[LLVMdev] Register Spilling and SSA

Matthias Braun matthias.braun at kit.edu
Fri Jan 15 07:08:56 PST 2010


Am Donnerstag, den 14.01.2010, 16:35 -0600 schrieb David Greene:
> On Thursday 14 January 2010 15:56, ST wrote:
> > Hi
> >
> > I just stumbled upon this paper. While i just skimmed over it it seems as
> > if the authors say that their algorithm is more efficient than the llvm 2.3
> > algorithm? So i thought that might be interesting?
> >
> > http://pp.info.uni-karlsruhe.de/uploads/publikationen/braun09cc.pdf

As the author of this paper I have to defend it now (of course ;-)

> 
> Don't trust it.  The abstract clearly states they're counting the number of 
> dynamic spills.  That has almost nothing to do with performance.
So if not the number of dynamic spills/reloads and rematerialisations.
What else can you do to measure the quality of your spilling algorithm?
I admit that the impressive numbers in spill translate to smaller gains
in the range of 1-5% also it's hard to compare 2 different compilers.
Nonetheless we produce faster x86 code than llvm-2.3 for several spec
benchmarks (and produce way slower code for some others where I suspect
missing architecture neutral optimisations in firm).

> 
> Someone would have to reproduce their experiment to verify that performance
> indeed improves.

You can easily download libfirm-1.17.0 and cparser-0.9.9 from
http://www.libfirm.org and see for yourself.

If you're interested in the valgrind hacks to count the spills/reloads,
I uploaded them here:
pp.info.uni-karlsruhe.de/~matze/valgrind-3.5.0-countmem.tgz (there's a
new valgrind plugin called 'countmem' in it).

Greetings,
	Matthias Braun




More information about the llvm-dev mailing list