16#ifndef LLVM_LIB_CODEGEN_AGGRESSIVEANTIDEPBREAKER_H
17#define LLVM_LIB_CODEGEN_AGGRESSIVEANTIDEPBREAKER_H
29class MachineBasicBlock;
33class MachineRegisterInfo;
34class RegisterClassInfo;
36class TargetRegisterClass;
37class TargetRegisterInfo;
53 const unsigned NumTargetRegs;
60 std::vector<unsigned> GroupNodes;
66 std::vector<unsigned> GroupNodeIndices;
69 std::multimap<unsigned, RegisterReference> RegRefs;
73 std::vector<unsigned> KillIndices;
77 std::vector<unsigned> DefIndices;
89 std::multimap<unsigned, RegisterReference>&
GetRegRefs() {
return RegRefs; }
93 unsigned GetGroup(
unsigned Reg);
99 std::vector<unsigned> &Regs,
100 std::multimap<
unsigned,
105 unsigned UnionGroups(
unsigned Reg1,
unsigned Reg2);
110 unsigned LeaveGroup(
unsigned Reg);
113 bool IsLive(
unsigned Reg);
145 unsigned BreakAntiDependencies(
const std::vector<SUnit> &SUnits,
148 unsigned InsertPosIndex,
154 unsigned InsertPosIndex)
override;
157 void FinishBlock()
override;
161 using RenameOrderType = std::map<const TargetRegisterClass *, unsigned>;
169 void GetPassthruRegs(
MachineInstr &
MI, std::set<unsigned> &PassthruRegs);
171 void HandleLastUse(
unsigned Reg,
unsigned KillIdx,
const char *tag,
172 const char *header =
nullptr,
173 const char *footer =
nullptr);
176 std::set<unsigned> &PassthruRegs);
179 bool FindSuitableFreeRegisters(
unsigned SuperReg,
180 unsigned AntiDepGroupIndex,
181 RenameOrderType &RenameOrder,
182 std::map<unsigned, unsigned> &RenameMap);
unsigned const MachineRegisterInfo * MRI
This file implements the BitVector class.
#define LLVM_LIBRARY_VISIBILITY
const HexagonInstrInfo * TII
unsigned const TargetRegisterInfo * TRI
AggressiveAntiDepBreaker & operator=(const AggressiveAntiDepBreaker &other)=delete
AggressiveAntiDepBreaker(const AggressiveAntiDepBreaker &other)=delete
Contains all the state necessary for anti-dep breaking.
std::vector< unsigned > & GetDefIndices()
Return the define indices.
std::multimap< unsigned, RegisterReference > & GetRegRefs()
Return the RegRefs map.
std::vector< unsigned > & GetKillIndices()
Return the kill indices.
This class works in conjunction with the post-RA scheduler to rename registers to break register anti...
std::vector< std::pair< MachineInstr *, MachineInstr * > > DbgValueVector
Representation of each machine instruction.
MachineOperand class - Representation of each machine instruction operand.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
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.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
This is an optimization pass for GlobalISel generic memory operations.
Information about a register reference within a liverange.
MachineOperand * Operand
The registers operand.
const TargetRegisterClass * RC
The register class.