[llvm] r259425 - function names start with a lowercase letter; NFC

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 1 19:39:52 PST 2016


Generally renames in parts of the code your working with are culturally
considered "marginally acceptable" - moreso if there's an inconsistency
within a single class/file, etc (sometihng where the old and new naming
conventions get confusing - two similar names in different but
often-used-together classes that are just off by case, etc). It's a... case
by case basis, if you will.

(things that are more culturally considered below the bar (not worth the
churn) are whitespace (removing trailing whitespace, reformatting a line
etc) only changes - unless, again, you're dealing with a mixed up
file/about to completely rework a piece of code, etc)

On Mon, Feb 1, 2016 at 7:19 PM, Sanjay Patel via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Ah, sorry about that. I used these functions in patches earlier today, and
> thought I'd just end the formatting inconsistency (for them at least) with
> a 'replace all'. I didn't consider the pain for non-trunk users. I'll
> resist the urge to fix the half of LLVM that's still wrong. :)
>
>
> On Monday, February 1, 2016, Philip Reames <listmail at philipreames.com>
> wrote:
>
>> I generally don't want to discourage cleanup changes, but I'll note this
>> was a particular low value change which causes us a bit of headache when
>> merging into our downstream branch.  Nothing major, but I question the
>> value/cost tradeoff here.  (Please, please, don't revert!)
>>
>> Philip
>>
>> On 02/01/2016 02:23 PM, Sanjay Patel via llvm-commits wrote:
>>
>>> Author: spatel
>>> Date: Mon Feb  1 16:23:39 2016
>>> New Revision: 259425
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=259425&view=rev
>>> Log:
>>> function names start with a lowercase letter; NFC
>>>
>>> Modified:
>>>      llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp
>>>      llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
>>>      llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
>>>      llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp
>>>      llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
>>>      llvm/trunk/lib/Transforms/InstCombine/InstCombineInternal.h
>>>      llvm/trunk/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
>>>      llvm/trunk/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
>>>      llvm/trunk/lib/Transforms/InstCombine/InstCombinePHI.cpp
>>>      llvm/trunk/lib/Transforms/InstCombine/InstCombineSelect.cpp
>>>      llvm/trunk/lib/Transforms/InstCombine/InstCombineShifts.cpp
>>>
>>>  llvm/trunk/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
>>>      llvm/trunk/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
>>>      llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
>>>
>>> Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp?rev=259425&r1=259424&r2=259425&view=diff
>>>
>>> ==============================================================================
>>> --- llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp
>>> (original)
>>> +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp Mon Feb
>>> 1 16:23:39 2016
>>> @@ -1052,15 +1052,15 @@ Instruction *InstCombiner::visitAdd(Bina
>>>     Value *LHS = I.getOperand(0), *RHS = I.getOperand(1);
>>>       if (Value *V = SimplifyVectorOp(I))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       if (Value *V = SimplifyAddInst(LHS, RHS, I.hasNoSignedWrap(),
>>>                                    I.hasNoUnsignedWrap(), DL, TLI, DT,
>>> AC))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>        // (A*B)+(A*C) -> A*(B+C) etc
>>>     if (Value *V = SimplifyUsingDistributiveLaws(I))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       if (ConstantInt *CI = dyn_cast<ConstantInt>(RHS)) {
>>>       // X + (signbit) --> X ^ signbit
>>> @@ -1157,7 +1157,7 @@ Instruction *InstCombiner::visitAdd(Bina
>>>         return BinaryOperator::CreateSub(LHS, V);
>>>       if (Value *V = checkForNegativeOperand(I, Builder))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       // A+B --> A|B iff A and B have no bits set in common.
>>>     if (haveNoCommonBitsSet(LHS, RHS, DL, AC, &I, DT))
>>> @@ -1317,11 +1317,11 @@ Instruction *InstCombiner::visitFAdd(Bin
>>>     Value *LHS = I.getOperand(0), *RHS = I.getOperand(1);
>>>       if (Value *V = SimplifyVectorOp(I))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       if (Value *V =
>>>             SimplifyFAddInst(LHS, RHS, I.getFastMathFlags(), DL, TLI,
>>> DT, AC))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       if (isa<Constant>(RHS)) {
>>>       if (isa<PHINode>(LHS))
>>> @@ -1415,7 +1415,7 @@ Instruction *InstCombiner::visitFAdd(Bin
>>>       if (I.hasUnsafeAlgebra()) {
>>>       if (Value *V = FAddCombine(Builder).simplify(&I))
>>> -      return ReplaceInstUsesWith(I, V);
>>> +      return replaceInstUsesWith(I, V);
>>>     }
>>>       return Changed ? &I : nullptr;
>>> @@ -1493,15 +1493,15 @@ Instruction *InstCombiner::visitSub(Bina
>>>     Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
>>>       if (Value *V = SimplifyVectorOp(I))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       if (Value *V = SimplifySubInst(Op0, Op1, I.hasNoSignedWrap(),
>>>                                    I.hasNoUnsignedWrap(), DL, TLI, DT,
>>> AC))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       // (A*B)-(A*C) -> A*(B-C) etc
>>>     if (Value *V = SimplifyUsingDistributiveLaws(I))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       // If this is a 'B = x-(-A)', change to B = x+A.
>>>     if (Value *V = dyn_castNegVal(Op1)) {
>>> @@ -1667,13 +1667,13 @@ Instruction *InstCombiner::visitSub(Bina
>>>     if (match(Op0, m_PtrToInt(m_Value(LHSOp))) &&
>>>         match(Op1, m_PtrToInt(m_Value(RHSOp))))
>>>       if (Value *Res = OptimizePointerDifference(LHSOp, RHSOp,
>>> I.getType()))
>>> -      return ReplaceInstUsesWith(I, Res);
>>> +      return replaceInstUsesWith(I, Res);
>>>       // trunc(p)-trunc(q) -> trunc(p-q)
>>>     if (match(Op0, m_Trunc(m_PtrToInt(m_Value(LHSOp)))) &&
>>>         match(Op1, m_Trunc(m_PtrToInt(m_Value(RHSOp)))))
>>>       if (Value *Res = OptimizePointerDifference(LHSOp, RHSOp,
>>> I.getType()))
>>> -      return ReplaceInstUsesWith(I, Res);
>>> +      return replaceInstUsesWith(I, Res);
>>>       bool Changed = false;
>>>     if (!I.hasNoSignedWrap() && WillNotOverflowSignedSub(Op0, Op1, I)) {
>>> @@ -1692,11 +1692,11 @@ Instruction *InstCombiner::visitFSub(Bin
>>>     Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
>>>       if (Value *V = SimplifyVectorOp(I))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       if (Value *V =
>>>             SimplifyFSubInst(Op0, Op1, I.getFastMathFlags(), DL, TLI,
>>> DT, AC))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       // fsub nsz 0, X ==> fsub nsz -0.0, X
>>>     if (I.getFastMathFlags().noSignedZeros() && match(Op0, m_Zero())) {
>>> @@ -1736,7 +1736,7 @@ Instruction *InstCombiner::visitFSub(Bin
>>>       if (I.hasUnsafeAlgebra()) {
>>>       if (Value *V = FAddCombine(Builder).simplify(&I))
>>> -      return ReplaceInstUsesWith(I, V);
>>> +      return replaceInstUsesWith(I, V);
>>>     }
>>>       return nullptr;
>>>
>>> Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp?rev=259425&r1=259424&r2=259425&view=diff
>>>
>>> ==============================================================================
>>> --- llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
>>> (original)
>>> +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp Mon
>>> Feb  1 16:23:39 2016
>>> @@ -243,7 +243,7 @@ Instruction *InstCombiner::OptAndOp(Inst
>>>         if (CI->getValue() == ShlMask)
>>>         // Masking out bits that the shift already masks.
>>> -      return ReplaceInstUsesWith(TheAnd, Op);   // No need for the and.
>>> +      return replaceInstUsesWith(TheAnd, Op);   // No need for the and.
>>>         if (CI != AndRHS) {                  // Reducing bits set in and.
>>>         TheAnd.setOperand(1, CI);
>>> @@ -263,7 +263,7 @@ Instruction *InstCombiner::OptAndOp(Inst
>>>         if (CI->getValue() == ShrMask)
>>>         // Masking out bits that the shift already masks.
>>> -      return ReplaceInstUsesWith(TheAnd, Op);
>>> +      return replaceInstUsesWith(TheAnd, Op);
>>>         if (CI != AndRHS) {
>>>         TheAnd.setOperand(1, CI);  // Reduce bits set in and cst.
>>> @@ -1248,14 +1248,14 @@ Instruction *InstCombiner::visitAnd(Bina
>>>     Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
>>>       if (Value *V = SimplifyVectorOp(I))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       if (Value *V = SimplifyAndInst(Op0, Op1, DL, TLI, DT, AC))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       // (A|B)&(A|C) -> A|(B&C) etc
>>>     if (Value *V = SimplifyUsingDistributiveLaws(I))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       // See if we can simplify any instructions used by the instruction
>>> whose sole
>>>     // purpose is to compute bits we don't care about.
>>> @@ -1263,7 +1263,7 @@ Instruction *InstCombiner::visitAnd(Bina
>>>       return &I;
>>>       if (Value *V = SimplifyBSwap(I))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       if (ConstantInt *AndRHS = dyn_cast<ConstantInt>(Op1)) {
>>>       const APInt &AndRHSMask = AndRHS->getValue();
>>> @@ -1451,7 +1451,7 @@ Instruction *InstCombiner::visitAnd(Bina
>>>       ICmpInst *RHS = dyn_cast<ICmpInst>(Op1);
>>>       if (LHS && RHS)
>>>         if (Value *Res = FoldAndOfICmps(LHS, RHS))
>>> -        return ReplaceInstUsesWith(I, Res);
>>> +        return replaceInstUsesWith(I, Res);
>>>         // TODO: Make this recursive; it's a little tricky because an
>>> arbitrary
>>>       // number of 'and' instructions might have to be created.
>>> @@ -1459,18 +1459,18 @@ Instruction *InstCombiner::visitAnd(Bina
>>>       if (LHS && match(Op1, m_OneUse(m_And(m_Value(X), m_Value(Y))))) {
>>>         if (auto *Cmp = dyn_cast<ICmpInst>(X))
>>>           if (Value *Res = FoldAndOfICmps(LHS, Cmp))
>>> -          return ReplaceInstUsesWith(I, Builder->CreateAnd(Res, Y));
>>> +          return replaceInstUsesWith(I, Builder->CreateAnd(Res, Y));
>>>         if (auto *Cmp = dyn_cast<ICmpInst>(Y))
>>>           if (Value *Res = FoldAndOfICmps(LHS, Cmp))
>>> -          return ReplaceInstUsesWith(I, Builder->CreateAnd(Res, X));
>>> +          return replaceInstUsesWith(I, Builder->CreateAnd(Res, X));
>>>       }
>>>       if (RHS && match(Op0, m_OneUse(m_And(m_Value(X), m_Value(Y))))) {
>>>         if (auto *Cmp = dyn_cast<ICmpInst>(X))
>>>           if (Value *Res = FoldAndOfICmps(Cmp, RHS))
>>> -          return ReplaceInstUsesWith(I, Builder->CreateAnd(Res, Y));
>>> +          return replaceInstUsesWith(I, Builder->CreateAnd(Res, Y));
>>>         if (auto *Cmp = dyn_cast<ICmpInst>(Y))
>>>           if (Value *Res = FoldAndOfICmps(Cmp, RHS))
>>> -          return ReplaceInstUsesWith(I, Builder->CreateAnd(Res, X));
>>> +          return replaceInstUsesWith(I, Builder->CreateAnd(Res, X));
>>>       }
>>>     }
>>>   @@ -1478,7 +1478,7 @@ Instruction *InstCombiner::visitAnd(Bina
>>>     if (FCmpInst *LHS = dyn_cast<FCmpInst>(I.getOperand(0)))
>>>       if (FCmpInst *RHS = dyn_cast<FCmpInst>(I.getOperand(1)))
>>>         if (Value *Res = FoldAndOfFCmps(LHS, RHS))
>>> -        return ReplaceInstUsesWith(I, Res);
>>> +        return replaceInstUsesWith(I, Res);
>>>         if (CastInst *Op0C = dyn_cast<CastInst>(Op0)) {
>>> @@ -2055,14 +2055,14 @@ Instruction *InstCombiner::visitOr(Binar
>>>     Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
>>>       if (Value *V = SimplifyVectorOp(I))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       if (Value *V = SimplifyOrInst(Op0, Op1, DL, TLI, DT, AC))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       // (A&B)|(A&C) -> A&(B|C) etc
>>>     if (Value *V = SimplifyUsingDistributiveLaws(I))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       // See if we can simplify any instructions used by the instruction
>>> whose sole
>>>     // purpose is to compute bits we don't care about.
>>> @@ -2070,7 +2070,7 @@ Instruction *InstCombiner::visitOr(Binar
>>>       return &I;
>>>       if (Value *V = SimplifyBSwap(I))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       if (ConstantInt *RHS = dyn_cast<ConstantInt>(Op1)) {
>>>       ConstantInt *C1 = nullptr; Value *X = nullptr;
>>> @@ -2335,7 +2335,7 @@ Instruction *InstCombiner::visitOr(Binar
>>>       ICmpInst *RHS = dyn_cast<ICmpInst>(Op1);
>>>       if (LHS && RHS)
>>>         if (Value *Res = FoldOrOfICmps(LHS, RHS, &I))
>>> -        return ReplaceInstUsesWith(I, Res);
>>> +        return replaceInstUsesWith(I, Res);
>>>         // TODO: Make this recursive; it's a little tricky because an
>>> arbitrary
>>>       // number of 'or' instructions might have to be created.
>>> @@ -2343,18 +2343,18 @@ Instruction *InstCombiner::visitOr(Binar
>>>       if (LHS && match(Op1, m_OneUse(m_Or(m_Value(X), m_Value(Y))))) {
>>>         if (auto *Cmp = dyn_cast<ICmpInst>(X))
>>>           if (Value *Res = FoldOrOfICmps(LHS, Cmp, &I))
>>> -          return ReplaceInstUsesWith(I, Builder->CreateOr(Res, Y));
>>> +          return replaceInstUsesWith(I, Builder->CreateOr(Res, Y));
>>>         if (auto *Cmp = dyn_cast<ICmpInst>(Y))
>>>           if (Value *Res = FoldOrOfICmps(LHS, Cmp, &I))
>>> -          return ReplaceInstUsesWith(I, Builder->CreateOr(Res, X));
>>> +          return replaceInstUsesWith(I, Builder->CreateOr(Res, X));
>>>       }
>>>       if (RHS && match(Op0, m_OneUse(m_Or(m_Value(X), m_Value(Y))))) {
>>>         if (auto *Cmp = dyn_cast<ICmpInst>(X))
>>>           if (Value *Res = FoldOrOfICmps(Cmp, RHS, &I))
>>> -          return ReplaceInstUsesWith(I, Builder->CreateOr(Res, Y));
>>> +          return replaceInstUsesWith(I, Builder->CreateOr(Res, Y));
>>>         if (auto *Cmp = dyn_cast<ICmpInst>(Y))
>>>           if (Value *Res = FoldOrOfICmps(Cmp, RHS, &I))
>>> -          return ReplaceInstUsesWith(I, Builder->CreateOr(Res, X));
>>> +          return replaceInstUsesWith(I, Builder->CreateOr(Res, X));
>>>       }
>>>     }
>>>   @@ -2362,7 +2362,7 @@ Instruction *InstCombiner::visitOr(Binar
>>>     if (FCmpInst *LHS = dyn_cast<FCmpInst>(I.getOperand(0)))
>>>       if (FCmpInst *RHS = dyn_cast<FCmpInst>(I.getOperand(1)))
>>>         if (Value *Res = FoldOrOfFCmps(LHS, RHS))
>>> -        return ReplaceInstUsesWith(I, Res);
>>> +        return replaceInstUsesWith(I, Res);
>>>       // fold (or (cast A), (cast B)) -> (cast (or A, B))
>>>     if (CastInst *Op0C = dyn_cast<CastInst>(Op0)) {
>>> @@ -2440,14 +2440,14 @@ Instruction *InstCombiner::visitXor(Bina
>>>     Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
>>>       if (Value *V = SimplifyVectorOp(I))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       if (Value *V = SimplifyXorInst(Op0, Op1, DL, TLI, DT, AC))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       // (A&B)^(A&C) -> A&(B^C) etc
>>>     if (Value *V = SimplifyUsingDistributiveLaws(I))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       // See if we can simplify any instructions used by the instruction
>>> whose sole
>>>     // purpose is to compute bits we don't care about.
>>> @@ -2455,7 +2455,7 @@ Instruction *InstCombiner::visitXor(Bina
>>>       return &I;
>>>       if (Value *V = SimplifyBSwap(I))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       // Is this a ~ operation?
>>>     if (Value *NotOp = dyn_castNotVal(&I)) {
>>> @@ -2724,7 +2724,7 @@ Instruction *InstCombiner::visitXor(Bina
>>>             Value *Op0 = LHS->getOperand(0), *Op1 = LHS->getOperand(1);
>>>             unsigned Code = getICmpCode(LHS) ^ getICmpCode(RHS);
>>>             bool isSigned = LHS->isSigned() || RHS->isSigned();
>>> -          return ReplaceInstUsesWith(I,
>>> +          return replaceInstUsesWith(I,
>>>                                  getNewICmpValue(isSigned, Code, Op0,
>>> Op1,
>>>                                                  Builder));
>>>           }
>>>
>>> Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp?rev=259425&r1=259424&r2=259425&view=diff
>>>
>>> ==============================================================================
>>> --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp (original)
>>> +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Mon Feb
>>> 1 16:23:39 2016
>>> @@ -780,7 +780,7 @@ static Instruction *simplifyMaskedStore(
>>>       // If the mask is all zeros, this instruction does nothing.
>>>     if (ConstMask->isNullValue())
>>> -    return IC.EraseInstFromFunction(II);
>>> +    return IC.eraseInstFromFunction(II);
>>>       // If the mask is all ones, this is a plain vector store of the
>>> 1st argument.
>>>     if (ConstMask->isAllOnesValue()) {
>>> @@ -796,7 +796,7 @@ static Instruction *simplifyMaskedGather
>>>     // If the mask is all zeros, return the "passthru" argument of the
>>> gather.
>>>     auto *ConstMask = dyn_cast<Constant>(II.getArgOperand(2));
>>>     if (ConstMask && ConstMask->isNullValue())
>>> -    return IC.ReplaceInstUsesWith(II, II.getArgOperand(3));
>>> +    return IC.replaceInstUsesWith(II, II.getArgOperand(3));
>>>       return nullptr;
>>>   }
>>> @@ -805,7 +805,7 @@ static Instruction *simplifyMaskedScatte
>>>     // If the mask is all zeros, a scatter does nothing.
>>>     auto *ConstMask = dyn_cast<Constant>(II.getArgOperand(3));
>>>     if (ConstMask && ConstMask->isNullValue())
>>> -    return IC.EraseInstFromFunction(II);
>>> +    return IC.eraseInstFromFunction(II);
>>>       return nullptr;
>>>   }
>>> @@ -817,7 +817,7 @@ Instruction *InstCombiner::visitCallInst
>>>     auto Args = CI.arg_operands();
>>>     if (Value *V = SimplifyCall(CI.getCalledValue(), Args.begin(),
>>> Args.end(), DL,
>>>                                 TLI, DT, AC))
>>> -    return ReplaceInstUsesWith(CI, V);
>>> +    return replaceInstUsesWith(CI, V);
>>>       if (isFreeCall(&CI, TLI))
>>>       return visitFree(CI);
>>> @@ -841,7 +841,7 @@ Instruction *InstCombiner::visitCallInst
>>>       // memmove/cpy/set of zero bytes is a noop.
>>>       if (Constant *NumBytes = dyn_cast<Constant>(MI->getLength())) {
>>>         if (NumBytes->isNullValue())
>>> -        return EraseInstFromFunction(CI);
>>> +        return eraseInstFromFunction(CI);
>>>           if (ConstantInt *CI = dyn_cast<ConstantInt>(NumBytes))
>>>           if (CI->getZExtValue() == 1) {
>>> @@ -874,7 +874,7 @@ Instruction *InstCombiner::visitCallInst
>>>       if (MemTransferInst *MTI = dyn_cast<MemTransferInst>(MI)) {
>>>         // memmove(x,x,size) -> noop.
>>>         if (MTI->getSource() == MTI->getDest())
>>> -        return EraseInstFromFunction(CI);
>>> +        return eraseInstFromFunction(CI);
>>>       }
>>>         // If we can determine a pointer alignment that is bigger than
>>> currently
>>> @@ -902,7 +902,7 @@ Instruction *InstCombiner::visitCallInst
>>>     case Intrinsic::objectsize: {
>>>       uint64_t Size;
>>>       if (getObjectSize(II->getArgOperand(0), Size, DL, TLI))
>>> -      return ReplaceInstUsesWith(CI, ConstantInt::get(CI.getType(),
>>> Size));
>>> +      return replaceInstUsesWith(CI, ConstantInt::get(CI.getType(),
>>> Size));
>>>       return nullptr;
>>>     }
>>>     case Intrinsic::bswap: {
>>> @@ -911,7 +911,7 @@ Instruction *InstCombiner::visitCallInst
>>>         // bswap(bswap(x)) -> x
>>>       if (match(IIOperand, m_BSwap(m_Value(X))))
>>> -        return ReplaceInstUsesWith(CI, X);
>>> +        return replaceInstUsesWith(CI, X);
>>>         // bswap(trunc(bswap(x))) -> trunc(lshr(x, c))
>>>       if (match(IIOperand, m_Trunc(m_BSwap(m_Value(X))))) {
>>> @@ -930,13 +930,13 @@ Instruction *InstCombiner::visitCallInst
>>>         // bitreverse(bitreverse(x)) -> x
>>>       if (match(IIOperand,
>>> m_Intrinsic<Intrinsic::bitreverse>(m_Value(X))))
>>> -      return ReplaceInstUsesWith(CI, X);
>>> +      return replaceInstUsesWith(CI, X);
>>>       break;
>>>     }
>>>       case Intrinsic::masked_load:
>>>       if (Value *SimplifiedMaskedOp = simplifyMaskedLoad(*II, *Builder))
>>> -      return ReplaceInstUsesWith(CI, SimplifiedMaskedOp);
>>> +      return replaceInstUsesWith(CI, SimplifiedMaskedOp);
>>>       break;
>>>     case Intrinsic::masked_store:
>>>       return simplifyMaskedStore(*II, *this);
>>> @@ -949,10 +949,10 @@ Instruction *InstCombiner::visitCallInst
>>>       if (ConstantInt *Power =
>>> dyn_cast<ConstantInt>(II->getArgOperand(1))) {
>>>         // powi(x, 0) -> 1.0
>>>         if (Power->isZero())
>>> -        return ReplaceInstUsesWith(CI, ConstantFP::get(CI.getType(),
>>> 1.0));
>>> +        return replaceInstUsesWith(CI, ConstantFP::get(CI.getType(),
>>> 1.0));
>>>         // powi(x, 1) -> x
>>>         if (Power->isOne())
>>> -        return ReplaceInstUsesWith(CI, II->getArgOperand(0));
>>> +        return replaceInstUsesWith(CI, II->getArgOperand(0));
>>>         // powi(x, -1) -> 1/x
>>>         if (Power->isAllOnesValue())
>>>           return
>>> BinaryOperator::CreateFDiv(ConstantFP::get(CI.getType(), 1.0),
>>> @@ -972,7 +972,7 @@ Instruction *InstCombiner::visitCallInst
>>>       unsigned TrailingZeros = KnownOne.countTrailingZeros();
>>>       APInt Mask(APInt::getLowBitsSet(BitWidth, TrailingZeros));
>>>       if ((Mask & KnownZero) == Mask)
>>> -      return ReplaceInstUsesWith(CI, ConstantInt::get(IT,
>>> +      return replaceInstUsesWith(CI, ConstantInt::get(IT,
>>>                                    APInt(BitWidth, TrailingZeros)));
>>>         }
>>> @@ -990,7 +990,7 @@ Instruction *InstCombiner::visitCallInst
>>>       unsigned LeadingZeros = KnownOne.countLeadingZeros();
>>>       APInt Mask(APInt::getHighBitsSet(BitWidth, LeadingZeros));
>>>       if ((Mask & KnownZero) == Mask)
>>> -      return ReplaceInstUsesWith(CI, ConstantInt::get(IT,
>>> +      return replaceInstUsesWith(CI, ConstantInt::get(IT,
>>>                                    APInt(BitWidth, LeadingZeros)));
>>>         }
>>> @@ -1036,7 +1036,7 @@ Instruction *InstCombiner::visitCallInst
>>>         return II;
>>>       }
>>>       if (Value *V = simplifyMinnumMaxnum(*II))
>>> -      return ReplaceInstUsesWith(*II, V);
>>> +      return replaceInstUsesWith(*II, V);
>>>       break;
>>>     }
>>>     case Intrinsic::ppc_altivec_lvx:
>>> @@ -1147,7 +1147,7 @@ Instruction *InstCombiner::visitCallInst
>>>         // Constant folding: Convert to generic half to single
>>> conversion.
>>>       if (isa<ConstantAggregateZero>(Arg))
>>> -      return ReplaceInstUsesWith(*II,
>>> ConstantAggregateZero::get(RetType));
>>> +      return replaceInstUsesWith(*II,
>>> ConstantAggregateZero::get(RetType));
>>>         if (isa<ConstantDataVector>(Arg)) {
>>>         auto VectorHalfAsShorts = Arg;
>>> @@ -1164,7 +1164,7 @@ Instruction *InstCombiner::visitCallInst
>>>         auto VectorHalfs =
>>>             Builder->CreateBitCast(VectorHalfAsShorts, VectorHalfType);
>>>         auto VectorFloats = Builder->CreateFPExt(VectorHalfs, RetType);
>>> -      return ReplaceInstUsesWith(*II, VectorFloats);
>>> +      return replaceInstUsesWith(*II, VectorFloats);
>>>       }
>>>         // We only use the lowest lanes of the argument.
>>> @@ -1214,7 +1214,7 @@ Instruction *InstCombiner::visitCallInst
>>>     case Intrinsic::x86_avx2_pslli_q:
>>>     case Intrinsic::x86_avx2_pslli_w:
>>>       if (Value *V = simplifyX86immShift(*II, *Builder))
>>> -      return ReplaceInstUsesWith(*II, V);
>>> +      return replaceInstUsesWith(*II, V);
>>>       break;
>>>       case Intrinsic::x86_sse2_psra_d:
>>> @@ -1234,7 +1234,7 @@ Instruction *InstCombiner::visitCallInst
>>>     case Intrinsic::x86_avx2_psll_q:
>>>     case Intrinsic::x86_avx2_psll_w: {
>>>       if (Value *V = simplifyX86immShift(*II, *Builder))
>>> -      return ReplaceInstUsesWith(*II, V);
>>> +      return replaceInstUsesWith(*II, V);
>>>         // SSE2/AVX2 uses only the first 64-bits of the 128-bit vector
>>>       // operand to compute the shift amount.
>>> @@ -1257,7 +1257,7 @@ Instruction *InstCombiner::visitCallInst
>>>     case Intrinsic::x86_avx2_pmovsxwd:
>>>     case Intrinsic::x86_avx2_pmovsxwq:
>>>       if (Value *V = simplifyX86extend(*II, *Builder, true))
>>> -      return ReplaceInstUsesWith(*II, V);
>>> +      return replaceInstUsesWith(*II, V);
>>>       break;
>>>       case Intrinsic::x86_sse41_pmovzxbd:
>>> @@ -1273,12 +1273,12 @@ Instruction *InstCombiner::visitCallInst
>>>     case Intrinsic::x86_avx2_pmovzxwd:
>>>     case Intrinsic::x86_avx2_pmovzxwq:
>>>       if (Value *V = simplifyX86extend(*II, *Builder, false))
>>> -      return ReplaceInstUsesWith(*II, V);
>>> +      return replaceInstUsesWith(*II, V);
>>>       break;
>>>       case Intrinsic::x86_sse41_insertps:
>>>       if (Value *V = simplifyX86insertps(*II, *Builder))
>>> -      return ReplaceInstUsesWith(*II, V);
>>> +      return replaceInstUsesWith(*II, V);
>>>       break;
>>>       case Intrinsic::x86_sse4a_extrq: {
>>> @@ -1301,7 +1301,7 @@ Instruction *InstCombiner::visitCallInst
>>>         // Attempt to simplify to a constant, shuffle vector or EXTRQI
>>> call.
>>>       if (Value *V = simplifyX86extrq(*II, Op0, CILength, CIIndex,
>>> *Builder))
>>> -      return ReplaceInstUsesWith(*II, V);
>>> +      return replaceInstUsesWith(*II, V);
>>>         // EXTRQ only uses the lowest 64-bits of the first 128-bit vector
>>>       // operands and the lowest 16-bits of the second.
>>> @@ -1330,7 +1330,7 @@ Instruction *InstCombiner::visitCallInst
>>>         // Attempt to simplify to a constant or shuffle vector.
>>>       if (Value *V = simplifyX86extrq(*II, Op0, CILength, CIIndex,
>>> *Builder))
>>> -      return ReplaceInstUsesWith(*II, V);
>>> +      return replaceInstUsesWith(*II, V);
>>>         // EXTRQI only uses the lowest 64-bits of the first 128-bit
>>> vector
>>>       // operand.
>>> @@ -1362,7 +1362,7 @@ Instruction *InstCombiner::visitCallInst
>>>         APInt Len = V11.zextOrTrunc(6);
>>>         APInt Idx = V11.lshr(8).zextOrTrunc(6);
>>>         if (Value *V = simplifyX86insertq(*II, Op0, Op1, Len, Idx,
>>> *Builder))
>>> -        return ReplaceInstUsesWith(*II, V);
>>> +        return replaceInstUsesWith(*II, V);
>>>       }
>>>         // INSERTQ only uses the lowest 64-bits of the first 128-bit
>>> vector
>>> @@ -1395,7 +1395,7 @@ Instruction *InstCombiner::visitCallInst
>>>         APInt Len = CILength->getValue().zextOrTrunc(6);
>>>         APInt Idx = CIIndex->getValue().zextOrTrunc(6);
>>>         if (Value *V = simplifyX86insertq(*II, Op0, Op1, Len, Idx,
>>> *Builder))
>>> -        return ReplaceInstUsesWith(*II, V);
>>> +        return replaceInstUsesWith(*II, V);
>>>       }
>>>         // INSERTQI only uses the lowest 64-bits of the first two
>>> 128-bit vector
>>> @@ -1429,11 +1429,11 @@ Instruction *InstCombiner::visitCallInst
>>>         // fold (blend A, A, Mask) -> A
>>>       if (Op0 == Op1)
>>> -      return ReplaceInstUsesWith(CI, Op0);
>>> +      return replaceInstUsesWith(CI, Op0);
>>>         // Zero Mask - select 1st argument.
>>>       if (isa<ConstantAggregateZero>(Mask))
>>> -      return ReplaceInstUsesWith(CI, Op0);
>>> +      return replaceInstUsesWith(CI, Op0);
>>>         // Constant Mask - select 1st/2nd argument lane based on top bit
>>> of mask.
>>>       if (auto C = dyn_cast<ConstantDataVector>(Mask)) {
>>> @@ -1501,7 +1501,7 @@ Instruction *InstCombiner::visitCallInst
>>>       auto V1 = II->getArgOperand(0);
>>>       auto V2 = Constant::getNullValue(II->getType());
>>>       auto Shuffle = Builder->CreateShuffleVector(V1, V2, NewC);
>>> -    return ReplaceInstUsesWith(CI, Shuffle);
>>> +    return replaceInstUsesWith(CI, Shuffle);
>>>     }
>>>       case Intrinsic::x86_avx_vpermilvar_ps:
>>> @@ -1541,7 +1541,7 @@ Instruction *InstCombiner::visitCallInst
>>>       auto V1 = II->getArgOperand(0);
>>>       auto V2 = UndefValue::get(V1->getType());
>>>       auto Shuffle = Builder->CreateShuffleVector(V1, V2, NewC);
>>> -    return ReplaceInstUsesWith(CI, Shuffle);
>>> +    return replaceInstUsesWith(CI, Shuffle);
>>>     }
>>>       case Intrinsic::x86_avx_vperm2f128_pd_256:
>>> @@ -1549,7 +1549,7 @@ Instruction *InstCombiner::visitCallInst
>>>     case Intrinsic::x86_avx_vperm2f128_si_256:
>>>     case Intrinsic::x86_avx2_vperm2i128:
>>>       if (Value *V = simplifyX86vperm2(*II, *Builder))
>>> -      return ReplaceInstUsesWith(*II, V);
>>> +      return replaceInstUsesWith(*II, V);
>>>       break;
>>>       case Intrinsic::x86_xop_vpcomb:
>>> @@ -1557,7 +1557,7 @@ Instruction *InstCombiner::visitCallInst
>>>     case Intrinsic::x86_xop_vpcomq:
>>>     case Intrinsic::x86_xop_vpcomw:
>>>       if (Value *V = simplifyX86vpcom(*II, *Builder, true))
>>> -      return ReplaceInstUsesWith(*II, V);
>>> +      return replaceInstUsesWith(*II, V);
>>>       break;
>>>       case Intrinsic::x86_xop_vpcomub:
>>> @@ -1565,7 +1565,7 @@ Instruction *InstCombiner::visitCallInst
>>>     case Intrinsic::x86_xop_vpcomuq:
>>>     case Intrinsic::x86_xop_vpcomuw:
>>>       if (Value *V = simplifyX86vpcom(*II, *Builder, false))
>>> -      return ReplaceInstUsesWith(*II, V);
>>> +      return replaceInstUsesWith(*II, V);
>>>       break;
>>>       case Intrinsic::ppc_altivec_vperm:
>>> @@ -1662,7 +1662,7 @@ Instruction *InstCombiner::visitCallInst
>>>         // Handle mul by zero first:
>>>       if (isa<ConstantAggregateZero>(Arg0) ||
>>> isa<ConstantAggregateZero>(Arg1)) {
>>> -      return ReplaceInstUsesWith(CI,
>>> ConstantAggregateZero::get(II->getType()));
>>> +      return replaceInstUsesWith(CI,
>>> ConstantAggregateZero::get(II->getType()));
>>>       }
>>>         // Check for constant LHS & RHS - in this case we just simplify.
>>> @@ -1674,7 +1674,7 @@ Instruction *InstCombiner::visitCallInst
>>>           CV0 = ConstantExpr::getIntegerCast(CV0, NewVT,
>>> /*isSigned=*/!Zext);
>>>           CV1 = ConstantExpr::getIntegerCast(CV1, NewVT,
>>> /*isSigned=*/!Zext);
>>>   -        return ReplaceInstUsesWith(CI, ConstantExpr::getMul(CV0,
>>> CV1));
>>> +        return replaceInstUsesWith(CI, ConstantExpr::getMul(CV0, CV1));
>>>         }
>>>           // Couldn't simplify - canonicalize constant to the RHS.
>>> @@ -1701,7 +1701,7 @@ Instruction *InstCombiner::visitCallInst
>>>         // Only do this if it was exact and therefore not dependent on
>>> the
>>>         // rounding mode.
>>>         if (Status == APFloat::opOK)
>>> -        return ReplaceInstUsesWith(CI,
>>> ConstantFP::get(II->getContext(), Val));
>>> +        return replaceInstUsesWith(CI,
>>> ConstantFP::get(II->getContext(), Val));
>>>       }
>>>         break;
>>> @@ -1712,7 +1712,7 @@ Instruction *InstCombiner::visitCallInst
>>>       if (IntrinsicInst *SS =
>>> dyn_cast<IntrinsicInst>(II->getArgOperand(0))) {
>>>         if (SS->getIntrinsicID() == Intrinsic::stacksave) {
>>>           if (&*++SS->getIterator() == II)
>>> -          return EraseInstFromFunction(CI);
>>> +          return eraseInstFromFunction(CI);
>>>         }
>>>       }
>>>   @@ -1730,7 +1730,7 @@ Instruction *InstCombiner::visitCallInst
>>>           if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(BCI)) {
>>>             // If there is a stackrestore below this one, remove this
>>> one.
>>>             if (II->getIntrinsicID() == Intrinsic::stackrestore)
>>> -            return EraseInstFromFunction(CI);
>>> +            return eraseInstFromFunction(CI);
>>>             // Otherwise, ignore the intrinsic.
>>>           } else {
>>>             // If we found a non-intrinsic call, we can't remove the
>>> stack
>>> @@ -1745,7 +1745,7 @@ Instruction *InstCombiner::visitCallInst
>>>       // are no allocas or calls between the restore and the return,
>>> nuke the
>>>       // restore.
>>>       if (!CannotRemove && (isa<ReturnInst>(TI) || isa<ResumeInst>(TI)))
>>> -      return EraseInstFromFunction(CI);
>>> +      return eraseInstFromFunction(CI);
>>>       break;
>>>     }
>>>     case Intrinsic::lifetime_start: {
>>> @@ -1761,8 +1761,8 @@ Instruction *InstCombiner::visitCallInst
>>>           if (LTE->getIntrinsicID() == Intrinsic::lifetime_end) {
>>>             if (II->getOperand(0) == LTE->getOperand(0) &&
>>>                 II->getOperand(1) == LTE->getOperand(1)) {
>>> -            EraseInstFromFunction(*LTE);
>>> -            return EraseInstFromFunction(*II);
>>> +            eraseInstFromFunction(*LTE);
>>> +            return eraseInstFromFunction(*II);
>>>             }
>>>             continue;
>>>           }
>>> @@ -1780,7 +1780,7 @@ Instruction *InstCombiner::visitCallInst
>>>       if (match(IIOperand, m_And(m_Value(A), m_Value(B)))) {
>>>         Builder->CreateCall(AssumeIntrinsic, A, II->getName());
>>>         Builder->CreateCall(AssumeIntrinsic, B, II->getName());
>>> -      return EraseInstFromFunction(*II);
>>> +      return eraseInstFromFunction(*II);
>>>       }
>>>       // assume(!(a || b)) -> assume(!a); assume(!b);
>>>       if (match(IIOperand, m_Not(m_Or(m_Value(A), m_Value(B))))) {
>>> @@ -1788,7 +1788,7 @@ Instruction *InstCombiner::visitCallInst
>>>                             II->getName());
>>>         Builder->CreateCall(AssumeIntrinsic, Builder->CreateNot(B),
>>>                             II->getName());
>>> -      return EraseInstFromFunction(*II);
>>> +      return eraseInstFromFunction(*II);
>>>       }
>>>         // assume( (load addr) != null ) -> add 'nonnull' metadata to
>>> load
>>> @@ -1805,7 +1805,7 @@ Instruction *InstCombiner::visitCallInst
>>>           if (isValidAssumeForContext(II, LI, DT)) {
>>>             MDNode *MD = MDNode::get(II->getContext(), None);
>>>             LI->setMetadata(LLVMContext::MD_nonnull, MD);
>>> -          return EraseInstFromFunction(*II);
>>> +          return eraseInstFromFunction(*II);
>>>           }
>>>         }
>>>         // TODO: apply nonnull return attributes to calls and invokes
>>> @@ -1816,7 +1816,7 @@ Instruction *InstCombiner::visitCallInst
>>>       APInt KnownZero(1, 0), KnownOne(1, 0);
>>>       computeKnownBits(IIOperand, KnownZero, KnownOne, 0, II);
>>>       if (KnownOne.isAllOnesValue())
>>> -      return EraseInstFromFunction(*II);
>>> +      return eraseInstFromFunction(*II);
>>>         break;
>>>     }
>>> @@ -1830,7 +1830,7 @@ Instruction *InstCombiner::visitCallInst
>>>       // Remove the relocation if unused, note that this check is
>>> required
>>>       // to prevent the cases below from looping forever.
>>>       if (II->use_empty())
>>> -      return EraseInstFromFunction(*II);
>>> +      return eraseInstFromFunction(*II);
>>>         // Undef is undef, even after relocation.
>>>       // TODO: provide a hook for this in GCStrategy.  This is clearly
>>> legal for
>>> @@ -1838,7 +1838,7 @@ Instruction *InstCombiner::visitCallInst
>>>       // about whether it was legal for all possible collectors.
>>>       if (isa<UndefValue>(DerivedPtr)) {
>>>         // gc_relocate is uncasted. Use undef of gc_relocate's type to
>>> replace it.
>>> -      return ReplaceInstUsesWith(*II, UndefValue::get(GCRelocateType));
>>> +      return replaceInstUsesWith(*II, UndefValue::get(GCRelocateType));
>>>       }
>>>         // The relocation of null will be null for most any collector.
>>> @@ -1847,7 +1847,7 @@ Instruction *InstCombiner::visitCallInst
>>>       if (isa<ConstantPointerNull>(DerivedPtr)) {
>>>         // gc_relocate is uncasted. Use null-pointer of gc_relocate's
>>> type to
>>>         // replace it.
>>> -      return ReplaceInstUsesWith(*II,
>>> ConstantPointerNull::get(GCRelocateType));
>>> +      return replaceInstUsesWith(*II,
>>> ConstantPointerNull::get(GCRelocateType));
>>>       }
>>>         // isKnownNonNull -> nonnull attribute
>>> @@ -1915,12 +1915,12 @@ Instruction *InstCombiner::tryOptimizeCa
>>>     if (!CI->getCalledFunction()) return nullptr;
>>>       auto InstCombineRAUW = [this](Instruction *From, Value *With) {
>>> -    ReplaceInstUsesWith(*From, With);
>>> +    replaceInstUsesWith(*From, With);
>>>     };
>>>     LibCallSimplifier Simplifier(DL, TLI, InstCombineRAUW);
>>>     if (Value *With = Simplifier.optimizeCall(CI)) {
>>>       ++NumSimplified;
>>> -    return CI->use_empty() ? CI : ReplaceInstUsesWith(*CI, With);
>>> +    return CI->use_empty() ? CI : replaceInstUsesWith(*CI, With);
>>>     }
>>>       return nullptr;
>>> @@ -2057,9 +2057,9 @@ Instruction *InstCombiner::visitCallSite
>>>         // If OldCall does not return void then replaceAllUsesWith undef.
>>>         // This allows ValueHandlers and custom metadata to adjust
>>> itself.
>>>         if (!OldCall->getType()->isVoidTy())
>>> -        ReplaceInstUsesWith(*OldCall,
>>> UndefValue::get(OldCall->getType()));
>>> +        replaceInstUsesWith(*OldCall,
>>> UndefValue::get(OldCall->getType()));
>>>         if (isa<CallInst>(OldCall))
>>> -        return EraseInstFromFunction(*OldCall);
>>> +        return eraseInstFromFunction(*OldCall);
>>>           // We cannot remove an invoke, because it would change the
>>> CFG, just
>>>         // change the callee to a null pointer.
>>> @@ -2072,7 +2072,7 @@ Instruction *InstCombiner::visitCallSite
>>>       // If CS does not return void then replaceAllUsesWith undef.
>>>       // This allows ValueHandlers and custom metadata to adjust itself.
>>>       if (!CS.getInstruction()->getType()->isVoidTy())
>>> -      ReplaceInstUsesWith(*CS.getInstruction(),
>>> +      replaceInstUsesWith(*CS.getInstruction(),
>>>
>>> UndefValue::get(CS.getInstruction()->getType()));
>>>         if (isa<InvokeInst>(CS.getInstruction())) {
>>> @@ -2087,7 +2087,7 @@ Instruction *InstCombiner::visitCallSite
>>>
>>> UndefValue::get(Type::getInt1PtrTy(Callee->getContext())),
>>>                     CS.getInstruction());
>>>   -    return EraseInstFromFunction(*CS.getInstruction());
>>> +    return eraseInstFromFunction(*CS.getInstruction());
>>>     }
>>>       if (IntrinsicInst *II = findInitTrampoline(Callee))
>>> @@ -2122,7 +2122,7 @@ Instruction *InstCombiner::visitCallSite
>>>       Instruction *I = tryOptimizeCall(CI);
>>>       // If we changed something return the result, etc. Otherwise let
>>>       // the fallthrough check.
>>> -    if (I) return EraseInstFromFunction(*I);
>>> +    if (I) return eraseInstFromFunction(*I);
>>>     }
>>>       return Changed ? CS.getInstruction() : nullptr;
>>> @@ -2389,7 +2389,7 @@ bool InstCombiner::transformConstExprCas
>>>     }
>>>       if (!Caller->use_empty())
>>> -    ReplaceInstUsesWith(*Caller, NV);
>>> +    replaceInstUsesWith(*Caller, NV);
>>>     else if (Caller->hasValueHandle()) {
>>>       if (OldRetTy == NV->getType())
>>>         ValueHandleBase::ValueIsRAUWd(Caller, NV);
>>> @@ -2399,7 +2399,7 @@ bool InstCombiner::transformConstExprCas
>>>         ValueHandleBase::ValueIsDeleted(Caller);
>>>     }
>>>   -  EraseInstFromFunction(*Caller);
>>> +  eraseInstFromFunction(*Caller);
>>>     return true;
>>>   }
>>>
>>> Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp?rev=259425&r1=259424&r2=259425&view=diff
>>>
>>> ==============================================================================
>>> --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp (original)
>>> +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp Mon Feb
>>> 1 16:23:39 2016
>>> @@ -149,9 +149,9 @@ Instruction *InstCombiner::PromoteCastOf
>>>       // New is the allocation instruction, pointer typed. AI is the
>>> original
>>>       // allocation instruction, also pointer typed. Thus, cast to use
>>> is BitCast.
>>>       Value *NewCast = AllocaBuilder.CreateBitCast(New, AI.getType(),
>>> "tmpcast");
>>> -    ReplaceInstUsesWith(AI, NewCast);
>>> +    replaceInstUsesWith(AI, NewCast);
>>>     }
>>> -  return ReplaceInstUsesWith(CI, New);
>>> +  return replaceInstUsesWith(CI, New);
>>>   }
>>>     /// Given an expression that CanEvaluateTruncated or
>>> CanEvaluateSExtd returns
>>> @@ -508,7 +508,7 @@ Instruction *InstCombiner::visitTrunc(Tr
>>>             " to avoid cast: " << CI << '\n');
>>>       Value *Res = EvaluateInDifferentType(Src, DestTy, false);
>>>       assert(Res->getType() == DestTy);
>>> -    return ReplaceInstUsesWith(CI, Res);
>>> +    return replaceInstUsesWith(CI, Res);
>>>     }
>>>       // Canonicalize trunc x to i1 -> (icmp ne (and x, 1), 0), likewise
>>> for vector.
>>> @@ -532,7 +532,7 @@ Instruction *InstCombiner::visitTrunc(Tr
>>>       // If the shift amount is larger than the size of A, then the
>>> result is
>>>       // known to be zero because all the input bits got shifted out.
>>>       if (Cst->getZExtValue() >= ASize)
>>> -      return ReplaceInstUsesWith(CI, Constant::getNullValue(DestTy));
>>> +      return replaceInstUsesWith(CI, Constant::getNullValue(DestTy));
>>>         // Since we're doing an lshr and a zero extend, and know that
>>> the shift
>>>       // amount is smaller than ASize, it is always safe to do the shift
>>> in A's
>>> @@ -606,7 +606,7 @@ Instruction *InstCombiner::transformZExt
>>>           In = Builder->CreateXor(In, One, In->getName() + ".not");
>>>         }
>>>   -      return ReplaceInstUsesWith(CI, In);
>>> +      return replaceInstUsesWith(CI, In);
>>>       }
>>>         // zext (X == 0) to i32 --> X^1      iff X has only the low bit
>>> set.
>>> @@ -636,7 +636,7 @@ Instruction *InstCombiner::transformZExt
>>>             Constant *Res =
>>> ConstantInt::get(Type::getInt1Ty(CI.getContext()),
>>>                                              isNE);
>>>             Res = ConstantExpr::getZExt(Res, CI.getType());
>>> -          return ReplaceInstUsesWith(CI, Res);
>>> +          return replaceInstUsesWith(CI, Res);
>>>           }
>>>             uint32_t ShAmt = KnownZeroMask.logBase2();
>>> @@ -654,7 +654,7 @@ Instruction *InstCombiner::transformZExt
>>>           }
>>>             if (CI.getType() == In->getType())
>>> -          return ReplaceInstUsesWith(CI, In);
>>> +          return replaceInstUsesWith(CI, In);
>>>           return CastInst::CreateIntegerCast(In, CI.getType(),
>>> false/*ZExt*/);
>>>         }
>>>       }
>>> @@ -694,7 +694,7 @@ Instruction *InstCombiner::transformZExt
>>>             if (ICI->getPredicate() == ICmpInst::ICMP_EQ)
>>>               Result = Builder->CreateXor(Result, ConstantInt::get(ITy,
>>> 1));
>>>             Result->takeName(ICI);
>>> -          return ReplaceInstUsesWith(CI, Result);
>>> +          return replaceInstUsesWith(CI, Result);
>>>           }
>>>         }
>>>       }
>>> @@ -872,7 +872,7 @@ Instruction *InstCombiner::visitZExt(ZEx
>>>                             APInt::getHighBitsSet(DestBitSize,
>>>
>>> DestBitSize-SrcBitsKept),
>>>                                0, &CI))
>>> -      return ReplaceInstUsesWith(CI, Res);
>>> +      return replaceInstUsesWith(CI, Res);
>>>         // We need to emit an AND to clear the high bits.
>>>       Constant *C = ConstantInt::get(Res->getType(),
>>> @@ -986,7 +986,7 @@ Instruction *InstCombiner::transformSExt
>>>           if (Pred == ICmpInst::ICMP_SGT)
>>>           In = Builder->CreateNot(In, In->getName()+".not");
>>> -      return ReplaceInstUsesWith(CI, In);
>>> +      return replaceInstUsesWith(CI, In);
>>>       }
>>>     }
>>>   @@ -1009,7 +1009,7 @@ Instruction *InstCombiner::transformSExt
>>>             Value *V = Pred == ICmpInst::ICMP_NE ?
>>>                          ConstantInt::getAllOnesValue(CI.getType()) :
>>>                          ConstantInt::getNullValue(CI.getType());
>>> -          return ReplaceInstUsesWith(CI, V);
>>> +          return replaceInstUsesWith(CI, V);
>>>           }
>>>             if (!Op1C->isZero() == (Pred == ICmpInst::ICMP_NE)) {
>>> @@ -1041,7 +1041,7 @@ Instruction *InstCombiner::transformSExt
>>>           }
>>>             if (CI.getType() == In->getType())
>>> -          return ReplaceInstUsesWith(CI, In);
>>> +          return replaceInstUsesWith(CI, In);
>>>           return CastInst::CreateIntegerCast(In, CI.getType(),
>>> true/*SExt*/);
>>>         }
>>>       }
>>> @@ -1137,7 +1137,7 @@ Instruction *InstCombiner::visitSExt(SEx
>>>     ComputeSignBit(Src, KnownZero, KnownOne, 0, &CI);
>>>     if (KnownZero) {
>>>       Value *ZExt = Builder->CreateZExt(Src, DestTy);
>>> -    return ReplaceInstUsesWith(CI, ZExt);
>>> +    return replaceInstUsesWith(CI, ZExt);
>>>     }
>>>       // Attempt to extend the entire input expression tree to the
>>> destination
>>> @@ -1158,7 +1158,7 @@ Instruction *InstCombiner::visitSExt(SEx
>>>       // If the high bits are already filled with sign bit, just replace
>>> this
>>>       // cast with the result.
>>>       if (ComputeNumSignBits(Res, 0, &CI) > DestBitSize - SrcBitSize)
>>> -      return ReplaceInstUsesWith(CI, Res);
>>> +      return replaceInstUsesWith(CI, Res);
>>>         // We need to emit a shl + ashr to do the sign extend.
>>>       Value *ShAmt = ConstantInt::get(DestTy, DestBitSize-SrcBitSize);
>>> @@ -1451,7 +1451,7 @@ Instruction *InstCombiner::FoldItoFPtoI(
>>>       if (FITy->getScalarSizeInBits() < SrcTy->getScalarSizeInBits())
>>>         return new TruncInst(SrcI, FITy);
>>>       if (SrcTy == FITy)
>>> -      return ReplaceInstUsesWith(FI, SrcI);
>>> +      return replaceInstUsesWith(FI, SrcI);
>>>       return new BitCastInst(SrcI, FITy);
>>>     }
>>>     return nullptr;
>>> @@ -1796,7 +1796,7 @@ Instruction *InstCombiner::visitBitCast(
>>>     // Get rid of casts from one type to the same type. These are
>>> useless and can
>>>     // be replaced by the operand.
>>>     if (DestTy == Src->getType())
>>> -    return ReplaceInstUsesWith(CI, Src);
>>> +    return replaceInstUsesWith(CI, Src);
>>>       if (PointerType *DstPTy = dyn_cast<PointerType>(DestTy)) {
>>>       PointerType *SrcPTy = cast<PointerType>(SrcTy);
>>> @@ -1854,7 +1854,7 @@ Instruction *InstCombiner::visitBitCast(
>>>         // assemble the elements of the vector manually.  Try to rip the
>>> code out
>>>         // and replace it with insertelements.
>>>         if (Value *V = optimizeIntegerToVectorInsertions(CI, *this))
>>> -        return ReplaceInstUsesWith(CI, V);
>>> +        return replaceInstUsesWith(CI, V);
>>>       }
>>>     }
>>>
>>> Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp?rev=259425&r1=259424&r2=259425&view=diff
>>>
>>> ==============================================================================
>>> --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
>>> (original)
>>> +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Mon
>>> Feb  1 16:23:39 2016
>>> @@ -402,7 +402,7 @@ FoldCmpLoadFromIndexedGlobal(GetElementP
>>>     if (SecondTrueElement != Overdefined) {
>>>       // None true -> false.
>>>       if (FirstTrueElement == Undefined)
>>> -      return ReplaceInstUsesWith(ICI, Builder->getFalse());
>>> +      return replaceInstUsesWith(ICI, Builder->getFalse());
>>>         Value *FirstTrueIdx = ConstantInt::get(Idx->getType(),
>>> FirstTrueElement);
>>>   @@ -422,7 +422,7 @@ FoldCmpLoadFromIndexedGlobal(GetElementP
>>>     if (SecondFalseElement != Overdefined) {
>>>       // None false -> true.
>>>       if (FirstFalseElement == Undefined)
>>> -      return ReplaceInstUsesWith(ICI, Builder->getTrue());
>>> +      return replaceInstUsesWith(ICI, Builder->getTrue());
>>>         Value *FirstFalseIdx = ConstantInt::get(Idx->getType(),
>>> FirstFalseElement);
>>>   @@ -983,7 +983,7 @@ Instruction *InstCombiner::FoldGEPICmp(G
>>>             Value *Cmp =
>>> Builder->CreateICmp(ICmpInst::getSignedPredicate(Cond),
>>>                                            LOffset, ROffset);
>>> -        return ReplaceInstUsesWith(I, Cmp);
>>> +        return replaceInstUsesWith(I, Cmp);
>>>         }
>>>           // Otherwise, the base pointers are different and the indices
>>> are
>>> @@ -1020,7 +1020,7 @@ Instruction *InstCombiner::FoldGEPICmp(G
>>>           }
>>>           if (NumDifferences == 0)   // SAME GEP?
>>> -        return ReplaceInstUsesWith(I, // No comparison is needed here.
>>> +        return replaceInstUsesWith(I, // No comparison is needed here.
>>>
>>>  Builder->getInt1(ICmpInst::isTrueWhenEqual(Cond)));
>>>           else if (NumDifferences == 1 && GEPsInBounds) {
>>> @@ -1119,7 +1119,7 @@ Instruction *InstCombiner::FoldAllocaCmp
>>>     }
>>>       Type *CmpTy = CmpInst::makeCmpResultType(Other->getType());
>>> -  return ReplaceInstUsesWith(
>>> +  return replaceInstUsesWith(
>>>         ICI,
>>>         ConstantInt::get(CmpTy,
>>> !CmpInst::isTrueWhenEqual(ICI.getPredicate())));
>>>   }
>>> @@ -1290,39 +1290,39 @@ Instruction *InstCombiner::FoldICmpDivCs
>>>     default: llvm_unreachable("Unhandled icmp opcode!");
>>>     case ICmpInst::ICMP_EQ:
>>>       if (LoOverflow && HiOverflow)
>>> -      return ReplaceInstUsesWith(ICI, Builder->getFalse());
>>> +      return replaceInstUsesWith(ICI, Builder->getFalse());
>>>       if (HiOverflow)
>>>         return new ICmpInst(DivIsSigned ? ICmpInst::ICMP_SGE :
>>>                             ICmpInst::ICMP_UGE, X, LoBound);
>>>       if (LoOverflow)
>>>         return new ICmpInst(DivIsSigned ? ICmpInst::ICMP_SLT :
>>>                             ICmpInst::ICMP_ULT, X, HiBound);
>>> -    return ReplaceInstUsesWith(ICI, InsertRangeTest(X, LoBound, HiBound,
>>> +    return replaceInstUsesWith(ICI, InsertRangeTest(X, LoBound, HiBound,
>>>                                                       DivIsSigned,
>>> true));
>>>     case ICmpInst::ICMP_NE:
>>>       if (LoOverflow && HiOverflow)
>>> -      return ReplaceInstUsesWith(ICI, Builder->getTrue());
>>> +      return replaceInstUsesWith(ICI, Builder->getTrue());
>>>       if (HiOverflow)
>>>         return new ICmpInst(DivIsSigned ? ICmpInst::ICMP_SLT :
>>>                             ICmpInst::ICMP_ULT, X, LoBound);
>>>       if (LoOverflow)
>>>         return new ICmpInst(DivIsSigned ? ICmpInst::ICMP_SGE :
>>>                             ICmpInst::ICMP_UGE, X, HiBound);
>>> -    return ReplaceInstUsesWith(ICI, InsertRangeTest(X, LoBound, HiBound,
>>> +    return replaceInstUsesWith(ICI, InsertRangeTest(X, LoBound, HiBound,
>>>                                                       DivIsSigned,
>>> false));
>>>     case ICmpInst::ICMP_ULT:
>>>     case ICmpInst::ICMP_SLT:
>>>       if (LoOverflow == +1)   // Low bound is greater than input range.
>>> -      return ReplaceInstUsesWith(ICI, Builder->getTrue());
>>> +      return replaceInstUsesWith(ICI, Builder->getTrue());
>>>       if (LoOverflow == -1)   // Low bound is less than input range.
>>> -      return ReplaceInstUsesWith(ICI, Builder->getFalse());
>>> +      return replaceInstUsesWith(ICI, Builder->getFalse());
>>>       return new ICmpInst(Pred, X, LoBound);
>>>     case ICmpInst::ICMP_UGT:
>>>     case ICmpInst::ICMP_SGT:
>>>       if (HiOverflow == +1)       // High bound greater than input range.
>>> -      return ReplaceInstUsesWith(ICI, Builder->getFalse());
>>> +      return replaceInstUsesWith(ICI, Builder->getFalse());
>>>       if (HiOverflow == -1)       // High bound less than input range.
>>> -      return ReplaceInstUsesWith(ICI, Builder->getTrue());
>>> +      return replaceInstUsesWith(ICI, Builder->getTrue());
>>>       if (Pred == ICmpInst::ICMP_UGT)
>>>         return new ICmpInst(ICmpInst::ICMP_UGE, X, HiBound);
>>>       return new ICmpInst(ICmpInst::ICMP_SGE, X, HiBound);
>>> @@ -1394,7 +1394,7 @@ Instruction *InstCombiner::FoldICmpShrCs
>>>     if (Comp != CmpRHSV) { // Comparing against a bit that we know is
>>> zero.
>>>       bool IsICMP_NE = ICI.getPredicate() == ICmpInst::ICMP_NE;
>>>       Constant *Cst = Builder->getInt1(IsICMP_NE);
>>> -    return ReplaceInstUsesWith(ICI, Cst);
>>> +    return replaceInstUsesWith(ICI, Cst);
>>>     }
>>>       // Otherwise, check to see if the bits shifted out are known to be
>>> zero.
>>> @@ -1426,7 +1426,7 @@ Instruction *InstCombiner::FoldICmpCstSh
>>>     auto getConstant = [&I, this](bool IsTrue) {
>>>       if (I.getPredicate() == I.ICMP_NE)
>>>         IsTrue = !IsTrue;
>>> -    return ReplaceInstUsesWith(I, ConstantInt::get(I.getType(),
>>> IsTrue));
>>> +    return replaceInstUsesWith(I, ConstantInt::get(I.getType(),
>>> IsTrue));
>>>     };
>>>       auto getICmp = [&I](CmpInst::Predicate Pred, Value *LHS, Value
>>> *RHS) {
>>> @@ -1490,7 +1490,7 @@ Instruction *InstCombiner::FoldICmpCstSh
>>>     auto getConstant = [&I, this](bool IsTrue) {
>>>       if (I.getPredicate() == I.ICMP_NE)
>>>         IsTrue = !IsTrue;
>>> -    return ReplaceInstUsesWith(I, ConstantInt::get(I.getType(),
>>> IsTrue));
>>> +    return replaceInstUsesWith(I, ConstantInt::get(I.getType(),
>>> IsTrue));
>>>     };
>>>       auto getICmp = [&I](CmpInst::Predicate Pred, Value *LHS, Value
>>> *RHS) {
>>> @@ -1729,9 +1729,9 @@ Instruction *InstCombiner::visitICmpInst
>>>               // As a special case, check to see if this means that the
>>>               // result is always true or false now.
>>>               if (ICI.getPredicate() == ICmpInst::ICMP_EQ)
>>> -              return ReplaceInstUsesWith(ICI, Builder->getFalse());
>>> +              return replaceInstUsesWith(ICI, Builder->getFalse());
>>>               if (ICI.getPredicate() == ICmpInst::ICMP_NE)
>>> -              return ReplaceInstUsesWith(ICI, Builder->getTrue());
>>> +              return replaceInstUsesWith(ICI, Builder->getTrue());
>>>             } else {
>>>               ICI.setOperand(1, NewCst);
>>>               Constant *NewAndCst;
>>> @@ -1991,7 +1991,7 @@ Instruction *InstCombiner::visitICmpInst
>>>         if (Comp != RHS) {// Comparing against a bit that we know is
>>> zero.
>>>           bool IsICMP_NE = ICI.getPredicate() == ICmpInst::ICMP_NE;
>>>           Constant *Cst = Builder->getInt1(IsICMP_NE);
>>> -        return ReplaceInstUsesWith(ICI, Cst);
>>> +        return replaceInstUsesWith(ICI, Cst);
>>>         }
>>>           // If the shift is NUW, then it is just shifting out zeros, no
>>> need for an
>>> @@ -2241,7 +2241,7 @@ Instruction *InstCombiner::visitICmpInst
>>>           if (ConstantInt *BOC =
>>> dyn_cast<ConstantInt>(BO->getOperand(1))) {
>>>             Constant *NotCI = ConstantExpr::getNot(RHS);
>>>             if (!ConstantExpr::getAnd(BOC, NotCI)->isNullValue())
>>> -            return ReplaceInstUsesWith(ICI,
>>> Builder->getInt1(isICMP_NE));
>>> +            return replaceInstUsesWith(ICI,
>>> Builder->getInt1(isICMP_NE));
>>>           }
>>>           break;
>>>   @@ -2250,7 +2250,7 @@ Instruction *InstCombiner::visitICmpInst
>>>             // If bits are being compared against that are and'd out,
>>> then the
>>>             // comparison can never succeed!
>>>             if ((RHSV & ~BOC->getValue()) != 0)
>>> -            return ReplaceInstUsesWith(ICI,
>>> Builder->getInt1(isICMP_NE));
>>> +            return replaceInstUsesWith(ICI,
>>> Builder->getInt1(isICMP_NE));
>>>               // If we have ((X & C) == C), turn it into ((X & C) != 0).
>>>             if (RHS == BOC && RHSV.isPowerOf2())
>>> @@ -2438,7 +2438,7 @@ Instruction *InstCombiner::visitICmpInst
>>>       // Finally, return the value computed.
>>>     if (ICI.getPredicate() == ICmpInst::ICMP_ULT)
>>> -    return ReplaceInstUsesWith(ICI, Result);
>>> +    return replaceInstUsesWith(ICI, Result);
>>>       assert(ICI.getPredicate() == ICmpInst::ICMP_UGT && "ICmp should be
>>> folded!");
>>>     return BinaryOperator::CreateNot(Result);
>>> @@ -2524,7 +2524,7 @@ static Instruction *ProcessUGT_ADDCST_AD
>>>       // The inner add was the result of the narrow add, zero extended
>>> to the
>>>     // wider type.  Replace it with the result computed by the intrinsic.
>>> -  IC.ReplaceInstUsesWith(*OrigAdd, ZExt);
>>> +  IC.replaceInstUsesWith(*OrigAdd, ZExt);
>>>       // The original icmp gets replaced with the overflow value.
>>>     return ExtractValueInst::Create(Call, 1, "sadd.overflow");
>>> @@ -2808,7 +2808,7 @@ static Instruction *ProcessUMulZExtIdiom
>>>           continue;
>>>         if (TruncInst *TI = dyn_cast<TruncInst>(U)) {
>>>           if (TI->getType()->getPrimitiveSizeInBits() == MulWidth)
>>> -          IC.ReplaceInstUsesWith(*TI, Mul);
>>> +          IC.replaceInstUsesWith(*TI, Mul);
>>>           else
>>>             TI->setOperand(0, Mul);
>>>         } else if (BinaryOperator *BO = dyn_cast<BinaryOperator>(U)) {
>>> @@ -2820,7 +2820,7 @@ static Instruction *ProcessUMulZExtIdiom
>>>           Instruction *Zext =
>>>               cast<Instruction>(Builder->CreateZExt(ShortAnd,
>>> BO->getType()));
>>>           IC.Worklist.Add(Zext);
>>> -        IC.ReplaceInstUsesWith(*BO, Zext);
>>> +        IC.replaceInstUsesWith(*BO, Zext);
>>>         } else {
>>>           llvm_unreachable("Unexpected Binary operation");
>>>         }
>>> @@ -3074,7 +3074,7 @@ Instruction *InstCombiner::visitICmpInst
>>>       if (Value *V =
>>>             SimplifyICmpInst(I.getPredicate(), Op0, Op1, DL, TLI, DT,
>>> AC, &I))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       // comparing -val or val with non-zero is the same as just
>>> comparing val
>>>     // ie, abs(val) != 0 -> val != 0
>>> @@ -3292,7 +3292,7 @@ Instruction *InstCombiner::visitICmpInst
>>>       default: llvm_unreachable("Unknown icmp opcode!");
>>>       case ICmpInst::ICMP_EQ: {
>>>         if (Op0Max.ult(Op1Min) || Op0Min.ugt(Op1Max))
>>> -        return ReplaceInstUsesWith(I,
>>> ConstantInt::getFalse(I.getType()));
>>> +        return replaceInstUsesWith(I,
>>> ConstantInt::getFalse(I.getType()));
>>>           // If all bits are known zero except for one, then we know at
>>> most one
>>>         // bit is set.   If the comparison is against zero, then this is
>>> a check
>>> @@ -3336,7 +3336,7 @@ Instruction *InstCombiner::visitICmpInst
>>>       }
>>>       case ICmpInst::ICMP_NE: {
>>>         if (Op0Max.ult(Op1Min) || Op0Min.ugt(Op1Max))
>>> -        return ReplaceInstUsesWith(I,
>>> ConstantInt::getTrue(I.getType()));
>>> +        return replaceInstUsesWith(I,
>>> ConstantInt::getTrue(I.getType()));
>>>           // If all bits are known zero except for one, then we know at
>>> most one
>>>         // bit is set.   If the comparison is against zero, then this is
>>> a check
>>> @@ -3380,9 +3380,9 @@ Instruction *InstCombiner::visitICmpInst
>>>       }
>>>       case ICmpInst::ICMP_ULT:
>>>         if (Op0Max.ult(Op1Min))          // A <u B -> true if max(A) <
>>> min(B)
>>> -        return ReplaceInstUsesWith(I,
>>> ConstantInt::getTrue(I.getType()));
>>> +        return replaceInstUsesWith(I,
>>> ConstantInt::getTrue(I.getType()));
>>>         if (Op0Min.uge(Op1Max))          // A <u B -> false if min(A) >=
>>> max(B)
>>> -        return ReplaceInstUsesWith(I,
>>> ConstantInt::getFalse(I.getType()));
>>> +        return replaceInstUsesWith(I,
>>> ConstantInt::getFalse(I.getType()));
>>>         if (Op1Min == Op0Max)            // A <u B -> A != B if max(A)
>>> == min(B)
>>>           return new ICmpInst(ICmpInst::ICMP_NE, Op0, Op1);
>>>         if (ConstantInt *CI = dyn_cast<ConstantInt>(Op1)) {
>>> @@ -3398,9 +3398,9 @@ Instruction *InstCombiner::visitICmpInst
>>>         break;
>>>       case ICmpInst::ICMP_UGT:
>>>         if (Op0Min.ugt(Op1Max))          // A >u B -> true if min(A) >
>>> max(B)
>>> -        return ReplaceInstUsesWith(I,
>>> ConstantInt::getTrue(I.getType()));
>>> +        return replaceInstUsesWith(I,
>>> ConstantInt::getTrue(I.getType()));
>>>         if (Op0Max.ule(Op1Min))          // A >u B -> false if max(A) <=
>>> max(B)
>>> -        return ReplaceInstUsesWith(I,
>>> ConstantInt::getFalse(I.getType()));
>>> +        return replaceInstUsesWith(I,
>>> ConstantInt::getFalse(I.getType()));
>>>           if (Op1Max == Op0Min)            // A >u B -> A != B if min(A)
>>> == max(B)
>>>           return new ICmpInst(ICmpInst::ICMP_NE, Op0, Op1);
>>> @@ -3417,9 +3417,9 @@ Instruction *InstCombiner::visitICmpInst
>>>         break;
>>>       case ICmpInst::ICMP_SLT:
>>>         if (Op0Max.slt(Op1Min))          // A <s B -> true if max(A) <
>>> min(C)
>>> -        return ReplaceInstUsesWith(I,
>>> ConstantInt::getTrue(I.getType()));
>>> +        return replaceInstUsesWith(I,
>>> ConstantInt::getTrue(I.getType()));
>>>         if (Op0Min.sge(Op1Max))          // A <s B -> false if min(A) >=
>>> max(C)
>>> -        return ReplaceInstUsesWith(I,
>>> ConstantInt::getFalse(I.getType()));
>>> +        return replaceInstUsesWith(I,
>>> ConstantInt::getFalse(I.getType()));
>>>         if (Op1Min == Op0Max)            // A <s B -> A != B if max(A)
>>> == min(B)
>>>           return new ICmpInst(ICmpInst::ICMP_NE, Op0, Op1);
>>>         if (ConstantInt *CI = dyn_cast<ConstantInt>(Op1)) {
>>> @@ -3430,9 +3430,9 @@ Instruction *InstCombiner::visitICmpInst
>>>         break;
>>>       case ICmpInst::ICMP_SGT:
>>>         if (Op0Min.sgt(Op1Max))          // A >s B -> true if min(A) >
>>> max(B)
>>> -        return ReplaceInstUsesWith(I,
>>> ConstantInt::getTrue(I.getType()));
>>> +        return replaceInstUsesWith(I,
>>> ConstantInt::getTrue(I.getType()));
>>>         if (Op0Max.sle(Op1Min))          // A >s B -> false if max(A) <=
>>> min(B)
>>> -        return ReplaceInstUsesWith(I,
>>> ConstantInt::getFalse(I.getType()));
>>> +        return replaceInstUsesWith(I,
>>> ConstantInt::getFalse(I.getType()));
>>>           if (Op1Max == Op0Min)            // A >s B -> A != B if min(A)
>>> == max(B)
>>>           return new ICmpInst(ICmpInst::ICMP_NE, Op0, Op1);
>>> @@ -3445,30 +3445,30 @@ Instruction *InstCombiner::visitICmpInst
>>>       case ICmpInst::ICMP_SGE:
>>>         assert(!isa<ConstantInt>(Op1) && "ICMP_SGE with ConstantInt not
>>> folded!");
>>>         if (Op0Min.sge(Op1Max))          // A >=s B -> true if min(A) >=
>>> max(B)
>>> -        return ReplaceInstUsesWith(I,
>>> ConstantInt::getTrue(I.getType()));
>>> +        return replaceInstUsesWith(I,
>>> ConstantInt::getTrue(I.getType()));
>>>         if (Op0Max.slt(Op1Min))          // A >=s B -> false if max(A) <
>>> min(B)
>>> -        return ReplaceInstUsesWith(I,
>>> ConstantInt::getFalse(I.getType()));
>>> +        return replaceInstUsesWith(I,
>>> ConstantInt::getFalse(I.getType()));
>>>         break;
>>>       case ICmpInst::ICMP_SLE:
>>>         assert(!isa<ConstantInt>(Op1) && "ICMP_SLE with ConstantInt not
>>> folded!");
>>>         if (Op0Max.sle(Op1Min))          // A <=s B -> true if max(A) <=
>>> min(B)
>>> -        return ReplaceInstUsesWith(I,
>>> ConstantInt::getTrue(I.getType()));
>>> +        return replaceInstUsesWith(I,
>>> ConstantInt::getTrue(I.getType()));
>>>         if (Op0Min.sgt(Op1Max))          // A <=s B -> false if min(A) >
>>> max(B)
>>> -        return ReplaceInstUsesWith(I,
>>> ConstantInt::getFalse(I.getType()));
>>> +        return replaceInstUsesWith(I,
>>> ConstantInt::getFalse(I.getType()));
>>>         break;
>>>       case ICmpInst::ICMP_UGE:
>>>         assert(!isa<ConstantInt>(Op1) && "ICMP_UGE with ConstantInt not
>>> folded!");
>>>         if (Op0Min.uge(Op1Max))          // A >=u B -> true if min(A) >=
>>> max(B)
>>> -        return ReplaceInstUsesWith(I,
>>> ConstantInt::getTrue(I.getType()));
>>> +        return replaceInstUsesWith(I,
>>> ConstantInt::getTrue(I.getType()));
>>>         if (Op0Max.ult(Op1Min))          // A >=u B -> false if max(A) <
>>> min(B)
>>> -        return ReplaceInstUsesWith(I,
>>> ConstantInt::getFalse(I.getType()));
>>> +        return replaceInstUsesWith(I,
>>> ConstantInt::getFalse(I.getType()));
>>>         break;
>>>       case ICmpInst::ICMP_ULE:
>>>         assert(!isa<ConstantInt>(Op1) && "ICMP_ULE with ConstantInt not
>>> folded!");
>>>         if (Op0Max.ule(Op1Min))          // A <=u B -> true if max(A) <=
>>> min(B)
>>> -        return ReplaceInstUsesWith(I,
>>> ConstantInt::getTrue(I.getType()));
>>> +        return replaceInstUsesWith(I,
>>> ConstantInt::getTrue(I.getType()));
>>>         if (Op0Min.ugt(Op1Max))          // A <=u B -> false if min(A) >
>>> max(B)
>>> -        return ReplaceInstUsesWith(I,
>>> ConstantInt::getFalse(I.getType()));
>>> +        return replaceInstUsesWith(I,
>>> ConstantInt::getFalse(I.getType()));
>>>         break;
>>>       }
>>>   @@ -3842,9 +3842,9 @@ Instruction *InstCombiner::visitICmpInst
>>>         switch (SRem == BO0 ? ICmpInst::getSwappedPredicate(Pred) :
>>> Pred) {
>>>           default: break;
>>>           case ICmpInst::ICMP_EQ:
>>> -          return ReplaceInstUsesWith(I,
>>> ConstantInt::getFalse(I.getType()));
>>> +          return replaceInstUsesWith(I,
>>> ConstantInt::getFalse(I.getType()));
>>>           case ICmpInst::ICMP_NE:
>>> -          return ReplaceInstUsesWith(I,
>>> ConstantInt::getTrue(I.getType()));
>>> +          return replaceInstUsesWith(I,
>>> ConstantInt::getTrue(I.getType()));
>>>           case ICmpInst::ICMP_SGT:
>>>           case ICmpInst::ICMP_SGE:
>>>             return new ICmpInst(ICmpInst::ICMP_SGT, SRem->getOperand(1),
>>> @@ -3971,8 +3971,8 @@ Instruction *InstCombiner::visitICmpInst
>>>         Constant *Overflow;
>>>         if (OptimizeOverflowCheck(OCF_UNSIGNED_ADD, A, B, *AddI, Result,
>>>                                   Overflow)) {
>>> -        ReplaceInstUsesWith(*AddI, Result);
>>> -        return ReplaceInstUsesWith(I, Overflow);
>>> +        replaceInstUsesWith(*AddI, Result);
>>> +        return replaceInstUsesWith(I, Overflow);
>>>         }
>>>       }
>>>   @@ -4181,10 +4181,10 @@ Instruction *InstCombiner::FoldFCmp_IntT
>>>         RHSRoundInt.roundToIntegral(APFloat::rmNearestTiesToEven);
>>>         if (RHS.compare(RHSRoundInt) != APFloat::cmpEqual) {
>>>           if (P == FCmpInst::FCMP_OEQ || P == FCmpInst::FCMP_UEQ)
>>> -          return ReplaceInstUsesWith(I, Builder->getFalse());
>>> +          return replaceInstUsesWith(I, Builder->getFalse());
>>>             assert(P == FCmpInst::FCMP_ONE || P == FCmpInst::FCMP_UNE);
>>> -        return ReplaceInstUsesWith(I, Builder->getTrue());
>>> +        return replaceInstUsesWith(I, Builder->getTrue());
>>>         }
>>>       }
>>>   @@ -4250,9 +4250,9 @@ Instruction *InstCombiner::FoldFCmp_IntT
>>>       Pred = ICmpInst::ICMP_NE;
>>>       break;
>>>     case FCmpInst::FCMP_ORD:
>>> -    return ReplaceInstUsesWith(I, Builder->getTrue());
>>> +    return replaceInstUsesWith(I, Builder->getTrue());
>>>     case FCmpInst::FCMP_UNO:
>>> -    return ReplaceInstUsesWith(I, Builder->getFalse());
>>> +    return replaceInstUsesWith(I, Builder->getFalse());
>>>     }
>>>       // Now we know that the APFloat is a normal number, zero or inf.
>>> @@ -4270,8 +4270,8 @@ Instruction *InstCombiner::FoldFCmp_IntT
>>>       if (SMax.compare(RHS) == APFloat::cmpLessThan) {  // smax < 13123.0
>>>         if (Pred == ICmpInst::ICMP_NE  || Pred == ICmpInst::ICMP_SLT ||
>>>             Pred == ICmpInst::ICMP_SLE)
>>> -        return ReplaceInstUsesWith(I, Builder->getTrue());
>>> -      return ReplaceInstUsesWith(I, Builder->getFalse());
>>> +        return replaceInstUsesWith(I, Builder->getTrue());
>>> +      return replaceInstUsesWith(I, Builder->getFalse());
>>>       }
>>>     } else {
>>>       // If the RHS value is > UnsignedMax, fold the comparison. This
>>> handles
>>> @@ -4282,8 +4282,8 @@ Instruction *InstCombiner::FoldFCmp_IntT
>>>       if (UMax.compare(RHS) == APFloat::cmpLessThan) {  // umax < 13123.0
>>>         if (Pred == ICmpInst::ICMP_NE  || Pred == ICmpInst::ICMP_ULT ||
>>>             Pred == ICmpInst::ICMP_ULE)
>>> -        return ReplaceInstUsesWith(I, Builder->getTrue());
>>> -      return ReplaceInstUsesWith(I, Builder->getFalse());
>>> +        return replaceInstUsesWith(I, Builder->getTrue());
>>> +      return replaceInstUsesWith(I, Builder->getFalse());
>>>       }
>>>     }
>>>   @@ -4295,8 +4295,8 @@ Instruction *InstCombiner::FoldFCmp_IntT
>>>       if (SMin.compare(RHS) == APFloat::cmpGreaterThan) { // smin >
>>> 12312.0
>>>         if (Pred == ICmpInst::ICMP_NE || Pred == ICmpInst::ICMP_SGT ||
>>>             Pred == ICmpInst::ICMP_SGE)
>>> -        return ReplaceInstUsesWith(I, Builder->getTrue());
>>> -      return ReplaceInstUsesWith(I, Builder->getFalse());
>>> +        return replaceInstUsesWith(I, Builder->getTrue());
>>> +      return replaceInstUsesWith(I, Builder->getFalse());
>>>       }
>>>     } else {
>>>       // See if the RHS value is < UnsignedMin.
>>> @@ -4306,8 +4306,8 @@ Instruction *InstCombiner::FoldFCmp_IntT
>>>       if (SMin.compare(RHS) == APFloat::cmpGreaterThan) { // umin >
>>> 12312.0
>>>         if (Pred == ICmpInst::ICMP_NE || Pred == ICmpInst::ICMP_UGT ||
>>>             Pred == ICmpInst::ICMP_UGE)
>>> -        return ReplaceInstUsesWith(I, Builder->getTrue());
>>> -      return ReplaceInstUsesWith(I, Builder->getFalse());
>>> +        return replaceInstUsesWith(I, Builder->getTrue());
>>> +      return replaceInstUsesWith(I, Builder->getFalse());
>>>       }
>>>     }
>>>   @@ -4329,14 +4329,14 @@ Instruction *InstCombiner::FoldFCmp_IntT
>>>         switch (Pred) {
>>>         default: llvm_unreachable("Unexpected integer comparison!");
>>>         case ICmpInst::ICMP_NE:  // (float)int != 4.4   --> true
>>> -        return ReplaceInstUsesWith(I, Builder->getTrue());
>>> +        return replaceInstUsesWith(I, Builder->getTrue());
>>>         case ICmpInst::ICMP_EQ:  // (float)int == 4.4   --> false
>>> -        return ReplaceInstUsesWith(I, Builder->getFalse());
>>> +        return replaceInstUsesWith(I, Builder->getFalse());
>>>         case ICmpInst::ICMP_ULE:
>>>           // (float)int <= 4.4   --> int <= 4
>>>           // (float)int <= -4.4  --> false
>>>           if (RHS.isNegative())
>>> -          return ReplaceInstUsesWith(I, Builder->getFalse());
>>> +          return replaceInstUsesWith(I, Builder->getFalse());
>>>           break;
>>>         case ICmpInst::ICMP_SLE:
>>>           // (float)int <= 4.4   --> int <= 4
>>> @@ -4348,7 +4348,7 @@ Instruction *InstCombiner::FoldFCmp_IntT
>>>           // (float)int < -4.4   --> false
>>>           // (float)int < 4.4    --> int <= 4
>>>           if (RHS.isNegative())
>>> -          return ReplaceInstUsesWith(I, Builder->getFalse());
>>> +          return replaceInstUsesWith(I, Builder->getFalse());
>>>           Pred = ICmpInst::ICMP_ULE;
>>>           break;
>>>         case ICmpInst::ICMP_SLT:
>>> @@ -4361,7 +4361,7 @@ Instruction *InstCombiner::FoldFCmp_IntT
>>>           // (float)int > 4.4    --> int > 4
>>>           // (float)int > -4.4   --> true
>>>           if (RHS.isNegative())
>>> -          return ReplaceInstUsesWith(I, Builder->getTrue());
>>> +          return replaceInstUsesWith(I, Builder->getTrue());
>>>           break;
>>>         case ICmpInst::ICMP_SGT:
>>>           // (float)int > 4.4    --> int > 4
>>> @@ -4373,7 +4373,7 @@ Instruction *InstCombiner::FoldFCmp_IntT
>>>           // (float)int >= -4.4   --> true
>>>           // (float)int >= 4.4    --> int > 4
>>>           if (RHS.isNegative())
>>> -          return ReplaceInstUsesWith(I, Builder->getTrue());
>>> +          return replaceInstUsesWith(I, Builder->getTrue());
>>>           Pred = ICmpInst::ICMP_UGT;
>>>           break;
>>>         case ICmpInst::ICMP_SGE:
>>> @@ -4406,7 +4406,7 @@ Instruction *InstCombiner::visitFCmpInst
>>>       if (Value *V = SimplifyFCmpInst(I.getPredicate(), Op0, Op1,
>>>                                     I.getFastMathFlags(), DL, TLI, DT,
>>> AC, &I))
>>> -    return ReplaceInstUsesWith(I, V);
>>> +    return replaceInstUsesWith(I, V);
>>>       // Simplify 'fcmp pred X, X'
>>>     if (Op0 == Op1) {
>>> @@ -4540,7 +4540,7 @@ Instruction *InstCombiner::visitFCmpInst
>>>               break;
>>>               // fabs(x) < 0 --> false
>>>             case FCmpInst::FCMP_OLT:
>>> -            return ReplaceInstUsesWith(I, Builder->getFalse());
>>> +            return replaceInstUsesWith(I, Builder->getFalse());
>>>               // fabs(x) > 0 --> x != 0
>>>             case FCmpInst::FCMP_OGT:
>>>               return new FCmpInst(FCmpInst::FCMP_ONE,
>>> CI->getArgOperand(0), RHSC);
>>>
>>> Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineInternal.h
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineInternal.h?rev=259425&r1=259424&r2=259425&view=diff
>>>
>>> ==============================================================================
>>> --- llvm/trunk/lib/Transforms/InstCombine/InstCombineInternal.h
>>> (original)
>>> +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineInternal.h Mon Feb
>>> 1 16:23:39 2016
>>> @@ -417,7 +417,7 @@ public:
>>>     /// replaceable with another preexisting expression. Here we add all
>>> uses of
>>>     /// I to the worklist, replace all uses of I with the new value,
>>> then return
>>>     /// I, so that the inst combiner will know that I was modified.
>>> -  Instruction *ReplaceInstUsesWith(Instruction &I, Value *V) {
>>> +  Instruction *replaceInstUsesWith(Instruction &I, Value *V) {
>>>       // If there are no uses to replace, then we return nullptr to
>>> indicate that
>>>       // no changes were made to the program.
>>>       if (I.use_empty()) return nullptr;
>>> @@ -451,7 +451,7 @@ public:
>>>     /// When dealing with an instruction that has side effects or
>>> produces a void
>>>     /// value, we can't rely on DCE to delete the instruction. Instead,
>>> visit
>>>     /// methods should return the value returned by this function.
>>> -  Instruction *EraseInstFromFunction(Instruction &I) {
>>> +  Instruction *eraseInstFromFunction(Instruction &I) {
>>>       DEBUG(dbgs() << "IC: ERASE " << I << '\n');
>>>         assert(I.use_empty() && "Cannot erase instruction that is
>>> used!");
>>>
>>> Modified:
>>> llvm/trunk/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
>>> URL:
>>> <http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp?rev=259425&r1=259424&r2=259425&view=diff>
>>
>>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160201/697d98be/attachment.html>


More information about the llvm-commits mailing list