[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Which Transformation Pack Should I choose?



Emil Slusanschi <slusanschi@sc.rwth-aachen.de> wrote:
> The thing is, I don't want to insert all those temporary double 
> variables and use 3 statements for just one assignment. I've solved that 

May I ask why you're worried about temporaries? 

> by inserting a Grimp statement into the Jimple BodyTransformer that 
> implements a "jtp.mypahse" phase:
> 
> z.<DerivType: double value> = staticinvoke <java.lang.Math: double 
> sin(double)>(x.<DerivType: double value>);

I think it would be a bad idea to use Grimp stmts in this phase
because it violates the 3-address code assumption of Jimple, and in
more practical terms, you will confuse any Jimple analysis not
expecting a Grimp statement.  You can pretty much expect undefined
behaviour.

> All good and well, but shouldn't I do this in a "gtp" pack? Because 
> after all, this is more or less a Grimp transformation. And here is my 
> problem: there is no "gtp" pack, or at least not yet ;-) What should I 
> do? Continue like this, with a mix of Grimp and Jimple statements in a 

You may use the "gop" pack for the same effect. The phase is off by
default but you can enable it from the commandline with "-p gop on".

Cheers,
Navin.