[PATCH] D111493: [IVUsers] Check for preheader instead of loop simplify form
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 11 13:03:21 PDT 2021
nikic added a comment.
In D111493#3054181 <https://reviews.llvm.org/D111493#3054181>, @mkazantsev wrote:
> Looks fair. Just curious, what's the CT impact?
For the average case this is only a small improvement: https://llvm-compile-time-tracker.com/compare.php?from=943b3048484b7e3cf04f4d51c23c82fcece2185d&to=272c643a5149425ef577312ae494e726c8b15d9e&stat=instructions
For the pathological case I was looking at compile-time for LSR drops to 40s from previously [unknown but at least 10 minutes].
In D111493#3055286 <https://reviews.llvm.org/D111493#3055286>, @reames wrote:
> Glancing through the SCEVExpander code, I only see one unconditional use of a preheader assumption, and that looks easy to bail out of. Are you sure we need this restriction at all? (Landing this and then investigating is encouraged.)
Not sure, but I think the difference to those other usages is that they are only used for optimization, i.e. for basic LICM during expansion. For addrecs having no preheader can make expansion impossible. I guess one would have to check that in isSafeToExpand() instead?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111493/new/
https://reviews.llvm.org/D111493
More information about the llvm-commits
mailing list