[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FW: Soot and optimizing iterator while loops
I sent this earlier but didn't get a response.
Perhaps somebody on the mailing list has input?
-----Original Message-----
From: Steve Neuendorffer [mailto:neuendor@eecs.berkeley.edu]
Sent: Friday, May 25, 2001 1:24 AM
To: hendren@sable.mcgill.ca
Subject: Soot and optimizing iterator while loops
Hi!
I've been using Soot to implement a compiler for Ptolemy models.
(http://ptolemy.eecs.berkeley.edu)
Essentially this involves a sequence of syntactic transformations that
remove the generic Ptolemy APIs,
eventually resulting in a minimal executable. One of the transformations
I'd like to do is unrolling
iterator loops, which are fairly common.
Turning something like:
// start the models.
Iterator models = _models.iterator();
while(models.hasNext()) {
startRun((CompositeActor)models.next());
}
into
startRun(theModel);
given knowledge that the list _models contains the object pointed to by the
field theModel.
Currently I've implemented this by writing some simple code that recognizes
iterator while loops using a JimpleBody and BlockGraph and unrolls them.
Unfortunately, recognizing loops with complex control structures is
difficult, and requires the iterative approach used in Dava. I'd like to
implement this using Dava, but it seems that it is not possible to generate
class files from Dava? Do you have plans to handle Dava so that higher
level optimizations are possible?
Any other suggestions on how to approach this?
Steve Neuendorffer
UC Berkeley
BTW: Kudos on some really useful and versatile software!
BEGIN:VCARD
VERSION:2.1
N:Neuendorffer;Stephen
FN:Stephen Neuendorffer
ORG:UC Berkeley;EECS
TITLE:Graduate Student Researcher
TEL;HOME;VOICE:(510) 233-5782
TEL;CELL;VOICE:(510) 367-2057
TEL;WORK;FAX:(510) 642-2739
ADR;WORK:;337 Cory;337 Cory Hall;Berkeley;CA;94720-1770;United States of America
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:337 Cory=0D=0A337 Cory Hall=0D=0ABerkeley, CA 94720-1770=0D=0AUnited States =
of America
ADR;HOME:;;7003 Potrero Ave.;El Cerrito;CA;94530;United States of America
LABEL;HOME;ENCODING=QUOTED-PRINTABLE:7003 Potrero Ave.=0D=0AEl Cerrito, CA 94530=0D=0AUnited States of America
EMAIL;PREF;INTERNET:neuendor@eecs.berkeley.edu
REV:20001220T050447Z
END:VCARD