diff options
author | Chris Lattner <sabre@nondot.org> | 2002-02-03 07:39:06 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-02-03 07:39:06 +0000 |
commit | b86d191dbe3bf3013f133a82c89cf0ae0fbf023b (patch) | |
tree | abe16244d950992789ca1bf70028ee2b305ec53b /llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp | |
parent | e59929f7b283d87dacc62bd473acdb79578de507 (diff) | |
download | bcm5719-llvm-b86d191dbe3bf3013f133a82c89cf0ae0fbf023b.tar.gz bcm5719-llvm-b86d191dbe3bf3013f133a82c89cf0ae0fbf023b.zip |
* Switch over to cleaner TmpInstruction model
llvm-svn: 1648
Diffstat (limited to 'llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp')
-rw-r--r-- | llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp b/llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp index 34dd83b49e0..ff655fc98da 100644 --- a/llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp +++ b/llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp @@ -14,12 +14,14 @@ #include "llvm/CodeGen/InstrSelectionSupport.h" #include "llvm/CodeGen/InstrSelection.h" #include "llvm/CodeGen/MachineInstr.h" +#include "llvm/CodeGen/MachineCodeForInstruction.h" +#include "llvm/CodeGen/MachineCodeForMethod.h" +#include "llvm/CodeGen/InstrForest.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/MachineRegInfo.h" #include "llvm/ConstantVals.h" #include "llvm/Method.h" #include "llvm/BasicBlock.h" -#include "llvm/Instruction.h" #include "llvm/Type.h" #include "llvm/iMemory.h" using std::vector; @@ -36,16 +38,16 @@ InsertCodeToLoadConstant(Value* opValue, vector<TmpInstruction*> tempVec; // Create a tmp virtual register to hold the constant. - TmpInstruction* tmpReg = - new TmpInstruction(TMP_INSTRUCTION_OPCODE, opValue, NULL); - vmInstr->getMachineInstrVec().addTempValue(tmpReg); + TmpInstruction* tmpReg = new TmpInstruction(opValue); + MachineCodeForInstruction &MCFI = MachineCodeForInstruction::get(vmInstr); + MCFI.addTemp(tmpReg); target.getInstrInfo().CreateCodeToLoadConst(opValue, tmpReg, loadConstVec, tempVec); // Register the new tmp values created for this m/c instruction sequence for (unsigned i=0; i < tempVec.size(); i++) - vmInstr->getMachineInstrVec().addTempValue(tempVec[i]); + MCFI.addTemp(tempVec[i]); // Record the mapping from the tmp VM instruction to machine instruction. // Do this for all machine instructions that were not mapped to any |