[PATCH] D46039: Fix compile time hang in LSR

Jun Bum Lim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 25 08:41:10 PDT 2018


junbuml added inline comments.


================
Comment at: lib/Transforms/Scalar/LoopStrengthReduce.cpp:3605-3606
+      // x to Depth.
+      GenerateReassociations(LU, LUIdx, LU.Formulae.back(),
+                             Depth + 1 + (Log2_32(AddOps.size()) >> 2));
   }
----------------
IIUC, this change perform like  if there are many reassociations at one level, then we limit the depth in the next levels. right? If we want to guarantee certain number of reassociations at each level, we may need to limit the number of function call here at each level.  I'm not sure which one is beneficial for performance in general between limiting the depth or limiting a certain number of reassociations at each level with a fixed depth. 


Repository:
  rL LLVM

https://reviews.llvm.org/D46039





More information about the llvm-commits mailing list