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

Re: Which Transformation Pack Should I choose?



Hi Navindra,

Navindra Umanee wrote:
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?


I want to be able to "read" and verify the generated/reverse engineered code that is being generated (java source files). If I keep generating a ton of temporaries (which is perfectly normal at the Jimple level ofc), I will eventually loose the overview.


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.



This is exactly why I asked about your opinions at this point, because of course it is not enough to have something "working", it is always necessary to have it working properly. Therefore my question about a prospective "gtp" pack. If you say I can do it in the "gop" pack, then I'll do it there, no problem.


On the other hand, I don't think I will have a Jimple analysis running in parallel with my transformations. I plan on making some code transformations (either at the Jimple or Grimple level), and only then, maybe optimize the resulting transformed piece of code. And yes, I also wanted to ask: is there a way of determining the _exact_ order in which the passes (packs and analyses) are executed. By this I mean, first a jop.cse and then my jtp.transform and then another gop.transform maybe and so on... Can it be done through the command line? The order of the arguments in the command line or something?

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.



Cheers, Emil