Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 75901 invoked from network); 31 Mar 2008 22:53:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Mar 2008 22:53:57 -0000 Received: (qmail 61405 invoked by uid 500); 31 Mar 2008 22:53:56 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 61380 invoked by uid 500); 31 Mar 2008 22:53:56 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 61371 invoked by uid 99); 31 Mar 2008 22:53:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Mar 2008 15:53:56 -0700 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gcjhd-harmony-dev@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Mar 2008 22:53:05 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JgSsP-0005Hm-4S for dev@harmony.apache.org; Mon, 31 Mar 2008 22:53:17 +0000 Received: from packo.dialup.corbina.ru ([85.21.96.35]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 31 Mar 2008 22:53:17 +0000 Received: from egor.pasko by packo.dialup.corbina.ru with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 31 Mar 2008 22:53:17 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: dev@harmony.apache.org From: Egor Pasko Subject: Re: [general] GSoC 2008 Refactor Java Bytecode Translator Date: 01 Apr 2008 02:53:06 +0400 Lines: 82 Message-ID: <0vqmyoeeca5.fsf@gmail.com> References: <884d1faa0803192322o7b9f58dfja181970fbe2f882e@mail.gmail.com> <0vqmyojgn54.fsf@gmail.com> <0vqiqz6hg79.fsf@gmail.com> <0vqej9uhcnc.fsf@gmail.com> <884d1faa0803282142o1507767ejed736d455cf6bea5@mail.gmail.com> <0vqabkhhgrh.fsf@gmail.com> <884d1faa0803300533h181c323cv4a8d5ee9875ff059@mail.gmail.com> <884d1faa0803301138v1e84b867wfcc907cf86ccd20c@mail.gmail.com> <0vq4panf42u.fsf@gmail.com> <884d1faa0803310936i5703e01ck71798eff11a88993@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: packo.dialup.corbina.ru User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 Sender: news X-Virus-Checked: Checked by ClamAV on apache.org On the 0x418 day of Apache Harmony Okonechnikov Konstantin wrote: > On 31 Mar 2008 16:52:41 +0400, Egor Pasko wrote: > > > > 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? :) > > > It looks like some dark magic or maybe late night hours > :), now everyting seems to be OK, I removed > simplification. Nevertheless, I beware of nasty warning inside > IRBuilder::genTauCheckNull(...): > ... > // Not advisable to turn off simplification of checknull because > // IRBuilder calls genTauCheckNull redundantly many times I have no idea what this means, but I will take a look! plz, remind me if I do not do it in a couple of days :) > // ...then it does simplify without asking the flag > ... > > I am working now on removing propgate copy and SCE. Testing on HelloWorld. > If there were such code: > > Opnd* IRBuilder::genAdd(Type* dstType, Modifier mod, Opnd* src1, Opnd* > src2) { > src1 = propagateCopy(src1); > src2 = propagateCopy(src2); > Operation operation(Op_Add, dstType->tag, mod); > uint32 hashcode = operation.encodeForHashing(); > Opnd* dst = lookupHash(hashcode, src1, src2); > if (dst) return dst; > if (!dst) { > dst = createOpnd(dstType); > Inst *newi = instFactory->makeAdd(mod, dst, src1, src2); > appendInst(newi); > } > insertHash(hashcode, src1, src2, dst->getInst()); > return dst; > } > > It becomes like this: > > Opnd* IRBuilder::genAdd(Type* dstType, Modifier mod, Opnd* src1, Opnd* src2) > { > Operation operation(Op_Add, dstType->tag, mod); > Opnd* dst = createOpnd(dstType); > Inst *newi = instFactory->makeAdd(mod, dst, src1, src2); > appendInst(newi); > return dst; > } > > Is everything OK? Let's not remove copy propagation, it does not make the code difficult, does not add lots of lines, but still very functional. OK? -- Egor Pasko