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