[PATCH] D55373: [LSR] Generate formulae to enable more indexed accesses

Gil Rapaport via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 28 05:52:58 PST 2019


gilr added inline comments.


================
Comment at: lib/Transforms/Scalar/LoopStrengthReduce.cpp:159
+static cl::opt<bool> CollapseUnrolledCode(
+  "lsr-collapse-unrolled", cl::Hidden, cl::init(false),
+  cl::desc("Narrow LSR search space by collapsing unrolled code"));
----------------
False by default?


================
Comment at: lib/Transforms/Scalar/LoopStrengthReduce.cpp:4466
 void LSRInstance::NarrowSearchSpaceByCollapsingUnrolledCode() {
-  if (EstimateSearchSpaceComplexity() < ComplexityLimit)
+  if (!CollapseUnrolledCode &&
+      EstimateSearchSpaceComplexity() < ComplexityLimit) 
----------------
The convention for flags controlling the narrowing heuristics seem to be to use them in NarrowSearchSpaceUsingHeuristics() rather than in the the functions they affect.


================
Comment at: lib/Transforms/Scalar/LoopStrengthReduce.cpp:4466
 void LSRInstance::NarrowSearchSpaceByCollapsingUnrolledCode() {
-  if (EstimateSearchSpaceComplexity() < ComplexityLimit)
+  if (!CollapseUnrolledCode &&
+      EstimateSearchSpaceComplexity() < ComplexityLimit) 
----------------
gilr wrote:
> The convention for flags controlling the narrowing heuristics seem to be to use them in NarrowSearchSpaceUsingHeuristics() rather than in the the functions they affect.
I think you meant '||' here.


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

https://reviews.llvm.org/D55373





More information about the llvm-commits mailing list