[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: optimizing for size
Hi Mark,
Mark Smith <mark@camazotz.com> wrote:
> Thanks for all the suggestions; in particular, "--via-shimple" doubled
> the space saved (3.5k on a 60k jar file vs 1.7k without).
As I mentioned in my previous mail, I believe my suspicions about it
probably being a bug rather than real savings were right. After
poring over some more benchmarks, I found one bug anyway.
You can pull the updated source file for the constant propagator at
http://tinyurl.com/f664 , drop it in src/soot/shimple/toolkits/scalar/
and rebuild. (Diff to the previous: http://tinyurl.com/f63j )
Alternately you could specify "-p sop.cpf prune-cfg:false" to work
around the bug. Probably the only case where letting the constant
propagator itself prune the graph would result in a net savings (over
letting ConditionalBranchFolder run afterwards) would be when a
tableswitch or lookupswitch is folded due to constant propagation
(since CBF currently only supports IfStmt).
To tell you the truth, I almost expect space usage to go up because
the Shimple constant propagator propagates constant strings (and if
they are long strings maybe that'll make a difference). Running
RetroGuard again might fix that though.
Under Stephen's system, SCPF would definitely rate a red tag... sorry
for the trouble!
Cheers,
Navin.