[PATCH] D81558: [NewPM] Introduce PreserveCFG check

Jakub Kuderski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 1 10:01:40 PDT 2020


kuhar added inline comments.


================
Comment at: llvm/lib/Passes/StandardInstrumentations.cpp:43
+    "verify-cfg-preserved", cl::Hidden,
+#ifdef NDEBUG
+    cl::init(false));
----------------
yrouban wrote:
> 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.
In general, I think we do care about it too. Could you run opt on some bigger .bc file to make sure there's little noticeable difference? I posted some .bc files in https://reviews.llvm.org/D83089.


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

https://reviews.llvm.org/D81558



More information about the llvm-commits mailing list