[LLVMdev] Reducing impact of DSE

David Jones djones at xtreme-eda.com
Tue Feb 3 12:17:59 PST 2015


I am writing a compiler using LLVM 3.2 as the back end.

Given a certain (IMHO pathological, but otherwise representative of the
things I will be expected to compile) input, LLVM is spending a lot of time
in dead store elimination:

/tools/llvm/3.2na/bin/opt test.bc -O2  -time-passes -o opt.bc
reports: 119s (71%) in DSE

Bug 15000 reports a performance issue with DSE. The bug is marked fixed, so
I decided to try using LLVM 3.5.1:

/tools/llvm/3.5.1rel/bin/opt test.bc -O2  -time-passes -o opt.bc

  Total Execution Time: 151.3811 seconds (151.4667 wall clock)

   ---User Time---   --System Time--   --User+System--   ---Wall Time---
--- Name ---
  98.8245 ( 65.3%)   0.0000 (  0.0%)  98.8245 ( 65.3%)  98.9236 ( 65.3%)
Dead Store Elimination

I have no insight as to why DSE remains so poor. What constructs are
particularly hard on DSE, which would result in what I'm seeing? Is there
anything I can do? Is there an easy way for me to programmatically disable
the DSE pass?

NOTE: by "programmatically", I am looking for a way to disable DSE when
using LLVM as a library. Passing command line options isn't a very clean
solution in that case.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150203/70ab68c7/attachment.html>


More information about the llvm-dev mailing list