And Sxy has a point, and I now remember this is why we did CAND/CIOR
etc. I would say, this is a case where your change is not always a
win. Any suggestion/pointer?
Sun

On Mon, Jun 6, 2011 at 12:10 PM, Chandrasekhar Murthy <mur...@sgi.com> wrote:
> Would replacing CAND/CIOR by LAND/LIOR work for the cases you are looking
> at.
>
>
>
> Murthy
>
>
>
> ________________________________
>
> From: shuxin yang [mailto:shuxin.ope...@gmail.com]
> Sent: Monday, June 06, 2011 10:32 AM
> To: Chandrasekhar Murthy
> Cc: Sun Chan; open64-devel
>
> Subject: Re: [Open64-devel] patch to enable more if-conversion
>
>
>
> Hi:
>    (Just a general question about conditional and/or, not specific to
> open64.)
>
>    More often than not, I find it is more convenient to directly deal with
> cand/cor at the level higher than CG. I don't remember all these situations
> I ran into. Here is some examples:
>
>   e.g.1: merge the if-then-else constructs
>    if (c1||c1) s1 then s2;
>   ..
>    if (c1||c2) s3 then s4;
>
>  e.g.2 PRE complicate cand/cor
>    if (cand-cor)  {..}
>
>
>    .. some stmts here
>
>    if (cand-cor) {}
>
>   e.g3 reorder the sub-expr in the cand/cor, suppose it is safe to to that
>    c1 || c2 || c3 => c3 || c2 || c1
>
> I believe sometimes lowered cand-cor could be more convenient. However,
> dealing with CFG is far more difficult than expression. If I were compiler
> designer, I would keep cand/cor all the way down to the point right before
> CG.  What is your take?
>
> Thanks
> Shuxin
>
> On Mon, Jun 6, 2011 at 8:42 AM, Chandrasekhar Murthy <mur...@sgi.com> wrote:
>
> As some of the files in lno (access_vector.cxx, array_bounds.cxx, etc..) are
> processing these nodes, I think the lowering is done after LNO.
>
> Murthy
>
> -----Original Message-----
> From: Sun Chan [mailto:sun.c...@gmail.com]
>
> Sent: Monday, June 06, 2011 8:20 AM
> To: Chandrasekhar Murthy
> Cc: David Coakley; open64-devel
> Subject: Re: [Open64-devel] patch to enable more if-conversion
>
> Thx Murthy, does this mean we should keep these nodes till after LNO?
> David,
> Is your if-conv fix at mainopt? Or is it at preopt? From this
> discussion so far, this should be done in mainopt, i.e. the lowering
> into your new form ought to be done at mainopt, after LNO.
> Sun
>
> On Mon, Jun 6, 2011 at 7:24 AM, Chandrasekhar Murthy <mur...@sgi.com> wrote:
>> && and || were initially handled in the frontend.
>> CAND/CIOR were added later in order to move the lowering to VHO.
>> The lowering was deferred to later so that LNO could also process these
>> nodes.
>>
>> Murthy
>>
>> -----Original Message-----
>> From: Sun Chan [mailto:sun.c...@gmail.com]
>> Sent: Saturday, June 04, 2011 9:54 PM
>> To: David Coakley
>> Cc: open64-devel
>> Subject: Re: [Open64-devel] patch to enable more if-conversion
>>
>> I forgot why we did cand anymore. OTOH, I do remember lowering that
>> with profile feedback info is tricky to get that right. Can you double
>> check that you are not breaking profile info and consistency check
>> with your changes?
>> Sun
>>
>> On Fri, Jun 3, 2011 at 1:53 PM, David Coakley <dcoak...@gmail.com> wrote:
>>> Could a gatekeeper please review the attached change that enables more
>>> if-conversion?
>>>
>>> Here is the proposed log message:
>>>
>>> Convert:
>>> if (a && b)
>>>  x = ...
>>> To:
>>> if (a)
>>>  if (b)
>>>    x = ...
>>> To enable more if-conversion.
>>>
>>> Without this transformation, WHIRL-lowering creates control flow
>>> that WOPT-if-conversion can't handle.  With this transformation,
>>> this now looks like any other if-conversion opportunity to WOPT.
>>> So this transformation enables more if-conversion (i.e. replace
>>> branch with conditional move).  No if-conversion code was touched -
>>> only lowering code.
>>>
>>>
>>>
>>>
>>> I have also attached a small test program that demonstrates when the
>>> transformation occurs.  Thanks,
>>>
>>> -David Coakley / AMD Open Source Compiler Engineering
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Simplify data backup and recovery for your virtual environment with
>>> vRanger.
>>> Installation's a snap, and flexible recovery options mean your data is
>>> safe,
>>> secure and there when you need it. Discover what all the cheering's
>>> about.
>>> Get your free trial download today.
>>> http://p.sf.net/sfu/quest-dev2dev2
>>> _______________________________________________
>>> Open64-devel mailing list
>>> Open64-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/open64-devel
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> Simplify data backup and recovery for your virtual environment with
>> vRanger.
>> Installation's a snap, and flexible recovery options mean your data is
>> safe,
>> secure and there when you need it. Discover what all the cheering's about.
>> Get your free trial download today.
>> http://p.sf.net/sfu/quest-dev2dev2
>> _______________________________________________
>> Open64-devel mailing list
>> Open64-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/open64-devel
>>
>
> ------------------------------------------------------------------------------
> Simplify data backup and recovery for your virtual environment with vRanger.
> Installation's a snap, and flexible recovery options mean your data is safe,
> secure and there when you need it. Discover what all the cheering's about.
> Get your free trial download today.
> http://p.sf.net/sfu/quest-dev2dev2
> _______________________________________________
> Open64-devel mailing list
> Open64-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/open64-devel
>
>

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to