15 #ifndef LLVM_LIB_CODEGEN_SPLITKIT_H 16 #define LLVM_LIB_CODEGEN_SPLITKIT_H 40 class MachineBlockFrequencyInfo;
41 class MachineDominatorTree;
42 class MachineLoopInfo;
43 class MachineRegisterInfo;
44 class TargetInstrInfo;
45 class TargetRegisterInfo;
71 if (LastInsertPoint[Num].
first.isValid() &&
72 !LastInsertPoint[Num].second.isValid())
73 return LastInsertPoint[Num].
first;
74 return computeLastInsertPoint(CurLI, MBB);
151 unsigned NumGapBlocks;
157 unsigned NumThroughBlocks;
166 bool calcLiveBlockInfo();
193 bool isOriginalEndpoint(
SlotIndex Idx)
const;
214 return getUseBlocks().size() - NumGapBlocks + getNumThroughBlocks();
232 bool shouldSplitSingleBlock(
const BlockInfo &BI,
bool SingleInstrs)
const;
303 unsigned OpenIdx = 0;
345 return LRCalc[SpillMode != SM_Partition && RegIdx != 0];
377 void forceRecompute(
unsigned RegIdx,
const VNInfo &ParentVNI);
381 void forceRecomputeVNI(
const VNInfo &ParentVNI);
385 VNInfo *defFromParent(
unsigned RegIdx,
411 bool transferValues();
424 void extendPHIKillRanges();
427 void rewriteAssigned(
bool ExtendRanges);
430 void deleteRematVictims();
437 bool Late,
unsigned RegIdx);
439 SlotIndex buildSingleSubRegCopy(
unsigned FromReg,
unsigned ToReg,
462 void selectIntv(
unsigned Idx);
535 void splitLiveThroughBlock(
unsigned MBBNum,
565 #endif // LLVM_LIB_CODEGEN_SPLITKIT_H
A common definition of LaneBitmask for use in TableGen and CodeGen.
This class represents lattice values for constants.
SlotIndex getLastSplitPoint(unsigned Num)
LiveInterval - This class represents the liveness of a register, or stack slot.
bool test(unsigned Idx) const
SlotIndex FirstDef
First non-phi valno->def, or SlotIndex().
MachineBlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate machine basic b...
const MachineLoopInfo & Loops
ComplementSpillMode
ComplementSpillMode - Select how the complement live range should be created.
SlotIndex getFirstInsertPoint(MachineBasicBlock &MBB)
Return the base index of the first insert point in .
A live range for subregisters.
unsigned const TargetRegisterInfo * TRI
VNInfo - Value Number Information.
Determines the latest safe point in a block in which we can insert a split, spill or other instructio...
SlotIndex getFirstSplitPoint(unsigned Num)
This class represents the liveness of a register, stack slot, etc.
unsigned getNumLiveBlocks() const
getNumLiveBlocks - Return the number of blocks where CurLI is live.
ArrayRef< SlotIndex > getUseSlots() const
getUseSlots - Return an array of SlotIndexes of instructions using CurLI.
const BitVector & getThroughBlocks() const
getThroughBlocks - Return the set of through blocks.
const HexagonInstrInfo * TII
const TargetInstrInfo & TII
SlotIndex getLastInsertPoint(const LiveInterval &CurLI, const MachineBasicBlock &MBB)
Return the base index of the last valid insert point for in .
SplitEditor - Edit machine code and LiveIntervals for live range splitting.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
const LiveIntervals & LIS
int getNumber() const
MachineBasicBlocks are uniquely numbered at the function level, unless they're not in a MachineFuncti...
SlotIndex LastInstr
Last instr accessing current reg.
MachineBasicBlock::iterator getLastInsertPointIter(const LiveInterval &CurLI, MachineBasicBlock &MBB)
Returns the last insert point as an iterator for in .
TargetInstrInfo - Interface to description of machine instruction set.
const LiveInterval & getParent() const
getParent - Return the last analyzed interval.
MachineBasicBlock * getBlockNumbered(unsigned N) const
getBlockNumbered - MachineBasicBlocks are automatically numbered when they are inserted into the mach...
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
unsigned const MachineRegisterInfo * MRI
PointerIntPair - This class implements a pair of a pointer and small integer.
typename Sizer::Allocator Allocator
SM_Partition(Default) - Try to create the complement interval so it doesn't overlap any other interva...
SM_Size - Overlap intervals to minimize the number of inserted COPY instructions. ...
unsigned currentIntv() const
currentIntv - Return the current interval index.
SlotIndex getMBBStartIdx(const MachineBasicBlock *mbb) const
Return the first index in the given basic block.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
MachineBasicBlock::iterator getLastSplitPointIter(MachineBasicBlock *BB)
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements...
static bool isSameInstr(SlotIndex A, SlotIndex B)
isSameInstr - Return true if A and B refer to the same instruction.
const MachineFunction & MF
SlotIndex FirstInstr
First instr accessing current reg.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Additional information about basic blocks where the current variable is live.
SplitAnalysis - Analyze a LiveInterval, looking for live range splitting opportunities.
bool LiveOut
Current reg is live out.
static void clear(coro::Shape &Shape)
SlotIndex getInstructionIndex(const MachineInstr &Instr) const
Returns the base index of the given instruction.
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
#define LLVM_LIBRARY_VISIBILITY
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library...
bool didRepairRange() const
didRepairRange() - Returns true if CurLI was invalid and has been repaired by analyze().
ArrayRef< BlockInfo > getUseBlocks() const
getUseBlocks - Return an array of BlockInfo objects for the basic blocks where CurLI has uses...
bool isThroughBlock(unsigned MBB) const
isThroughBlock - Return true if CurLI is live through MBB without uses.
bool isOneInstr() const
isOneInstr - Returns true when this BlockInfo describes a single instruction.
unsigned getNumThroughBlocks() const
getNumThroughBlocks - Return the number of through blocks.
iterator SkipPHIsLabelsAndDebug(iterator I)
Return the first instruction in MBB after I that is not a PHI, label or debug.
bool LiveIn
Current reg is live in.
SlotIndex - An opaque wrapper around machine indexes.
DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...