<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Analysis/LoopAccessAnalysis.cpp, branch users/aaupov/spr/main.bolt-require-cfg-in-bat-mode</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[LAA] Rename var used to retry with RT-checks (NFC) (#147307)</title>
<updated>2025-07-22T12:36:33+00:00</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>ramkumar.ramachandra@codasip.com</email>
</author>
<published>2025-07-22T12:36:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b692b239f037ebdc5a4501884a7f57a19afa33fd'/>
<id>b692b239f037ebdc5a4501884a7f57a19afa33fd</id>
<content type='text'>
FoundNonConstantDistanceDependence is a misleading name for a variable
that determines whether we retry with runtime checks. Rename it.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
FoundNonConstantDistanceDependence is a misleading name for a variable
that determines whether we retry with runtime checks. Rename it.</pre>
</div>
</content>
</entry>
<entry>
<title>[LAA] Hoist check for SCEV-uncomputable dist (NFC) (#148841)</title>
<updated>2025-07-16T14:30:53+00:00</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>ramkumar.ramachandra@codasip.com</email>
</author>
<published>2025-07-16T14:30:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=584158f9aeac7df66ca08649b8c082883c66b360'/>
<id>584158f9aeac7df66ca08649b8c082883c66b360</id>
<content type='text'>
Hoist the check for SCEVCouldNotCompute distance into
getDependenceDistanceAndSize.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Hoist the check for SCEVCouldNotCompute distance into
getDependenceDistanceAndSize.</pre>
</div>
</content>
</entry>
<entry>
<title>Reapply "[LAA] Remove loop-invariant check added in 234cc40adc61."</title>
<updated>2025-07-14T20:21:22+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-07-14T20:21:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5a4586f468344da04c904fefbba788a854bb319e'/>
<id>5a4586f468344da04c904fefbba788a854bb319e</id>
<content type='text'>
This reverts commit d43a80936d437d217d5a6dbbaa5fb131c27e7085.

With the correctness issue blocking the recommit finally fixed
(5d01697ec6cb), again unconditionally check if accesses are completely
before or after each other.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit d43a80936d437d217d5a6dbbaa5fb131c27e7085.

With the correctness issue blocking the recommit finally fixed
(5d01697ec6cb), again unconditionally check if accesses are completely
before or after each other.
</pre>
</div>
</content>
</entry>
<entry>
<title>[LAA] Move code to check if access are completely before/after (NFC).</title>
<updated>2025-07-11T18:53:57+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-07-11T18:52:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9693056aace285c2dcf619217dd5879862c48f1b'/>
<id>9693056aace285c2dcf619217dd5879862c48f1b</id>
<content type='text'>
Factor out code to check if access are completely before/after each
other. This reduces the diff for an upcoming re-commit and moving to a
function also helps to reduce the nesting level via early exits.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Factor out code to check if access are completely before/after each
other. This reduces the diff for an upcoming re-commit and moving to a
function also helps to reduce the nesting level via early exits.
</pre>
</div>
</content>
</entry>
<entry>
<title>[LAA] Strip outdated comment in isDependent (NFC) (#146367)</title>
<updated>2025-07-07T12:54:37+00:00</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>ramkumar.ramachandra@codasip.com</email>
</author>
<published>2025-07-07T12:54:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=20864c4379f31844eae7da1179b78d48ad0ae487'/>
<id>20864c4379f31844eae7da1179b78d48ad0ae487</id>
<content type='text'>
The comment has been outdated since 87ddd3a1 ([LAA] Rename and fix
semantics of MaxSafeDepDistBytes to MinDepDistBytes).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The comment has been outdated since 87ddd3a1 ([LAA] Rename and fix
semantics of MaxSafeDepDistBytes to MinDepDistBytes).</pre>
</div>
</content>
</entry>
<entry>
<title>[LAA] Hoist setting condition for RT-checks (#128045)</title>
<updated>2025-07-07T11:02:41+00:00</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>ramkumar.ramachandra@codasip.com</email>
</author>
<published>2025-07-07T11:02:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fb845f93c003e6696d4741f4825541a2c0867c42'/>
<id>fb845f93c003e6696d4741f4825541a2c0867c42</id>
<content type='text'>
Strip ShouldRetyWithRuntimeCheck from the
DepedenceDistanceStrideAndSizeInfo struct, and free isDependent from the
responsibility of setting the condition for when runtime-checks are
needed, transferring this responsibility to
getDependenceDistanceStrideAndSize.

We can have multiple DepType::Unknown dependences that, by themselves,
do not trigger the retrying with runtime memory checks, and therefore
block vectorization. But once a single
FoundNonConstantDistanceDependence is found, the analysis seems to
switch to the "LAA: Retrying with memory checks" path and allows all
these dependences to be handled via runtime checks. There is hence no
rationale for predicating FoundNonConstantDependenceDistance on
DepType::Unknown, and removing this predication is one of the
side-effects of this patch.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Strip ShouldRetyWithRuntimeCheck from the
DepedenceDistanceStrideAndSizeInfo struct, and free isDependent from the
responsibility of setting the condition for when runtime-checks are
needed, transferring this responsibility to
getDependenceDistanceStrideAndSize.

We can have multiple DepType::Unknown dependences that, by themselves,
do not trigger the retrying with runtime memory checks, and therefore
block vectorization. But once a single
FoundNonConstantDistanceDependence is found, the analysis seems to
switch to the "LAA: Retrying with memory checks" path and allows all
these dependences to be handled via runtime checks. There is hence no
rationale for predicating FoundNonConstantDependenceDistance on
DepType::Unknown, and removing this predication is one of the
side-effects of this patch.</pre>
</div>
</content>
</entry>
<entry>
<title>[LAA] Clean up APInt-overflow related code (#140048)</title>
<updated>2025-06-30T13:48:56+00:00</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>ramkumar.ramachandra@codasip.com</email>
</author>
<published>2025-06-30T13:48:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=619f7afd716c520e9ab98e1cca30f75dafe40655'/>
<id>619f7afd716c520e9ab98e1cca30f75dafe40655</id>
<content type='text'>
Co-authored-by: Florian Hahn &lt;flo@fhahn.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Florian Hahn &lt;flo@fhahn.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[LAA] Address follow-up suggestions for #128061.</title>
<updated>2025-06-24T11:00:17+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-06-24T11:00:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b8769104f1ef7c040b6733e736f550eea0d97442'/>
<id>b8769104f1ef7c040b6733e736f550eea0d97442</id>
<content type='text'>
Adjust naming and add argument comments as suggested.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adjust naming and add argument comments as suggested.
</pre>
</div>
</content>
</entry>
<entry>
<title>[LAA] Be more careful when evaluating AddRecs at symbolic max BTC. (#128061)</title>
<updated>2025-06-23T19:23:40+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-06-23T19:23:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5d01697ec6cb5bf836faa35353d23ba6dd572042'/>
<id>5d01697ec6cb5bf836faa35353d23ba6dd572042</id>
<content type='text'>
Evaluating AR at the symbolic max BTC may wrap and create an expression
that is less than the start of the AddRec due to wrapping (for example
consider MaxBTC = -2).

If that's the case, set ScEnd to -(EltSize + 1). ScEnd will get
incremented by EltSize before returning, so this effectively sets ScEnd
to unsigned max. Note that LAA separately checks that accesses cannot
not wrap (52ded672492,
https://github.com/llvm/llvm-project/pull/127543), so unsigned max
represents an upper bound.

When there is a computable backedge-taken count, we are guaranteed to
execute the number of iterations, and if any pointer would wrap it would
be UB (or the access will never be executed, so cannot alias). It
includes new tests from the previous discussion that show a case we wrap
with a BTC, but it is UB due to the pointer after the object wrapping
(in `evaluate-at-backedge-taken-count-wrapping.ll`)

When we have only a maximum backedge taken count, we instead try to use
dereferenceability information to determine if the pointer access must be in
bounds for the maximum backedge taken count.

PR: https://github.com/llvm/llvm-project/pull/128061</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Evaluating AR at the symbolic max BTC may wrap and create an expression
that is less than the start of the AddRec due to wrapping (for example
consider MaxBTC = -2).

If that's the case, set ScEnd to -(EltSize + 1). ScEnd will get
incremented by EltSize before returning, so this effectively sets ScEnd
to unsigned max. Note that LAA separately checks that accesses cannot
not wrap (52ded672492,
https://github.com/llvm/llvm-project/pull/127543), so unsigned max
represents an upper bound.

When there is a computable backedge-taken count, we are guaranteed to
execute the number of iterations, and if any pointer would wrap it would
be UB (or the access will never be executed, so cannot alias). It
includes new tests from the previous discussion that show a case we wrap
with a BTC, but it is UB due to the pointer after the object wrapping
(in `evaluate-at-backedge-taken-count-wrapping.ll`)

When we have only a maximum backedge taken count, we instead try to use
dereferenceability information to determine if the pointer access must be in
bounds for the maximum backedge taken count.

PR: https://github.com/llvm/llvm-project/pull/128061</pre>
</div>
</content>
</entry>
<entry>
<title>[LV] Stengthen loop-invariance checks in isPredicatedInst (#140744)</title>
<updated>2025-06-20T13:01:48+00:00</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>ramkumar.ramachandra@codasip.com</email>
</author>
<published>2025-06-20T13:01:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c8c4bd1ebc6e4451dc835a77bacdbe6a0467f219'/>
<id>c8c4bd1ebc6e4451dc835a77bacdbe6a0467f219</id>
<content type='text'>
Check loop-invariance against SCEV as well.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Check loop-invariance against SCEV as well.</pre>
</div>
</content>
</entry>
</feed>
