[LLVMdev] Reducing impact of DSE

Bruno Cardoso Lopes bruno.cardoso at gmail.com
Tue Feb 3 12:35:58 PST 2015


Hi David,

If you have really large basic blocks, you could be hitting pr22348,
see this thread:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150112/253207.html

On Tue, Feb 3, 2015 at 6:17 PM, David Jones <djones at xtreme-eda.com> wrote:
> 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.
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



-- 
Bruno Cardoso Lopes
http://www.brunocardoso.cc



More information about the llvm-dev mailing list