[LLVMdev] DependenceAnalysis and PR14241

Hal Finkel hfinkel at anl.gov
Fri Nov 2 11:02:41 PDT 2012


----- Original Message -----
> From: "Tobias Grosser" <tobias at grosser.es>
> To: "preston briggs" <preston.briggs at gmail.com>
> Cc: "Benjamin Kramer" <benny.kra at gmail.com>, "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>
> Sent: Friday, November 2, 2012 12:56:53 PM
> Subject: Re: [LLVMdev] DependenceAnalysis and PR14241
> 
> On 11/02/2012 10:21 AM, Preston Briggs wrote:
> >
> > My initial guess is that a conservative fix is quick and small
> > (make
> > sure the underlying pointers are loop invariant, otherwise give
> > up). A
> > better approach would be to somehow turn code like the example into
> > array references that can be analyzed. I'll need to think about
> > this and
> > do some reading.
> 
> Hi Preston,
> 
> I looked at this test case. I am not sure what you are exactly doing,
> but I have the feeling you start from the getelementptr instruction.
> If
> you directly pass the pointer that is pointed to by the loads and
> stores
> to SCEV, there should just be a single base pointer %s in the
> resulting
> SCEVS. You can then extract this base pointer, subtract it from the
> scev
> and analyze the remaining scev as subscript. The base pointer in this
> test case is loop invariant.

Does const SCEV *getPointerBase(const SCEV *V) do this?

 -Hal

> 
> Cheers
> Tobi
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 

-- 
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-dev mailing list