[PATCH] D95578: [Docs] Update HowToSubmitABug

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 27 17:11:58 PST 2021


aeubanks marked 2 inline comments as done.
aeubanks added inline comments.


================
Comment at: llvm/docs/HowToSubmitABug.rst:92
 If you find that a bug crashes in the optimizer, compile your test-case to a
 ``.bc`` file by passing "``-emit-llvm -O1 -Xclang -disable-llvm-passes -c -o
+foo.bc``". The ``-O1`` is important because ``-O0`` adds the ``optnone``
----------------
MaskRay wrote:
> Worth mentioning that `-Xclang -disable-O0-optnone` can disable emitted `optnone`.
I think that's too much information. Clang can generate different code for -O0 than -O1 and above even besides the optnone attribute.


================
Comment at: llvm/docs/HowToSubmitABug.rst:125
+If none of the above work, you can get the IR before a crash by running the
+``opt`` command with the ``--print-before-all --print-module-scope`` flags to
+dump the IR before every pass. Be warned that this is very verbose.
----------------
MaskRay wrote:
> I only use `--print-module-scope` with `-filter-print-funcs`...
`-print-before-all` won't print the entire module before a function pass, and you need the whole module.


================
Comment at: llvm/docs/HowToSubmitABug.rst:164
+reading a variable before it is defined). In particular, check to see if the
+program is clean under various sanitizers and `valgrind
+<http://valgrind.org/>`_. Many "LLVM bugs" that we have chased down ended up
----------------
MaskRay wrote:
> Perhaps also: `-fsanitize=address,undefined` && `-fsanitize=memory`
added a link to sanitizers and mentioned `-fsanitize=address,undefined`. I'm worried about msan because you need to build the C++ standard library with it, or else you get false positives. It's discoverable through the link anyway.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95578



More information about the llvm-commits mailing list