add bundling! well not really, for now it's just stop-insertion.
[oota-llvm.git] / lib / Target / IA64 / IA64TargetMachine.cpp
index f0c429adea1863518e63e9dacd827eadf48a15d3..79377c577f9daddd4a234444681b0162eee7ff97 100644 (file)
@@ -23,6 +23,7 @@
 #include "llvm/Transforms/Scalar.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/ADT/Statistic.h"
+#include <iostream>
 using namespace llvm;
 
 /// IA64TargetMachineModule - Note that this is used on hosts that cannot link
@@ -103,10 +104,8 @@ bool IA64TargetMachine::addPassesToEmitFile(PassManager &PM,
   PM.add(createUnreachableBlockEliminationPass());
 
   // Add an instruction selector
-  if(EnableDAGIsel)
-    PM.add(createIA64DAGToDAGInstructionSelector(*this));
-  else
-    PM.add(createIA64PatternInstructionSelector(*this));
+// FIXME: reap this option one day:  if(EnableDAGIsel)
+  PM.add(createIA64DAGToDAGInstructionSelector(*this));
   
 /* XXX not yet. ;)
   // Run optional SSA-based machine code optimizations next...
@@ -133,6 +132,9 @@ bool IA64TargetMachine::addPassesToEmitFile(PassManager &PM,
 /* XXX no, not just yet */
 //  PM.add(createIA64PeepholeOptimizerPass());
 
+  // Make sure everything is bundled happily
+  PM.add(createIA64BundlingPass(*this));
+
   if (PrintMachineCode)  // Print the register-allocated code
     PM.add(createIA64CodePrinterPass(std::cerr, *this));