17 #ifndef LLVM_CODEGEN_AGGRESSIVEANTIDEPBREAKER_H
18 #define LLVM_CODEGEN_AGGRESSIVEANTIDEPBREAKER_H
33 class RegisterClassInfo;
51 const unsigned NumTargetRegs;
58 std::vector<unsigned> GroupNodes;
64 std::vector<unsigned> GroupNodeIndices;
67 std::multimap<unsigned, RegisterReference> RegRefs;
71 std::vector<unsigned> KillIndices;
75 std::vector<unsigned> DefIndices;
87 std::multimap<unsigned, RegisterReference>&
GetRegRefs() {
return RegRefs; }
97 std::vector<unsigned> &Regs,
98 std::multimap<
unsigned,
104 unsigned UnionGroups(
unsigned Reg1,
unsigned Reg2);
148 unsigned InsertPosIndex,
161 typedef std::map<const TargetRegisterClass *, unsigned> RenameOrderType;
169 void GetPassthruRegs(
MachineInstr *MI, std::set<unsigned>& PassthruRegs);
171 void HandleLastUse(
unsigned Reg,
unsigned KillIdx,
const char *tag,
172 const char *header =NULL,
const char *footer =NULL);
174 void PrescanInstruction(
MachineInstr *MI,
unsigned Count,
175 std::set<unsigned>& PassthruRegs);
177 BitVector GetRenameRegisters(
unsigned Reg);
178 bool FindSuitableFreeRegisters(
unsigned AntiDepGroupIndex,
179 RenameOrderType& RenameOrder,
180 std::map<unsigned, unsigned> &RenameMap);
MachineOperand * Operand
Operand - The registers operand.
AggressiveAntiDepState(const unsigned TargetRegs, MachineBasicBlock *BB)
unsigned LeaveGroup(unsigned Reg)
~AggressiveAntiDepBreaker()
AggressiveAntiDepBreaker(MachineFunction &MFi, const RegisterClassInfo &RCI, TargetSubtargetInfo::RegClassVector &CriticalPathRCs)
unsigned GetGroup(unsigned Reg)
void GetGroupRegs(unsigned Group, std::vector< unsigned > &Regs, std::multimap< unsigned, AggressiveAntiDepState::RegisterReference > *RegRefs)
unsigned UnionGroups(unsigned Reg1, unsigned Reg2)
void Observe(MachineInstr *MI, unsigned Count, unsigned InsertPosIndex)
bundle_iterator< MachineInstr, instr_iterator > iterator
unsigned BreakAntiDependencies(const std::vector< SUnit > &SUnits, MachineBasicBlock::iterator Begin, MachineBasicBlock::iterator End, unsigned InsertPosIndex, DbgValueVector &DbgValues)
void StartBlock(MachineBasicBlock *BB)
Start - Initialize anti-dep breaking for a new basic block.
const TargetRegisterClass * RC
RC - The register class.
std::vector< unsigned > & GetDefIndices()
GetDefIndices - Return the define indices.
Class AggressiveAntiDepBreaker.
std::multimap< unsigned, RegisterReference > & GetRegRefs()
GetRegRefs - Return the RegRefs map.
std::vector< std::pair< MachineInstr *, MachineInstr * > > DbgValueVector
void FinishBlock()
Finish - Finish anti-dep breaking for a basic block.
bool IsLive(unsigned Reg)
IsLive - Return true if Reg is live.
std::vector< unsigned > & GetKillIndices()
GetKillIndices - Return the kill indices.