[llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp Instruction.cpp Instructions.cpp Verifier.cpp

Andrew Lenharth alenhar2 at cs.uiuc.edu
Sat Jun 18 11:35:08 PDT 2005



Changes in directory llvm/lib/VMCore:

AsmWriter.cpp updated: 1.179 -> 1.180
Instruction.cpp updated: 1.46 -> 1.47
Instructions.cpp updated: 1.19 -> 1.20
Verifier.cpp updated: 1.133 -> 1.134
---
Log message:

core changes for varargs

---
Diffs of the changes:  (+3 -12)

 AsmWriter.cpp    |    4 ----
 Instruction.cpp  |    5 +----
 Instructions.cpp |    1 -
 Verifier.cpp     |    5 ++---
 4 files changed, 3 insertions(+), 12 deletions(-)


Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.179 llvm/lib/VMCore/AsmWriter.cpp:1.180
--- llvm/lib/VMCore/AsmWriter.cpp:1.179	Sun May 15 11:13:11 2005
+++ llvm/lib/VMCore/AsmWriter.cpp	Sat Jun 18 13:34:52 2005
@@ -1188,10 +1188,6 @@
     if (Operand) writeOperand(Operand, true);   // Work with broken code
     Out << ", ";
     printType(I.getType());
-  } else if (const VANextInst *VAN = dyn_cast<VANextInst>(&I)) {
-    if (Operand) writeOperand(Operand, true);   // Work with broken code
-    Out << ", ";
-    printType(VAN->getArgType());
   } else if (Operand) {   // Print the normal way...
 
     // PrintAllTypes - Instructions who have operands of all the same type


Index: llvm/lib/VMCore/Instruction.cpp
diff -u llvm/lib/VMCore/Instruction.cpp:1.46 llvm/lib/VMCore/Instruction.cpp:1.47
--- llvm/lib/VMCore/Instruction.cpp:1.46	Fri May  6 00:50:54 2005
+++ llvm/lib/VMCore/Instruction.cpp	Sat Jun 18 13:34:52 2005
@@ -110,8 +110,7 @@
   case Call:    return "call";
   case Shl:     return "shl";
   case Shr:     return "shr";
-  case VANext:  return "vanext";
-  case VAArg:   return "vaarg";
+  case VAArg:   return "va_arg";
 
   default: return "<Invalid operator> ";
   }
@@ -139,8 +138,6 @@
     return LI->isVolatile() == cast<LoadInst>(I)->isVolatile();
   if (const StoreInst *SI = dyn_cast<StoreInst>(this))
     return SI->isVolatile() == cast<StoreInst>(I)->isVolatile();
-  if (const VANextInst *VAN = dyn_cast<VANextInst>(this))
-    return VAN->getArgType() == cast<VANextInst>(I)->getArgType();
   if (const CallInst *CI = dyn_cast<CallInst>(this))
     return CI->isTailCall() == cast<CallInst>(I)->isTailCall();
   return true;


Index: llvm/lib/VMCore/Instructions.cpp
diff -u llvm/lib/VMCore/Instructions.cpp:1.19 llvm/lib/VMCore/Instructions.cpp:1.20
--- llvm/lib/VMCore/Instructions.cpp:1.19	Fri May  6 15:26:43 2005
+++ llvm/lib/VMCore/Instructions.cpp	Sat Jun 18 13:34:52 2005
@@ -1096,7 +1096,6 @@
 CallInst   *CallInst::clone()   const { return new CallInst(*this); }
 ShiftInst  *ShiftInst::clone()  const { return new ShiftInst(*this); }
 SelectInst *SelectInst::clone() const { return new SelectInst(*this); }
-VANextInst *VANextInst::clone() const { return new VANextInst(*this); }
 VAArgInst  *VAArgInst::clone()  const { return new VAArgInst(*this); }
 PHINode    *PHINode::clone()    const { return new PHINode(*this); }
 ReturnInst *ReturnInst::clone() const { return new ReturnInst(*this); }


Index: llvm/lib/VMCore/Verifier.cpp
diff -u llvm/lib/VMCore/Verifier.cpp:1.133 llvm/lib/VMCore/Verifier.cpp:1.134
--- llvm/lib/VMCore/Verifier.cpp:1.133	Sun May  8 17:27:09 2005
+++ llvm/lib/VMCore/Verifier.cpp	Sat Jun 18 13:34:52 2005
@@ -178,7 +178,6 @@
     void visitPHINode(PHINode &PN);
     void visitBinaryOperator(BinaryOperator &B);
     void visitShiftInst(ShiftInst &SI);
-    void visitVANextInst(VANextInst &VAN) { visitInstruction(VAN); }
     void visitVAArgInst(VAArgInst &VAA) { visitInstruction(VAA); }
     void visitCallInst(CallInst &CI);
     void visitGetElementPtrInst(GetElementPtrInst &GEP);
@@ -655,10 +654,10 @@
     Assert1(CI.getParent()->getParent()->getFunctionType()->isVarArg(),
             "llvm.va_start intrinsic may only occur in function with variable"
             " args!", &CI);
-    NumArgs = 0;
+    NumArgs = 1;
     break;
   case Intrinsic::vaend:          NumArgs = 1; break;
-  case Intrinsic::vacopy:         NumArgs = 1; break;
+  case Intrinsic::vacopy:         NumArgs = 2; break;
 
   case Intrinsic::returnaddress:
   case Intrinsic::frameaddress:






More information about the llvm-commits mailing list