[PATCH] D56950: [docs] Prevent O0 optnone for opt input

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 18 17:25:11 PST 2019


craig.topper added inline comments.


================
Comment at: llvm/docs/HowToSubmitABug.rst:87
 If you find that a bug crashes in the optimizer, compile your test-case to a
-``.bc`` file by passing "``-emit-llvm -O0 -c -o foo.bc``".
+``.bc`` file by passing "``-emit-llvm -O0 -Xclang -disable-O0-optnone -c -o foo.bc``".
 Then run:
----------------
smeenai wrote:
> This is definitely over 80 columns, but I'm not sure if we're strict about that in the documentation, and what the best way to split it would be.
> 
> Also, are there any preferences for `-O0 -Xclang -disable-O0-optnone` vs. `-O1 -Xclang -disable-llvm-passes` vs. `-O1 -Xclang -disable-llvm-optzns`?
I think -disable-passes is preferred over -disable-llvm-optzns. That spelling is weird.

Using -O1 -Xclang -disable-llvm-passes is going to more accurately give the IR. There are other differences that clang makes in -O0 other than the obvious optnone.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56950/new/

https://reviews.llvm.org/D56950





More information about the llvm-commits mailing list