[llvm-dev] Determine reason for failure at -O1

Craig Topper via llvm-dev llvm-dev at lists.llvm.org
Sat Jun 30 17:07:01 PDT 2018

You can use -opt-bisect-limit to narrower down the optimization that causes
the issue. https://llvm.org/docs/OptBisect.html


On Sat, Jun 30, 2018 at 4:57 PM Jeffrey Walton via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> On Sat, Jun 30, 2018 at 2:37 PM, David Blaikie <dblaikie at gmail.com> wrote:
> > I'd suggest approach this like any other bug in source code (not in the
> > compiler) - reduce the example, isolate the failure - until you either
> find
> > a source bug, or a small, standalone example that seems to demonstrate a
> > contradiction or bug in the way the compiler is interpreting the source.
> Thanks Davis.
> According to https://stackoverflow.com/q/15548023/608639 the list of
> optimizations applied at -O1 include:
> -globalopt -demanded-bits -branch-prob -inferattrs -ipsccp -dse
> -loop-simplify -scoped-noalias -barrier -adce -deadargelim -memdep
> -licm -globals-aa -rpo-functionattrs -basiccg -loop-idiom -forceattrs
> -mem2reg -simplifycfg -early-cse -instcombine -sccp -loop-unswitch
> -loop-vectorize -tailcallelim -functionattrs -loop-accesses -memcpyopt
> -loop-deletion -reassociate -strip-dead-prototypes -loops -basicaa
> -correlated-propagation -lcssa -domtree -always-inline -aa -block-freq
> -float2int -lower-expect -sroa -loop-unroll
> -alignment-from-assumptions -lazy-value-info -prune-eh -jump-threading
> -loop-rotate -indvars -bdce -scalar-evolution -tbaa
> -assumption-cache-tracker
> I tried backing off some of the optimizations to begin to isolate:
> $ CXX=clang++ CXXFLAGS="-g2 -O1 -no-loop-vectorize" make cham-simd.o
> clang++ -g2 -O1 -no-loop-vectorize -fPIC -pthread -pipe -c cham-simd.cpp
> clang-6.0: error: unknown argument: '-no-loop-vectorize'
> make: *** [GNUmakefile:1069: cham-simd.o] Error 1
> So I guess my question is, how do I disable a particular optimization?
> Jeff
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180630/e2ddf4ff/attachment.html>

More information about the llvm-dev mailing list