[LLVMdev] scalar evolution to determine access functions in arays

Tobias Grosser tobias at grosser.es
Wed Aug 3 00:36:25 PDT 2011


On 08/03/2011 08:35 AM, Jimborean Alexandra wrote:
> Hello Tobi,
>
> You are right, we need to run some other passes before running the
> scalar evolution pass. The sequence that I run for this example is -O3
> -loop-simplify -reg2mem. This is why I did not obtain the expressions
> depending on the loop indices. So I removed the reg2mem pass and scalar
> evolution computes the correct functions.
>
> However, I need to run the reg2mem pass (or any other that would
> eliminate the phi nodes) before calling my own passes. So probably we
> are going to run the scalar evolution on the code containing the phi
> nodes, run reg2mem and try to identify the original variables in the new
> code built after reg2mem.

Just out of interest. Why do you need to run the reg2mem pass?

Cheers
Tobi



More information about the llvm-dev mailing list