harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Egor Pasko <egor.pa...@gmail.com>
Subject Re: [general] GSoC 2008 Refactor Java Bytecode Translator
Date Mon, 31 Mar 2008 12:52:41 GMT
On the 0x417 day of Apache Harmony Okonechnikov Konstantin wrote:
> In addition to previous letter:
> - I removed DoSimplify flag from IrBuilderFlags and all code connected to it
> , but didn't removed simplifier yet.
> First reason is that,there are some problems with removing simplification
> from
>      IRBuilder::genTauCheckNull(Opnd* opnd, bool &alwaysThrows)
>      IRBuilder::genTauCheckZero(Opnd* opnd, bool &alwaysThrows)
>      IRBuilder::simplifyTauCheckDivOpnds(Opnd* src1, Opnd* src2, bool
> &alwaysThrows)

what is with these methods?

> Well, I figured out that simply removing simplification here doesn't work
> :)

what happens? :)

> Continued investigating. Maybe it's time to open Muchnik's book...
> And the other reason is Simplifier::PropogateCopy(). Again about it: what
> does it do, why do we use it?

just always get the propagated operand instead of the actual
operand. Makes copy propagation built in.

Of course Simplifier nature is that it only creates simplified
expressions. Old expressions have to be dead-code-eliminated
> - About CSE: we should use [optimizer] HNV , right?

HVN is more advanced, it keeps information about control flow, CSE in
IRBuilder operates only locally within basic blocks (that are
typically small in Java)

> - How do we configure opt emconf?

You probably want to run your optpass for a set of methods, and not
run it for others, right? In this case you better take a
client.emconf, which currently differentiates <clinit> methods, and do
something similar.

For example, your custom.emconf file might start with:



take configuration of MY_OPT from client.emconf and change it as you
want. Remove all profiling settings for simplicity. OPT will compile
all methods _starting with_ MyMethod1 and MyMethod2.

> How to reorganize optimizer passes correctly?

This is an open question. Some optimizations cannot work after
others. Sometimes it is not what it should be, but sometimes it is
intentional. For example, "sse" pass converts HIR to SSA form, some
optimizations require SSA form and cannot work without it. 

It would be nice to have a single place to keep the information about
each optpass requirements, compatibilities, recommendations. But
currently we keep this info only in our minds, mailing lists,
comments, JIRA. Many incompatibilities are completely not obvious. A
set of not-tested flags for each optpass make the picture even more

Egor Pasko

View raw message