diff options
author | Owen Anderson <resistor@mac.com> | 2014-03-14 05:02:18 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2014-03-14 05:02:18 +0000 |
commit | b6f478aa66b60e3ab1efd33a7a55d0549d94ab44 (patch) | |
tree | d16d8839b107f68c881d70314544135632b223a0 /include/llvm/CodeGen | |
parent | beaa95d97f319dc9b93b89850ab2ed9790182166 (diff) | |
download | llvm-b6f478aa66b60e3ab1efd33a7a55d0549d94ab44.tar.gz llvm-b6f478aa66b60e3ab1efd33a7a55d0549d94ab44.tar.bz2 llvm-b6f478aa66b60e3ab1efd33a7a55d0549d94ab44.tar.xz |
Revert r203883 (which was more of a bandaid) and fix the real underlying
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
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/MachineRegisterInfo.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineRegisterInfo.h b/include/llvm/CodeGen/MachineRegisterInfo.h index dd9e2803bd..9a49b19316 100644 --- a/include/llvm/CodeGen/MachineRegisterInfo.h +++ b/include/llvm/CodeGen/MachineRegisterInfo.h @@ -856,11 +856,13 @@ public: // 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(); } }; |