Hi,
noticed, that after converting into ssa-form, there are still
variables, which are not wrapped into SSA_NAME.
Assigment to scalar variable:
int a;
a = 100;
The variable a is not wrapped into SSA_NAME a_1.
b = foo();
is converted into
b.0_3 = foo ();
# .MEM_25 = VDEF <.MEM_24>
b = b.0_3;
Question:
What is the purpose of this behavour? In classical ssa-representation
all variables should be numbered.
I guess it has somethink to do with memory-ssa and alias analysis.
Could anybody confirm or negate?
A simple program and the cut-off of the dump after putting into ssa follows.
int foo(){
return 100;
}
int main(int argc, char **args){
int a,b,d, *pa;
a=10;
b=20;
if(argc>3){
b=foo();
pa=&a;
b=*pa + 3;
}
else{
a+=1;
pa=&b;
}
*pa += 100;
b = a + b;
a++;
printf("*pa=%d\n",*pa+100);
return 0;
}
;; Function foo (foo)
foo ()
{
int D.2572;
<bb 2>:
D.2572_1 = 100;
return D.2572_1;
}
main (int argc, char * * args)
{
...
<bb 2>:
# .MEM_23 = VDEF <.MEM_22(D)>
a = 10;
# .MEM_24 = VDEF <.MEM_23>
b = 20;
if (argc_2(D) > 3)
goto <bb 3>;
else
goto <bb 4>;
<bb 3>:
b.0_3 = foo ();
# .MEM_25 = VDEF <.MEM_24>
b = b.0_3;
pa_4 = &a;
# VUSE <.MEM_25>
D.2561_5 = *pa_4;
b.1_6 = D.2561_5 + 3;
# .MEM_26 = VDEF <.MEM_25>
b = b.1_6;
goto <bb 5>;
...
}