[aarch64-port-dev ] [RFC] ldp/stp peephole optimizations

Andrew Haley aph at redhat.com
Tue Dec 26 10:13:48 UTC 2017


On 26/12/17 04:24, Zhongwei Yao wrote:
> I was also thinking about merging it in assembler. My concern was that
> assembler usually does not do optimisation.
> 
> However, I've taken a quick check and I think it should be doable in
> assembler. For example, we can merge ldr in assembler's ldr instruct
> definition by checking if the previous instruct meets the constraints.
> For the previous instruction, we can record it in Instruction_aarch64
> class's destructor (if it is ld/st instruction, record it. if not,
> clear it.).
> 
> What do you think? If it is OK, I'll work out a prototype for merging
> ldr in assembler.

Try doing it in MacroAssembler.  MacroAssembler::membar is an example of
where we already merge instructions.

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


More information about the aarch64-port-dev mailing list