[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp SelectionDAGISel.cpp

Evan Cheng evan.cheng at apple.com
Mon Nov 27 15:36:25 PST 2006



Changes in directory llvm/lib/CodeGen/SelectionDAG:

ScheduleDAG.cpp updated: 1.109 -> 1.110
SelectionDAGISel.cpp updated: 1.320 -> 1.321
---
Log message:

Change MachineInstr ctor's to take a TargetInstrDescriptor reference instead
of opcode and number of operands.

---
Diffs of the changes:  (+4 -3)

 ScheduleDAG.cpp      |    4 ++--
 SelectionDAGISel.cpp |    3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.109 llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.110
--- llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.109	Mon Nov 13 17:35:00 2006
+++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp	Mon Nov 27 17:36:08 2006
@@ -395,7 +395,7 @@
 #endif
 
     // Create the new machine instruction.
-    MachineInstr *MI = new MachineInstr(*TII, Opc, NumMIOperands);
+    MachineInstr *MI = new MachineInstr(II);
     
     // Add result register values for things that are defined by this
     // instruction.
@@ -518,7 +518,7 @@
       
       // Create the inline asm machine instruction.
       MachineInstr *MI =
-        new MachineInstr(BB, TargetInstrInfo::INLINEASM, (NumOps-2)/2+1);
+        new MachineInstr(BB, TII->get(TargetInstrInfo::INLINEASM));
 
       // Add the asm string as an external symbol operand.
       const char *AsmStr =


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.320 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.321
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.320	Sun Nov 26 19:05:09 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp	Mon Nov 27 17:36:08 2006
@@ -294,8 +294,9 @@
       }
       unsigned PHIReg = ValueMap[PN];
       assert(PHIReg && "PHI node does not have an assigned virtual register!");
+      const TargetInstrInfo *TII = TLI.getTargetMachine().getInstrInfo();
       for (unsigned i = 0; i != NumElements; ++i)
-        BuildMI(MBB, TargetInstrInfo::PHI, PN->getNumOperands(), PHIReg+i);
+        BuildMI(MBB, TII->get(TargetInstrInfo::PHI), PHIReg+i);
     }
   }
 }






More information about the llvm-commits mailing list