[PATCH] D147036: [GuardWidening] Use BFI to reject obviously unprofitable widening

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 14 03:19:50 PDT 2023


skatkov added a comment.

Looks pretty straightforward.  Please introduce an option and lgtm.
Any reason you shoose "twice"?



================
Comment at: llvm/lib/Transforms/Scalar/GuardWidening.cpp:434
+    // dominated instruction, bail.
+    if (BFI->getBlockFreq(DominatingGuard->getParent()).getFrequency() / 2 >
+        BFI->getBlockFreq(DominatedInstr->getParent()).getFrequency())
----------------
could you please introduce an option?


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

https://reviews.llvm.org/D147036



More information about the llvm-commits mailing list