[llvm-commits] [llvm] r135904 - in /llvm/trunk: docs/ include/llvm/ include/llvm/Support/ lib/Analysis/ lib/AsmParser/ lib/Bitcode/Reader/ lib/CodeGen/ lib/Transforms/IPO/ lib/Transforms/InstCombine/ lib/Transforms/Instrumentation/ lib/Transforms
Frits van Bommel
fvbommel at gmail.com
Mon Jul 25 07:36:23 PDT 2011
On 25 July 2011 11:48, Jay Foad <jay.foad at gmail.com> wrote:
> --- llvm/trunk/lib/Analysis/PHITransAddr.cpp (original)
> +++ llvm/trunk/lib/Analysis/PHITransAddr.cpp Mon Jul 25 04:48:08 2011
> @@ -407,9 +407,10 @@
> }
>
> GetElementPtrInst *Result =
> - GetElementPtrInst::Create(GEPOps[0], GEPOps.begin()+1, GEPOps.end(),
> - InVal->getName()+".phi.trans.insert",
> - PredBB->getTerminator());
> + GetElementPtrInst::Create(GEPOps[0],
> + makeArrayRef(GEPOps.begin() + 1, GEPOps.end()),
'makeArrayRef(GEPOps).slice(1)' is nicer, and is the idiom used in
several other places.
> --- llvm/trunk/lib/Transforms/InstCombine/InstCombinePHI.cpp (original)
> +++ llvm/trunk/lib/Transforms/InstCombine/InstCombinePHI.cpp Mon Jul 25 04:48:08 2011
> @@ -229,8 +229,8 @@
>
> Value *Base = FixedOperands[0];
> GetElementPtrInst *NewGEP =
> - GetElementPtrInst::Create(Base, FixedOperands.begin()+1,
> - FixedOperands.end());
> + GetElementPtrInst::Create(Base, makeArrayRef(FixedOperands.begin() + 1,
> + FixedOperands.end()));
makeArrayRef(FixedOperands).slice(1)
More information about the llvm-commits
mailing list