Changeset View
Changeset View
Standalone View
Standalone View
llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp
Show First 20 Lines • Show All 735 Lines • ▼ Show 20 Lines | if (Align && !I->hasByValOrInAllocaAttr() && !I->hasNUses(0)) { | ||||
->getParent())); | ->getParent())); | ||||
DTCalculated = true; | DTCalculated = true; | ||||
} | } | ||||
// If we can already prove the asserted alignment in the context of the | // If we can already prove the asserted alignment in the context of the | ||||
// caller, then don't bother inserting the assumption. | // caller, then don't bother inserting the assumption. | ||||
Value *Arg = CS.getArgument(I->getArgNo()); | Value *Arg = CS.getArgument(I->getArgNo()); | ||||
if (getKnownAlignment(Arg, DL, CS.getInstruction(), | if (getKnownAlignment(Arg, DL, CS.getInstruction(), | ||||
&IFI.ACT->getAssumptionCache(*CalledFunc), | &IFI.ACT->getAssumptionCache(*CS.getCaller()), | ||||
&DT) >= Align) | &DT) >= Align) | ||||
continue; | continue; | ||||
IRBuilder<>(CS.getInstruction()) | IRBuilder<>(CS.getInstruction()) | ||||
.CreateAlignmentAssumption(DL, Arg, Align); | .CreateAlignmentAssumption(DL, Arg, Align); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 786 Lines • Show Last 20 Lines |