16 #ifndef LLVM_CODEGEN_LIVESTACKS_H 17 #define LLVM_CODEGEN_LIVESTACKS_H 24 #include <unordered_map> 28 class TargetRegisterClass;
29 class TargetRegisterInfo;
39 using SS2IntervalMap = std::unordered_map<int, LiveInterval>;
40 SS2IntervalMap S2IMap;
43 std::map<int, const TargetRegisterClass *> S2RCMap;
65 assert(Slot >= 0 &&
"Spill slot indice must be >= 0");
66 SS2IntervalMap::iterator
I = S2IMap.find(Slot);
67 assert(I != S2IMap.end() &&
"Interval does not exist for stack slot");
72 assert(Slot >= 0 &&
"Spill slot indice must be >= 0");
73 SS2IntervalMap::const_iterator
I = S2IMap.find(Slot);
74 assert(I != S2IMap.end() &&
"Interval does not exist for stack slot");
78 bool hasInterval(
int Slot)
const {
return S2IMap.count(Slot); }
81 assert(Slot >= 0 &&
"Spill slot indice must be >= 0");
82 std::map<int, const TargetRegisterClass *>::const_iterator
I =
84 assert(I != S2RCMap.end() &&
85 "Register class info does not exist for stack slot");
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
This class represents lattice values for constants.
A Module instance is used to store all the information related to an LLVM module. ...
SS2IntervalMap::const_iterator const_iterator
LiveInterval - This class represents the liveness of a register, or stack slot.
LiveInterval & getInterval(int Slot)
VNInfo::Allocator & getVNInfoAllocator()
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
const LiveInterval & getInterval(int Slot) const
LiveInterval & getOrCreateInterval(int Slot, const TargetRegisterClass *RC)
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
const_iterator begin() const
Allocate memory in an ever growing pool, as if by bump-pointer.
void initializeLiveStacksPass(PassRegistry &)
Represent the analysis usage information of a pass.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
SS2IntervalMap::iterator iterator
bool runOnMachineFunction(MachineFunction &) override
runOnMachineFunction - pass entry point
unsigned getNumIntervals() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool hasInterval(int Slot) const
const TargetRegisterClass * getIntervalRegClass(int Slot) const
This class implements an extremely fast bulk output stream that can only output to a stream...
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
const_iterator end() const
void print(raw_ostream &O, const Module *=nullptr) const override
print - Implement the dump method.