15 #ifndef LLVM_LIB_CODEGEN_ANTIDEPBREAKER_H 16 #define LLVM_LIB_CODEGEN_ANTIDEPBREAKER_H 35 std::vector<std::pair<MachineInstr *, MachineInstr *>>;
44 virtual unsigned BreakAntiDependencies(
const std::vector<SUnit> &SUnits,
47 unsigned InsertPosIndex,
53 unsigned InsertPosIndex) = 0;
56 virtual void FinishBlock() = 0;
69 unsigned OldReg,
unsigned NewReg) {
73 for (
const auto &DV :
make_range(DbgValues.crbegin(), DbgValues.crend())) {
75 if ((PrevMI == ParentMI) || (PrevMI == PrevDbgMI)) {
77 UpdateDbgValue(*DbgMI, OldReg, NewReg);
79 }
else if (PrevDbgMI) {
88 #endif // LLVM_LIB_CODEGEN_ANTIDEPBREAKER_H #define LLVM_LIBRARY_VISIBILITY
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library...
Compute iterated dominance frontiers using a linear time algorithm.
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
unsigned getReg() const
getReg - Returns the register number.
This class works in conjunction with the post-RA scheduler to rename registers to break register anti...
std::vector< std::pair< MachineInstr *, MachineInstr * > > DbgValueVector
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
bool isDebugValue() const
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.
bool isReg() const
isReg - Tests if this is a MO_Register operand.
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...
const MachineOperand & getOperand(unsigned i) const