[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 14:11:28 PDT 2019


hfinkel added inline comments.


================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:1206
+  Instruction *InsertPt = nullptr;
+  for (Instruction &Iter : *Cmp->getParent()) {
+    if (&Iter == BO || &Iter == Cmp) {
----------------
spatel wrote:
> hfinkel wrote:
> > 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?
> I only have 1 test case to play with (I'll try to attach it to this review for reference), and it doesn't have large blocks. It's a ~66K line function with ~6K blocks.
> 
> From what I can tell, the problem is that we reset the DT on any made change up at line 472. That seems like overkill, but I don't have the motivation to sort out which of the transforms in the loop could bypass that reset. 
Okay. If you're going to mention that DT is slow, please put in the comment something about the fact that it's slow because we need to recompute it a lot (and, perhaps, why).


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

https://reviews.llvm.org/D61075





More information about the llvm-commits mailing list