Basecase assembly optimisation project

Ondřej Bílka neleai at seznam.cz
Wed Oct 2 18:40:14 CEST 2013


On Thu, Sep 26, 2013 at 09:20:29PM +0200, Torbjorn Granlund wrote:
> For the last few months, I have been working on writing and rewriting
> basecase code for X64-64 processors.  The result is now in the
> mainline GMP repo.
> 
I am writing a tool that might be useful, a simple optimizer of assembly
routines. You need to write a benchmark that measures performance and
prints elapsed time and assembly file. Currently it has two optimization
patterns, first is enclosing block of code without control flow
instructions in

# EVOLVE_START
code
# EVOLVE_END

and evolver will try different schedulings to find optimal one.

Second one is when you choose between different instructions, where you 
write alternatives by following form.

cmp $1, %rax #| cmp $1, %al

A sequences can be done in following way

cmp $1, %rax; ja .foo #| test %eax, %eax; jne .foo

sounds interesting?


More information about the gmp-devel mailing list