[PATCH] D79893: [SCEV] Constant fold MultExpr before applying depth limit.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 13 13:36:32 PDT 2020
efriedma added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:3006
+ if (Depth > MaxArithDepth || hasHugeExpression(Ops))
+ return getOrCreateMulExpr(Ops, Flags);
+
----------------
I think you need to rearrange the code a bit more: with the current version of the patch, we increase the depth before checking the current depth.
The general idea makes sense: we should perform optimizations that aren't recursive before the depth check.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79893/new/
https://reviews.llvm.org/D79893
More information about the llvm-commits
mailing list