[all-commits] [llvm/llvm-project] 4a9cde: [SimpleLoopUnswitch] Invalidate the topmost loop w...
Florian Hahn via All-commits
all-commits at lists.llvm.org
Wed Dec 4 03:32:34 PST 2019
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 4a9cde5a791cd49b96993e61d0f2401b81b6212d
https://github.com/llvm/llvm-project/commit/4a9cde5a791cd49b96993e61d0f2401b81b6212d
Author: Florian Hahn <flo at fhahn.com>
Date: 2019-12-04 (Wed, 04 Dec 2019)
Changed paths:
M llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
A llvm/test/Transforms/SimpleLoopUnswitch/preserve-scev-exiting-multiple-loops.ll
Log Message:
-----------
[SimpleLoopUnswitch] Invalidate the topmost loop with ExitBB as exiting.
SCEV caches the exiting blocks when computing exit counts. In
SimpleLoopUnswitch, we split the exit block of the loop to unswitch.
Currently we only invalidate the loop containing that exit block, but if
that block is the exiting block for a parent loop, we have stale cache
entries. We have to invalidate the top-most loop that contains the exit
block as exiting block. We might also be able to skip invalidating the
loop containing the exit block, if the exit block is not an exiting
block of that loop.
There are also 2 more places in SimpleLoopUnswitch, that use a similar
problematic approach to get the loop to invalidate. If the patch makes
sense, I will also update those places to a similar approach (they deal
with multiple exit blocks, so we cannot directly re-use
getTopMostExitingLoop).
Fixes PR43972.
Reviewers: skatkov, reames, asbirlea, chandlerc
Reviewed By: asbirlea
Differential Revision: https://reviews.llvm.org/D70786
More information about the All-commits
mailing list