16#ifndef LLVM_LIB_CODEGEN_AGGRESSIVEANTIDEPBREAKER_H
17#define LLVM_LIB_CODEGEN_AGGRESSIVEANTIDEPBREAKER_H
53 const unsigned NumTargetRegs;
60 std::vector<unsigned> GroupNodes;
66 std::vector<unsigned> GroupNodeIndices;
69 std::multimap<MCRegister, RegisterReference> RegRefs;
73 std::vector<unsigned> KillIndices;
77 std::vector<unsigned> DefIndices;
89 std::multimap<MCRegister, RegisterReference> &
GetRegRefs() {
100 unsigned Group, std::vector<MCRegister> &Regs,
101 std::multimap<MCRegister, AggressiveAntiDepState::RegisterReference>
149 unsigned InsertPosIndex,
155 unsigned InsertPosIndex)
override;
162 using RenameOrderType = std::map<const TargetRegisterClass *, unsigned>;
170 void GetPassthruRegs(
MachineInstr &
MI, std::set<MCRegister> &PassthruRegs);
172 void HandleLastUse(
MCRegister Reg,
unsigned KillIdx,
const char *tag,
173 const char *header =
nullptr,
174 const char *footer =
nullptr);
177 const std::set<MCRegister> &PassthruRegs);
180 bool FindSuitableFreeRegisters(
MCRegister SuperReg,
181 unsigned AntiDepGroupIndex,
182 RenameOrderType &RenameOrder,
183 std::map<MCRegister, MCRegister> &RenameMap);
This file implements the BitVector class.
#define LLVM_LIBRARY_VISIBILITY
void Observe(MachineInstr &MI, unsigned Count, unsigned InsertPosIndex) override
Update liveness information to account for the current instruction, which will not be scheduled.
AggressiveAntiDepBreaker & operator=(const AggressiveAntiDepBreaker &other)=delete
AggressiveAntiDepBreaker(const AggressiveAntiDepBreaker &other)=delete
void FinishBlock() override
Finish anti-dep breaking for a basic block.
unsigned BreakAntiDependencies(const std::vector< SUnit > &SUnits, MachineBasicBlock::iterator Begin, MachineBasicBlock::iterator End, unsigned InsertPosIndex, DbgValueVector &DbgValues) override
Identifiy anti-dependencies along the critical path of the ScheduleDAG and break them by renaming reg...
void StartBlock(MachineBasicBlock *BB) override
Initialize anti-dep breaking for a new basic block.
AggressiveAntiDepBreaker(MachineFunction &MFi, const RegisterClassInfo &RCI, TargetSubtargetInfo::RegClassVector &CriticalPathRCs)
Contains all the state necessary for anti-dep breaking.
AggressiveAntiDepState(const unsigned TargetRegs, MachineBasicBlock *BB)
std::vector< unsigned > & GetDefIndices()
Return the define indices.
std::vector< unsigned > & GetKillIndices()
Return the kill indices.
std::multimap< MCRegister, RegisterReference > & GetRegRefs()
Return the RegRefs map.
This class works in conjunction with the post-RA scheduler to rename registers to break register anti...
std::vector< std::pair< MachineInstr *, MachineInstr * > > DbgValueVector
Wrapper class representing physical registers. Should be passed by value.
MachineInstrBundleIterator< MachineInstr > iterator
Representation of each machine instruction.
MachineOperand class - Representation of each machine instruction operand.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
TargetInstrInfo - Interface to description of machine instruction set.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
SmallVectorImpl< const TargetRegisterClass * > RegClassVector
This is an optimization pass for GlobalISel generic memory operations.
FunctionAddr VTableAddr Count
Information about a register reference within a liverange.
MachineOperand * Operand
The registers operand.
const TargetRegisterClass * RC
The register class.