[LLVMdev] DependenceAnalysis and PR14241
Tobias Grosser
tobias at grosser.es
Fri Nov 2 10:56:53 PDT 2012
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.
Cheers
Tobi
More information about the llvm-dev
mailing list