Skip to content

Commit

Permalink
Revert r203883 (which was more of a bandaid) and fix the real underlying
Browse files Browse the repository at this point in the history
issue in that the new MachineRegisterInfo bundle iterators didn't
dereference to the START of the bundle, while the old skipBundle()
method did.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203890 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
resistor committed Mar 14, 2014
1 parent beaa95d commit b6f478a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions include/llvm/CodeGen/MachineRegisterInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -856,11 +856,13 @@ class MachineRegisterInfo {
// Retrieve a reference to the current operand.
MachineInstr &operator*() const {
assert(Op && "Cannot dereference end iterator!");
if (ByBundle) return *(getBundleStart(Op->getParent()));
return *Op->getParent();
}

MachineInstr *operator->() const {
assert(Op && "Cannot dereference end iterator!");
if (ByBundle) return getBundleStart(Op->getParent());
return Op->getParent();
}
};
Expand Down
2 changes: 1 addition & 1 deletion lib/CodeGen/InlineSpiller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,7 @@ void InlineSpiller::spillAroundUses(unsigned Reg) {
for (MachineRegisterInfo::reg_bundle_iterator
RegI = MRI.reg_bundle_begin(Reg), E = MRI.reg_bundle_end();
RegI != E; ) {
MachineInstr *MI = getBundleStart(&*(RegI++));
MachineInstr *MI = &*(RegI++);

// Debug values are not allowed to affect codegen.
if (MI->isDebugValue()) {
Expand Down

0 comments on commit b6f478a

Please sign in to comment.