1 //===- SparcV9TmpInstr.cpp - SparcV9 Intermediate Value class -------------===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // Methods of class for temporary intermediate values used within the current
13 //===----------------------------------------------------------------------===//
15 #include "SparcV9TmpInstr.h"
16 #include "Support/LeakDetector.h"
20 TmpInstruction::TmpInstruction(Value *s1, Value *s2, const std::string &name)
21 : Instruction(s1->getType(), Instruction::UserOp1, name) {
22 Operands.push_back(Use(s1, this)); // s1 must be non-null
24 Operands.push_back(Use(s2, this));
26 // TmpInstructions should not be garbage checked.
27 LeakDetector::removeGarbageObject(this);
30 TmpInstruction::TmpInstruction(MachineCodeForInstruction& mcfi,
31 Value *s1, Value *s2, const std::string &name)
32 : Instruction(s1->getType(), Instruction::UserOp1, name) {
35 Operands.push_back(Use(s1, this)); // s1 must be non-null
37 Operands.push_back(Use(s2, this));
39 // TmpInstructions should not be garbage checked.
40 LeakDetector::removeGarbageObject(this);
43 // Constructor that requires the type of the temporary to be specified.
44 // Both S1 and S2 may be NULL.
45 TmpInstruction::TmpInstruction(MachineCodeForInstruction& mcfi,
46 const Type *Ty, Value *s1, Value* s2,
47 const std::string &name)
48 : Instruction(Ty, Instruction::UserOp1, name) {
52 Operands.push_back(Use(s1, this));
54 Operands.push_back(Use(s2, this));
56 // TmpInstructions should not be garbage checked.
57 LeakDetector::removeGarbageObject(this);
60 } // end namespace llvm