[llvm] r352550 - [docs] Prevent O0 optnone for opt input

Shoaib Meenai via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 29 14:17:51 PST 2019


Author: smeenai
Date: Tue Jan 29 14:17:51 2019
New Revision: 352550

URL: http://llvm.org/viewvc/llvm-project?rev=352550&view=rev
Log:
[docs] Prevent O0 optnone for opt input

If we just compile with -O0, clang will add optnone attributes
everywhere, so opt won't actually be able to perform any passes.
Instruct clang to not emit the optnone so opt can do its thing.

Differential Revision: https://reviews.llvm.org/D56950

Modified:
    llvm/trunk/docs/HowToSubmitABug.rst

Modified: llvm/trunk/docs/HowToSubmitABug.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/HowToSubmitABug.rst?rev=352550&r1=352549&r2=352550&view=diff
==============================================================================
--- llvm/trunk/docs/HowToSubmitABug.rst (original)
+++ llvm/trunk/docs/HowToSubmitABug.rst Tue Jan 29 14:17:51 2019
@@ -84,8 +84,8 @@ Compile-time optimization bugs
 ------------------------------
 
 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``".
-Then run:
+``.bc`` file by passing "``-emit-llvm -O1 -Xclang -disable-llvm-passes -c -o
+foo.bc``".  Then run:
 
 .. code-block:: bash
 




More information about the llvm-commits mailing list