@@ -49,7 +49,7 @@ CriticalAntiDepBreaker::~CriticalAntiDepBreaker() = default;
49
49
50
50
void CriticalAntiDepBreaker::StartBlock (MachineBasicBlock *BB) {
51
51
const unsigned BBSize = BB->size ();
52
- for (unsigned i = 1 , e = TRI->getNumRegs (); i != e; ++i) {
52
+ for (unsigned i = 0 , e = TRI->getNumRegs (); i != e; ++i) {
53
53
// Clear out the register class data.
54
54
Classes[i] = nullptr ;
55
55
@@ -111,7 +111,7 @@ void CriticalAntiDepBreaker::Observe(MachineInstr &MI, unsigned Count,
111
111
return ;
112
112
assert (Count < InsertPosIndex && " Instruction index out of expected range!" );
113
113
114
- for (unsigned Reg = 1 ; Reg != TRI->getNumRegs (); ++Reg) {
114
+ for (unsigned Reg = 0 ; Reg != TRI->getNumRegs (); ++Reg) {
115
115
if (KillIndices[Reg] != ~0u ) {
116
116
// If Reg is currently live, then mark that it can't be renamed as
117
117
// we don't know the extent of its live-range anymore (now that it
@@ -265,7 +265,7 @@ void CriticalAntiDepBreaker::ScanInstruction(MachineInstr &MI, unsigned Count) {
265
265
[&](MCPhysReg SR) { return MO.clobbersPhysReg (SR); });
266
266
};
267
267
268
- for (unsigned i = 1 , e = TRI->getNumRegs (); i != e; ++i) {
268
+ for (unsigned i = 0 , e = TRI->getNumRegs (); i != e; ++i) {
269
269
if (ClobbersPhysRegAndSubRegs (i)) {
270
270
DefIndices[i] = Count;
271
271
KillIndices[i] = ~0u ;
@@ -463,7 +463,7 @@ BreakAntiDependencies(const std::vector<SUnit> &SUnits,
463
463
LLVM_DEBUG (dbgs () << " Critical path has total latency "
464
464
<< (Max->getDepth () + Max->Latency ) << " \n " );
465
465
LLVM_DEBUG (dbgs () << " Available regs:" );
466
- for (unsigned Reg = 1 ; Reg < TRI->getNumRegs (); ++Reg) {
466
+ for (unsigned Reg = 0 ; Reg < TRI->getNumRegs (); ++Reg) {
467
467
if (KillIndices[Reg] == ~0u )
468
468
LLVM_DEBUG (dbgs () << " " << printReg (Reg, TRI));
469
469
}
0 commit comments