Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Convert java code in SSA form

  Asked By: Gin    Date: Jan 12    Category: Java    Views: 896

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;
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;
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

This is like this which i want if u can help me then
please send me some stuff about this problem.



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on Convert java code in SSA form Or get search suggestion and latest updates.