<div dir="ltr">Another point is that it's important that the default works well for pathological code, such as that produced by other programs.<div><br></div><div>An example I frequently see is the output from Verilator, a program which compiles the hardware description language Verilog into C, and then compiles that. It likes to produce *extremely* large function bodies. I've seen cases where engineers designing a CPU make some trivial one line change to their Verilog and see the compile time go from a couple of seconds to many hours. Telling them to use -O0 fixes the compile time problem, but of course then makes their simulation go much more slowly.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 11, 2018 at 1:57 PM, David A. Greene via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Matthias Braun via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> writes:<br>
<br>
> I don't want to go too deep into the discussion here; but I'd like to<br>
> point out that in my experience the assignment of registers is less<br>
> interesting/important than the problem of how to place your<br>
> spill/reload code, where to perform live range splitting, how to<br>
> accomodate your odd machine performance characteristics, ... The<br>
> greedy allocator does a good job in giving you the flexibility to do<br>
> what you need to.<br>
<br>
</span>That reflects my experience as well. Counting (static or dynamic)<br>
spills is definitely a poor way to judge an allocator. Counting copies<br>
may have more merit, but by far the most important aspect is spill code<br>
generation, what, where and how to spill.<br>
<br>
I recently did a study varying Greedy allocation and spilling knobs and<br>
saw swings of 20% or more in performance. This is highly code-dependent<br>
of course but it just reinforced for me that there is no good "default"<br>
for anyone. Customers are always going to complain about "their" code<br>
and it's our job to patiently explain why what works for "their" code<br>
will be dreadful for "everyone else's" code.<br>
<br>
And everyone is moving to Python anyway, so ¯\_(ツ)_/¯ :)<br>
<br>
-David<br>
<div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</div></div></blockquote></div><br></div>