[llvm-commits] [PATCH] Rotate CallInst operands -- HEADS UP

Daniel Dunbar daniel at zuster.org
Tue Apr 13 09:18:28 PDT 2010


Hi Gabor,

What is the measured performance impact of this change?

 - Daniel

On Tue, Apr 13, 2010 at 8:50 AM, Gabor Greif <gabor at mac.com> wrote:
> Hi all,
>
> I am about to submit a patch for reordering CallInst operands.
>
> Note: this potentially will have an effect on any optimizer that
> does not use CallSite + getCalledValue (the abstract interface)
> but does getOperand/setOperand on the CallInst directly.
>
> In a nutshell, the "callee" operand moves to the last operand
> position, whereas it used to reside in the frontmost position.
>
> Motivation ---------------------------------------------------
> Because of the internal workings of Use::getUser() the operands
> near the end of the operand array allow a faster access to their
> User. Call-Graph computation relies on getUser() and is expected
> to become speedier.
> Also, InvokeInst already has transitioned to this operand ordering
> some time ago (already in the upcoming release 2.7). Moving CallInst
> over allows to simplify CallSite.
> Third, there is no more need to add 1 to op_begin() when accessing
> the arguments of the call.
> Fourth, getCalledValue (and friends) now access a value at a constant
> offset from the CallInst, whereas before this change it needed a pointer
> dereference operation (resp. a multiplication with sizeof(Use)).
>
> What to do ---------------------------------------------------
>
> If you have an optimization framework that interrogates CallInsts
> directly, you should use the abstract accessors CallSite and
> getCalledValue/Function (and friends) so you don't have to bother
> with operand positioning. You can make these changes (to employ
> the abstract accessors) now, and this will probably improve your
> code because they also handle InvokeInst.
>
> llvm-gcc needed no adjustment, and clang needed one change (in the
> spirit of the lines above) which has been checked in already.
>
> For reviewers -------------------------------------------------
>
> The changes are mostly mechanical, and do not need a lot of explanation.
> There is at least one fix to an InvokeInst bug (in CBackend). Of
> course I could commit that (those) separately.
>
> Cheers,
>
>        Gabor
>
>
>
> Index: llvm/include/llvm/Instructions.h
> ===================================================================
> --- llvm/include/llvm/Instructions.h    (revision 101132)
> +++ llvm/include/llvm/Instructions.h    (working copy)
> @@ -1031,17 +1031,17 @@
>   /// indirect function invocation.
>   ///
>   Function *getCalledFunction() const {
> -    return dyn_cast<Function>(Op<0>());
> +    return dyn_cast<Function>(Op<-1>());
>   }
>
>   /// getCalledValue - Get a pointer to the function that is invoked by this
>   /// instruction.
> -  const Value *getCalledValue() const { return Op<0>(); }
> -        Value *getCalledValue()       { return Op<0>(); }
> +  const Value *getCalledValue() const { return Op<-1>(); }
> +        Value *getCalledValue()       { return Op<-1>(); }
>
>   /// setCalledFunction - Set the function called.
>   void setCalledFunction(Value* Fn) {
> -    Op<0>() = Fn;
> +    Op<-1>() = Fn;
>   }
>
>   // Methods for support type inquiry through isa, cast, and dyn_cast:
> @@ -1071,7 +1071,7 @@
>                                    ->getElementType())->getReturnType(),
>                 Instruction::Call,
>                 OperandTraits<CallInst>::op_end(this) - (ArgEnd - ArgBegin + 1),
> -                (unsigned)(ArgEnd - ArgBegin + 1), InsertAtEnd) {
> +                unsigned(ArgEnd - ArgBegin + 1), InsertAtEnd) {
>   init(Func, ArgBegin, ArgEnd, NameStr,
>        typename std::iterator_traits<InputIterator>::iterator_category());
>  }
> Index: llvm/include/llvm/IntrinsicInst.h
> ===================================================================
> --- llvm/include/llvm/IntrinsicInst.h   (revision 101132)
> +++ llvm/include/llvm/IntrinsicInst.h   (working copy)
> @@ -43,7 +43,7 @@
>     Intrinsic::ID getIntrinsicID() const {
>       return (Intrinsic::ID)getCalledFunction()->getIntrinsicID();
>     }
> -
> +
>     // Methods for support type inquiry through isa, cast, and dyn_cast:
>     static inline bool classof(const IntrinsicInst *) { return true; }
>     static inline bool classof(const CallInst *I) {
> @@ -74,7 +74,7 @@
>     static inline bool classof(const Value *V) {
>       return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
>     }
> -
> +
>     static Value *StripCast(Value *C);
>   };
>
> @@ -83,7 +83,7 @@
>   class DbgDeclareInst : public DbgInfoIntrinsic {
>   public:
>     Value *getAddress() const;
> -    MDNode *getVariable() const { return cast<MDNode>(getOperand(2)); }
> +    MDNode *getVariable() const { return cast<MDNode>(getOperand(1)); }
>
>     // Methods for support type inquiry through isa, cast, and dyn_cast:
>     static inline bool classof(const DbgDeclareInst *) { return true; }
> @@ -103,10 +103,10 @@
>     Value *getValue();
>     uint64_t getOffset() const {
>       return cast<ConstantInt>(
> -                             const_cast<Value*>(getOperand(2)))->getZExtValue();
> +                             const_cast<Value*>(getOperand(1)))->getZExtValue();
>     }
> -    const MDNode *getVariable() const { return cast<MDNode>(getOperand(3)); }
> -    MDNode *getVariable() { return cast<MDNode>(getOperand(3)); }
> +    const MDNode *getVariable() const { return cast<MDNode>(getOperand(2)); }
> +    MDNode *getVariable() { return cast<MDNode>(getOperand(2)); }
>
>     // Methods for support type inquiry through isa, cast, and dyn_cast:
>     static inline bool classof(const DbgValueInst *) { return true; }
> @@ -122,19 +122,19 @@
>   ///
>   class MemIntrinsic : public IntrinsicInst {
>   public:
> -    Value *getRawDest() const { return const_cast<Value*>(getOperand(1)); }
> +    Value *getRawDest() const { return const_cast<Value*>(getOperand(0)); }
>
> -    Value *getLength() const { return const_cast<Value*>(getOperand(3)); }
> +    Value *getLength() const { return const_cast<Value*>(getOperand(2)); }
>     ConstantInt *getAlignmentCst() const {
> -      return cast<ConstantInt>(const_cast<Value*>(getOperand(4)));
> +      return cast<ConstantInt>(const_cast<Value*>(getOperand(3)));
>     }
> -
> +
>     unsigned getAlignment() const {
>       return getAlignmentCst()->getZExtValue();
>     }
>
>     ConstantInt *getVolatileCst() const {
> -      return cast<ConstantInt>(const_cast<Value*>(getOperand(5)));
> +      return cast<ConstantInt>(const_cast<Value*>(getOperand(4)));
>     }
>     bool isVolatile() const {
>       return getVolatileCst()->getZExtValue() != 0;
> @@ -150,27 +150,27 @@
>     void setDest(Value *Ptr) {
>       assert(getRawDest()->getType() == Ptr->getType() &&
>              "setDest called with pointer of wrong type!");
> -      setOperand(1, Ptr);
> +      setOperand(0, Ptr);
>     }
>
>     void setLength(Value *L) {
>       assert(getLength()->getType() == L->getType() &&
>              "setLength called with value of wrong type!");
> -      setOperand(3, L);
> +      setOperand(2, L);
>     }
> -
> +
>     void setAlignment(Constant* A) {
> -      setOperand(4, A);
> +      setOperand(3, A);
>     }
>
>     void setVolatile(Constant* V) {
> -      setOperand(5, V);
> +      setOperand(4, V);
>     }
>
>     const Type *getAlignmentType() const {
> -      return getOperand(4)->getType();
> +      return getOperand(3)->getType();
>     }
> -
> +
>     // Methods for support type inquiry through isa, cast, and dyn_cast:
>     static inline bool classof(const MemIntrinsic *) { return true; }
>     static inline bool classof(const IntrinsicInst *I) {
> @@ -193,14 +193,14 @@
>   public:
>     /// get* - Return the arguments to the instruction.
>     ///
> -    Value *getValue() const { return const_cast<Value*>(getOperand(2)); }
> -
> +    Value *getValue() const { return const_cast<Value*>(getOperand(1)); }
> +
>     void setValue(Value *Val) {
>       assert(getValue()->getType() == Val->getType() &&
> -             "setSource called with pointer of wrong type!");
> -      setOperand(2, Val);
> +             "setValue called with value of wrong type!");
> +      setOperand(1, Val);
>     }
> -
> +
>     // Methods for support type inquiry through isa, cast, and dyn_cast:
>     static inline bool classof(const MemSetInst *) { return true; }
>     static inline bool classof(const IntrinsicInst *I) {
> @@ -210,26 +210,26 @@
>       return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
>     }
>   };
> -
> +
>   /// MemTransferInst - This class wraps the llvm.memcpy/memmove intrinsics.
>   ///
>   class MemTransferInst : public MemIntrinsic {
>   public:
>     /// get* - Return the arguments to the instruction.
>     ///
> -    Value *getRawSource() const { return const_cast<Value*>(getOperand(2)); }
> -
> +    Value *getRawSource() const { return const_cast<Value*>(getOperand(1)); }
> +
>     /// getSource - This is just like getRawSource, but it strips off any cast
>     /// instructions that feed it, giving the original input.  The returned
>     /// value is guaranteed to be a pointer.
>     Value *getSource() const { return getRawSource()->stripPointerCasts(); }
> -
> +
>     void setSource(Value *Ptr) {
>       assert(getRawSource()->getType() == Ptr->getType() &&
>              "setSource called with pointer of wrong type!");
> -      setOperand(2, Ptr);
> +      setOperand(1, Ptr);
>     }
> -
> +
>     // Methods for support type inquiry through isa, cast, and dyn_cast:
>     static inline bool classof(const MemTransferInst *) { return true; }
>     static inline bool classof(const IntrinsicInst *I) {
> @@ -240,8 +240,8 @@
>       return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
>     }
>   };
> -
> -
> +
> +
>   /// MemCpyInst - This class wraps the llvm.memcpy intrinsic.
>   ///
>   class MemCpyInst : public MemTransferInst {
> @@ -283,7 +283,7 @@
>       return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
>     }
>   };
> -
> +
>   /// MemoryUseIntrinsic - This is the common base class for the memory use
>   /// marker intrinsics.
>   ///
> Index: llvm/include/llvm/Support/CallSite.h
> ===================================================================
> --- llvm/include/llvm/Support/CallSite.h        (revision 101132)
> +++ llvm/include/llvm/Support/CallSite.h        (working copy)
> @@ -153,27 +153,21 @@
>  private:
>   /// Returns the operand number of the first argument
>   unsigned getArgumentOffset() const {
> -    if (isCall())
> -      return 1; // Skip Function (ATM)
> -    else
>       return 0; // Args are at the front
>   }
>
>   unsigned getArgumentEndOffset() const {
>     if (isCall())
> -      return 0; // Unchanged (ATM)
> +      return 1; // Skip Function
>     else
>       return 3; // Skip BB, BB, Function
>   }
>
>   IterTy getCallee() const {
> -      // FIXME: this is slow, since we do not have the fast versions
> -      // of the op_*() functions here. See CallSite::getCallee.
> -      //
> -    if (isCall())
> -      return getInstruction()->op_begin(); // Unchanged (ATM)
> -    else
> -      return getInstruction()->op_end() - 3; // Skip BB, BB, Function
> +    // FIXME: this is slow, since we do not have the fast versions
> +               // of the op_*() functions here. See CallSite::getCallee.
> +               //
> +    return arg_end();
>   }
>  };
>
> Index: llvm/lib/Analysis/MemoryBuiltins.cpp
> ===================================================================
> --- llvm/lib/Analysis/MemoryBuiltins.cpp        (revision 101132)
> +++ llvm/lib/Analysis/MemoryBuiltins.cpp        (working copy)
> @@ -103,7 +103,7 @@
>
>   // If malloc calls' arg can be determined to be a multiple of ElementSize,
>   // return the multiple.  Otherwise, return NULL.
> -  Value *MallocArg = CI->getOperand(1);
> +  Value *MallocArg = CI->getOperand(0);
>   Value *Multiple = NULL;
>   if (ComputeMultiple(MallocArg, ElementSize, Multiple,
>                       LookThroughSExt))
> @@ -120,7 +120,7 @@
>   Value *ArraySize = computeArraySize(CI, TD);
>
>   if (ArraySize &&
> -      ArraySize != ConstantInt::get(CI->getOperand(1)->getType(), 1))
> +      ArraySize != ConstantInt::get(CI->getOperand(0)->getType(), 1))
>     return CI;
>
>   // CI is a non-array malloc or we can't figure out that it is an array malloc.
> Index: llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
> ===================================================================
> --- llvm/lib/Analysis/MemoryDependenceAnalysis.cpp      (revision 101132)
> +++ llvm/lib/Analysis/MemoryDependenceAnalysis.cpp      (working copy)
> @@ -117,7 +117,7 @@
>       Pointer = V->getOperand(0);
>       PointerSize = AA->getTypeStoreSize(V->getType());
>     } else if (isFreeCall(Inst)) {
> -      Pointer = Inst->getOperand(1);
> +      Pointer = Inst->getOperand(0);
>       // calls to free() erase the entire structure
>       PointerSize = ~0ULL;
>     } else if (isa<CallInst>(Inst) || isa<InvokeInst>(Inst)) {
> @@ -197,9 +197,9 @@
>         // pointer, not on query pointers that are indexed off of them.  It'd
>         // be nice to handle that at some point.
>         AliasAnalysis::AliasResult R =
> -          AA->alias(II->getOperand(3), ~0U, MemPtr, ~0U);
> +          AA->alias(II->getOperand(2), ~0U, MemPtr, ~0U);
>         if (R == AliasAnalysis::MustAlias) {
> -          InvariantTag = II->getOperand(1);
> +          InvariantTag = II->getOperand(0);
>           continue;
>         }
>
> @@ -210,7 +210,7 @@
>         // pointer, not on query pointers that are indexed off of them.  It'd
>         // be nice to handle that at some point.
>         AliasAnalysis::AliasResult R =
> -          AA->alias(II->getOperand(2), ~0U, MemPtr, ~0U);
> +          AA->alias(II->getOperand(1), ~0U, MemPtr, ~0U);
>         if (R == AliasAnalysis::MustAlias)
>           return MemDepResult::getDef(II);
>       }
> @@ -366,7 +366,7 @@
>       MemSize = AA->getTypeStoreSize(LI->getType());
>     }
>   } else if (isFreeCall(QueryInst)) {
> -    MemPtr = QueryInst->getOperand(1);
> +    MemPtr = QueryInst->getOperand(0);
>     // calls to free() erase the entire structure, not just a field.
>     MemSize = ~0UL;
>   } else if (isa<CallInst>(QueryInst) || isa<InvokeInst>(QueryInst)) {
> @@ -378,13 +378,13 @@
>     case Intrinsic::lifetime_start:
>     case Intrinsic::lifetime_end:
>     case Intrinsic::invariant_start:
> +      MemPtr = QueryInst->getOperand(1);
> +      MemSize = cast<ConstantInt>(QueryInst->getOperand(0))->getZExtValue();
> +      break;
> +    case Intrinsic::invariant_end:
>       MemPtr = QueryInst->getOperand(2);
>       MemSize = cast<ConstantInt>(QueryInst->getOperand(1))->getZExtValue();
>       break;
> -    case Intrinsic::invariant_end:
> -      MemPtr = QueryInst->getOperand(3);
> -      MemSize = cast<ConstantInt>(QueryInst->getOperand(2))->getZExtValue();
> -      break;
>     default:
>       CallSite QueryCS = CallSite::get(QueryInst);
>       bool isReadOnly = AA->onlyReadsMemory(QueryCS);
> Index: llvm/lib/Analysis/IPA/GlobalsModRef.cpp
> ===================================================================
> --- llvm/lib/Analysis/IPA/GlobalsModRef.cpp     (revision 101132)
> +++ llvm/lib/Analysis/IPA/GlobalsModRef.cpp     (working copy)
> @@ -252,7 +252,7 @@
>     } else if (CallInst *CI = dyn_cast<CallInst>(*UI)) {
>       // Make sure that this is just the function being called, not that it is
>       // passing into the function.
> -      for (unsigned i = 1, e = CI->getNumOperands(); i != e; ++i)
> +      for (unsigned i = 0, e = CI->getNumOperands() - 1; i != e; ++i)
>         if (CI->getOperand(i) == V) return true;
>     } else if (InvokeInst *II = dyn_cast<InvokeInst>(*UI)) {
>       // Make sure that this is just the function being called, not that it is
> Index: llvm/lib/Analysis/ValueTracking.cpp
> ===================================================================
> --- llvm/lib/Analysis/ValueTracking.cpp (revision 101132)
> +++ llvm/lib/Analysis/ValueTracking.cpp (working copy)
> @@ -953,7 +953,7 @@
>   if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(I))
>     // sqrt(-0.0) = -0.0, no other negative results are possible.
>     if (II->getIntrinsicID() == Intrinsic::sqrt)
> -      return CannotBeNegativeZero(II->getOperand(1), Depth+1);
> +      return CannotBeNegativeZero(II->getOperand(0), Depth+1);
>
>   if (const CallInst *CI = dyn_cast<CallInst>(I))
>     if (const Function *F = CI->getCalledFunction()) {
> @@ -966,7 +966,7 @@
>         if (F->getName() == "fabsl") return true;
>         if (F->getName() == "sqrt" || F->getName() == "sqrtf" ||
>             F->getName() == "sqrtl")
> -          return CannotBeNegativeZero(CI->getOperand(1), Depth+1);
> +          return CannotBeNegativeZero(CI->getOperand(0), Depth+1);
>       }
>     }
>
> Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp
> ===================================================================
> --- llvm/lib/Analysis/BasicAliasAnalysis.cpp    (revision 101132)
> +++ llvm/lib/Analysis/BasicAliasAnalysis.cpp    (working copy)
> @@ -94,7 +94,7 @@
>   } else if (const CallInst* CI = extractMallocCall(V)) {
>     if (!isArrayMalloc(V, &TD))
>       // The size is the argument to the malloc call.
> -      if (const ConstantInt* C = dyn_cast<ConstantInt>(CI->getOperand(1)))
> +      if (const ConstantInt* C = dyn_cast<ConstantInt>(CI->getOperand(0)))
>         return (C->getZExtValue() < Size);
>     return false;
>   } else if (const Argument *A = dyn_cast<Argument>(V)) {
> @@ -318,10 +318,10 @@
>   case Intrinsic::memcpy:
>   case Intrinsic::memmove: {
>     unsigned Len = ~0U;
> -    if (ConstantInt *LenCI = dyn_cast<ConstantInt>(II->getOperand(3)))
> +    if (ConstantInt *LenCI = dyn_cast<ConstantInt>(II->getOperand(2)))
>       Len = LenCI->getZExtValue();
> -    Value *Dest = II->getOperand(1);
> -    Value *Src = II->getOperand(2);
> +    Value *Dest = II->getOperand(0);
> +    Value *Src = II->getOperand(1);
>     if (isNoAlias(Dest, Len, P, Size)) {
>       if (isNoAlias(Src, Len, P, Size))
>         return NoModRef;
> @@ -332,9 +332,9 @@
>   case Intrinsic::memset:
>     // Since memset is 'accesses arguments' only, the AliasAnalysis base class
>     // will handle it for the variable length case.
> -    if (ConstantInt *LenCI = dyn_cast<ConstantInt>(II->getOperand(3))) {
> +    if (ConstantInt *LenCI = dyn_cast<ConstantInt>(II->getOperand(2))) {
>       unsigned Len = LenCI->getZExtValue();
> -      Value *Dest = II->getOperand(1);
> +      Value *Dest = II->getOperand(0);
>       if (isNoAlias(Dest, Len, P, Size))
>         return NoModRef;
>     }
> @@ -352,7 +352,7 @@
>   case Intrinsic::atomic_load_umax:
>   case Intrinsic::atomic_load_umin:
>     if (TD) {
> -      Value *Op1 = II->getOperand(1);
> +      Value *Op1 = II->getOperand(0);
>       unsigned Op1Size = TD->getTypeStoreSize(Op1->getType());
>       if (isNoAlias(Op1, Op1Size, P, Size))
>         return NoModRef;
> @@ -361,14 +361,14 @@
>   case Intrinsic::lifetime_start:
>   case Intrinsic::lifetime_end:
>   case Intrinsic::invariant_start: {
> -    unsigned PtrSize = cast<ConstantInt>(II->getOperand(1))->getZExtValue();
> -    if (isNoAlias(II->getOperand(2), PtrSize, P, Size))
> +    unsigned PtrSize = cast<ConstantInt>(II->getOperand(0))->getZExtValue();
> +    if (isNoAlias(II->getOperand(1), PtrSize, P, Size))
>       return NoModRef;
>     break;
>   }
>   case Intrinsic::invariant_end: {
> -    unsigned PtrSize = cast<ConstantInt>(II->getOperand(2))->getZExtValue();
> -    if (isNoAlias(II->getOperand(3), PtrSize, P, Size))
> +    unsigned PtrSize = cast<ConstantInt>(II->getOperand(1))->getZExtValue();
> +    if (isNoAlias(II->getOperand(2), PtrSize, P, Size))
>       return NoModRef;
>     break;
>   }
> Index: llvm/lib/Analysis/ConstantFolding.cpp
> ===================================================================
> --- llvm/lib/Analysis/ConstantFolding.cpp       (revision 101132)
> +++ llvm/lib/Analysis/ConstantFolding.cpp       (working copy)
> @@ -772,9 +772,9 @@
>   case Instruction::ICmp:
>   case Instruction::FCmp: assert(0 && "Invalid for compares");
>   case Instruction::Call:
> -    if (Function *F = dyn_cast<Function>(Ops[0]))
> +    if (Function *F = dyn_cast<Function>(Ops[NumOps - 1]))
>       if (canConstantFoldCallTo(F))
> -        return ConstantFoldCall(F, Ops+1, NumOps-1);
> +        return ConstantFoldCall(F, Ops, NumOps - 1);
>     return 0;
>   case Instruction::PtrToInt:
>     // If the input is a inttoptr, eliminate the pair.  This requires knowing
> Index: llvm/lib/Target/X86/X86ISelLowering.cpp
> ===================================================================
> --- llvm/lib/Target/X86/X86ISelLowering.cpp     (revision 101132)
> +++ llvm/lib/Target/X86/X86ISelLowering.cpp     (working copy)
> @@ -9917,7 +9917,7 @@
>
>   // Verify this is a simple bswap.
>   if (CI->getNumOperands() != 2 ||
> -      CI->getType() != CI->getOperand(1)->getType() ||
> +      CI->getType() != CI->getOperand(0)->getType() ||
>       !CI->getType()->isIntegerTy())
>     return false;
>
> @@ -9930,7 +9930,7 @@
>   Module *M = CI->getParent()->getParent()->getParent();
>   Constant *Int = Intrinsic::getDeclaration(M, Intrinsic::bswap, Tys, 1);
>
> -  Value *Op = CI->getOperand(1);
> +  Value *Op = CI->getOperand(0);
>   Op = CallInst::Create(Int, Op, CI->getName(), CI);
>
>   CI->replaceAllUsesWith(Op);
> Index: llvm/lib/Target/X86/X86FastISel.cpp
> ===================================================================
> --- llvm/lib/Target/X86/X86FastISel.cpp (revision 101132)
> +++ llvm/lib/Target/X86/X86FastISel.cpp (working copy)
> @@ -1168,8 +1168,8 @@
>     // Emit code inline code to store the stack guard onto the stack.
>     EVT PtrTy = TLI.getPointerTy();
>
> -    Value *Op1 = I.getOperand(1); // The guard's value.
> -    AllocaInst *Slot = cast<AllocaInst>(I.getOperand(2));
> +    Value *Op1 = I.getOperand(0); // The guard's value.
> +    AllocaInst *Slot = cast<AllocaInst>(I.getOperand(1));
>
>     // Grab the frame index.
>     X86AddressMode AM;
> @@ -1180,7 +1180,7 @@
>     return true;
>   }
>   case Intrinsic::objectsize: {
> -    ConstantInt *CI = dyn_cast<ConstantInt>(I.getOperand(2));
> +    ConstantInt *CI = dyn_cast<ConstantInt>(I.getOperand(1));
>     const Type *Ty = I.getCalledFunction()->getReturnType();
>
>     assert(CI && "Non-constant type in Intrinsic::objectsize?");
> @@ -1235,8 +1235,8 @@
>     if (!isTypeLegal(RetTy, VT))
>       return false;
>
> -    Value *Op1 = I.getOperand(1);
> -    Value *Op2 = I.getOperand(2);
> +    Value *Op1 = I.getOperand(0);
> +    Value *Op2 = I.getOperand(1);
>     unsigned Reg1 = getRegForValue(Op1);
>     unsigned Reg2 = getRegForValue(Op2);
>
> @@ -1279,7 +1279,7 @@
>
>  bool X86FastISel::X86SelectCall(Instruction *I) {
>   CallInst *CI = cast<CallInst>(I);
> -  Value *Callee = I->getOperand(0);
> +  Value *Callee = CI->getCalledValue();
>
>   // Can't handle inline asm yet.
>   if (isa<InlineAsm>(Callee))
> Index: llvm/lib/Target/CBackend/CBackend.cpp
> ===================================================================
> --- llvm/lib/Target/CBackend/CBackend.cpp       (revision 101132)
> +++ llvm/lib/Target/CBackend/CBackend.cpp       (working copy)
> @@ -2886,7 +2886,7 @@
>   bool hasByVal = I.hasByValArgument();
>   bool isStructRet = I.hasStructRetAttr();
>   if (isStructRet) {
> -    writeOperandDeref(I.getOperand(1));
> +    writeOperandDeref(I.getOperand(0));
>     Out << " = ";
>   }
>
> @@ -2942,7 +2942,7 @@
>
>   unsigned NumDeclaredParams = FTy->getNumParams();
>
> -  CallSite::arg_iterator AI = I.op_begin()+1, AE = I.op_end();
> +  CallInst::op_iterator AI = I.op_begin(), AE = I.op_end() - 1;
>   unsigned ArgNo = 0;
>   if (isStructRet) {   // Skip struct return argument.
>     ++AI;
> @@ -2996,7 +2996,7 @@
>     Out << "0; ";
>
>     Out << "va_start(*(va_list*)";
> -    writeOperand(I.getOperand(1));
> +    writeOperand(I.getOperand(0));
>     Out << ", ";
>     // Output the last argument to the enclosing function.
>     if (I.getParent()->getParent()->arg_empty())
> @@ -3006,9 +3006,9 @@
>     Out << ')';
>     return true;
>   case Intrinsic::vaend:
> -    if (!isa<ConstantPointerNull>(I.getOperand(1))) {
> +    if (!isa<ConstantPointerNull>(I.getOperand(0))) {
>       Out << "0; va_end(*(va_list*)";
> -      writeOperand(I.getOperand(1));
> +      writeOperand(I.getOperand(0));
>       Out << ')';
>     } else {
>       Out << "va_end(*(va_list*)0)";
> @@ -3017,47 +3017,47 @@
>   case Intrinsic::vacopy:
>     Out << "0; ";
>     Out << "va_copy(*(va_list*)";
> +    writeOperand(I.getOperand(0));
> +    Out << ", *(va_list*)";
>     writeOperand(I.getOperand(1));
> -    Out << ", *(va_list*)";
> -    writeOperand(I.getOperand(2));
>     Out << ')';
>     return true;
>   case Intrinsic::returnaddress:
>     Out << "__builtin_return_address(";
> -    writeOperand(I.getOperand(1));
> +    writeOperand(I.getOperand(0));
>     Out << ')';
>     return true;
>   case Intrinsic::frameaddress:
>     Out << "__builtin_frame_address(";
> -    writeOperand(I.getOperand(1));
> +    writeOperand(I.getOperand(0));
>     Out << ')';
>     return true;
>   case Intrinsic::powi:
>     Out << "__builtin_powi(";
> +    writeOperand(I.getOperand(0));
> +    Out << ", ";
>     writeOperand(I.getOperand(1));
> -    Out << ", ";
> -    writeOperand(I.getOperand(2));
>     Out << ')';
>     return true;
>   case Intrinsic::setjmp:
>     Out << "setjmp(*(jmp_buf*)";
> -    writeOperand(I.getOperand(1));
> +    writeOperand(I.getOperand(0));
>     Out << ')';
>     return true;
>   case Intrinsic::longjmp:
>     Out << "longjmp(*(jmp_buf*)";
> +    writeOperand(I.getOperand(0));
> +    Out << ", ";
>     writeOperand(I.getOperand(1));
> -    Out << ", ";
> -    writeOperand(I.getOperand(2));
>     Out << ')';
>     return true;
>   case Intrinsic::prefetch:
>     Out << "LLVM_PREFETCH((const void *)";
> +    writeOperand(I.getOperand(0));
> +    Out << ", ";
>     writeOperand(I.getOperand(1));
>     Out << ", ";
>     writeOperand(I.getOperand(2));
> -    Out << ", ";
> -    writeOperand(I.getOperand(3));
>     Out << ")";
>     return true;
>   case Intrinsic::stacksave:
> @@ -3074,7 +3074,7 @@
>     printType(Out, I.getType());
>     Out << ')';
>     // Multiple GCC builtins multiplex onto this intrinsic.
> -    switch (cast<ConstantInt>(I.getOperand(3))->getZExtValue()) {
> +    switch (cast<ConstantInt>(I.getOperand(2))->getZExtValue()) {
>     default: llvm_unreachable("Invalid llvm.x86.sse.cmp!");
>     case 0: Out << "__builtin_ia32_cmpeq"; break;
>     case 1: Out << "__builtin_ia32_cmplt"; break;
> @@ -3095,9 +3095,9 @@
>       Out << 'd';
>
>     Out << "(";
> +    writeOperand(I.getOperand(0));
> +    Out << ", ";
>     writeOperand(I.getOperand(1));
> -    Out << ", ";
> -    writeOperand(I.getOperand(2));
>     Out << ")";
>     return true;
>   case Intrinsic::ppc_altivec_lvsl:
> @@ -3105,7 +3105,7 @@
>     printType(Out, I.getType());
>     Out << ')';
>     Out << "__builtin_altivec_lvsl(0, (void*)";
> -    writeOperand(I.getOperand(1));
> +    writeOperand(I.getOperand(0));
>     Out << ")";
>     return true;
>   }
> @@ -3218,7 +3218,7 @@
>       DestVal = ResultVals[ValueCount].first;
>       DestValNo = ResultVals[ValueCount].second;
>     } else
> -      DestVal = CI.getOperand(ValueCount-ResultVals.size()+1);
> +      DestVal = CI.getOperand(ValueCount-ResultVals.size());
>
>     if (I->isEarlyClobber)
>       C = "&"+C;
> @@ -3252,7 +3252,7 @@
>     }
>
>     assert(ValueCount >= ResultVals.size() && "Input can't refer to result");
> -    Value *SrcVal = CI.getOperand(ValueCount-ResultVals.size()+1);
> +    Value *SrcVal = CI.getOperand(ValueCount-ResultVals.size());
>
>     Out << "\"" << C << "\"(";
>     if (!I->isIndirect)
> Index: llvm/lib/Target/CppBackend/CPPBackend.cpp
> ===================================================================
> --- llvm/lib/Target/CppBackend/CPPBackend.cpp   (revision 101132)
> +++ llvm/lib/Target/CppBackend/CPPBackend.cpp   (working copy)
> @@ -1082,8 +1082,9 @@
>
>     // Before we emit this instruction, we need to take care of generating any
>     // forward references. So, we get the names of all the operands in advance
> -    std::string* opNames = new std::string[I->getNumOperands()];
> -    for (unsigned i = 0; i < I->getNumOperands(); i++) {
> +    const unsigned Ops(I->getNumOperands());
> +    std::string* opNames = new std::string[Ops];
> +    for (unsigned i = 0; i < Ops; i++) {
>       opNames[i] = getOpName(I->getOperand(i));
>     }
>
> @@ -1144,15 +1145,15 @@
>       const InvokeInst* inv = cast<InvokeInst>(I);
>       Out << "std::vector<Value*> " << iName << "_params;";
>       nl(Out);
> -      for (unsigned i = 3; i < inv->getNumOperands(); ++i) {
> +      for (unsigned i = 0; i < inv->getNumOperands() - 3; ++i) {
>         Out << iName << "_params.push_back("
>             << opNames[i] << ");";
>         nl(Out);
>       }
>       Out << "InvokeInst *" << iName << " = InvokeInst::Create("
> -          << opNames[0] << ", "
> -          << opNames[1] << ", "
> -          << opNames[2] << ", "
> +          << opNames[Ops - 3] << ", "
> +          << opNames[Ops - 2] << ", "
> +          << opNames[Ops - 1] << ", "
>           << iName << "_params.begin(), " << iName << "_params.end(), \"";
>       printEscapedString(inv->getName());
>       Out << "\", " << bbname << ");";
> @@ -1388,18 +1389,18 @@
>       if (call->getNumOperands() > 2) {
>         Out << "std::vector<Value*> " << iName << "_params;";
>         nl(Out);
> -        for (unsigned i = 1; i < call->getNumOperands(); ++i) {
> +        for (unsigned i = 0; i < call->getNumOperands() - 1; ++i) {
>           Out << iName << "_params.push_back(" << opNames[i] << ");";
>           nl(Out);
>         }
>         Out << "CallInst* " << iName << " = CallInst::Create("
> -            << opNames[0] << ", " << iName << "_params.begin(), "
> +            << opNames[Ops - 1] << ", " << iName << "_params.begin(), "
>             << iName << "_params.end(), \"";
>       } else if (call->getNumOperands() == 2) {
>         Out << "CallInst* " << iName << " = CallInst::Create("
> -            << opNames[0] << ", " << opNames[1] << ", \"";
> +            << opNames[Ops - 1] << ", " << opNames[0] << ", \"";
>       } else {
> -        Out << "CallInst* " << iName << " = CallInst::Create(" << opNames[0]
> +        Out << "CallInst* " << iName << " = CallInst::Create(" << opNames[Ops - 1]
>             << ", \"";
>       }
>       printEscapedString(call->getName());
> Index: llvm/lib/VMCore/Instructions.cpp
> ===================================================================
> --- llvm/lib/VMCore/Instructions.cpp    (revision 101132)
> +++ llvm/lib/VMCore/Instructions.cpp    (working copy)
> @@ -107,7 +107,7 @@
>  User::op_iterator CallSite::getCallee() const {
>   Instruction *II(getInstruction());
>   return isCall()
> -    ? cast<CallInst>(II)->op_begin()
> +    ? cast<CallInst>(II)->op_end() - 1 // Skip Function
>     : cast<InvokeInst>(II)->op_end() - 3; // Skip BB, BB, Function
>  }
>
> @@ -308,8 +308,7 @@
>
>  void CallInst::init(Value *Func, Value* const *Params, unsigned NumParams) {
>   assert(NumOperands == NumParams+1 && "NumOperands not set up?");
> -  Use *OL = OperandList;
> -  OL[0] = Func;
> +  Op<-1>() = Func;
>
>   const FunctionType *FTy =
>     cast<FunctionType>(cast<PointerType>(Func->getType())->getElementType());
> @@ -318,20 +317,21 @@
>   assert((NumParams == FTy->getNumParams() ||
>           (FTy->isVarArg() && NumParams > FTy->getNumParams())) &&
>          "Calling a function with bad signature!");
> +
> +  Use *OL = OperandList;
>   for (unsigned i = 0; i != NumParams; ++i) {
>     assert((i >= FTy->getNumParams() ||
>             FTy->getParamType(i) == Params[i]->getType()) &&
>            "Calling a function with a bad signature!");
> -    OL[i+1] = Params[i];
> +    OL[i] = Params[i];
>   }
>  }
>
>  void CallInst::init(Value *Func, Value *Actual1, Value *Actual2) {
>   assert(NumOperands == 3 && "NumOperands not set up?");
> -  Use *OL = OperandList;
> -  OL[0] = Func;
> -  OL[1] = Actual1;
> -  OL[2] = Actual2;
> +  Op<-1>() = Func;
> +  Op<0>() = Actual1;
> +  Op<1>() = Actual2;
>
>   const FunctionType *FTy =
>     cast<FunctionType>(cast<PointerType>(Func->getType())->getElementType());
> @@ -350,9 +350,8 @@
>
>  void CallInst::init(Value *Func, Value *Actual) {
>   assert(NumOperands == 2 && "NumOperands not set up?");
> -  Use *OL = OperandList;
> -  OL[0] = Func;
> -  OL[1] = Actual;
> +  Op<-1>() = Func;
> +  Op<0>() = Actual;
>
>   const FunctionType *FTy =
>     cast<FunctionType>(cast<PointerType>(Func->getType())->getElementType());
> @@ -368,8 +367,7 @@
>
>  void CallInst::init(Value *Func) {
>   assert(NumOperands == 1 && "NumOperands not set up?");
> -  Use *OL = OperandList;
> -  OL[0] = Func;
> +  Op<-1>() = Func;
>
>   const FunctionType *FTy =
>     cast<FunctionType>(cast<PointerType>(Func->getType())->getElementType());
> Index: llvm/lib/VMCore/Verifier.cpp
> ===================================================================
> --- llvm/lib/VMCore/Verifier.cpp        (revision 101132)
> +++ llvm/lib/VMCore/Verifier.cpp        (working copy)
> @@ -1396,7 +1396,7 @@
>     if (Function *F = dyn_cast<Function>(I.getOperand(i))) {
>       // Check to make sure that the "address of" an intrinsic function is never
>       // taken.
> -      Assert1(!F->isIntrinsic() || (i == 0 && isa<CallInst>(I)),
> +      Assert1(!F->isIntrinsic() || (i + 1 == e && isa<CallInst>(I)),
>               "Cannot take the address of an intrinsic!", &I);
>       Assert1(F->getParent() == Mod, "Referencing function in another module!",
>               &I);
> @@ -1479,7 +1479,8 @@
>                 "Instruction does not dominate all uses!", Op, &I);
>       }
>     } else if (isa<InlineAsm>(I.getOperand(i))) {
> -      Assert1((i == 0 && isa<CallInst>(I)) || (i + 3 == e && isa<InvokeInst>(I)),
> +      Assert1((i + 1 == e && isa<CallInst>(I)) ||
> +              (i + 3 == e && isa<InvokeInst>(I)),
>               "Cannot take the address of an inline asm!", &I);
>     }
>   }
> @@ -1614,16 +1615,16 @@
>   default:
>     break;
>   case Intrinsic::dbg_declare: {  // llvm.dbg.declare
> -    Assert1(CI.getOperand(1) && isa<MDNode>(CI.getOperand(1)),
> +    Assert1(CI.getOperand(0) && isa<MDNode>(CI.getOperand(0)),
>                 "invalid llvm.dbg.declare intrinsic call 1", &CI);
> -    MDNode *MD = cast<MDNode>(CI.getOperand(1));
> +    MDNode *MD = cast<MDNode>(CI.getOperand(0));
>     Assert1(MD->getNumOperands() == 1,
>                 "invalid llvm.dbg.declare intrinsic call 2", &CI);
>   } break;
>   case Intrinsic::memcpy:
>   case Intrinsic::memmove:
>   case Intrinsic::memset:
> -    Assert1(isa<ConstantInt>(CI.getOperand(4)),
> +    Assert1(isa<ConstantInt>(CI.getOperand(3)),
>             "alignment argument of memory intrinsics must be a constant int",
>             &CI);
>     break;
> @@ -1632,10 +1633,10 @@
>   case Intrinsic::gcread:
>     if (ID == Intrinsic::gcroot) {
>       AllocaInst *AI =
> -        dyn_cast<AllocaInst>(CI.getOperand(1)->stripPointerCasts());
> +        dyn_cast<AllocaInst>(CI.getOperand(0)->stripPointerCasts());
>       Assert1(AI && AI->getType()->getElementType()->isPointerTy(),
>               "llvm.gcroot parameter #1 must be a pointer alloca.", &CI);
> -      Assert1(isa<Constant>(CI.getOperand(2)),
> +      Assert1(isa<Constant>(CI.getOperand(1)),
>               "llvm.gcroot parameter #2 must be a constant.", &CI);
>     }
>
> @@ -1643,32 +1644,32 @@
>             "Enclosing function does not use GC.", &CI);
>     break;
>   case Intrinsic::init_trampoline:
> -    Assert1(isa<Function>(CI.getOperand(2)->stripPointerCasts()),
> +    Assert1(isa<Function>(CI.getOperand(1)->stripPointerCasts()),
>             "llvm.init_trampoline parameter #2 must resolve to a function.",
>             &CI);
>     break;
>   case Intrinsic::prefetch:
> -    Assert1(isa<ConstantInt>(CI.getOperand(2)) &&
> -            isa<ConstantInt>(CI.getOperand(3)) &&
> -            cast<ConstantInt>(CI.getOperand(2))->getZExtValue() < 2 &&
> -            cast<ConstantInt>(CI.getOperand(3))->getZExtValue() < 4,
> +    Assert1(isa<ConstantInt>(CI.getOperand(1)) &&
> +            isa<ConstantInt>(CI.getOperand(2)) &&
> +            cast<ConstantInt>(CI.getOperand(1))->getZExtValue() < 2 &&
> +            cast<ConstantInt>(CI.getOperand(2))->getZExtValue() < 4,
>             "invalid arguments to llvm.prefetch",
>             &CI);
>     break;
>   case Intrinsic::stackprotector:
> -    Assert1(isa<AllocaInst>(CI.getOperand(2)->stripPointerCasts()),
> +    Assert1(isa<AllocaInst>(CI.getOperand(1)->stripPointerCasts()),
>             "llvm.stackprotector parameter #2 must resolve to an alloca.",
>             &CI);
>     break;
>   case Intrinsic::lifetime_start:
>   case Intrinsic::lifetime_end:
>   case Intrinsic::invariant_start:
> -    Assert1(isa<ConstantInt>(CI.getOperand(1)),
> +    Assert1(isa<ConstantInt>(CI.getOperand(0)),
>             "size argument of memory use markers must be a constant integer",
>             &CI);
>     break;
>   case Intrinsic::invariant_end:
> -    Assert1(isa<ConstantInt>(CI.getOperand(2)),
> +    Assert1(isa<ConstantInt>(CI.getOperand(1)),
>             "llvm.invariant.end parameter #2 must be a constant integer", &CI);
>     break;
>   }
> Index: llvm/lib/VMCore/AsmWriter.cpp
> ===================================================================
> --- llvm/lib/VMCore/AsmWriter.cpp       (revision 101132)
> +++ llvm/lib/VMCore/AsmWriter.cpp       (working copy)
> @@ -1847,6 +1847,7 @@
>     default: Out << " cc" << CI->getCallingConv(); break;
>     }
>
> +    Operand = CI->getCalledValue();
>     const PointerType    *PTy = cast<PointerType>(Operand->getType());
>     const FunctionType   *FTy = cast<FunctionType>(PTy->getElementType());
>     const Type         *RetTy = FTy->getReturnType();
> @@ -1870,10 +1871,10 @@
>       writeOperand(Operand, true);
>     }
>     Out << '(';
> -    for (unsigned op = 1, Eop = I.getNumOperands(); op < Eop; ++op) {
> -      if (op > 1)
> +    for (unsigned op = 0, Eop = CI->getNumOperands() - 1; op < Eop; ++op) {
> +      if (op > 0)
>         Out << ", ";
> -      writeParamOperand(I.getOperand(op), PAL.getParamAttributes(op));
> +      writeParamOperand(CI->getOperand(op), PAL.getParamAttributes(op + 1));
>     }
>     Out << ')';
>     if (PAL.getFnAttributes() != Attribute::None)
> @@ -1917,10 +1918,10 @@
>       writeOperand(Operand, true);
>     }
>     Out << '(';
> -    for (unsigned op = 0, Eop = I.getNumOperands() - 3; op < Eop; ++op) {
> +    for (unsigned op = 0, Eop = II->getNumOperands() - 3; op < Eop; ++op) {
>       if (op)
>         Out << ", ";
> -      writeParamOperand(I.getOperand(op), PAL.getParamAttributes(op + 1));
> +      writeParamOperand(II->getOperand(op), PAL.getParamAttributes(op + 1));
>     }
>
>     Out << ')';
> Index: llvm/lib/VMCore/AutoUpgrade.cpp
> ===================================================================
> --- llvm/lib/VMCore/AutoUpgrade.cpp     (revision 101132)
> +++ llvm/lib/VMCore/AutoUpgrade.cpp     (working copy)
> @@ -338,11 +338,11 @@
>     if (isLoadH || isLoadL || isMovL || isMovSD || isShufPD ||
>         isUnpckhPD || isUnpcklPD || isPunpckhQPD || isPunpcklQPD) {
>       std::vector<Constant*> Idxs;
> -      Value *Op0 = CI->getOperand(1);
> +      Value *Op0 = CI->getOperand(0);
>       ShuffleVectorInst *SI = NULL;
>       if (isLoadH || isLoadL) {
>         Value *Op1 = UndefValue::get(Op0->getType());
> -        Value *Addr = new BitCastInst(CI->getOperand(2),
> +        Value *Addr = new BitCastInst(CI->getOperand(1),
>                                   Type::getDoublePtrTy(C),
>                                       "upgraded.", CI);
>         Value *Load = new LoadInst(Addr, "upgraded.", false, 8, CI);
> @@ -375,7 +375,7 @@
>         SI = new ShuffleVectorInst(ZeroV, Op0, Mask, "upgraded.", CI);
>       } else if (isMovSD ||
>                  isUnpckhPD || isUnpcklPD || isPunpckhQPD || isPunpcklQPD) {
> -        Value *Op1 = CI->getOperand(2);
> +        Value *Op1 = CI->getOperand(1);
>         if (isMovSD) {
>           Idxs.push_back(ConstantInt::get(Type::getInt32Ty(C), 2));
>           Idxs.push_back(ConstantInt::get(Type::getInt32Ty(C), 1));
> @@ -389,8 +389,8 @@
>         Value *Mask = ConstantVector::get(Idxs);
>         SI = new ShuffleVectorInst(Op0, Op1, Mask, "upgraded.", CI);
>       } else if (isShufPD) {
> -        Value *Op1 = CI->getOperand(2);
> -        unsigned MaskVal = cast<ConstantInt>(CI->getOperand(3))->getZExtValue();
> +        Value *Op1 = CI->getOperand(1);
> +        unsigned MaskVal = cast<ConstantInt>(CI->getOperand(2))->getZExtValue();
>         Idxs.push_back(ConstantInt::get(Type::getInt32Ty(C), MaskVal & 1));
>         Idxs.push_back(ConstantInt::get(Type::getInt32Ty(C),
>                                                ((MaskVal >> 1) & 1)+2));
> @@ -410,8 +410,8 @@
>       CI->eraseFromParent();
>     } else if (F->getName() == "llvm.x86.sse41.pmulld") {
>       // Upgrade this set of intrinsics into vector multiplies.
> -      Instruction *Mul = BinaryOperator::CreateMul(CI->getOperand(1),
> -                                                   CI->getOperand(2),
> +      Instruction *Mul = BinaryOperator::CreateMul(CI->getOperand(0),
> +                                                   CI->getOperand(1),
>                                                    CI->getName(),
>                                                    CI);
>       // Fix up all the uses with our new multiply.
> @@ -438,10 +438,10 @@
>   case Intrinsic::x86_mmx_psrl_w: {
>     Value *Operands[2];
>
> -    Operands[0] = CI->getOperand(1);
> +    Operands[0] = CI->getOperand(0);
>
>     // Cast the second parameter to the correct type.
> -    BitCastInst *BC = new BitCastInst(CI->getOperand(2),
> +    BitCastInst *BC = new BitCastInst(CI->getOperand(1),
>                                       NewFn->getFunctionType()->getParamType(1),
>                                       "upgraded.", CI);
>     Operands[1] = BC;
> @@ -465,9 +465,9 @@
>   case Intrinsic::ctlz:
>   case Intrinsic::ctpop:
>   case Intrinsic::cttz: {
> -    //  Build a small vector of the 1..(N-1) operands, which are the
> +    //  Build a small vector of the 0..(N-1) operands, which are the
>     //  parameters.
> -    SmallVector<Value*, 8> Operands(CI->op_begin()+1, CI->op_end());
> +    SmallVector<Value*, 8> Operands(CI->op_begin(), CI->op_end() - 1);
>
>     //  Construct a new CallInst
>     CallInst *NewCI = CallInst::Create(NewFn, Operands.begin(), Operands.end(),
> @@ -502,7 +502,7 @@
>   case Intrinsic::eh_selector:
>   case Intrinsic::eh_typeid_for: {
>     // Only the return type changed.
> -    SmallVector<Value*, 8> Operands(CI->op_begin() + 1, CI->op_end());
> +    SmallVector<Value*, 8> Operands(CI->op_begin(), CI->op_end() - 1);
>     CallInst *NewCI = CallInst::Create(NewFn, Operands.begin(), Operands.end(),
>                                        "upgraded." + CI->getName(), CI);
>     NewCI->setTailCall(CI->isTailCall());
> @@ -525,8 +525,8 @@
>   case Intrinsic::memset: {
>     // Add isVolatile
>     const llvm::Type *I1Ty = llvm::Type::getInt1Ty(CI->getContext());
> -    Value *Operands[5] = { CI->getOperand(1), CI->getOperand(2),
> -                           CI->getOperand(3), CI->getOperand(4),
> +    Value *Operands[5] = { CI->getOperand(0), CI->getOperand(1),
> +                           CI->getOperand(2), CI->getOperand(3),
>                            llvm::ConstantInt::get(I1Ty, 0) };
>     CallInst *NewCI = CallInst::Create(NewFn, Operands, Operands+5,
>                                        CI->getName(), CI);
> @@ -608,7 +608,8 @@
>   if (Function *Declare = M->getFunction("llvm.dbg.declare")) {
>     if (!Declare->use_empty()) {
>       DbgDeclareInst *DDI = cast<DbgDeclareInst>(Declare->use_back());
> -      if (!isa<MDNode>(DDI->getOperand(1)) ||!isa<MDNode>(DDI->getOperand(2))) {
> +      if (!isa<MDNode>(DDI->getOperand(0)) ||
> +          !isa<MDNode>(DDI->getOperand(1))) {
>         while (!Declare->use_empty()) {
>           CallInst *CI = cast<CallInst>(Declare->use_back());
>           CI->eraseFromParent();
> Index: llvm/lib/VMCore/IntrinsicInst.cpp
> ===================================================================
> --- llvm/lib/VMCore/IntrinsicInst.cpp   (revision 101132)
> +++ llvm/lib/VMCore/IntrinsicInst.cpp   (working copy)
> @@ -54,7 +54,7 @@
>  ///
>
>  Value *DbgDeclareInst::getAddress() const {
> -  if (MDNode* MD = cast_or_null<MDNode>(getOperand(1)))
> +  if (MDNode* MD = cast_or_null<MDNode>(getOperand(0)))
>     return MD->getOperand(0);
>   else
>     return NULL;
> @@ -65,9 +65,9 @@
>  ///
>
>  const Value *DbgValueInst::getValue() const {
> -  return cast<MDNode>(getOperand(1))->getOperand(0);
> +  return cast<MDNode>(getOperand(0))->getOperand(0);
>  }
>
>  Value *DbgValueInst::getValue() {
> -  return cast<MDNode>(getOperand(1))->getOperand(0);
> +  return cast<MDNode>(getOperand(0))->getOperand(0);
>  }
> Index: llvm/lib/Transforms/Utils/BuildLibCalls.cpp
> ===================================================================
> --- llvm/lib/Transforms/Utils/BuildLibCalls.cpp (revision 101132)
> +++ llvm/lib/Transforms/Utils/BuildLibCalls.cpp (working copy)
> @@ -395,11 +395,11 @@
>         FT->getParamType(2) != TD->getIntPtrType(Context) ||
>         FT->getParamType(3) != TD->getIntPtrType(Context))
>       return false;
> -
> -    if (isFoldable(4, 3, false)) {
> -      EmitMemCpy(CI->getOperand(1), CI->getOperand(2), CI->getOperand(3),
> +
> +    if (isFoldable(3, 2, false)) {
> +      EmitMemCpy(CI->getOperand(0), CI->getOperand(1), CI->getOperand(2),
>                  1, false, B, TD);
> -      replaceCall(CI->getOperand(1));
> +      replaceCall(CI->getOperand(0));
>       return true;
>     }
>     return false;
> @@ -418,11 +418,11 @@
>         FT->getParamType(2) != TD->getIntPtrType(Context) ||
>         FT->getParamType(3) != TD->getIntPtrType(Context))
>       return false;
> -
> -    if (isFoldable(4, 3, false)) {
> -      EmitMemMove(CI->getOperand(1), CI->getOperand(2), CI->getOperand(3),
> +
> +    if (isFoldable(3, 2, false)) {
> +      EmitMemMove(CI->getOperand(0), CI->getOperand(1), CI->getOperand(2),
>                   1, false, B, TD);
> -      replaceCall(CI->getOperand(1));
> +      replaceCall(CI->getOperand(0));
>       return true;
>     }
>     return false;
> @@ -436,12 +436,12 @@
>         FT->getParamType(2) != TD->getIntPtrType(Context) ||
>         FT->getParamType(3) != TD->getIntPtrType(Context))
>       return false;
> -
> -    if (isFoldable(4, 3, false)) {
> -      Value *Val = B.CreateIntCast(CI->getOperand(2), B.getInt8Ty(),
> +
> +    if (isFoldable(3, 2, false)) {
> +      Value *Val = B.CreateIntCast(CI->getOperand(1), B.getInt8Ty(),
>                                    false);
> -      EmitMemSet(CI->getOperand(1), Val,  CI->getOperand(3), false, B, TD);
> -      replaceCall(CI->getOperand(1));
> +      EmitMemSet(CI->getOperand(0), Val,  CI->getOperand(2), false, B, TD);
> +      replaceCall(CI->getOperand(0));
>       return true;
>     }
>     return false;
> @@ -462,8 +462,8 @@
>     // st[rp]cpy_chk call which may fail at runtime if the size is too long.
>     // TODO: It might be nice to get a maximum length out of the possible
>     // string lengths for varying.
> -    if (isFoldable(3, 2, true)) {
> -      Value *Ret = EmitStrCpy(CI->getOperand(1), CI->getOperand(2), B, TD,
> +    if (isFoldable(2, 1, true)) {
> +      Value *Ret = EmitStrCpy(CI->getOperand(0), CI->getOperand(1), B, TD,
>                               Name.substr(2, 6));
>       replaceCall(Ret);
>       return true;
> @@ -478,10 +478,10 @@
>         FT->getParamType(0) != Type::getInt8PtrTy(Context) ||
>         !FT->getParamType(2)->isIntegerTy() ||
>         FT->getParamType(3) != TD->getIntPtrType(Context))
> -
> -    if (isFoldable(4, 3, false)) {
> -      Value *Ret = EmitStrNCpy(CI->getOperand(1), CI->getOperand(2),
> -                               CI->getOperand(3), B, TD, Name.substr(2, 7));
> +
> +    if (isFoldable(3, 2, false)) {
> +      Value *Ret = EmitStrNCpy(CI->getOperand(0), CI->getOperand(1),
> +                               CI->getOperand(2), B, TD, Name.substr(2, 7));
>       replaceCall(Ret);
>       return true;
>     }
> Index: llvm/lib/Transforms/Utils/AddrModeMatcher.cpp
> ===================================================================
> --- llvm/lib/Transforms/Utils/AddrModeMatcher.cpp       (revision 101132)
> +++ llvm/lib/Transforms/Utils/AddrModeMatcher.cpp       (working copy)
> @@ -382,7 +382,7 @@
>   std::vector<InlineAsm::ConstraintInfo>
>   Constraints = IA->ParseConstraints();
>
> -  unsigned ArgNo = 1;   // ArgNo - The operand of the CallInst.
> +  unsigned ArgNo = 0;   // ArgNo - The operand of the CallInst.
>   for (unsigned i = 0, e = Constraints.size(); i != e; ++i) {
>     TargetLowering::AsmOperandInfo OpInfo(Constraints[i]);
>
> @@ -450,7 +450,7 @@
>
>     if (CallInst *CI = dyn_cast<CallInst>(U)) {
>       InlineAsm *IA = dyn_cast<InlineAsm>(CI->getCalledValue());
> -      if (IA == 0) return true;
> +      if (!IA) return true;
>
>       // If this is a memory operand, we're cool, otherwise bail out.
>       if (!IsOperandAMemoryOperand(CI, IA, I, TLI))
> Index: llvm/lib/Transforms/Utils/InlineFunction.cpp
> ===================================================================
> --- llvm/lib/Transforms/Utils/InlineFunction.cpp        (revision 101132)
> +++ llvm/lib/Transforms/Utils/InlineFunction.cpp        (working copy)
> @@ -66,7 +66,7 @@
>
>     // Next, create the new invoke instruction, inserting it at the end
>     // of the old basic block.
> -    SmallVector<Value*, 8> InvokeArgs(CI->op_begin()+1, CI->op_end());
> +    SmallVector<Value*, 8> InvokeArgs(CI->op_begin(), CI->op_end() - 1);
>     InvokeInst *II =
>       InvokeInst::Create(CI->getCalledValue(), Split, InvokeDest,
>                          InvokeArgs.begin(), InvokeArgs.end(),
> Index: llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp
> ===================================================================
> --- llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp      (revision 101132)
> +++ llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp      (working copy)
> @@ -73,10 +73,10 @@
>     if (AI->getType() != ArgVTy) {
>       Instruction::CastOps opcode = CastInst::getCastOpcode(AI, false, ArgVTy,
>                                                             false);
> -      InitCall->setOperand(2,
> +      InitCall->setOperand(1,
>           CastInst::Create(opcode, AI, ArgVTy, "argv.cast", InitCall));
>     } else {
> -      InitCall->setOperand(2, AI);
> +      InitCall->setOperand(1, AI);
>     }
>     /* FALL THROUGH */
>
> @@ -93,12 +93,12 @@
>       }
>       opcode = CastInst::getCastOpcode(AI, true,
>                                        Type::getInt32Ty(Context), true);
> -      InitCall->setOperand(1,
> +      InitCall->setOperand(0,
>           CastInst::Create(opcode, AI, Type::getInt32Ty(Context),
>                            "argc.cast", InitCall));
>     } else {
>       AI->replaceAllUsesWith(InitCall);
> -      InitCall->setOperand(1, AI);
> +      InitCall->setOperand(0, AI);
>     }
>
>   case 0: break;
> Index: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
> ===================================================================
> --- llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp     (revision 101132)
> +++ llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp     (working copy)
> @@ -250,7 +250,7 @@
>     // If we are passing this argument into call as the corresponding
>     // argument operand, then the argument is dynamically constant.
>     // Otherwise, we cannot transform this function safely.
> -    if (CI->getOperand(ArgNo+1) == Arg)
> +    if (CI->getOperand(ArgNo) == Arg)
>       return true;
>   }
>
> @@ -442,7 +442,7 @@
>   // required PHI nodes, add entries into the PHI node for the actual
>   // parameters passed into the tail-recursive call.
>   for (unsigned i = 0, e = CI->getNumOperands()-1; i != e; ++i)
> -    ArgumentPHIs[i]->addIncoming(CI->getOperand(i+1), BB);
> +    ArgumentPHIs[i]->addIncoming(CI->getOperand(i), BB);
>
>   // If we are introducing an accumulator variable to eliminate the recursion,
>   // do so now.  Note that we _know_ that no subsequent tail recursion
> Index: llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
> ===================================================================
> --- llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp (revision 101132)
> +++ llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp (working copy)
> @@ -254,7 +254,7 @@
>     if (Instruction *TheCopy = isOnlyCopiedFromConstantGlobal(AI)) {
>       DEBUG(dbgs() << "Found alloca equal to global: " << *AI << '\n');
>       DEBUG(dbgs() << "  memcpy = " << *TheCopy << '\n');
> -      Constant *TheSrc = cast<Constant>(TheCopy->getOperand(2));
> +      Constant *TheSrc = cast<Constant>(TheCopy->getOperand(1));
>       AI->replaceAllUsesWith(ConstantExpr::getBitCast(TheSrc, AI->getType()));
>       TheCopy->eraseFromParent();  // Don't mutate the global.
>       AI->eraseFromParent();
> @@ -404,11 +404,11 @@
>       isSafeGEP(GEPI, AI, GEPOffset, Info);
>       if (!Info.isUnsafe)
>         isSafeForScalarRepl(GEPI, AI, GEPOffset, Info);
> -    } else if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(UI)) {
> +    } else if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(User)) {
>       ConstantInt *Length = dyn_cast<ConstantInt>(MI->getLength());
>       if (Length)
>         isSafeMemAccess(AI, Offset, Length->getZExtValue(), 0,
> -                        UI.getOperandNo() == 1, Info);
> +                        UI.getOperandNo() == 0, Info);
>       else
>         MarkUnsafe(Info);
>     } else if (LoadInst *LI = dyn_cast<LoadInst>(User)) {
> @@ -756,7 +756,7 @@
>   }
>
>   // Process each element of the aggregate.
> -  Value *TheFn = MI->getOperand(0);
> +  Value *TheFn = MI->getCalledValue();
>   const Type *BytePtrTy = MI->getRawDest()->getType();
>   bool SROADest = MI->getRawDest() == Inst;
>
> @@ -814,7 +814,7 @@
>       // If the stored element is zero (common case), just store a null
>       // constant.
>       Constant *StoreVal;
> -      if (ConstantInt *CI = dyn_cast<ConstantInt>(MI->getOperand(2))) {
> +      if (ConstantInt *CI = dyn_cast<ConstantInt>(MI->getOperand(1))) {
>         if (CI->isZero()) {
>           StoreVal = Constant::getNullValue(EltTy);  // 0.0, null, 0, <0,0>
>         } else {
> @@ -877,7 +877,7 @@
>       Value *Ops[] = {
>         SROADest ? EltPtr : OtherElt,  // Dest ptr
>         SROADest ? OtherElt : EltPtr,  // Src ptr
> -        ConstantInt::get(MI->getOperand(3)->getType(), EltSize), // Size
> +        ConstantInt::get(MI->getOperand(2)->getType(), EltSize), // Size
>         // Align
>         ConstantInt::get(Type::getInt32Ty(MI->getContext()), OtherEltAlign),
>         MI->getVolatileCst()
> @@ -892,8 +892,8 @@
>     } else {
>       assert(isa<MemSetInst>(MI));
>       Value *Ops[] = {
> -        EltPtr, MI->getOperand(2),  // Dest, Value,
> -        ConstantInt::get(MI->getOperand(3)->getType(), EltSize), // Size
> +        EltPtr, MI->getOperand(1),  // Dest, Value,
> +        ConstantInt::get(MI->getOperand(2)->getType(), EltSize), // Size
>         Zero,  // Align
>         ConstantInt::get(Type::getInt1Ty(MI->getContext()), 0) // isVolatile
>       };
> @@ -1737,12 +1737,12 @@
>     if (isOffset) return false;
>
>     // If the memintrinsic isn't using the alloca as the dest, reject it.
> -    if (UI.getOperandNo() != 1) return false;
> +    if (UI.getOperandNo() != 0) return false;
>
>     MemIntrinsic *MI = cast<MemIntrinsic>(U);
>
>     // If the source of the memcpy/move is not a constant global, reject it.
> -    if (!PointsToConstantGlobal(MI->getOperand(2)))
> +    if (!PointsToConstantGlobal(MI->getOperand(1)))
>       return false;
>
>     // Otherwise, the transform is safe.  Remember the copy instruction.
> Index: llvm/lib/Transforms/Scalar/GVN.cpp
> ===================================================================
> --- llvm/lib/Transforms/Scalar/GVN.cpp  (revision 101132)
> +++ llvm/lib/Transforms/Scalar/GVN.cpp  (working copy)
> @@ -271,7 +271,7 @@
>   e.function = C->getCalledFunction();
>   e.opcode = Expression::CALL;
>
> -  for (CallInst::op_iterator I = C->op_begin()+1, E = C->op_end();
> +  for (CallInst::op_iterator I = C->op_begin(), E = C->op_end() - 1;
>        I != E; ++I)
>     e.varargs.push_back(lookup_or_add(*I));
>
> @@ -452,7 +452,7 @@
>         return nextValueNumber++;
>       }
>
> -      for (unsigned i = 1; i < C->getNumOperands(); ++i) {
> +      for (unsigned i = 0, e = C->getNumOperands() - 1; i < e; ++i) {
>         uint32_t c_vn = lookup_or_add(C->getOperand(i));
>         uint32_t cd_vn = lookup_or_add(local_cdep->getOperand(i));
>         if (c_vn != cd_vn) {
> @@ -508,7 +508,7 @@
>       valueNumbering[C] = nextValueNumber;
>       return nextValueNumber++;
>     }
> -    for (unsigned i = 1; i < C->getNumOperands(); ++i) {
> +    for (unsigned i = 0, e = C->getNumOperands() - 1; i < e; ++i) {
>       uint32_t c_vn = lookup_or_add(C->getOperand(i));
>       uint32_t cd_vn = lookup_or_add(cdep->getOperand(i));
>       if (c_vn != cd_vn) {
> Index: llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
> ===================================================================
> --- llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp     (revision 101132)
> +++ llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp     (working copy)
> @@ -110,8 +110,8 @@
>       return 0;
>
>     // Extract some information from the instruction
> -    Value *Dst = CI->getOperand(1);
> -    Value *Src = CI->getOperand(2);
> +    Value *Dst = CI->getOperand(0);
> +    Value *Src = CI->getOperand(1);
>
>     // See if we can get the length of the input string.
>     uint64_t Len = GetStringLength(Src);
> @@ -162,12 +162,12 @@
>       return 0;
>
>     // Extract some information from the instruction
> -    Value *Dst = CI->getOperand(1);
> -    Value *Src = CI->getOperand(2);
> +    Value *Dst = CI->getOperand(0);
> +    Value *Src = CI->getOperand(1);
>     uint64_t Len;
>
>     // We don't do anything if length is not constant
> -    if (ConstantInt *LengthArg = dyn_cast<ConstantInt>(CI->getOperand(3)))
> +    if (ConstantInt *LengthArg = dyn_cast<ConstantInt>(CI->getOperand(2)))
>       Len = LengthArg->getZExtValue();
>     else
>       return 0;
> @@ -207,11 +207,11 @@
>         FT->getParamType(0) != FT->getReturnType())
>       return 0;
>
> -    Value *SrcStr = CI->getOperand(1);
> +    Value *SrcStr = CI->getOperand(0);
>
>     // If the second operand is non-constant, see if we can compute the length
>     // of the input string and turn this into memchr.
> -    ConstantInt *CharC = dyn_cast<ConstantInt>(CI->getOperand(2));
> +    ConstantInt *CharC = dyn_cast<ConstantInt>(CI->getOperand(1));
>     if (CharC == 0) {
>       // These optimizations require TargetData.
>       if (!TD) return 0;
> @@ -220,7 +220,7 @@
>       if (Len == 0 || !FT->getParamType(1)->isIntegerTy(32))// memchr needs i32.
>         return 0;
>
> -      return EmitMemChr(SrcStr, CI->getOperand(2), // include nul.
> +      return EmitMemChr(SrcStr, CI->getOperand(1), // include nul.
>                         ConstantInt::get(TD->getIntPtrType(*Context), Len),
>                         B, TD);
>     }
> @@ -265,7 +265,7 @@
>         FT->getParamType(0) != Type::getInt8PtrTy(*Context))
>       return 0;
>
> -    Value *Str1P = CI->getOperand(1), *Str2P = CI->getOperand(2);
> +    Value *Str1P = CI->getOperand(0), *Str2P = CI->getOperand(1);
>     if (Str1P == Str2P)      // strcmp(x,x)  -> 0
>       return ConstantInt::get(CI->getType(), 0);
>
> @@ -314,13 +314,13 @@
>         !FT->getParamType(2)->isIntegerTy())
>       return 0;
>
> -    Value *Str1P = CI->getOperand(1), *Str2P = CI->getOperand(2);
> +    Value *Str1P = CI->getOperand(0), *Str2P = CI->getOperand(1);
>     if (Str1P == Str2P)      // strncmp(x,x,n)  -> 0
>       return ConstantInt::get(CI->getType(), 0);
>
>     // Get the length argument if it is constant.
>     uint64_t Length;
> -    if (ConstantInt *LengthArg = dyn_cast<ConstantInt>(CI->getOperand(3)))
> +    if (ConstantInt *LengthArg = dyn_cast<ConstantInt>(CI->getOperand(2)))
>       Length = LengthArg->getZExtValue();
>     else
>       return 0;
> @@ -365,7 +365,7 @@
>         FT->getParamType(0) != Type::getInt8PtrTy(*Context))
>       return 0;
>
> -    Value *Dst = CI->getOperand(1), *Src = CI->getOperand(2);
> +    Value *Dst = CI->getOperand(0), *Src = CI->getOperand(1);
>     if (Dst == Src)      // strcpy(x,x)  -> x
>       return Src;
>
> @@ -381,7 +381,7 @@
>     if (OptChkCall)
>       EmitMemCpyChk(Dst, Src,
>                     ConstantInt::get(TD->getIntPtrType(*Context), Len),
> -                    CI->getOperand(3), B, TD);
> +                    CI->getOperand(2), B, TD);
>     else
>       EmitMemCpy(Dst, Src,
>                  ConstantInt::get(TD->getIntPtrType(*Context), Len),
> @@ -402,9 +402,9 @@
>         !FT->getParamType(2)->isIntegerTy())
>       return 0;
>
> -    Value *Dst = CI->getOperand(1);
> -    Value *Src = CI->getOperand(2);
> -    Value *LenOp = CI->getOperand(3);
> +    Value *Dst = CI->getOperand(0);
> +    Value *Src = CI->getOperand(1);
> +    Value *LenOp = CI->getOperand(2);
>
>     // See if we can get the length of the input string.
>     uint64_t SrcLen = GetStringLength(Src);
> @@ -452,7 +452,7 @@
>         !FT->getReturnType()->isIntegerTy())
>       return 0;
>
> -    Value *Src = CI->getOperand(1);
> +    Value *Src = CI->getOperand(0);
>
>     // Constant folding: strlen("xyz") -> 3
>     if (uint64_t Len = GetStringLength(Src))
> @@ -477,7 +477,7 @@
>         !FT->getParamType(1)->isPointerTy())
>       return 0;
>
> -    Value *EndPtr = CI->getOperand(2);
> +    Value *EndPtr = CI->getOperand(1);
>     if (isa<ConstantPointerNull>(EndPtr)) {
>       CI->setOnlyReadsMemory();
>       CI->addAttribute(1, Attribute::NoCapture);
> @@ -500,17 +500,17 @@
>       return 0;
>
>     // fold strstr(x, x) -> x.
> -    if (CI->getOperand(1) == CI->getOperand(2))
> -      return B.CreateBitCast(CI->getOperand(1), CI->getType());
> +    if (CI->getOperand(0) == CI->getOperand(1))
> +      return B.CreateBitCast(CI->getOperand(0), CI->getType());
>
>     // See if either input string is a constant string.
>     std::string SearchStr, ToFindStr;
> -    bool HasStr1 = GetConstantStringInfo(CI->getOperand(1), SearchStr);
> -    bool HasStr2 = GetConstantStringInfo(CI->getOperand(2), ToFindStr);
> +    bool HasStr1 = GetConstantStringInfo(CI->getOperand(0), SearchStr);
> +    bool HasStr2 = GetConstantStringInfo(CI->getOperand(1), ToFindStr);
>
>     // fold strstr(x, "") -> x.
>     if (HasStr2 && ToFindStr.empty())
> -      return B.CreateBitCast(CI->getOperand(1), CI->getType());
> +      return B.CreateBitCast(CI->getOperand(0), CI->getType());
>
>     // If both strings are known, constant fold it.
>     if (HasStr1 && HasStr2) {
> @@ -520,14 +520,14 @@
>         return Constant::getNullValue(CI->getType());
>
>       // strstr("abcd", "bc") -> gep((char*)"abcd", 1)
> -      Value *Result = CastToCStr(CI->getOperand(1), B);
> +      Value *Result = CastToCStr(CI->getOperand(0), B);
>       Result = B.CreateConstInBoundsGEP1_64(Result, Offset, "strstr");
>       return B.CreateBitCast(Result, CI->getType());
>     }
>
>     // fold strstr(x, "y") -> strchr(x, 'y').
>     if (HasStr2 && ToFindStr.size() == 1)
> -      return B.CreateBitCast(EmitStrChr(CI->getOperand(1), ToFindStr[0], B, TD),
> +      return B.CreateBitCast(EmitStrChr(CI->getOperand(0), ToFindStr[0], B, TD),
>                              CI->getType());
>     return 0;
>   }
> @@ -545,13 +545,13 @@
>         !FT->getReturnType()->isIntegerTy(32))
>       return 0;
>
> -    Value *LHS = CI->getOperand(1), *RHS = CI->getOperand(2);
> +    Value *LHS = CI->getOperand(0), *RHS = CI->getOperand(1);
>
>     if (LHS == RHS)  // memcmp(s,s,x) -> 0
>       return Constant::getNullValue(CI->getType());
>
>     // Make sure we have a constant length.
> -    ConstantInt *LenC = dyn_cast<ConstantInt>(CI->getOperand(3));
> +    ConstantInt *LenC = dyn_cast<ConstantInt>(CI->getOperand(2));
>     if (!LenC) return 0;
>     uint64_t Len = LenC->getZExtValue();
>
> @@ -595,9 +595,9 @@
>       return 0;
>
>     // memcpy(x, y, n) -> llvm.memcpy(x, y, n, 1)
> -    EmitMemCpy(CI->getOperand(1), CI->getOperand(2),
> -               CI->getOperand(3), 1, false, B, TD);
> -    return CI->getOperand(1);
> +    EmitMemCpy(CI->getOperand(0), CI->getOperand(1),
> +               CI->getOperand(2), 1, false, B, TD);
> +    return CI->getOperand(0);
>   }
>  };
>
> @@ -617,9 +617,9 @@
>       return 0;
>
>     // memmove(x, y, n) -> llvm.memmove(x, y, n, 1)
> -    EmitMemMove(CI->getOperand(1), CI->getOperand(2),
> -                CI->getOperand(3), 1, false, B, TD);
> -    return CI->getOperand(1);
> +    EmitMemMove(CI->getOperand(0), CI->getOperand(1),
> +                CI->getOperand(2), 1, false, B, TD);
> +    return CI->getOperand(0);
>   }
>  };
>
> @@ -639,10 +639,10 @@
>       return 0;
>
>     // memset(p, v, n) -> llvm.memset(p, v, n, 1)
> -    Value *Val = B.CreateIntCast(CI->getOperand(2), Type::getInt8Ty(*Context),
> -                                 false);
> -    EmitMemSet(CI->getOperand(1), Val,  CI->getOperand(3), false, B, TD);
> -    return CI->getOperand(1);
> +    Value *Val = B.CreateIntCast(CI->getOperand(1), Type::getInt8Ty(*Context),
> +                                false);
> +    EmitMemSet(CI->getOperand(0), Val,  CI->getOperand(2), false, B, TD);
> +    return CI->getOperand(0);
>   }
>  };
>
> @@ -663,7 +663,7 @@
>         !FT->getParamType(0)->isFloatingPointTy())
>       return 0;
>
> -    Value *Op1 = CI->getOperand(1), *Op2 = CI->getOperand(2);
> +    Value *Op1 = CI->getOperand(0), *Op2 = CI->getOperand(1);
>     if (ConstantFP *Op1C = dyn_cast<ConstantFP>(Op1)) {
>       if (Op1C->isExactlyValue(1.0))  // pow(1.0, x) -> 1.0
>         return Op1C;
> @@ -717,7 +717,7 @@
>         !FT->getParamType(0)->isFloatingPointTy())
>       return 0;
>
> -    Value *Op = CI->getOperand(1);
> +    Value *Op = CI->getOperand(0);
>     // Turn exp2(sitofp(x)) -> ldexp(1.0, sext(x))  if sizeof(x) <= 32
>     // Turn exp2(uitofp(x)) -> ldexp(1.0, zext(x))  if sizeof(x) < 32
>     Value *LdExpArg = 0;
> @@ -769,7 +769,7 @@
>       return 0;
>
>     // If this is something like 'floor((double)floatval)', convert to floorf.
> -    FPExtInst *Cast = dyn_cast<FPExtInst>(CI->getOperand(1));
> +    FPExtInst *Cast = dyn_cast<FPExtInst>(CI->getOperand(0));
>     if (Cast == 0 || !Cast->getOperand(0)->getType()->isFloatTy())
>       return 0;
>
> @@ -798,7 +798,7 @@
>         !FT->getParamType(0)->isIntegerTy())
>       return 0;
>
> -    Value *Op = CI->getOperand(1);
> +    Value *Op = CI->getOperand(0);
>
>     // Constant fold.
>     if (ConstantInt *CI = dyn_cast<ConstantInt>(Op)) {
> @@ -834,7 +834,7 @@
>       return 0;
>
>     // isdigit(c) -> (c-'0') <u 10
> -    Value *Op = CI->getOperand(1);
> +    Value *Op = CI->getOperand(0);
>     Op = B.CreateSub(Op, ConstantInt::get(Type::getInt32Ty(*Context), '0'),
>                      "isdigittmp");
>     Op = B.CreateICmpULT(Op, ConstantInt::get(Type::getInt32Ty(*Context), 10),
> @@ -855,7 +855,7 @@
>       return 0;
>
>     // isascii(c) -> c <u 128
> -    Value *Op = CI->getOperand(1);
> +    Value *Op = CI->getOperand(0);
>     Op = B.CreateICmpULT(Op, ConstantInt::get(Type::getInt32Ty(*Context), 128),
>                          "isascii");
>     return B.CreateZExt(Op, CI->getType());
> @@ -874,7 +874,7 @@
>       return 0;
>
>     // abs(x) -> x >s -1 ? x : -x
> -    Value *Op = CI->getOperand(1);
> +    Value *Op = CI->getOperand(0);
>     Value *Pos = B.CreateICmpSGT(Op,
>                              Constant::getAllOnesValue(Op->getType()),
>                                  "ispos");
> @@ -896,7 +896,7 @@
>       return 0;
>
>     // isascii(c) -> c & 0x7f
> -    return B.CreateAnd(CI->getOperand(1),
> +    return B.CreateAnd(CI->getOperand(0),
>                        ConstantInt::get(CI->getType(),0x7F));
>   }
>  };
> @@ -919,7 +919,7 @@
>
>     // Check for a fixed format string.
>     std::string FormatStr;
> -    if (!GetConstantStringInfo(CI->getOperand(1), FormatStr))
> +    if (!GetConstantStringInfo(CI->getOperand(0), FormatStr))
>       return 0;
>
>     // Empty format string -> noop.
> @@ -951,10 +951,10 @@
>     }
>
>     // Optimize specific format strings.
> -    // printf("%c", chr) --> putchar(*(i8*)dst)
> +    // printf("%c", chr) --> putchar(chr)
>     if (FormatStr == "%c" && CI->getNumOperands() > 2 &&
> -        CI->getOperand(2)->getType()->isIntegerTy()) {
> -      Value *Res = EmitPutChar(CI->getOperand(2), B, TD);
> +        CI->getOperand(1)->getType()->isIntegerTy()) {
> +      Value *Res = EmitPutChar(CI->getOperand(1), B, TD);
>
>       if (CI->use_empty()) return CI;
>       return B.CreateIntCast(Res, CI->getType(), true);
> @@ -962,9 +962,9 @@
>
>     // printf("%s\n", str) --> puts(str)
>     if (FormatStr == "%s\n" && CI->getNumOperands() > 2 &&
> -        CI->getOperand(2)->getType()->isPointerTy() &&
> +        CI->getOperand(1)->getType()->isPointerTy() &&
>         CI->use_empty()) {
> -      EmitPutS(CI->getOperand(2), B, TD);
> +      EmitPutS(CI->getOperand(1), B, TD);
>       return CI;
>     }
>     return 0;
> @@ -985,7 +985,7 @@
>
>     // Check for a fixed format string.
>     std::string FormatStr;
> -    if (!GetConstantStringInfo(CI->getOperand(2), FormatStr))
> +    if (!GetConstantStringInfo(CI->getOperand(1), FormatStr))
>       return 0;
>
>     // If we just have a format string (nothing else crazy) transform it.
> @@ -1000,7 +1000,7 @@
>       if (!TD) return 0;
>
>       // sprintf(str, fmt) -> llvm.memcpy(str, fmt, strlen(fmt)+1, 1)
> -      EmitMemCpy(CI->getOperand(1), CI->getOperand(2), // Copy the nul byte.
> +      EmitMemCpy(CI->getOperand(0), CI->getOperand(1), // Copy the nul byte.
>                  ConstantInt::get(TD->getIntPtrType(*Context),
>                  FormatStr.size()+1), 1, false, B, TD);
>       return ConstantInt::get(CI->getType(), FormatStr.size());
> @@ -1014,10 +1014,10 @@
>     // Decode the second character of the format string.
>     if (FormatStr[1] == 'c') {
>       // sprintf(dst, "%c", chr) --> *(i8*)dst = chr; *((i8*)dst+1) = 0
> -      if (!CI->getOperand(3)->getType()->isIntegerTy()) return 0;
> -      Value *V = B.CreateTrunc(CI->getOperand(3),
> +      if (!CI->getOperand(2)->getType()->isIntegerTy()) return 0;
> +      Value *V = B.CreateTrunc(CI->getOperand(2),
>                                Type::getInt8Ty(*Context), "char");
> -      Value *Ptr = CastToCStr(CI->getOperand(1), B);
> +      Value *Ptr = CastToCStr(CI->getOperand(0), B);
>       B.CreateStore(V, Ptr);
>       Ptr = B.CreateGEP(Ptr, ConstantInt::get(Type::getInt32Ty(*Context), 1),
>                         "nul");
> @@ -1031,13 +1031,13 @@
>       if (!TD) return 0;
>
>       // sprintf(dest, "%s", str) -> llvm.memcpy(dest, str, strlen(str)+1, 1)
> -      if (!CI->getOperand(3)->getType()->isPointerTy()) return 0;
> +      if (!CI->getOperand(2)->getType()->isPointerTy()) return 0;
>
> -      Value *Len = EmitStrLen(CI->getOperand(3), B, TD);
> +      Value *Len = EmitStrLen(CI->getOperand(2), B, TD);
>       Value *IncLen = B.CreateAdd(Len,
>                                   ConstantInt::get(Len->getType(), 1),
>                                   "leninc");
> -      EmitMemCpy(CI->getOperand(1), CI->getOperand(3), IncLen, 1, false, B, TD);
> +      EmitMemCpy(CI->getOperand(0), CI->getOperand(2), IncLen, 1, false, B, TD);
>
>       // The sprintf result is the unincremented number of bytes in the string.
>       return B.CreateIntCast(Len, CI->getType(), false);
> @@ -1061,8 +1061,8 @@
>       return 0;
>
>     // Get the element size and count.
> -    ConstantInt *SizeC = dyn_cast<ConstantInt>(CI->getOperand(2));
> -    ConstantInt *CountC = dyn_cast<ConstantInt>(CI->getOperand(3));
> +    ConstantInt *SizeC = dyn_cast<ConstantInt>(CI->getOperand(1));
> +    ConstantInt *CountC = dyn_cast<ConstantInt>(CI->getOperand(2));
>     if (!SizeC || !CountC) return 0;
>     uint64_t Bytes = SizeC->getZExtValue()*CountC->getZExtValue();
>
> @@ -1072,8 +1072,8 @@
>
>     // If this is writing one byte, turn it into fputc.
>     if (Bytes == 1) {  // fwrite(S,1,1,F) -> fputc(S[0],F)
> -      Value *Char = B.CreateLoad(CastToCStr(CI->getOperand(1), B), "char");
> -      EmitFPutC(Char, CI->getOperand(4), B, TD);
> +      Value *Char = B.CreateLoad(CastToCStr(CI->getOperand(0), B), "char");
> +      EmitFPutC(Char, CI->getOperand(3), B, TD);
>       return ConstantInt::get(CI->getType(), 1);
>     }
>
> @@ -1097,11 +1097,11 @@
>       return 0;
>
>     // fputs(s,F) --> fwrite(s,1,strlen(s),F)
> -    uint64_t Len = GetStringLength(CI->getOperand(1));
> +    uint64_t Len = GetStringLength(CI->getOperand(0));
>     if (!Len) return 0;
> -    EmitFWrite(CI->getOperand(1),
> +    EmitFWrite(CI->getOperand(0),
>                ConstantInt::get(TD->getIntPtrType(*Context), Len-1),
> -               CI->getOperand(2), B, TD);
> +               CI->getOperand(1), B, TD);
>     return CI;  // Known to have no uses (see above).
>   }
>  };
> @@ -1120,7 +1120,7 @@
>
>     // All the optimizations depend on the format string.
>     std::string FormatStr;
> -    if (!GetConstantStringInfo(CI->getOperand(2), FormatStr))
> +    if (!GetConstantStringInfo(CI->getOperand(1), FormatStr))
>       return 0;
>
>     // fprintf(F, "foo") --> fwrite("foo", 3, 1, F)
> @@ -1132,10 +1132,10 @@
>       // These optimizations require TargetData.
>       if (!TD) return 0;
>
> -      EmitFWrite(CI->getOperand(2),
> +      EmitFWrite(CI->getOperand(1),
>                  ConstantInt::get(TD->getIntPtrType(*Context),
>                                   FormatStr.size()),
> -                 CI->getOperand(1), B, TD);
> +                 CI->getOperand(0), B, TD);
>       return ConstantInt::get(CI->getType(), FormatStr.size());
>     }
>
> @@ -1146,17 +1146,17 @@
>
>     // Decode the second character of the format string.
>     if (FormatStr[1] == 'c') {
> -      // fprintf(F, "%c", chr) --> *(i8*)dst = chr
> -      if (!CI->getOperand(3)->getType()->isIntegerTy()) return 0;
> -      EmitFPutC(CI->getOperand(3), CI->getOperand(1), B, TD);
> +      // fprintf(F, "%c", chr) --> fputc(chr, F)
> +      if (!CI->getOperand(2)->getType()->isIntegerTy()) return 0;
> +      EmitFPutC(CI->getOperand(2), CI->getOperand(0), B, TD);
>       return ConstantInt::get(CI->getType(), 1);
>     }
>
>     if (FormatStr[1] == 's') {
> -      // fprintf(F, "%s", str) -> fputs(str, F)
> -      if (!CI->getOperand(3)->getType()->isPointerTy() || !CI->use_empty())
> +      // fprintf(F, "%s", str) --> fputs(str, F)
> +      if (!CI->getOperand(2)->getType()->isPointerTy() || !CI->use_empty())
>         return 0;
> -      EmitFPutS(CI->getOperand(3), CI->getOperand(1), B, TD);
> +      EmitFPutS(CI->getOperand(2), CI->getOperand(0), B, TD);
>       return CI;
>     }
>     return 0;
> Index: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
> ===================================================================
> --- llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp (revision 101132)
> +++ llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp (working copy)
> @@ -123,14 +123,14 @@
>   if (StoreInst *SI = dyn_cast<StoreInst>(I))
>     return SI->getPointerOperand();
>   if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(I))
> -    return MI->getOperand(1);
> +    return MI->getOperand(0);
>
>   switch (cast<IntrinsicInst>(I)->getIntrinsicID()) {
>   default: assert(false && "Unexpected intrinsic!");
>   case Intrinsic::init_trampoline:
> +    return I->getOperand(0);
> +  case Intrinsic::lifetime_end:
>     return I->getOperand(1);
> -  case Intrinsic::lifetime_end:
> -    return I->getOperand(2);
>   }
>  }
>
> @@ -152,7 +152,7 @@
>     case Intrinsic::init_trampoline:
>       return -1u;
>     case Intrinsic::lifetime_end:
> -      Len = I->getOperand(1);
> +      Len = I->getOperand(0);
>       break;
>     }
>   }
> @@ -287,7 +287,7 @@
>
>  /// handleFreeWithNonTrivialDependency - Handle frees of entire structures whose
>  /// dependency is a store to a field of that structure.
> -bool DSE::handleFreeWithNonTrivialDependency(Instruction *F, MemDepResult Dep) {
> +bool DSE::handleFreeWithNonTrivialDependency(/*FIXME: Call*/Instruction *F, MemDepResult Dep) {
>   AliasAnalysis &AA = getAnalysis<AliasAnalysis>();
>
>   Instruction *Dependency = Dep.getInst();
> @@ -297,7 +297,7 @@
>   Value *DepPointer = getPointerOperand(Dependency)->getUnderlyingObject();
>
>   // Check for aliasing.
> -  if (AA.alias(F->getOperand(1), 1, DepPointer, 1) !=
> +  if (AA.alias(F->getOperand(0), 1, DepPointer, 1) !=
>          AliasAnalysis::MustAlias)
>     return false;
>
> Index: llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
> ===================================================================
> --- llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp      (revision 101132)
> +++ llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp      (working copy)
> @@ -744,7 +744,7 @@
>   const Type *ArgTys[3] = { M->getRawDest()->getType(),
>                             M->getRawSource()->getType(),
>                             M->getLength()->getType() };
> -  M->setOperand(0,Intrinsic::getDeclaration(Mod, Intrinsic::memcpy, ArgTys, 3));
> +  M->setCalledFunction(Intrinsic::getDeclaration(Mod, Intrinsic::memcpy, ArgTys, 3));
>
>   // MemDep may have over conservative information about this instruction, just
>   // conservatively flush it from the cache.
> Index: llvm/lib/Transforms/IPO/LowerSetJmp.cpp
> ===================================================================
> --- llvm/lib/Transforms/IPO/LowerSetJmp.cpp     (revision 101132)
> +++ llvm/lib/Transforms/IPO/LowerSetJmp.cpp     (working copy)
> @@ -262,8 +262,8 @@
>   // char*. It returns "void", so it doesn't need to replace any of
>   // Inst's uses and doesn't get a name.
>   CastInst* CI =
> -    new BitCastInst(Inst->getOperand(1), SBPTy, "LJBuf", Inst);
> -  Value *Args[] = { CI, Inst->getOperand(2) };
> +    new BitCastInst(Inst->getOperand(0), SBPTy, "LJBuf", Inst);
> +  Value *Args[] = { CI, Inst->getOperand(1) };
>   CallInst::Create(ThrowLongJmp, Args, Args + 2, "", Inst);
>
>   SwitchValuePair& SVP = SwitchValMap[Inst->getParent()->getParent()];
> @@ -378,7 +378,7 @@
>   const Type* SBPTy =
>           Type::getInt8PtrTy(Inst->getContext());
>   CastInst* BufPtr =
> -    new BitCastInst(Inst->getOperand(1), SBPTy, "SBJmpBuf", Inst);
> +    new BitCastInst(Inst->getOperand(0), SBPTy, "SBJmpBuf", Inst);
>   Value *Args[] = {
>     GetSetJmpMap(Func), BufPtr,
>     ConstantInt::get(Type::getInt32Ty(Inst->getContext()), SetJmpIDMap[Func]++)
> @@ -473,7 +473,7 @@
>
>   // Construct the new "invoke" instruction.
>   TerminatorInst* Term = OldBB->getTerminator();
> -  std::vector<Value*> Params(CI.op_begin() + 1, CI.op_end());
> +  std::vector<Value*> Params(CI.op_begin(), CI.op_end() - 1);
>   InvokeInst* II =
>     InvokeInst::Create(CI.getCalledValue(), NewBB, PrelimBBMap[Func],
>                        Params.begin(), Params.end(), CI.getName(), Term);
> Index: llvm/lib/Transforms/IPO/GlobalOpt.cpp
> ===================================================================
> --- llvm/lib/Transforms/IPO/GlobalOpt.cpp       (revision 101132)
> +++ llvm/lib/Transforms/IPO/GlobalOpt.cpp       (working copy)
> @@ -222,12 +222,12 @@
>         GS.HasPHIUser = true;
>       } else if (isa<CmpInst>(I)) {
>       } else if (isa<MemTransferInst>(I)) {
> +        if (I->getOperand(0) == V)
> +          GS.StoredType = GlobalStatus::isStored;
>         if (I->getOperand(1) == V)
> -          GS.StoredType = GlobalStatus::isStored;
> -        if (I->getOperand(2) == V)
>           GS.isLoaded = true;
>       } else if (isa<MemSetInst>(I)) {
> -        assert(I->getOperand(1) == V && "Memset only takes one pointer!");
> +        assert(I->getOperand(0) == V && "Memset only takes one pointer!");
>         GS.StoredType = GlobalStatus::isStored;
>       } else {
>         return true;  // Any other non-load instruction might take address!
> @@ -1323,8 +1323,8 @@
>   //      if (F2) { free(F2); F2 = 0; }
>   //    }
>   // The malloc can also fail if its argument is too large.
> -  Constant *ConstantZero = ConstantInt::get(CI->getOperand(1)->getType(), 0);
> -  Value *RunningOr = new ICmpInst(CI, ICmpInst::ICMP_SLT, CI->getOperand(1),
> +  Constant *ConstantZero = ConstantInt::get(CI->getOperand(0)->getType(), 0);
> +  Value *RunningOr = new ICmpInst(CI, ICmpInst::ICMP_SLT, CI->getOperand(0),
>                                   ConstantZero, "isneg");
>   for (unsigned i = 0, e = FieldMallocs.size(); i != e; ++i) {
>     Value *Cond = new ICmpInst(CI, ICmpInst::ICMP_EQ, FieldMallocs[i],
> @@ -1508,7 +1508,7 @@
>
>     // If this is an allocation of a fixed size array of structs, analyze as a
>     // variable size array.  malloc [100 x struct],1 -> malloc struct, 100
> -    if (NElems == ConstantInt::get(CI->getOperand(1)->getType(), 1))
> +    if (NElems == ConstantInt::get(CI->getOperand(0)->getType(), 1))
>       if (const ArrayType *AT = dyn_cast<ArrayType>(AllocTy))
>         AllocTy = AT->getElementType();
>
> @@ -1638,7 +1638,7 @@
>         // bool.
>         Instruction *StoredVal = cast<Instruction>(SI->getOperand(0));
>
> -        // If we're already replaced the input, StoredVal will be a cast or
> +        // If we've already replaced the input, StoredVal will be a cast or
>         // select instruction.  If not, it will be a load of the original
>         // global.
>         if (LoadInst *LI = dyn_cast<LoadInst>(StoredVal)) {
> @@ -2259,8 +2259,8 @@
>     } else if (SelectInst *SI = dyn_cast<SelectInst>(CurInst)) {
>       InstResult =
>             ConstantExpr::getSelect(getVal(Values, SI->getOperand(0)),
> -                                           getVal(Values, SI->getOperand(1)),
> -                                           getVal(Values, SI->getOperand(2)));
> +                                    getVal(Values, SI->getOperand(1)),
> +                                    getVal(Values, SI->getOperand(2)));
>     } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(CurInst)) {
>       Constant *P = getVal(Values, GEP->getOperand(0));
>       SmallVector<Constant*, 8> GEPOps;
> @@ -2292,14 +2292,14 @@
>       }
>
>       // Cannot handle inline asm.
> -      if (isa<InlineAsm>(CI->getOperand(0))) return false;
> +      if (isa<InlineAsm>(CI->getCalledValue())) return false;
>
>       // Resolve function pointers.
> -      Function *Callee = dyn_cast<Function>(getVal(Values, CI->getOperand(0)));
> +      Function *Callee = dyn_cast<Function>(getVal(Values, CI->getCalledValue()));
>       if (!Callee) return false;  // Cannot resolve.
>
>       SmallVector<Constant*, 8> Formals;
> -      for (User::op_iterator i = CI->op_begin() + 1, e = CI->op_end();
> +      for (User::op_iterator i = CI->op_begin(), e = CI->op_end() - 1;
>            i != e; ++i)
>         Formals.push_back(getVal(Values, *i));
>
> Index: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
> ===================================================================
> --- llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp     (revision 101132)
> +++ llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp     (working copy)
> @@ -1423,7 +1423,7 @@
>       switch (II->getIntrinsicID()) {
>       case Intrinsic::bswap:
>         Worklist.Add(II);
> -        ICI.setOperand(0, II->getOperand(1));
> +        ICI.setOperand(0, II->getOperand(0));
>         ICI.setOperand(1, ConstantInt::get(II->getContext(), RHSV.byteSwap()));
>         return &ICI;
>       case Intrinsic::ctlz:
> @@ -1431,7 +1431,7 @@
>         // ctz(A) == bitwidth(a)  ->  A == 0 and likewise for !=
>         if (RHSV == RHS->getType()->getBitWidth()) {
>           Worklist.Add(II);
> -          ICI.setOperand(0, II->getOperand(1));
> +          ICI.setOperand(0, II->getOperand(0));
>           ICI.setOperand(1, ConstantInt::get(RHS->getType(), 0));
>           return &ICI;
>         }
> @@ -1440,7 +1440,7 @@
>         // popcount(A) == 0  ->  A == 0 and likewise for !=
>         if (RHS->isZero()) {
>           Worklist.Add(II);
> -          ICI.setOperand(0, II->getOperand(1));
> +          ICI.setOperand(0, II->getOperand(0));
>           ICI.setOperand(1, RHS);
>           return &ICI;
>         }
> Index: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
> ===================================================================
> --- llvm/lib/Transforms/InstCombine/InstructionCombining.cpp    (revision 101132)
> +++ llvm/lib/Transforms/InstCombine/InstructionCombining.cpp    (working copy)
> @@ -711,7 +711,7 @@
>  }
>
>  Instruction *InstCombiner::visitFree(Instruction &FI) {
> -  Value *Op = FI.getOperand(1);
> +  Value *Op = FI.getOperand(0);
>
>   // free undef -> unreachable.
>   if (isa<UndefValue>(Op)) {
> @@ -896,7 +896,7 @@
>   if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(Agg)) {
>     // We're extracting from an intrinsic, see if we're the only user, which
>     // allows us to simplify multiple result intrinsics to simpler things that
> -    // just get one value..
> +    // just get one value.
>     if (II->hasOneUse()) {
>       // Check if we're grabbing the overflow bit or the result of a 'with
>       // overflow' intrinsic.  If it's the latter we can remove the intrinsic
> @@ -905,7 +905,7 @@
>       case Intrinsic::uadd_with_overflow:
>       case Intrinsic::sadd_with_overflow:
>         if (*EV.idx_begin() == 0) {  // Normal result.
> -          Value *LHS = II->getOperand(1), *RHS = II->getOperand(2);
> +          Value *LHS = II->getOperand(0), *RHS = II->getOperand(1);
>           II->replaceAllUsesWith(UndefValue::get(II->getType()));
>           EraseInstFromFunction(*II);
>           return BinaryOperator::CreateAdd(LHS, RHS);
> @@ -914,7 +914,7 @@
>       case Intrinsic::usub_with_overflow:
>       case Intrinsic::ssub_with_overflow:
>         if (*EV.idx_begin() == 0) {  // Normal result.
> -          Value *LHS = II->getOperand(1), *RHS = II->getOperand(2);
> +          Value *LHS = II->getOperand(0), *RHS = II->getOperand(1);
>           II->replaceAllUsesWith(UndefValue::get(II->getType()));
>           EraseInstFromFunction(*II);
>           return BinaryOperator::CreateSub(LHS, RHS);
> @@ -923,7 +923,7 @@
>       case Intrinsic::umul_with_overflow:
>       case Intrinsic::smul_with_overflow:
>         if (*EV.idx_begin() == 0) {  // Normal result.
> -          Value *LHS = II->getOperand(1), *RHS = II->getOperand(2);
> +          Value *LHS = II->getOperand(0), *RHS = II->getOperand(1);
>           II->replaceAllUsesWith(UndefValue::get(II->getType()));
>           EraseInstFromFunction(*II);
>           return BinaryOperator::CreateMul(LHS, RHS);
> Index: llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
> ===================================================================
> --- llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp     (revision 101132)
> +++ llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp     (working copy)
> @@ -732,10 +732,10 @@
>           // the right place.
>           Instruction *NewVal;
>           if (InputBit > ResultBit)
> -            NewVal = BinaryOperator::CreateLShr(I->getOperand(1),
> +            NewVal = BinaryOperator::CreateLShr(II->getOperand(0),
>                     ConstantInt::get(I->getType(), InputBit-ResultBit));
>           else
> -            NewVal = BinaryOperator::CreateShl(I->getOperand(1),
> +            NewVal = BinaryOperator::CreateShl(II->getOperand(0),
>                     ConstantInt::get(I->getType(), ResultBit-InputBit));
>           NewVal->takeName(I);
>           return InsertNewInstBefore(NewVal, *I);
> @@ -1052,12 +1052,12 @@
>     case Intrinsic::x86_sse2_mul_sd:
>     case Intrinsic::x86_sse2_min_sd:
>     case Intrinsic::x86_sse2_max_sd:
> +      TmpV = SimplifyDemandedVectorElts(II->getOperand(0), DemandedElts,
> +                                        UndefElts, Depth+1);
> +      if (TmpV) { II->setOperand(0, TmpV); MadeChange = true; }
>       TmpV = SimplifyDemandedVectorElts(II->getOperand(1), DemandedElts,
> -                                        UndefElts, Depth+1);
> +                                        UndefElts2, Depth+1);
>       if (TmpV) { II->setOperand(1, TmpV); MadeChange = true; }
> -      TmpV = SimplifyDemandedVectorElts(II->getOperand(2), DemandedElts,
> -                                        UndefElts2, Depth+1);
> -      if (TmpV) { II->setOperand(2, TmpV); MadeChange = true; }
>
>       // If only the low elt is demanded and this is a scalarizable intrinsic,
>       // scalarize it now.
> @@ -1069,8 +1069,8 @@
>         case Intrinsic::x86_sse2_sub_sd:
>         case Intrinsic::x86_sse2_mul_sd:
>           // TODO: Lower MIN/MAX/ABS/etc
> -          Value *LHS = II->getOperand(1);
> -          Value *RHS = II->getOperand(2);
> +          Value *LHS = II->getOperand(0);
> +          Value *RHS = II->getOperand(1);
>           // Extract the element as scalars.
>           LHS = InsertNewInstBefore(ExtractElementInst::Create(LHS,
>             ConstantInt::get(Type::getInt32Ty(I->getContext()), 0U)), *II);
> Index: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
> ===================================================================
> --- llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp        (revision 101132)
> +++ llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp        (working copy)
> @@ -109,8 +109,8 @@
>  }
>
>  Instruction *InstCombiner::SimplifyMemTransfer(MemIntrinsic *MI) {
> -  unsigned DstAlign = GetOrEnforceKnownAlignment(MI->getOperand(1));
> -  unsigned SrcAlign = GetOrEnforceKnownAlignment(MI->getOperand(2));
> +  unsigned DstAlign = GetOrEnforceKnownAlignment(MI->getOperand(0));
> +  unsigned SrcAlign = GetOrEnforceKnownAlignment(MI->getOperand(1));
>   unsigned MinAlign = std::min(DstAlign, SrcAlign);
>   unsigned CopyAlign = MI->getAlignment();
>
> @@ -122,7 +122,7 @@
>
>   // If MemCpyInst length is 1/2/4/8 bytes then replace memcpy with
>   // load/store.
> -  ConstantInt *MemOpLength = dyn_cast<ConstantInt>(MI->getOperand(3));
> +  ConstantInt *MemOpLength = dyn_cast<ConstantInt>(MI->getOperand(2));
>   if (MemOpLength == 0) return 0;
>
>   // Source and destination pointer types are always "i8*" for intrinsic.  See
> @@ -137,9 +137,9 @@
>
>   // Use an integer load+store unless we can find something better.
>   unsigned SrcAddrSp =
> -    cast<PointerType>(MI->getOperand(2)->getType())->getAddressSpace();
> -  unsigned DstAddrSp =
>     cast<PointerType>(MI->getOperand(1)->getType())->getAddressSpace();
> +  unsigned DstAddrSp =
> +    cast<PointerType>(MI->getOperand(0)->getType())->getAddressSpace();
>
>   const IntegerType* IntType = IntegerType::get(MI->getContext(), Size<<3);
>   Type *NewSrcPtrTy = PointerType::get(IntType, SrcAddrSp);
> @@ -151,8 +151,8 @@
>   // an i64 load+store, here because this improves the odds that the source or
>   // dest address will be promotable.  See if we can find a better type than the
>   // integer datatype.
> -  Value *StrippedDest = MI->getOperand(1)->stripPointerCasts();
> -  if (StrippedDest != MI->getOperand(1)) {
> +  Value *StrippedDest = MI->getOperand(0)->stripPointerCasts();
> +  if (StrippedDest != MI->getOperand(0)) {
>     const Type *SrcETy = cast<PointerType>(StrippedDest->getType())
>                                     ->getElementType();
>     if (TD && SrcETy->isSized() && TD->getTypeStoreSize(SrcETy) == Size) {
> @@ -186,15 +186,15 @@
>   SrcAlign = std::max(SrcAlign, CopyAlign);
>   DstAlign = std::max(DstAlign, CopyAlign);
>
> -  Value *Src = Builder->CreateBitCast(MI->getOperand(2), NewSrcPtrTy);
> -  Value *Dest = Builder->CreateBitCast(MI->getOperand(1), NewDstPtrTy);
> +  Value *Src = Builder->CreateBitCast(MI->getOperand(1), NewSrcPtrTy);
> +  Value *Dest = Builder->CreateBitCast(MI->getOperand(0), NewDstPtrTy);
>   Instruction *L = new LoadInst(Src, "tmp", MI->isVolatile(), SrcAlign);
>   InsertNewInstBefore(L, *MI);
>   InsertNewInstBefore(new StoreInst(L, Dest, MI->isVolatile(), DstAlign),
>                       *MI);
>
>   // Set the size of the copy to 0, it will be deleted on the next iteration.
> -  MI->setOperand(3, Constant::getNullValue(MemOpLength->getType()));
> +  MI->setOperand(2, Constant::getNullValue(MemOpLength->getType()));
>   return MI;
>  }
>
> @@ -258,7 +258,7 @@
>
>   IntrinsicInst *II = dyn_cast<IntrinsicInst>(&CI);
>   if (!II) return visitCallSite(&CI);
> -
> +
>   // Intrinsics cannot occur in an invoke, so handle them here instead of in
>   // visitCallSite.
>   if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(II)) {
> @@ -282,12 +282,12 @@
>     if (MemMoveInst *MMI = dyn_cast<MemMoveInst>(MI)) {
>       if (GlobalVariable *GVSrc = dyn_cast<GlobalVariable>(MMI->getSource()))
>         if (GVSrc->isConstant()) {
> -          Module *M = CI.getParent()->getParent()->getParent();
> +          Module *M = MMI->getParent()->getParent()->getParent();
>           Intrinsic::ID MemCpyID = Intrinsic::memcpy;
> -          const Type *Tys[3] = { CI.getOperand(1)->getType(),
> -                                 CI.getOperand(2)->getType(),
> -                                 CI.getOperand(3)->getType() };
> -          CI.setOperand(0,
> +          const Type *Tys[3] = { CI.getOperand(0)->getType(),
> +                                 CI.getOperand(1)->getType(),
> +                                 CI.getOperand(2)->getType() };
> +          MMI->setCalledFunction(
>                         Intrinsic::getDeclaration(M, MemCpyID, Tys, 3));
>           Changed = true;
>         }
> @@ -297,21 +297,19 @@
>       // memmove(x,x,size) -> noop.
>       if (MTI->getSource() == MTI->getDest())
>         return EraseInstFromFunction(CI);
> -    }
>
> -    // If we can determine a pointer alignment that is bigger than currently
> -    // set, update the alignment.
> -    if (isa<MemTransferInst>(MI)) {
> -      if (Instruction *I = SimplifyMemTransfer(MI))
> +      // If we can determine a pointer alignment that is bigger than currently
> +      // set, update the alignment.
> +      if (Instruction *I = SimplifyMemTransfer(MTI))
>         return I;
>     } else if (MemSetInst *MSI = dyn_cast<MemSetInst>(MI)) {
>       if (Instruction *I = SimplifyMemSet(MSI))
>         return I;
>     }
> -
> +
>     if (Changed) return II;
>   }
> -
> +
>   switch (II->getIntrinsicID()) {
>   default: break;
>   case Intrinsic::objectsize: {
> @@ -319,10 +317,10 @@
>     if (!TD) break;
>
>     const Type *ReturnTy = CI.getType();
> -    bool Min = (cast<ConstantInt>(II->getOperand(2))->getZExtValue() == 1);
> +    bool Min = (cast<ConstantInt>(II->getOperand(1))->getZExtValue() == 1);
>
>     // Get to the real allocated thing and offset as fast as possible.
> -    Value *Op1 = II->getOperand(1)->stripPointerCasts();
> +    Value *Op1 = II->getOperand(0)->stripPointerCasts();
>
>     // If we've stripped down to a single global variable that we
>     // can know the size of then just return that.
> @@ -390,7 +388,6 @@
>
>       Constant *RetVal = ConstantInt::get(ReturnTy, Size-Offset);
>       return ReplaceInstUsesWith(CI, RetVal);
> -
>     }
>
>     // Do not return "I don't know" here. Later optimization passes could
> @@ -399,45 +396,45 @@
>   }
>   case Intrinsic::bswap:
>     // bswap(bswap(x)) -> x
> -    if (IntrinsicInst *Operand = dyn_cast<IntrinsicInst>(II->getOperand(1)))
> +    if (IntrinsicInst *Operand = dyn_cast<IntrinsicInst>(II->getOperand(0)))
>       if (Operand->getIntrinsicID() == Intrinsic::bswap)
> -        return ReplaceInstUsesWith(CI, Operand->getOperand(1));
> +        return ReplaceInstUsesWith(CI, Operand->getOperand(0));
>
>     // bswap(trunc(bswap(x))) -> trunc(lshr(x, c))
> -    if (TruncInst *TI = dyn_cast<TruncInst>(II->getOperand(1))) {
> +    if (TruncInst *TI = dyn_cast<TruncInst>(II->getOperand(0))) {
>       if (IntrinsicInst *Operand = dyn_cast<IntrinsicInst>(TI->getOperand(0)))
>         if (Operand->getIntrinsicID() == Intrinsic::bswap) {
>           unsigned C = Operand->getType()->getPrimitiveSizeInBits() -
>                        TI->getType()->getPrimitiveSizeInBits();
>           Value *CV = ConstantInt::get(Operand->getType(), C);
> -          Value *V = Builder->CreateLShr(Operand->getOperand(1), CV);
> +          Value *V = Builder->CreateLShr(Operand->getOperand(0), CV);
>           return new TruncInst(V, TI->getType());
>         }
>     }
>
>     break;
>   case Intrinsic::powi:
> -    if (ConstantInt *Power = dyn_cast<ConstantInt>(II->getOperand(2))) {
> +    if (ConstantInt *Power = dyn_cast<ConstantInt>(II->getOperand(1))) {
>       // powi(x, 0) -> 1.0
>       if (Power->isZero())
>         return ReplaceInstUsesWith(CI, ConstantFP::get(CI.getType(), 1.0));
>       // powi(x, 1) -> x
>       if (Power->isOne())
> -        return ReplaceInstUsesWith(CI, II->getOperand(1));
> +        return ReplaceInstUsesWith(CI, II->getOperand(0));
>       // powi(x, -1) -> 1/x
>       if (Power->isAllOnesValue())
>         return BinaryOperator::CreateFDiv(ConstantFP::get(CI.getType(), 1.0),
> -                                          II->getOperand(1));
> +                                          II->getOperand(0));
>     }
>     break;
>   case Intrinsic::cttz: {
>     // If all bits below the first known one are known zero,
>     // this value is constant.
> -    const IntegerType *IT = cast<IntegerType>(II->getOperand(1)->getType());
> +    const IntegerType *IT = cast<IntegerType>(II->getOperand(0)->getType());
>     uint32_t BitWidth = IT->getBitWidth();
>     APInt KnownZero(BitWidth, 0);
>     APInt KnownOne(BitWidth, 0);
> -    ComputeMaskedBits(II->getOperand(1), APInt::getAllOnesValue(BitWidth),
> +    ComputeMaskedBits(II->getOperand(0), APInt::getAllOnesValue(BitWidth),
>                       KnownZero, KnownOne);
>     unsigned TrailingZeros = KnownOne.countTrailingZeros();
>     APInt Mask(APInt::getLowBitsSet(BitWidth, TrailingZeros));
> @@ -450,11 +447,11 @@
>   case Intrinsic::ctlz: {
>     // If all bits above the first known one are known zero,
>     // this value is constant.
> -    const IntegerType *IT = cast<IntegerType>(II->getOperand(1)->getType());
> +    const IntegerType *IT = cast<IntegerType>(II->getOperand(0)->getType());
>     uint32_t BitWidth = IT->getBitWidth();
>     APInt KnownZero(BitWidth, 0);
>     APInt KnownOne(BitWidth, 0);
> -    ComputeMaskedBits(II->getOperand(1), APInt::getAllOnesValue(BitWidth),
> +    ComputeMaskedBits(II->getOperand(0), APInt::getAllOnesValue(BitWidth),
>                       KnownZero, KnownOne);
>     unsigned LeadingZeros = KnownOne.countLeadingZeros();
>     APInt Mask(APInt::getHighBitsSet(BitWidth, LeadingZeros));
> @@ -465,8 +462,8 @@
>     }
>     break;
>   case Intrinsic::uadd_with_overflow: {
> -    Value *LHS = II->getOperand(1), *RHS = II->getOperand(2);
> -    const IntegerType *IT = cast<IntegerType>(II->getOperand(1)->getType());
> +    Value *LHS = II->getOperand(0), *RHS = II->getOperand(1);
> +    const IntegerType *IT = cast<IntegerType>(II->getOperand(0)->getType());
>     uint32_t BitWidth = IT->getBitWidth();
>     APInt Mask = APInt::getSignBit(BitWidth);
>     APInt LHSKnownZero(BitWidth, 0);
> @@ -510,19 +507,19 @@
>   // FALL THROUGH uadd into sadd
>   case Intrinsic::sadd_with_overflow:
>     // Canonicalize constants into the RHS.
> -    if (isa<Constant>(II->getOperand(1)) &&
> -        !isa<Constant>(II->getOperand(2))) {
> -      Value *LHS = II->getOperand(1);
> -      II->setOperand(1, II->getOperand(2));
> -      II->setOperand(2, LHS);
> +    if (isa<Constant>(II->getOperand(0)) &&
> +        !isa<Constant>(II->getOperand(1))) {
> +      Value *LHS = II->getOperand(0);
> +      II->setOperand(0, II->getOperand(1));
> +      II->setOperand(1, LHS);
>       return II;
>     }
>
>     // X + undef -> undef
> -    if (isa<UndefValue>(II->getOperand(2)))
> +    if (isa<UndefValue>(II->getOperand(1)))
>       return ReplaceInstUsesWith(CI, UndefValue::get(II->getType()));
>
> -    if (ConstantInt *RHS = dyn_cast<ConstantInt>(II->getOperand(2))) {
> +    if (ConstantInt *RHS = dyn_cast<ConstantInt>(II->getOperand(1))) {
>       // X + 0 -> {X, false}
>       if (RHS->isZero()) {
>         Constant *V[] = {
> @@ -530,7 +527,7 @@
>           ConstantInt::getFalse(II->getContext())
>         };
>         Constant *Struct = ConstantStruct::get(II->getContext(), V, 2, false);
> -        return InsertValueInst::Create(Struct, II->getOperand(1), 0);
> +        return InsertValueInst::Create(Struct, II->getOperand(0), 0);
>       }
>     }
>     break;
> @@ -538,38 +535,38 @@
>   case Intrinsic::ssub_with_overflow:
>     // undef - X -> undef
>     // X - undef -> undef
> -    if (isa<UndefValue>(II->getOperand(1)) ||
> -        isa<UndefValue>(II->getOperand(2)))
> +    if (isa<UndefValue>(II->getOperand(0)) ||
> +        isa<UndefValue>(II->getOperand(1)))
>       return ReplaceInstUsesWith(CI, UndefValue::get(II->getType()));
>
> -    if (ConstantInt *RHS = dyn_cast<ConstantInt>(II->getOperand(2))) {
> +    if (ConstantInt *RHS = dyn_cast<ConstantInt>(II->getOperand(1))) {
>       // X - 0 -> {X, false}
>       if (RHS->isZero()) {
>         Constant *V[] = {
> -          UndefValue::get(II->getOperand(1)->getType()),
> +          UndefValue::get(II->getOperand(0)->getType()),
>           ConstantInt::getFalse(II->getContext())
>         };
>         Constant *Struct = ConstantStruct::get(II->getContext(), V, 2, false);
> -        return InsertValueInst::Create(Struct, II->getOperand(1), 0);
> +        return InsertValueInst::Create(Struct, II->getOperand(0), 0);
>       }
>     }
>     break;
>   case Intrinsic::umul_with_overflow:
>   case Intrinsic::smul_with_overflow:
>     // Canonicalize constants into the RHS.
> -    if (isa<Constant>(II->getOperand(1)) &&
> -        !isa<Constant>(II->getOperand(2))) {
> -      Value *LHS = II->getOperand(1);
> -      II->setOperand(1, II->getOperand(2));
> -      II->setOperand(2, LHS);
> +    if (isa<Constant>(II->getOperand(0)) &&
> +        !isa<Constant>(II->getOperand(1))) {
> +      Value *LHS = II->getOperand(0);
> +      II->setOperand(0, II->getOperand(1));
> +      II->setOperand(1, LHS);
>       return II;
>     }
>
>     // X * undef -> undef
> -    if (isa<UndefValue>(II->getOperand(2)))
> +    if (isa<UndefValue>(II->getOperand(1)))
>       return ReplaceInstUsesWith(CI, UndefValue::get(II->getType()));
>
> -    if (ConstantInt *RHSI = dyn_cast<ConstantInt>(II->getOperand(2))) {
> +    if (ConstantInt *RHSI = dyn_cast<ConstantInt>(II->getOperand(1))) {
>       // X*0 -> {0, false}
>       if (RHSI->isZero())
>         return ReplaceInstUsesWith(CI, Constant::getNullValue(II->getType()));
> @@ -577,11 +574,11 @@
>       // X * 1 -> {X, false}
>       if (RHSI->equalsInt(1)) {
>         Constant *V[] = {
> -          UndefValue::get(II->getOperand(1)->getType()),
> +          UndefValue::get(II->getOperand(0)->getType()),
>           ConstantInt::getFalse(II->getContext())
>         };
>         Constant *Struct = ConstantStruct::get(II->getContext(), V, 2, false);
> -        return InsertValueInst::Create(Struct, II->getOperand(1), 0);
> +        return InsertValueInst::Create(Struct, II->getOperand(0), 0);
>       }
>     }
>     break;
> @@ -592,8 +589,8 @@
>   case Intrinsic::x86_sse2_loadu_dq:
>     // Turn PPC lvx     -> load if the pointer is known aligned.
>     // Turn X86 loadups -> load if the pointer is known aligned.
> -    if (GetOrEnforceKnownAlignment(II->getOperand(1), 16) >= 16) {
> -      Value *Ptr = Builder->CreateBitCast(II->getOperand(1),
> +    if (GetOrEnforceKnownAlignment(II->getOperand(0), 16) >= 16) {
> +      Value *Ptr = Builder->CreateBitCast(II->getOperand(0),
>                                          PointerType::getUnqual(II->getType()));
>       return new LoadInst(Ptr);
>     }
> @@ -601,22 +598,22 @@
>   case Intrinsic::ppc_altivec_stvx:
>   case Intrinsic::ppc_altivec_stvxl:
>     // Turn stvx -> store if the pointer is known aligned.
> -    if (GetOrEnforceKnownAlignment(II->getOperand(2), 16) >= 16) {
> +    if (GetOrEnforceKnownAlignment(II->getOperand(1), 16) >= 16) {
>       const Type *OpPtrTy =
> -        PointerType::getUnqual(II->getOperand(1)->getType());
> -      Value *Ptr = Builder->CreateBitCast(II->getOperand(2), OpPtrTy);
> -      return new StoreInst(II->getOperand(1), Ptr);
> +        PointerType::getUnqual(II->getOperand(0)->getType());
> +      Value *Ptr = Builder->CreateBitCast(II->getOperand(1), OpPtrTy);
> +      return new StoreInst(II->getOperand(0), Ptr);
>     }
>     break;
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>




More information about the llvm-commits mailing list