diff options
author | Florian Hahn <flo@fhahn.com> | 2022-07-14 09:23:47 -0700 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2022-07-14 09:23:47 -0700 |
commit | e7ec1746a632798b3b0fa933ad8a8f264b2ded08 (patch) | |
tree | 27c343fab32903b73d94a8da9a5479e5c4417498 /llvm/lib/Transforms/Utils/SimplifyIndVar.cpp | |
parent | d1a5669f5e4434d1a556b189088e96a011ec0999 (diff) | |
download | llvm-e7ec1746a632798b3b0fa933ad8a8f264b2ded08.zip llvm-e7ec1746a632798b3b0fa933ad8a8f264b2ded08.tar.gz llvm-e7ec1746a632798b3b0fa933ad8a8f264b2ded08.tar.bz2 |
[SCEV] Avoid creating unnecessary SCEVs for SelectInsts.
After 675080a4533b, we always create SCEVs for all operands of a
SelectInst. This can cause notable compile-time regressions compared to
the recursive algorithm, which only evaluates the operands if the select
is in a form we can create a usable expression.
This approach adds additional logic to getOperandsToCreate to only
queue operands for selects if we will later be able to construct a
usable SCEV.
Unfortunately this introduces a bit of coupling between actual SCEV
construction for selects and getOperandsToCreate, but I am not sure if
there are better alternatives to address the regression mentioned for
675080a4533b.
This doesn't have any notable compile-time impact on CTMark.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D129731
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyIndVar.cpp')
0 files changed, 0 insertions, 0 deletions