mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Add a TmpInstruction ctor that doesn't take a MCFI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14073 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
10c508b286
commit
777a1cde66
@ -75,7 +75,12 @@ public:
|
|||||||
// s1 must be a valid value. s2 may be NULL.
|
// s1 must be a valid value. s2 may be NULL.
|
||||||
TmpInstruction(MachineCodeForInstruction& mcfi,
|
TmpInstruction(MachineCodeForInstruction& mcfi,
|
||||||
Value *s1, Value *s2 = 0, const std::string &name = "");
|
Value *s1, Value *s2 = 0, const std::string &name = "");
|
||||||
|
|
||||||
|
// Constructor that uses the type of S1 as the type of the temporary,
|
||||||
|
// but does not require a MachineCodeForInstruction.
|
||||||
|
// s1 must be a valid value. s2 may be NULL.
|
||||||
|
TmpInstruction(Value *s1, Value *s2 = 0, const std::string &name = "");
|
||||||
|
|
||||||
// Constructor that requires the type of the temporary to be specified.
|
// 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(MachineCodeForInstruction& mcfi,
|
TmpInstruction(MachineCodeForInstruction& mcfi,
|
||||||
|
@ -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,
|
TmpInstruction::TmpInstruction(MachineCodeForInstruction& mcfi,
|
||||||
Value *s1, Value *s2, const std::string &name)
|
Value *s1, Value *s2, const std::string &name)
|
||||||
: Instruction(s1->getType(), Instruction::UserOp1, name)
|
: Instruction(s1->getType(), Instruction::UserOp1, name)
|
||||||
@ -97,9 +108,9 @@ TmpInstruction::TmpInstruction(MachineCodeForInstruction& mcfi,
|
|||||||
// TmpInstructions should not be garbage checked.
|
// TmpInstructions should not be garbage checked.
|
||||||
LeakDetector::removeGarbageObject(this);
|
LeakDetector::removeGarbageObject(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Constructor that requires the type of the temporary to be specified.
|
// 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,
|
TmpInstruction::TmpInstruction(MachineCodeForInstruction& mcfi,
|
||||||
const Type *Ty, Value *s1, Value* s2,
|
const Type *Ty, Value *s1, Value* s2,
|
||||||
const std::string &name)
|
const std::string &name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user