[llvm] r227172 - Migrate SeparateConstOffsetFromGEP to use a Function with

Chandler Carruth chandlerc at google.com
Mon Jan 26 23:33:51 PST 2015


This really needs to move to CodeGen instead of Transforms as well.
Transforms is only supposed to use TTI...

On Mon, Jan 26, 2015 at 11:16 PM, Eric Christopher <echristo at gmail.com>
wrote:

> Author: echristo
> Date: Tue Jan 27 01:16:37 2015
> New Revision: 227172
>
> URL: http://llvm.org/viewvc/llvm-project?rev=227172&view=rev
> Log:
> Migrate SeparateConstOffsetFromGEP to use a Function with
> getSubtarget.
>
> Modified:
>     llvm/trunk/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
>
> Modified: llvm/trunk/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp?rev=227172&r1=227171&r2=227172&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
> (original)
> +++ llvm/trunk/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp Tue
> Jan 27 01:16:37 2015
> @@ -910,7 +910,7 @@ bool SeparateConstOffsetFromGEP::splitGE
>    if (LowerGEP) {
>      // As currently BasicAA does not analyze ptrtoint/inttoptr, do not
> lower to
>      // arithmetic operations if the target uses alias analysis in codegen.
> -    if (TM && TM->getSubtarget<TargetSubtargetInfo>().useAA())
> +    if (TM &&
> TM->getSubtargetImpl(*GEP->getParent()->getParent())->useAA())
>        lowerToSingleIndexGEPs(GEP, AccumulativeByteOffset);
>      else
>        lowerToArithmetics(GEP, AccumulativeByteOffset);
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150126/f8d4a739/attachment.html>


More information about the llvm-commits mailing list