[PATCH] Teach ScalarEvolution about pointer address spaces

Tom Stellard tom at stellard.net
Wed Aug 28 13:26:54 PDT 2013


On Tue, Aug 27, 2013 at 11:29:52AM -0700, Quentin Colombet wrote:
> 
>   Hi Matt,
> 
>   Globally LGTM, but I am not the right person to give the all green signal :).
>   Hereafter are a few minor fixes.
> 

Hi Matt,

I've just received confirmation that this patch fixes
http://llvm.org/bugs/show_bug.cgi?id=17012

-Tom

>   Cheers,
>   -Quentin
> 
> 
> ================
> Comment at: lib/Analysis/ScalarEvolution.cpp:2630
> @@ -2628,3 +2629,3 @@
>    // This is just a compile-time optimization.
> -  if (TD)
> -    return getConstant(TD->getIntPtrType(getContext()),
> +  if (TD) {
> +    return getConstant(IntTy,
> ----------------
> You do not want to add brackets here.
> 
> ================
> Comment at: lib/Analysis/ScalarEvolution.cpp:2715
> @@ -2711,3 +2714,3 @@
>  
> -  if (Ty->isIntegerTy())
> +  if (Ty->isIntegerTy()) {
>      return Ty;
> ----------------
> Ditto.
> 
> ================
> Comment at: lib/Analysis/ScalarEvolutionExpander.cpp:422
> @@ +421,3 @@
> +                 ? SE.TD->getIntPtrType(PTy)
> +                 : Type::getInt64Ty(PTy->getContext());
> +
> ----------------
> I think it may not hurt to (re)put a comment like this:
> // Without DataLayout, conservatively assume pointers are 64-bit.
> 
> 
> http://llvm-reviews.chandlerc.com/D1449
> _______________________________________________
> 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