[llvm-commits] CVS: llvm/lib/Bytecode/Writer/SlotCalculator.cpp Writer.cpp

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



Changes in directory llvm/lib/Bytecode/Writer:

SlotCalculator.cpp updated: 1.71 -> 1.72
Writer.cpp updated: 1.105 -> 1.106
---
Log message:

core changes for varargs

---
Diffs of the changes:  (+1 -16)

 SlotCalculator.cpp |    6 ------
 Writer.cpp         |   11 +----------
 2 files changed, 1 insertion(+), 16 deletions(-)


Index: llvm/lib/Bytecode/Writer/SlotCalculator.cpp
diff -u llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.71 llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.72
--- llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.71	Thu May  5 17:32:23 2005
+++ llvm/lib/Bytecode/Writer/SlotCalculator.cpp	Sat Jun 18 13:34:51 2005
@@ -187,8 +187,6 @@
             !isa<GlobalValue>(I->getOperand(op)))
           getOrCreateSlot(I->getOperand(op));
       getOrCreateSlot(I->getType());
-      if (const VANextInst *VAN = dyn_cast<VANextInst>(&*I))
-        getOrCreateSlot(VAN->getArgType());
     }
     processSymbolTableConstants(&F->getSymbolTable());
   }
@@ -320,8 +318,6 @@
     getOrCreateSlot(BB);
     for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); I!=E; ++I) {
       getOrCreateSlot(I);
-      if (const VANextInst *VAN = dyn_cast<VANextInst>(I))
-        getOrCreateSlot(VAN->getArgType());
     }
   }
 
@@ -472,8 +468,6 @@
     for (unsigned op = 0, e = I->getNumOperands(); op != e; ++op)
       if (isa<Constant>(I->getOperand(op)))
         getOrCreateCompactionTableSlot(I->getOperand(op));
-    if (const VANextInst *VAN = dyn_cast<VANextInst>(&*I))
-      getOrCreateCompactionTableSlot(VAN->getArgType());
   }
 
   // Do the types in the symbol table


Index: llvm/lib/Bytecode/Writer/Writer.cpp
diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.105 llvm/lib/Bytecode/Writer/Writer.cpp:1.106
--- llvm/lib/Bytecode/Writer/Writer.cpp:1.105	Fri May 13 18:35:47 2005
+++ llvm/lib/Bytecode/Writer/Writer.cpp	Sat Jun 18 13:34:51 2005
@@ -439,7 +439,7 @@
   output_typeid(Type);                      // Result type
 
   unsigned NumArgs = I->getNumOperands();
-  output_vbr(NumArgs + (isa<CastInst>(I) || isa<VANextInst>(I) ||
+  output_vbr(NumArgs + (isa<CastInst>(I)  ||
                         isa<VAArgInst>(I) || Opcode == 56 || Opcode == 58));
 
   if (!isa<GetElementPtrInst>(&I)) {
@@ -453,10 +453,6 @@
       int Slot = Table.getSlot(I->getType());
       assert(Slot != -1 && "Cast return type unknown?");
       output_typeid((unsigned)Slot);
-    } else if (const VANextInst *VAI = dyn_cast<VANextInst>(I)) {
-      int Slot = Table.getSlot(VAI->getArgType());
-      assert(Slot != -1 && "VarArg argument type unknown?");
-      output_typeid((unsigned)Slot);
     } else if (Opcode == 56) {  // Invoke escape sequence
       output_vbr(cast<InvokeInst>(I)->getCallingConv());
     } else if (Opcode == 58) {  // Call escape sequence
@@ -704,11 +700,6 @@
       assert(Slots[1] != ~0U && "Cast return type unknown?");
       if (Slots[1] > MaxOpSlot) MaxOpSlot = Slots[1];
       NumOperands++;
-    } else if (const VANextInst *VANI = dyn_cast<VANextInst>(&I)) {
-      Slots[1] = Table.getSlot(VANI->getArgType());
-      assert(Slots[1] != ~0U && "va_next return type unknown?");
-      if (Slots[1] > MaxOpSlot) MaxOpSlot = Slots[1];
-      NumOperands++;
     } else if (const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&I)) {
       // We need to encode the type of sequential type indices into their slot #
       unsigned Idx = 1;






More information about the llvm-commits mailing list