[ https://issues.apache.org/jira/browse/HARMONY5690?page=com.atlassian.jira.plugin.system.issuetabpanels:alltabpanel
]
Dmitry Pronichkin updated HARMONY5690:

Description:
64bit integer arithmetic is currently made using 32bit instructions.
This feature introduces following optimizations:
1. "long = int && 0xFFFFFFFF" operations should perform sign extension and "AND" instruction.
But we are using 32bit instructions/operands (64bit value is represented as two 32bit values),
so we can replace this sequence with just one "MOV" instruction.
This optimization is already in trunk but it works only when integer operand is left. Patch
generalizes use cases.
2. Multiplication of two 64bit values is implemented as three 32bit multiplications. But if
we know that one of multiplicands has null high part (after applying some instruction, for
example AND 0xFFFFFFFF) we can avoid one multiplication. So if both operands have null high
part then we do only one multiplication instead of three.
Patch introduces such optimization.
Additional feature  new utility method called "isNoDefBetweenInsts(const Opnd* opnd, Inst*
first, Inst* last)" in CGUtils. It checks whether there are definitions of given operand between
two given instructions. It checks only in one basic block range (can be extended).
was:
64bit integer arithmetic is currently made using 32bit instructions.
This feature introduces following optimizations:
1. "long = int && 0xFFFFFFFF" operations should perform sign extension and "AND" instruction.
But we are using 32bit instructions/operands (64bit value is represented as two 32bit values),
so we can replace this sequence with just one "MOV" instruction.
This optimization is already in trunk but it works only when integer operand is left. Patch
generalizes use cases.
2. Multiplication of two 64bit values is implemented as three 32bit multiplications. But if
we know that one of multiplicands has null high part (after applying some instruction, for
example AND 0xFFFFFFFF) we can avoid one multiplication. So if both operands has null high
part then we do only one multiplication instead of three.
Patch introduces such optimization.
Additional feature  new utility method called "isNoDefBetweenInsts(const Opnd* opnd, Inst*
first, Inst* last)" in CGUtils. It checks whether there are definitions of given operand between
two given instructions. It checks only in one basic block range (can be extended).
> [drlvm][jit][opt] 64bit integer arithmetics improvement
> 
>
> Key: HARMONY5690
> URL: https://issues.apache.org/jira/browse/HARMONY5690
> Project: Harmony
> Issue Type: Improvement
> Components: DRLVM
> Environment: IA32
> Reporter: Dmitry Pronichkin
> Assignee: Mikhail Fursov
> Attachments: i8improvements.patch
>
>
> 64bit integer arithmetic is currently made using 32bit instructions.
> This feature introduces following optimizations:
> 1. "long = int && 0xFFFFFFFF" operations should perform sign extension and "AND"
instruction. But we are using 32bit instructions/operands (64bit value is represented as two
32bit values), so we can replace this sequence with just one "MOV" instruction.
> This optimization is already in trunk but it works only when integer operand is left.
Patch generalizes use cases.
> 2. Multiplication of two 64bit values is implemented as three 32bit multiplications.
But if we know that one of multiplicands has null high part (after applying some instruction,
for example AND 0xFFFFFFFF) we can avoid one multiplication. So if both operands have null
high part then we do only one multiplication instead of three.
> Patch introduces such optimization.
> Additional feature  new utility method called "isNoDefBetweenInsts(const Opnd* opnd,
Inst* first, Inst* last)" in CGUtils. It checks whether there are definitions of given operand
between two given instructions. It checks only in one basic block range (can be extended).

This message is automatically generated by JIRA.

You can reply to this email to add a comment to the issue online.
