[PATCH] D103991: [SCEV] Move mustprogress based no-self-wrap logic so it applies to all exit conditions
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 19 14:19:32 PST 2021
nikic added a comment.
In D103991#3143841 <https://reviews.llvm.org/D103991#3143841>, @reames wrote:
> In D103991#3143636 <https://reviews.llvm.org/D103991#3143636>, @nikic wrote:
>
>> Looking at callgrind profiles for one test case, the main additional cost is when simplifying IVs after unrolling, during the willOverflow check that zext/sext both operands. In getZeroExtendExpr we seem to spend more times in various proveNoWrapByXYZ() methods. It's not obvious to me how this change would cause that, I'd more expect the reverse effect (less need to infer additional flags because we added more here).
>
> All I can think of is that maybe we figure out the trip count for some loop, unroll it, and then spend time analyzing the newly introduced IVs? That's really the only interaction I can find.
This file (tddis.c from mafft) doesn't see any codegen change, so it's not new unrolling. It could be that we're now better able to analyze an unrolled loop though.
> Out of curiosity, what kind of unrolling do you see? Full, partial, max count full, or runtime?
>From the debug log, there's both full and runtime unrolling going on in this file -- but looking at the unrolling implementation, we only simplify IVs for non-complete unrolling, so this should be related to runtime unrolling.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103991/new/
https://reviews.llvm.org/D103991
More information about the llvm-commits
mailing list