diff options
Diffstat (limited to 'lib/Target/SparcV9')
-rw-r--r-- | lib/Target/SparcV9/InstrSelection/InstrSelection.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp b/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp index d30881f..6cce02f 100644 --- a/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp +++ b/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp @@ -84,6 +84,17 @@ namespace { }; } +TmpInstruction::TmpInstruction(Value *s1, Value *s2, const std::string &name) + : Instruction(s1->getType(), Instruction::UserOp1, name) +{ + Operands.push_back(Use(s1, this)); // s1 must be non-null + if (s2) + Operands.push_back(Use(s2, this)); + + // TmpInstructions should not be garbage checked. + LeakDetector::removeGarbageObject(this); +} + TmpInstruction::TmpInstruction(MachineCodeForInstruction& mcfi, Value *s1, Value *s2, const std::string &name) : Instruction(s1->getType(), Instruction::UserOp1, name) @@ -97,9 +108,9 @@ TmpInstruction::TmpInstruction(MachineCodeForInstruction& mcfi, // TmpInstructions should not be garbage checked. LeakDetector::removeGarbageObject(this); } - + // Constructor that requires the type of the temporary to be specified. -// Both S1 and S2 may be NULL.( +// Both S1 and S2 may be NULL. TmpInstruction::TmpInstruction(MachineCodeForInstruction& mcfi, const Type *Ty, Value *s1, Value* s2, const std::string &name) |