I want to look at the SSA format GCC uses, so I tried the following simple test program:
#include <stdio.h>
int main(int argc, char **argv) {
int n = 0;
int i;
for (i = 0; i < 13; i++)
n += argc;
printf("%d\n", n);
return 0;
}
Compiled with gcc -fdump-tree-all a.c
and got, among other things, a.c.016t.ssa
with the following contents:
;; Function main (main, funcdef_no=0, decl_uid=2178, cgraph_uid=0)
main (int argc, char * * argv)
{
int i;
int n;
int D.2186;
int _8;
<bb 2>:
n_3 = 0;
i_4 = 0;
goto <bb 4>;
<bb 3>:
n_6 = n_1 + argc_5(D);
i_7 = i_2 + 1;
<bb 4>:
# n_1 = PHI <n_3(2), n_6(3)>
# i_2 = PHI <i_4(2), i_7(3)>
if (i_2 <= 12)
goto <bb 3>;
else
goto <bb 5>;
<bb 5>:
printf ("%d\n", n_1);
_8 = 0;
<L3>:
return _8;
}
Much of this is clear, but what does argc_5(D)
mean? Does it have anything to do with int D.2186
?