Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init
# 137d7067 22-Jan-2025 Julian Nagele <j.nagele@apple.com>

[SCEV] Do not attempt to collect loop guards for loops without predecessor. (#123662)

Attempting to collect loop guards for loops without a predecessor can
lead to non-terminating recursion trying

[SCEV] Do not attempt to collect loop guards for loops without predecessor. (#123662)

Attempting to collect loop guards for loops without a predecessor can
lead to non-terminating recursion trying to construct a SCEV.

Fixes https://github.com/llvm/llvm-project/issues/122913.

show more ...


Revision tags: llvmorg-19.1.7
# f035351a 31-Dec-2024 Julian Nagele <j.nagele@apple.com>

[SCEV] Make sure starting block is marked as visited when recursively collecting loop guards. (#120749)

When `collectFromBlock` is called without a predecessor (in particular
for loops that don't h

[SCEV] Make sure starting block is marked as visited when recursively collecting loop guards. (#120749)

When `collectFromBlock` is called without a predecessor (in particular
for loops that don't have a unique predecessor outside the loop) we
never start climbing the predecessor chain, and thus don't mark the
starting block as visited.

Fixes https://github.com/llvm/llvm-project/issues/120615.

show more ...


# acfd26a9 20-Dec-2024 Julian Nagele <j.nagele@apple.com>

[SCEV] Fix exit condition for recursive loop guard collection (#120442)

When assumptions are present `Terms.size()` does not actually count the
number of conditions collected from dominating branch

[SCEV] Fix exit condition for recursive loop guard collection (#120442)

When assumptions are present `Terms.size()` does not actually count the
number of conditions collected from dominating branches; introduce a
separate counter.

Fixes https://github.com/llvm/llvm-project/issues/120237

show more ...


Revision tags: llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4
# 7c8e05aa 15-Nov-2024 Julian Nagele <j.nagele@apple.com>

[SCEV] Collect and merge loop guards through PHI nodes with multiple incoming values (#113915)

This patch aims to strengthen collection of loop guards by processing
PHI nodes with multiple incoming

[SCEV] Collect and merge loop guards through PHI nodes with multiple incoming values (#113915)

This patch aims to strengthen collection of loop guards by processing
PHI nodes with multiple incoming values as follows: collect guards for
all incoming values/blocks and try to merge them into a single one for
the PHI node.

The goal is to determine tighter bounds on the trip counts of scalar
tail loops after vectorization, helping to avoid unnecessary transforms.
In particular we'd like to avoid vectorizing scalar tails of
hand-vectorized loops, for example in
[Transforms/PhaseOrdering/X86/pr38280.ll](https://github.com/llvm/llvm-project/blob/231e03ba7e82896847dbc27d457dbb208f04699c/llvm/test/Transforms/PhaseOrdering/X86/pr38280.ll),
discovered via https://github.com/llvm/llvm-project/pull/108190

Compile-time impact: https://llvm-compile-time-tracker.com/compare.php?from=a55248789ed3f653740e0723d016203b9d585f26&to=500e4c46e79f60b93b11a752698c520e345948e3&stat=instructions:u

PR: https://github.com/llvm/llvm-project/pull/113915

show more ...