<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp, branch users/chapuni/cov/single/loop</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>[LoadStoreVectorizer] Postprocess and merge equivalence classes (#121861)</title>
<updated>2025-01-08T01:17:26+00:00</updated>
<author>
<name>Vyacheslav Klochkov</name>
<email>vyacheslav.n.klochkov@intel.com</email>
</author>
<published>2025-01-08T01:17:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9184c42869b87a59839cafdb8a3679e7ec2faeb1'/>
<id>9184c42869b87a59839cafdb8a3679e7ec2faeb1</id>
<content type='text'>
This patch introduces a new method:

void Vectorizer::mergeEquivalenceClasses(EquivalenceClassMap &amp;EQClasses)
const;

The method is called at the end of
Vectorizer::collectEquivalenceClasses() and is needed to merge
equivalence classes that differ only by their underlying objects (UO1
and UO2), where UO1 is 1-level-indirection underlying base for UO2. This
situation arises due to the limited lookup depth used during the search
of underlying bases with llvm::getUnderlyingObject(ptr).

Using any fixed lookup depth can result into creation of multiple
equivalence classes that only differ by 1-level indirection bases.

The new approach merges equivalence classes if they have adjacent bases
(1-level indirection). If a series of equivalence classes form ladder
formed of 1-step/level indirections, they are all merged into a single
equivalence class. This provides more opportunities for the load-store
vectorizer to generate better vectors.

---------

Signed-off-by: Klochkov, Vyacheslav N &lt;vyacheslav.n.klochkov@intel.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch introduces a new method:

void Vectorizer::mergeEquivalenceClasses(EquivalenceClassMap &amp;EQClasses)
const;

The method is called at the end of
Vectorizer::collectEquivalenceClasses() and is needed to merge
equivalence classes that differ only by their underlying objects (UO1
and UO2), where UO1 is 1-level-indirection underlying base for UO2. This
situation arises due to the limited lookup depth used during the search
of underlying bases with llvm::getUnderlyingObject(ptr).

Using any fixed lookup depth can result into creation of multiple
equivalence classes that only differ by 1-level indirection bases.

The new approach merges equivalence classes if they have adjacent bases
(1-level indirection). If a series of equivalence classes form ladder
formed of 1-step/level indirections, they are all merged into a single
equivalence class. This provides more opportunities for the load-store
vectorizer to generate better vectors.

---------

Signed-off-by: Klochkov, Vyacheslav N &lt;vyacheslav.n.klochkov@intel.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[LoadStoreVectorizer] Postprocess and merge equivalence classes" (#119657)</title>
<updated>2024-12-12T04:36:23+00:00</updated>
<author>
<name>Michal Paszkowski</name>
<email>michal@paszkowski.org</email>
</author>
<published>2024-12-12T04:36:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=04313b86a52541b2a618d14f7fa1f23ea7adfa47'/>
<id>04313b86a52541b2a618d14f7fa1f23ea7adfa47</id>
<content type='text'>
Reverts llvm/llvm-project#114501, due to the following failure:
https://lab.llvm.org/buildbot/#/builders/55/builds/4171</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#114501, due to the following failure:
https://lab.llvm.org/buildbot/#/builders/55/builds/4171</pre>
</div>
</content>
</entry>
<entry>
<title>[LoadStoreVectorizer] Postprocess and merge equivalence classes (#114501)</title>
<updated>2024-12-12T03:01:35+00:00</updated>
<author>
<name>Vyacheslav Klochkov</name>
<email>vyacheslav.n.klochkov@intel.com</email>
</author>
<published>2024-12-12T03:01:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fd2f8d485df7742320317b14d49b9d808f70625c'/>
<id>fd2f8d485df7742320317b14d49b9d808f70625c</id>
<content type='text'>
This patch introduces a new method:
void Vectorizer::mergeEquivalenceClasses(EquivalenceClassMap &amp;EQClasses)
const

The method is called at the end of
Vectorizer::collectEquivalenceClasses() and is needed to merge
equivalence classes that differ only by their underlying objects (UO1
and UO2), where UO1 is 1-level-indirection underlying base for UO2. This
situation arises due to the limited lookup depth used during the search
of underlying bases with llvm::getUnderlyingObject(ptr).

Using any fixed lookup depth can result into creation of multiple
equivalence classes that only differ by 1-level indirection bases.

The new approach merges equivalence classes if they have adjacent bases
(1-level indirection). If a series of equivalence classes form ladder
formed of 1-step/level indirections, they are all merged into a single
equivalence class. This provides more opportunities for the load-store
vectorizer to generate better vectors.

---------

Signed-off-by: Klochkov, Vyacheslav N &lt;vyacheslav.n.klochkov@intel.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch introduces a new method:
void Vectorizer::mergeEquivalenceClasses(EquivalenceClassMap &amp;EQClasses)
const

The method is called at the end of
Vectorizer::collectEquivalenceClasses() and is needed to merge
equivalence classes that differ only by their underlying objects (UO1
and UO2), where UO1 is 1-level-indirection underlying base for UO2. This
situation arises due to the limited lookup depth used during the search
of underlying bases with llvm::getUnderlyingObject(ptr).

Using any fixed lookup depth can result into creation of multiple
equivalence classes that only differ by 1-level indirection bases.

The new approach merges equivalence classes if they have adjacent bases
(1-level indirection). If a series of equivalence classes form ladder
formed of 1-step/level indirections, they are all merged into a single
equivalence class. This provides more opportunities for the load-store
vectorizer to generate better vectors.

---------

Signed-off-by: Klochkov, Vyacheslav N &lt;vyacheslav.n.klochkov@intel.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "LSV: forbid load-cycles when vectorizing; fix bug (#104815)" (#106245)</title>
<updated>2024-08-27T16:45:22+00:00</updated>
<author>
<name>Danial Klimkin</name>
<email>dklimkin@google.com</email>
</author>
<published>2024-08-27T16:45:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9671ed1afcd1e3aab754a9b905d511ffd52f3624'/>
<id>9671ed1afcd1e3aab754a9b905d511ffd52f3624</id>
<content type='text'>
This reverts commit c46b41aaa6eaa787f808738d14c61a2f8b6d839f.

Multiple tests time out, either due to performance hit (see comment) or
a cycle.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit c46b41aaa6eaa787f808738d14c61a2f8b6d839f.

Multiple tests time out, either due to performance hit (see comment) or
a cycle.</pre>
</div>
</content>
</entry>
<entry>
<title>LSV: forbid load-cycles when vectorizing; fix bug (#104815)</title>
<updated>2024-08-22T10:37:19+00:00</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>ramkumar.ramachandra@codasip.com</email>
</author>
<published>2024-08-22T10:37:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c46b41aaa6eaa787f808738d14c61a2f8b6d839f'/>
<id>c46b41aaa6eaa787f808738d14c61a2f8b6d839f</id>
<content type='text'>
Forbid load-load cycles which would crash LoadStoreVectorizer when
reordering instructions.

Fixes #37865.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Forbid load-load cycles which would crash LoadStoreVectorizer when
reordering instructions.

Fixes #37865.</pre>
</div>
</content>
</entry>
<entry>
<title>LSV: fix style after cursory reading (NFC) (#104793)</title>
<updated>2024-08-19T18:55:58+00:00</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>ramkumar.ramachandra@codasip.com</email>
</author>
<published>2024-08-19T18:55:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=92a8ec7abbd853e89556c7b942f30054273af9c6'/>
<id>92a8ec7abbd853e89556c7b942f30054273af9c6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>LSV: document hang reported in #37865 (#102479)</title>
<updated>2024-08-09T10:34:09+00:00</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>ramkumar.ramachandra@codasip.com</email>
</author>
<published>2024-08-09T10:34:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=199d6f2c0c5a7ceffe00036ae34e8a0f638e8a53'/>
<id>199d6f2c0c5a7ceffe00036ae34e8a0f638e8a53</id>
<content type='text'>
LoadStoreVectorizer hangs on certain examples, when its reorder function
goes into a cycle. Detect this cycle and explicitly forbid it, using an
assert, and document the resulting crash in a test-case under AArch64.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LoadStoreVectorizer hangs on certain examples, when its reorder function
goes into a cycle. Detect this cycle and explicitly forbid it, using an
assert, and document the resulting crash in a test-case under AArch64.</pre>
</div>
</content>
</entry>
<entry>
<title>[IR] Add getDataLayout() helpers to Function and GlobalValue (#96919)</title>
<updated>2024-06-28T06:36:49+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2024-06-28T06:36:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9df71d7673b5c98e1032d01be83724a45b42fafc'/>
<id>9df71d7673b5c98e1032d01be83724a45b42fafc</id>
<content type='text'>
Similar to https://github.com/llvm/llvm-project/pull/96902, this adds
`getDataLayout()` helpers to Function and GlobalValue, replacing the
current `getParent()-&gt;getDataLayout()` pattern.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Similar to https://github.com/llvm/llvm-project/pull/96902, this adds
`getDataLayout()` helpers to Function and GlobalValue, replacing the
current `getParent()-&gt;getDataLayout()` pattern.</pre>
</div>
</content>
</entry>
<entry>
<title>Add llvm::min/max_element and use it in llvm/ and mlir/ directories. (#84678)</title>
<updated>2024-03-11T03:00:13+00:00</updated>
<author>
<name>Justin Lebar</name>
<email>justin.lebar@gmail.com</email>
</author>
<published>2024-03-11T03:00:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fab2bb8bfda865bd438dee981d7be7df8017b76d'/>
<id>fab2bb8bfda865bd438dee981d7be7df8017b76d</id>
<content type='text'>
For some reason this was missing from STLExtras.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For some reason this was missing from STLExtras.</pre>
</div>
</content>
</entry>
<entry>
<title>[IR] Fix GEP offset computations for vector GEPs (#75448)</title>
<updated>2024-01-04T09:08:21+00:00</updated>
<author>
<name>Jannik Silvanus</name>
<email>37809848+jasilvanus@users.noreply.github.com</email>
</author>
<published>2024-01-04T09:08:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7954c57124b495fbdc73674d71f2e366e4afe522'/>
<id>7954c57124b495fbdc73674d71f2e366e4afe522</id>
<content type='text'>
Vectors are always bit-packed and don't respect the elements' alignment
requirements. This is different from arrays. This means offsets of
vector GEPs need to be computed differently than offsets of array GEPs.

This PR fixes many places that rely on an incorrect pattern
that always relies on `DL.getTypeAllocSize(GTI.getIndexedType())`.
We replace these by usages of  `GTI.getSequentialElementStride(DL)`, 
which is a new helper function added in this PR.

This changes behavior for GEPs into vectors with element types for which
the (bit) size and alloc size is different. This includes two cases:

* Types with a bit size that is not a multiple of a byte, e.g. i1.
GEPs into such vectors are questionable to begin with, as some elements
  are not even addressable.
* Overaligned types, e.g. i16 with 32-bit alignment.

Existing tests are unaffected, but a miscompilation of a new test is fixed.

---------

Co-authored-by: Nikita Popov &lt;github@npopov.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Vectors are always bit-packed and don't respect the elements' alignment
requirements. This is different from arrays. This means offsets of
vector GEPs need to be computed differently than offsets of array GEPs.

This PR fixes many places that rely on an incorrect pattern
that always relies on `DL.getTypeAllocSize(GTI.getIndexedType())`.
We replace these by usages of  `GTI.getSequentialElementStride(DL)`, 
which is a new helper function added in this PR.

This changes behavior for GEPs into vectors with element types for which
the (bit) size and alloc size is different. This includes two cases:

* Types with a bit size that is not a multiple of a byte, e.g. i1.
GEPs into such vectors are questionable to begin with, as some elements
  are not even addressable.
* Overaligned types, e.g. i16 with 32-bit alignment.

Existing tests are unaffected, but a miscompilation of a new test is fixed.

---------

Co-authored-by: Nikita Popov &lt;github@npopov.com&gt;</pre>
</div>
</content>
</entry>
</feed>
