harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Shipilev (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-5887) [drlvm][jitrino] use INC operation to increment profile
Date Tue, 01 Jul 2008 12:11:44 GMT

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

Aleksey Shipilev commented on HARMONY-5887:
-------------------------------------------

Alexey, this assumption is easy to make, but it's not right.

Quote from Intel IA32 Optimization Manual:
"Use of the inc and dec Instructions

The inc and dec instructions modify only a subset of the bits in the flag
register. This creates a dependence on all previous writes of the flag
register. This is especially problematic when these instructions are on
the critical path because they are used to change an address for a load on
which many other instructions depend.

Assembly/Compiler Coding Rule 42. (M impact, H generality) inc and
dec instructions should be replaced with an add or sub instruction, because
add and sub overwrite all flags, whereas inc and dec do not, therefore
creating false dependencies on earlier instructions that set the flags."

So, "ADD reg, 1" is better than "INC reg". No change is required.

> [drlvm][jitrino] use INC operation to increment profile 
> --------------------------------------------------------
>
>                 Key: HARMONY-5887
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5887
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Alexey Varlamov
>            Priority: Trivial
>
> I've noticed "ADD counter,1" construct is used to increment dynamic profile counters.
More neat and efective INC instruction should be used instead.

-- 
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