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

Re: Modifying CFG



Hi Marco,

I think what you are looking for is something like UnitGraph.getBody().getUnits() which returns a PatchingChain with insertAfter() and insertBefore() methods. If you want to iterate over it and modify it concurrently, use its snapshotIterator() method.

If that doesn't help, please elaborate on the problem a little. You might also want to go through the two profiling tutorials.

Cheers,
Chris

Marco Bakera wrote:
Hey,

is there any possibility to change the CFG - which seems to be represented
in the Unitgraph - without having to do it with the units? I just want to
insert a Unit (a kind of AssignStmt) in the Unitgraph between to other
units. Is there an elegant method to do this without having to check which
kind of statement the unit belongs to and just inserting it?

Thanks for help.
Marco.

--
/X\arco
              . .
---------oOOo-(_)-oOOo--------> www.bakera.de <--