Make load->store deletion a bit smarter. This allows us to compile this:
[oota-llvm.git] / lib / CodeGen / MachineBasicBlock.cpp
index d2dcd382ed6b48efc662bb5d212c9f39a46f20b3..aba3f87ea9d6e173a10c93a3feb57273c49f2c37 100644 (file)
@@ -16,7 +16,7 @@
 #include "llvm/CodeGen/MachineFunction.h"
 #include "llvm/Target/MRegisterInfo.h"
 #include "llvm/Target/TargetData.h"
-#include "llvm/Target/TargetInstrInfo.h"
+#include "llvm/Target/TargetInstrDesc.h"
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Support/LeakDetector.h"
 #include <algorithm>
@@ -132,9 +132,9 @@ void ilist_traits<MachineInstr>::transferNodesFromList(
 
 MachineBasicBlock::iterator MachineBasicBlock::getFirstTerminator() {
   iterator I = end();
-  while (I != begin() && (--I)->getDesc()->isTerminator())
+  while (I != begin() && (--I)->getDesc().isTerminator())
     ; /*noop */
-  if (I != end() && !I->getDesc()->isTerminator()) ++I;
+  if (I != end() && !I->getDesc().isTerminator()) ++I;
   return I;
 }
 
@@ -261,7 +261,7 @@ void MachineBasicBlock::ReplaceUsesOfBlockWith(MachineBasicBlock *Old,
   MachineBasicBlock::iterator I = end();
   while (I != begin()) {
     --I;
-    if (!I->getDesc()->isTerminator()) break;
+    if (!I->getDesc().isTerminator()) break;
 
     // Scan the operands of this machine instruction, replacing any uses of Old
     // with New.