harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitry Pronichkin (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-5597) [drlvm][jit][opt] Branch Translator zero comparison improvement
Date Thu, 20 Mar 2008 10:09:24 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-5597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12580716#action_12580716
] 

Dmitry Pronichkin commented on HARMONY-5597:
--------------------------------------------

I want to suggest generalization of this branch elimination technique.
We can work on the following pattern:
if ( x < x1 ) { // or if (x1 > x)
  a = a0;
}
else {
  a = a1;
}

transforming it into code like this:
tmp = (x - x1) >> 31;
a = (a0 & tmp) | (a1 & !tmp);

This will fully cover the idea of sign check elimination.

> [drlvm][jit][opt] Branch Translator zero comparison improvement
> ---------------------------------------------------------------
>
>                 Key: HARMONY-5597
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5597
>             Project: Harmony
>          Issue Type: Improvement
>            Reporter: George Timoshenko
>            Assignee: Mikhail Fursov
>            Priority: Minor
>
> In the implementation of branch translator enhancement (HARMONY-5580)
> prevInst - can be lookuped more carefully than just:
> Inst * prevInst = inst->getPrevInst();
> +
> +                    if (prevInst && falseInst)
> There can be some insts that do not affect FALGS between CMP and BRANCH.
> And it is also correct when CMP belongs to another BB that is prior to the BRANCH's one.
(the only restriction is: FLAGS are safe from CMP to BRANCH)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message