[clang] [Clang][Driver] Add new flags to control IR verification (PR #68172)

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 4 11:50:59 PDT 2023


================
@@ -146,6 +146,13 @@ Non-comprehensive list of changes in this release
 
 New Compiler Flags
 ------------------
+* ``-fverify-intermediate-code`` and it's complement ``-fno-verify-intermediate-code``.
+  Enables or disables verification of the generated LLVM IR.
+  It's strongly encouraged to enable this verification, as it can catch hard to
+  find code generation bugs.
----------------
nikic wrote:

> Does it really not make sense, or do you simply not agree we should recommend it?

Both? It doesn't make sense to "strongly recommend" that end users manually enable verification by passing `-fverify-intermediate-code`. If we think it's important, then we need to enable the option by default, not ask users to do so. (Of course, I am strongly opposed to actually enabling it by default.)

https://github.com/llvm/llvm-project/pull/68172


More information about the cfe-commits mailing list