Hello, guys.
I just tested -reg2mem pass to see how it changes my bitcode.
E.g., for the following simple C code:
Hello, guys.
I just tested -reg2mem pass to see how it changes my bitcode.
...
After -reg2mem, I could find any of PHIs weren't eliminated.
I just wonder if this is normal.
This is normal.
Evan
The pass only ensures that the value coming into the phi is generated
by a load in the basic block for that path to the phi and that the phi
is the only use of that value. This was a compromise in the
difficulty of writing reg2mem and the difficulty in writing a pass
that depends on reg2mem.
Andrew