[llvm] r216455 - Change the return value of "getEnd()" from a MachineInstr* to a MachineBasicBlock::iterator.

James Molloy james.molloy at arm.com
Tue Aug 26 06:41:31 PDT 2014


Author: jamesm
Date: Tue Aug 26 08:41:31 2014
New Revision: 216455

URL: http://llvm.org/viewvc/llvm-project?rev=216455&view=rev
Log:
Change the return value of "getEnd()" from a MachineInstr* to a MachineBasicBlock::iterator.

It seems on Darwin the illegal round-trip ::iterator -> MachineInstr* -> ::iterator breaks execution horribly when the iterator is not a real MachineInstr, like ::end().


Modified:
    llvm/trunk/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp

Modified: llvm/trunk/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp?rev=216455&r1=216454&r2=216455&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp Tue Aug 26 08:41:31 2014
@@ -234,7 +234,7 @@ public:
   MachineInstr *getKill() const { return KillInst; }
   /// Return an instruction that can be used as an iterator for the end
   /// of the chain. This is the maximum of KillInst (if set) and LastInst.
-  MachineInstr *getEnd() const {
+  MachineBasicBlock::iterator getEnd() const {
     return ++MachineBasicBlock::iterator(KillInst ? KillInst : LastInst);
   }
 





More information about the llvm-commits mailing list