15 #ifndef LLVM_LIB_CODEGEN_ANTIDEPBREAKER_H
16 #define LLVM_LIB_CODEGEN_ANTIDEPBREAKER_H
32 typedef std::vector<std::pair<MachineInstr *, MachineInstr *> >
42 virtual unsigned BreakAntiDependencies(
const std::vector<SUnit>& SUnits,
45 unsigned InsertPosIndex,
51 unsigned InsertPosIndex) = 0;
54 virtual void FinishBlock() =0;
67 unsigned OldReg,
unsigned NewReg) {
71 for (
const auto &DV :
make_range(DbgValues.crbegin(), DbgValues.crend())) {
73 if ((PrevMI == ParentMI) || (PrevMI == PrevDbgMI)) {
75 UpdateDbgValue(*DbgMI, OldReg, NewReg);
77 }
else if (PrevDbgMI) {
This class works in conjunction with the post-RA scheduler to rename registers to break register anti...
bool isReg() const
isReg - Tests if this is a MO_Register operand.
bool isDebugValue() const
const MachineOperand & getOperand(unsigned i) const
static const unsigned End
#define LLVM_LIBRARY_VISIBILITY
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library...
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
void UpdateDbgValue(MachineInstr &MI, unsigned OldReg, unsigned NewReg)
Update DBG_VALUE if dependency breaker is updating other machine instruction to use NewReg...
Representation of each machine instruction.
void setReg(unsigned Reg)
Change the register this operand corresponds to.
unsigned getReg() const
getReg - Returns the register number.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void UpdateDbgValues(const DbgValueVector &DbgValues, MachineInstr *ParentMI, unsigned OldReg, unsigned NewReg)
Update all DBG_VALUE instructions that may be affected by the dependency breaker's update of ParentMI...
std::vector< std::pair< MachineInstr *, MachineInstr * > > DbgValueVector