[PATCH] D141487: [LoopUnroll] Directly update DT instead of DTU.

Jakub Kuderski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 13 08:19:35 PST 2023


kuhar added a comment.

> Recalculating the DTs from scratch is much quicker than DTU (~18s), but still noticeable slower than manual updates (~2s).

It would be great if we could detect those cases and teach DTU to trigger this recalculation. Would 18s be an acceptable fix for your use case?

> There are already DT verification assertions just before the begin of the manual updates and at the end. I can add some in-between as well if you think that's beneficial, but I am a bit worried about doing so too liberally even with expensive checks.

Ack.



================
Comment at: llvm/unittests/Transforms/Utils/LocalTest.cpp:1092
+
+static BasicBlock *getBasicBlockByName(Function &F, StringRef Name) {
+  for (BasicBlock &BB : F)
----------------
FYI, I added a utility for writing similar tests in the past (`CFGBuilder`), not sure if we could link with it here and if it would simplify the test code


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141487



More information about the llvm-commits mailing list