[antlr-interest] How i convert class or java program in SSA form
safion_web
safion_web at yahoo.com
Thu Jun 24 13:08:49 PDT 2004
Respected All,
Example:
How i convert java conventional code in SSA form like this is under
as example.
public int testSSA
{
int x;
int y;
x = 4;
y = 5;
x = x + y;
y = y + x;
if (x > 5)
return x;
else
return y;
}
(Now it is in SSA form)
public int testSSA
{
int x0;
int y0;
x0 = 4;
y0 = 5;
x1 = x0 + y0;
y1 = y1 + x1;
if (x1 > 5)
return x1;
else
return y1;
}
This conversion is said to in SSA form means that intermediate
representation in which every variable is assigned once. Existing
variable in the original IR are split into versions, new variables
typically indicated by the original name with a subscript, so every
defination gets its own version.
About this conversion that i want to say that if any one know how i
can read a line from any method just x = x + 1 then i will scatter
the line in small pieces then convert like x1 = x0 + 1; then i can
solve my problem.
also pl give me ANTLR AST documentation because when i using Parser
it will parse my program but now i want that i want to change that
parse tree in SSA form.
This is like this which i want if u can help me then please send me
some stuff about this problem.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list