chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] add a second lightweight flow-analysis pas


From: Felix
Subject: Re: [Chicken-hackers] [PATCH] add a second lightweight flow-analysis pass
Date: Tue, 16 Oct 2012 10:37:19 -0400 (EDT)

From: Peter Bex <address@hidden>
Subject: Re: [Chicken-hackers] [PATCH] add a second lightweight flow-analysis 
pass
Date: Mon, 15 Oct 2012 21:17:35 +0200

> On Fri, Oct 12, 2012 at 07:45:44PM +0200, Felix wrote:
>> This patch adds another lightweight flow-analysis pass to remove some
>> unnecessary type checks after normal optimization has taken place.
>> 
>> Even with specialization, inlining (in particular cross-module
>> inlining) may result in type checks that are in many cases redundant.
>> For example inlined record accessors compiled in safe mode, and
>> inlining of code in general (which is done after the normal
>> flow-analysis pass) will introduce type-checks that specialization
>> would have (sometimes) removed.
> 
> I'm not sure I completely understand why the scrutinizer can't remove
> this after inlining, but ok.

The scrutinizer works on direct-style code (flow-analysis on CPS code
is too hard), inlining takes place after CPS conversion (optimization
is done on the CPS converted code, which is easier).

> 
>> This patch adds a new compiler pass (called "lfa2"), that does a
>> simplified flow-analysis to identify redundant forms of the form
>> '(##core#inline "C_i_check_..." ...)'. Type-information is obtained
>> from constant forms and predicates like '(##core#inline
>> "C_i_structurep" ...)'. In unsafe mode checks will be removed in
>> general.
> 
> Looks good, as far as I can understand it!  I've pushed the patch.

Thanks.


cheers,
felix



reply via email to

[Prev in Thread] Current Thread [Next in Thread]