27 #ifndef LLVM_LIB_CODEGEN_SPILLPLACEMENT_H
28 #define LLVM_LIB_CODEGEN_SPILLPLACEMENT_H
39 class MachineBasicBlock;
40 class MachineLoopInfo;
41 class MachineBlockFrequencyInfo;
150 return BlockFrequencies[Number];
156 void releaseMemory()
override;
158 void activate(
unsigned);
BlockFrequency getBlockFrequency(unsigned Number) const
getBlockFrequency - Return the estimated block execution frequency per function invocation.
A register is impossible, variable must be spilled.
~SpillPlacement() override
MachineBlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate machine basic b...
void addPrefSpill(ArrayRef< unsigned > Blocks, bool Strong)
addPrefSpill - Add PrefSpill constraints to all blocks listed.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
bool scanActiveBundles()
scanActiveBundles - Perform an initial scan of all bundles activated by addConstraints and addLinks...
ArrayRef< unsigned > getRecentPositive()
getRecentPositive - Return an array of bundles that became positive during the previous call to scanA...
void iterate()
iterate - Update the network iteratively until convergence, or new bundles are found.
BorderConstraint Exit
Constraint on block exit.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
BlockConstraint - Entry and exit constraints for a basic block.
void addLinks(ArrayRef< unsigned > Links)
addLinks - Add transparent blocks with the given numbers.
Block doesn't care / variable not live.
Represent the analysis usage information of a pass.
unsigned Number
Basic block number (from MBB::getNumber()).
BorderConstraint Entry
Constraint on block entry.
bool finish()
finish - Compute the optimal spill code placement given the constraints.
Block entry/exit prefers a register.
void addConstraints(ArrayRef< BlockConstraint > LiveBlocks)
addConstraints - Add constraints and biases.
Block entry/exit prefers a stack slot.
Block entry prefers both register and stack.
void prepare(BitVector &RegBundles)
prepare - Reset state and prepare for a new spill placement computation.
Node - Each edge bundle corresponds to a Hopfield node.
BorderConstraint
BorderConstraint - A basic block has separate constraints for entry and exit.
static int const Threshold
TODO: Write a new FunctionPass AliasAnalysis so that it can keep a cache.
bool ChangesValue
True when this block changes the value of the live range.