[llvm-dev] linear-scan RA

David A. Greene via llvm-dev llvm-dev at lists.llvm.org
Wed Sep 12 06:39:00 PDT 2018


Bruce Hoult <brucehoult at sifive.com> writes:

> Another point is that it's important that the default works well for
> pathological code, such as that produced by other programs.
>
> 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.

That is very true.  There are some ridiculously large machine-generated
Fortran subroutines in the HPC world.  Many years ago a particular code
caused our Fortran compiler to abort because it triggered an assert that
there would be no more than 10,000 vectorizable loops in a subroutine.

Our customers are sensitive to compile time, even though we are all
about execution speed to a ridiculous extreme.  Customers will tolerate
quite a bit of extra compile time for things like good vectorization and
parallelization but a 20% hit from register allocation for a marginal
benefit on most codes is not going to fly.

                             -David


More information about the llvm-dev mailing list