17 #ifndef LLVM_LIB_CODEGEN_AGGRESSIVEANTIDEPBREAKER_H 18 #define LLVM_LIB_CODEGEN_AGGRESSIVEANTIDEPBREAKER_H 30 class MachineBasicBlock;
31 class MachineFunction;
34 class MachineRegisterInfo;
35 class RegisterClassInfo;
36 class TargetInstrInfo;
37 class TargetRegisterClass;
38 class TargetRegisterInfo;
54 const unsigned NumTargetRegs;
61 std::vector<unsigned> GroupNodes;
67 std::vector<unsigned> GroupNodeIndices;
70 std::multimap<unsigned, RegisterReference> RegRefs;
74 std::vector<unsigned> KillIndices;
78 std::vector<unsigned> DefIndices;
90 std::multimap<unsigned, RegisterReference>&
GetRegRefs() {
return RegRefs; }
94 unsigned GetGroup(
unsigned Reg);
100 std::vector<unsigned> &Regs,
101 std::multimap<
unsigned,
106 unsigned UnionGroups(
unsigned Reg1,
unsigned Reg2);
111 unsigned LeaveGroup(
unsigned Reg);
114 bool IsLive(
unsigned Reg);
143 unsigned BreakAntiDependencies(
const std::vector<SUnit> &SUnits,
146 unsigned InsertPosIndex,
152 unsigned InsertPosIndex)
override;
155 void FinishBlock()
override;
159 using RenameOrderType = std::map<const TargetRegisterClass *, unsigned>;
167 void GetPassthruRegs(
MachineInstr &MI, std::set<unsigned> &PassthruRegs);
169 void HandleLastUse(
unsigned Reg,
unsigned KillIdx,
const char *tag,
170 const char *header =
nullptr,
171 const char *footer =
nullptr);
173 void PrescanInstruction(
MachineInstr &MI,
unsigned Count,
174 std::set<unsigned> &PassthruRegs);
176 BitVector GetRenameRegisters(
unsigned Reg);
177 bool FindSuitableFreeRegisters(
unsigned AntiDepGroupIndex,
178 RenameOrderType& RenameOrder,
179 std::map<unsigned, unsigned> &RenameMap);
184 #endif // LLVM_LIB_CODEGEN_AGGRESSIVEANTIDEPBREAKER_H
Information about a register reference within a liverange.
This class represents lattice values for constants.
MachineOperand * Operand
The registers operand.
unsigned const TargetRegisterInfo * TRI
const HexagonInstrInfo * TII
This class works in conjunction with the post-RA scheduler to rename registers to break register anti...
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
TargetInstrInfo - Interface to description of machine instruction set.
std::vector< std::pair< MachineInstr *, MachineInstr * > > DbgValueVector
unsigned const MachineRegisterInfo * MRI
const TargetRegisterClass * RC
The register class.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
MachineOperand class - Representation of each machine instruction operand.
std::vector< unsigned > & GetDefIndices()
Return the define indices.
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
Representation of each machine instruction.
std::multimap< unsigned, RegisterReference > & GetRegRefs()
Return the RegRefs map.
#define LLVM_LIBRARY_VISIBILITY
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library...
Contains all the state necessary for anti-dep breaking.
std::vector< unsigned > & GetKillIndices()
Return the kill indices.