[PATCH] D81558: [NewPM] Introduce PreserveCFG check

Yevgeny Rouban via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 1 09:15:51 PDT 2020


yrouban added a comment.

In D81558#2249775 <https://reviews.llvm.org/D81558#2249775>, @kuhar wrote:

> This looks very useful. Does it currently report any errors when enabled?

None.



================
Comment at: llvm/lib/Passes/StandardInstrumentations.cpp:43
+    "verify-cfg-preserved", cl::Hidden,
+#ifdef NDEBUG
+    cl::init(false));
----------------
kuhar wrote:
> How much overhead does this have? It it's not negligible, we may want to enable it when expensive checks are enabled.
By default I proposed to enable it only for debug version. Do we track compile time for them?
I suggest that we leave this as is with additional comment to enable it for the expansive checks only if found a performance impact.
Basically for every function pass it runs twice over function blocks and edges and allocates linear memory. Should not be very big.


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

https://reviews.llvm.org/D81558



More information about the llvm-commits mailing list