[PATCH] D61075: [CodeGenPrepare] limit overflow intrinsic matching to a single basic block

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 2 10:13:40 PDT 2019


hfinkel added inline comments.


================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:1191
+    //    across multiple blocks and increasing register pressure.
+    // 3. Any use of a dominator tree could cause large compile-time regression.
+    return false;
----------------
I'm actually not sure why this would be true, at least in the multiple-blocks case. If they're in the same block, then the dominance check can be expensive, but that's because of the scanning involved. And, if that's true, then an OBB cache might address the problem. In any case, I don't think that having point (3) here is useful, could be misleading, and isn't necessary given the first two points.


================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:1206
+  Instruction *InsertPt = nullptr;
+  for (Instruction &Iter : *Cmp->getParent()) {
+    if (&Iter == BO || &Iter == Cmp) {
----------------
If the DT was expensive, I'd actually suspect it was this scanning that made it so on large blocks. Does this happen multiple times such that a OBB cache would help?


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

https://reviews.llvm.org/D61075





More information about the llvm-commits mailing list