16 #ifndef LLVM_CODEGEN_LIVESTACKANALYSIS_H
17 #define LLVM_CODEGEN_LIVESTACKANALYSIS_H
24 #include <unordered_map>
37 typedef std::unordered_map<int, LiveInterval> SS2IntervalMap;
38 SS2IntervalMap S2IMap;
41 std::map<int, const TargetRegisterClass*> S2RCMap;
61 assert(Slot >= 0 &&
"Spill slot indice must be >= 0");
62 SS2IntervalMap::iterator
I = S2IMap.find(Slot);
63 assert(I != S2IMap.end() &&
"Interval does not exist for stack slot");
68 assert(Slot >= 0 &&
"Spill slot indice must be >= 0");
69 SS2IntervalMap::const_iterator
I = S2IMap.find(Slot);
70 assert(I != S2IMap.end() &&
"Interval does not exist for stack slot");
75 return S2IMap.count(Slot);
79 assert(Slot >= 0 &&
"Spill slot indice must be >= 0");
80 std::map<int, const TargetRegisterClass*>::const_iterator
81 I = S2RCMap.find(Slot);
82 assert(I != S2RCMap.end() &&
83 "Register class info does not exist for stack slot");
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
const LiveInterval & getInterval(int Slot) const
A Module instance is used to store all the information related to an LLVM module. ...
LiveInterval - This class represents the liveness of a register, or stack slot.
LiveInterval & getInterval(int Slot)
VNInfo::Allocator & getVNInfoAllocator()
const_iterator end() const
This file defines the MallocAllocator and BumpPtrAllocator interfaces.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
const TargetRegisterClass * getIntervalRegClass(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...
SS2IntervalMap::const_iterator const_iterator
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...
bool hasInterval(int Slot) const
bool runOnMachineFunction(MachineFunction &) override
runOnMachineFunction - pass entry point
unsigned getNumIntervals() const
const_iterator begin() 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...
SS2IntervalMap::iterator iterator
void print(raw_ostream &O, const Module *=nullptr) const override
print - Implement the dump method.