summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2005-06-18 18:31:30 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2005-06-18 18:31:30 +0000
commitf5428213853bae45247fe6da711ff20954d73dbd (patch)
tree5747110c1c0c85ff2590290fc8db0cb8d2d3e187
parentcc494e8312c8e654be348d0f1dc0b0d73b87cb49 (diff)
downloadexternal_llvm-f5428213853bae45247fe6da711ff20954d73dbd.zip
external_llvm-f5428213853bae45247fe6da711ff20954d73dbd.tar.gz
external_llvm-f5428213853bae45247fe6da711ff20954d73dbd.tar.bz2
header file changes for varargs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22253 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Instruction.def7
-rw-r--r--include/llvm/Instructions.h45
-rw-r--r--include/llvm/Support/InstVisitor.h1
-rw-r--r--include/llvm/Target/TargetLowering.h11
4 files changed, 10 insertions, 54 deletions
diff --git a/include/llvm/Instruction.def b/include/llvm/Instruction.def
index 63af10b..08806b4 100644
--- a/include/llvm/Instruction.def
+++ b/include/llvm/Instruction.def
@@ -128,13 +128,14 @@ HANDLE_OTHER_INST(29, Call , CallInst ) // Call a function
HANDLE_OTHER_INST(30, Shl , ShiftInst ) // Shift operations
HANDLE_OTHER_INST(31, Shr , ShiftInst )
-HANDLE_OTHER_INST(32, VANext , VANextInst ) // vanext instruction
-HANDLE_OTHER_INST(33, VAArg , VAArgInst ) // vaarg instruction
+ //HANDLE_OTHER_INST(32, VANext , VANextInst ) // vanext instruction
+ //HANDLE_OTHER_INST(33, VAArg , VAArgInst ) // vaarg instruction
HANDLE_OTHER_INST(34, Select , SelectInst ) // select instruction
HANDLE_OTHER_INST(35, UserOp1, Instruction) // May be used internally in a pass
HANDLE_OTHER_INST(36, UserOp2, Instruction)
- LAST_OTHER_INST(36)
+HANDLE_OTHER_INST(37, VAArg , VAArgInst ) // vaarg instruction
+ LAST_OTHER_INST(37)
#undef FIRST_TERM_INST
#undef HANDLE_TERM_INST
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index 904ca8f..53cfe6a 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -660,55 +660,12 @@ public:
}
};
-
-//===----------------------------------------------------------------------===//
-// VANextInst Class
-//===----------------------------------------------------------------------===//
-
-/// VANextInst - This class represents the va_next llvm instruction, which
-/// advances a vararg list passed an argument of the specified type, returning
-/// the resultant list.
-///
-class VANextInst : public UnaryInstruction {
- PATypeHolder ArgTy;
- VANextInst(const VANextInst &VAN)
- : UnaryInstruction(VAN.getType(), VANext, VAN.getOperand(0)),
- ArgTy(VAN.getArgType()) {
- }
-
-public:
- VANextInst(Value *List, const Type *Ty, const std::string &Name = "",
- Instruction *InsertBefore = 0)
- : UnaryInstruction(List->getType(), VANext, List, Name, InsertBefore),
- ArgTy(Ty) {
- }
- VANextInst(Value *List, const Type *Ty, const std::string &Name,
- BasicBlock *InsertAtEnd)
- : UnaryInstruction(List->getType(), VANext, List, Name, InsertAtEnd),
- ArgTy(Ty) {
- }
-
- const Type *getArgType() const { return ArgTy; }
-
- virtual VANextInst *clone() const;
-
- // Methods for support type inquiry through isa, cast, and dyn_cast:
- static inline bool classof(const VANextInst *) { return true; }
- static inline bool classof(const Instruction *I) {
- return I->getOpcode() == VANext;
- }
- static inline bool classof(const Value *V) {
- return isa<Instruction>(V) && classof(cast<Instruction>(V));
- }
-};
-
-
//===----------------------------------------------------------------------===//
// VAArgInst Class
//===----------------------------------------------------------------------===//
/// VAArgInst - This class represents the va_arg llvm instruction, which returns
-/// an argument of the specified type given a va_list.
+/// an argument of the specified type given a va_list and increments that list
///
class VAArgInst : public UnaryInstruction {
VAArgInst(const VAArgInst &VAA)
diff --git a/include/llvm/Support/InstVisitor.h b/include/llvm/Support/InstVisitor.h
index 38cd74a..a4b1f8b 100644
--- a/include/llvm/Support/InstVisitor.h
+++ b/include/llvm/Support/InstVisitor.h
@@ -174,7 +174,6 @@ public:
RetTy visitSelectInst(SelectInst &I) { DELEGATE(Instruction); }
RetTy visitCallInst(CallInst &I) { DELEGATE(Instruction); }
RetTy visitShiftInst(ShiftInst &I) { DELEGATE(Instruction); }
- RetTy visitVANextInst(VANextInst &I) { DELEGATE(Instruction); }
RetTy visitVAArgInst(VAArgInst &I) { DELEGATE(Instruction); }
// Next level propagators... if the user does not overload a specific
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h
index 99fd0ba..b1ef3f1 100644
--- a/include/llvm/Target/TargetLowering.h
+++ b/include/llvm/Target/TargetLowering.h
@@ -268,7 +268,7 @@ public:
/// LowerVAStart - This lowers the llvm.va_start intrinsic. If not
/// implemented, this method prints a message and aborts.
virtual std::pair<SDOperand, SDOperand>
- LowerVAStart(SDOperand Chain, SelectionDAG &DAG);
+ LowerVAStart(SDOperand Chain, SelectionDAG &DAG, SDOperand Dest);
/// LowerVAEnd - This lowers llvm.va_end and returns the resultant chain. If
/// not implemented, this defaults to a noop.
@@ -278,13 +278,12 @@ public:
/// value/chain pair. If not implemented, this defaults to returning the
/// input operand.
virtual std::pair<SDOperand,SDOperand>
- LowerVACopy(SDOperand Chain, SDOperand L, SelectionDAG &DAG);
+ LowerVACopy(SDOperand Chain, SDOperand Src, SDOperand Dest, SelectionDAG &DAG);
- /// LowerVAArgNext - This lowers the vaarg and vanext instructions (depending
- /// on whether the first argument is true). If not implemented, this prints a
- /// message and aborts.
+ /// LowerVAArgNext - This lowers the instruction
+ /// If not implemented, this prints a message and aborts.
virtual std::pair<SDOperand,SDOperand>
- LowerVAArgNext(bool isVANext, SDOperand Chain, SDOperand VAList,
+ LowerVAArgNext(SDOperand Chain, SDOperand VAList,
const Type *ArgTy, SelectionDAG &DAG);
/// LowerFrameReturnAddress - This hook lowers a call to llvm.returnaddress or