<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Transforms/Utils/LoopUtils.cpp, branch users/meinersbur/flang_runtime_split-headers</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>[LoopVectorize] Vectorize select-cmp reduction pattern for increasing integer induction variable (#67812)</title>
<updated>2024-12-12T08:48:31+00:00</updated>
<author>
<name>Mel Chen</name>
<email>mel.chen@sifive.com</email>
</author>
<published>2024-12-12T08:48:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b3cba9be41bfa89bc0ec212706c6028a901e127a'/>
<id>b3cba9be41bfa89bc0ec212706c6028a901e127a</id>
<content type='text'>
Consider the following loop:
```
  int rdx = init;
  for (int i = 0; i &lt; n; ++i)
    rdx = (a[i] &gt; b[i]) ? i : rdx;
```
We can vectorize this loop if `i` is an increasing induction variable.
The final reduced value will be the maximum of `i` that the condition
`a[i] &gt; b[i]` is satisfied, or the start value `init`.

This patch added new RecurKind enums - IFindLastIV and FFindLastIV.

---------

Co-authored-by: Alexey Bataev &lt;5361294+alexey-bataev@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Consider the following loop:
```
  int rdx = init;
  for (int i = 0; i &lt; n; ++i)
    rdx = (a[i] &gt; b[i]) ? i : rdx;
```
We can vectorize this loop if `i` is an increasing induction variable.
The final reduced value will be the maximum of `i` that the condition
`a[i] &gt; b[i]` is satisfied, or the start value `init`.

This patch added new RecurKind enums - IFindLastIV and FFindLastIV.

---------

Co-authored-by: Alexey Bataev &lt;5361294+alexey-bataev@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[LICM] Use DomTreeUpdater version of SplitBlockPredecessors, nfc (#107190)</title>
<updated>2024-09-30T04:28:45+00:00</updated>
<author>
<name>Joshua Cao</name>
<email>cao.joshua@yahoo.com</email>
</author>
<published>2024-09-30T04:28:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0bc98349c84130babb6a4acf2951a0ccc84f574f'/>
<id>0bc98349c84130babb6a4acf2951a0ccc84f574f</id>
<content type='text'>
The DominatorTree version is marked for deprecation, so we use the
DomTreeUpdater version. We also update sinkRegion() to iterate over
basic blocks instead of DomTreeNodes. The loop body calls
SplitBlockPredecessors. The DTU version calls
DomTreeUpdater::apply_updates(), which may call DominatorTree::reset().
This invalidates the worklist of DomTreeNodes to iterate over.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The DominatorTree version is marked for deprecation, so we use the
DomTreeUpdater version. We also update sinkRegion() to iterate over
basic blocks instead of DomTreeNodes. The loop body calls
SplitBlockPredecessors. The DTU version calls
DomTreeUpdater::apply_updates(), which may call DominatorTree::reset().
This invalidates the worklist of DomTreeNodes to iterate over.</pre>
</div>
</content>
</entry>
<entry>
<title>Consolidate all IR logic for getting the identity value of a reduction [nfc]</title>
<updated>2024-09-04T15:23:21+00:00</updated>
<author>
<name>Philip Reames</name>
<email>preames@rivosinc.com</email>
</author>
<published>2024-08-31T00:13:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3d9abfc9f841b13825e3d03cfba272f5eeab9a3b'/>
<id>3d9abfc9f841b13825e3d03cfba272f5eeab9a3b</id>
<content type='text'>
This change merges the three different places (at the IR layer) for
finding the identity value of a reduction into a single copy.  This
depends on several prior commits which fix ommissions and bugs in
the distinct copies, but this patch itself should be fully
non-functional.

As the new comments and naming try to make clear, the identity value
is a property of the @llvm.vector.reduce.* intrinsic, not of e.g.
the recurrence descriptor.  (We still provide an interface for
clients using recurrence descriptors, but the implementation simply
translates to the intrinsic which each corresponds to.)

As a note, the getIntrinsicIdentity API does not support fminnum/fmaxnum
or fminimum/fmaximum which is why we still need manual logic (but at
least only one copy of manual logic) for those cases.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change merges the three different places (at the IR layer) for
finding the identity value of a reduction into a single copy.  This
depends on several prior commits which fix ommissions and bugs in
the distinct copies, but this patch itself should be fully
non-functional.

As the new comments and naming try to make clear, the identity value
is a property of the @llvm.vector.reduce.* intrinsic, not of e.g.
the recurrence descriptor.  (We still provide an interface for
clients using recurrence descriptors, but the implementation simply
translates to the intrinsic which each corresponds to.)

As a note, the getIntrinsicIdentity API does not support fminnum/fmaxnum
or fminimum/fmaximum which is why we still need manual logic (but at
least only one copy of manual logic) for those cases.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove "Target" from createXReduction naming [nfc]</title>
<updated>2024-09-04T00:03:55+00:00</updated>
<author>
<name>Philip Reames</name>
<email>preames@rivosinc.com</email>
</author>
<published>2024-09-03T23:49:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3e8840ba71bfcceeb598c2ca28d2d8784e24ba1e'/>
<id>3e8840ba71bfcceeb598c2ca28d2d8784e24ba1e</id>
<content type='text'>
Despite the stale comments, none of these actually use TTI, and they're
solely generating standard LLVM IR.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Despite the stale comments, none of these actually use TTI, and they're
solely generating standard LLVM IR.
</pre>
</div>
</content>
</entry>
<entry>
<title>Prefer use of 0.0 over -0.0 for fadd reductions w/nsz (in IR) (#106770)</title>
<updated>2024-09-03T16:16:37+00:00</updated>
<author>
<name>Philip Reames</name>
<email>preames@rivosinc.com</email>
</author>
<published>2024-09-03T16:16:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2c7786e94a1058bd4f96794a1d4f70dcb86e5cc5'/>
<id>2c7786e94a1058bd4f96794a1d4f70dcb86e5cc5</id>
<content type='text'>
This is a follow up to 924907bc6, and is mostly motivated by consistency
but does include one additional optimization. In general, we prefer 0.0
over -0.0 as the identity value for an fadd. We use that value in
several places, but don't in others. So, let's be consistent and use the
same identity (when nsz allows) everywhere.

This creates a bunch of test churn, but due to 924907bc6, most of that
churn doesn't actually indicate a change in codegen. The exception is
that this change enables the use of 0.0 for nsz, but *not* reasoc, fadd
reductions. Or said differently, it allows the neutral value of an
ordered fadd reduction to be 0.0.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a follow up to 924907bc6, and is mostly motivated by consistency
but does include one additional optimization. In general, we prefer 0.0
over -0.0 as the identity value for an fadd. We use that value in
several places, but don't in others. So, let's be consistent and use the
same identity (when nsz allows) everywhere.

This creates a bunch of test churn, but due to 924907bc6, most of that
churn doesn't actually indicate a change in codegen. The exception is
that this change enables the use of 0.0 for nsz, but *not* reasoc, fadd
reductions. Or said differently, it allows the neutral value of an
ordered fadd reduction to be 0.0.</pre>
</div>
</content>
</entry>
<entry>
<title>Reuse getBinOpIdentity in createAnyOfTargetReduction [nfc]</title>
<updated>2024-08-30T18:57:24+00:00</updated>
<author>
<name>Philip Reames</name>
<email>preames@rivosinc.com</email>
</author>
<published>2024-08-30T18:55:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=897b00f3c563dd3f7b8f7263c41eaebb3520ec86'/>
<id>897b00f3c563dd3f7b8f7263c41eaebb3520ec86</id>
<content type='text'>
Consolidating code so that we have one copy instead of multiple reasoning
about identity element.  Note that we're (deliberately) not passing
the FMF flags to common utility to preserve behavior in this change.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Consolidating code so that we have one copy instead of multiple reasoning
about identity element.  Note that we're (deliberately) not passing
the FMF flags to common utility to preserve behavior in this change.
</pre>
</div>
</content>
</entry>
<entry>
<title>Restructure createSimpleTargetReduction to match VP path [NFC]</title>
<updated>2024-08-30T16:46:59+00:00</updated>
<author>
<name>Philip Reames</name>
<email>preames@rivosinc.com</email>
</author>
<published>2024-08-30T16:43:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5b3ba438dfa7815bb0f3be07a300866085a431b9'/>
<id>5b3ba438dfa7815bb0f3be07a300866085a431b9</id>
<content type='text'>
Reduces code significantly, but more importantly makes it obvious that
this variant matches the VP variant just below.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reduces code significantly, but more importantly makes it obvious that
this variant matches the VP variant just below.
</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Make InstSimplifyFolder constructor explicit (NFC) (#101654)</title>
<updated>2024-08-02T13:45:50+00:00</updated>
<author>
<name>Sergei Barannikov</name>
<email>barannikov88@gmail.com</email>
</author>
<published>2024-08-02T13:45:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4e93b16f3fce467b2bbda4e5fd8b15fcad2bea93'/>
<id>4e93b16f3fce467b2bbda4e5fd8b15fcad2bea93</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[VP] Refactor VectorBuilder to avoid layering violation. NFC (#99276)</title>
<updated>2024-07-25T07:14:39+00:00</updated>
<author>
<name>Mel Chen</name>
<email>mel.chen@sifive.com</email>
</author>
<published>2024-07-25T07:14:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6d12b3f67df429bffff6e1953d9f55867d7e2469'/>
<id>6d12b3f67df429bffff6e1953d9f55867d7e2469</id>
<content type='text'>
This patch refactors the handling of reduction to eliminate layering
violations.

* Introduced `getReductionIntrinsicID` in LoopUtils.h for mapping
recurrence kinds to llvm.vector.reduce.* intrinsic IDs.
* Updated `VectorBuilder::createSimpleTargetReduction` to accept
llvm.vector.reduce.* intrinsic directly.
* New function `VPIntrinsic::getForIntrinsic` for mapping intrinsic ID
to the same functional VP intrinsic ID.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch refactors the handling of reduction to eliminate layering
violations.

* Introduced `getReductionIntrinsicID` in LoopUtils.h for mapping
recurrence kinds to llvm.vector.reduce.* intrinsic IDs.
* Updated `VectorBuilder::createSimpleTargetReduction` to accept
llvm.vector.reduce.* intrinsic directly.
* New function `VPIntrinsic::getForIntrinsic` for mapping intrinsic ID
to the same functional VP intrinsic ID.</pre>
</div>
</content>
</entry>
<entry>
<title>[TTI][WebAssembly] Pairwise reduction expansion (#93948)</title>
<updated>2024-07-17T08:21:52+00:00</updated>
<author>
<name>Sam Parker</name>
<email>sam.parker@arm.com</email>
</author>
<published>2024-07-17T08:21:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d28ed29d6bd9f0389092775406fff7e6205d4d5f'/>
<id>d28ed29d6bd9f0389092775406fff7e6205d4d5f</id>
<content type='text'>
WebAssembly doesn't support horizontal operations nor does it have a way
of expressing fast-math or reassoc flags, so runtimes are currently
unable to use pairwise operations when generating code from the existing
shuffle patterns.

This patch allows the backend to select which, arbitary, shuffle pattern
to be used per reduction intrinsic. The default behaviour is the same as
the existing, which is by splitting the vector into a top and bottom
half. The other pattern introduced is for a pairwise shuffle.

WebAssembly enables pairwise reductions for int/fp add/sub.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
WebAssembly doesn't support horizontal operations nor does it have a way
of expressing fast-math or reassoc flags, so runtimes are currently
unable to use pairwise operations when generating code from the existing
shuffle patterns.

This patch allows the backend to select which, arbitary, shuffle pattern
to be used per reduction intrinsic. The default behaviour is the same as
the existing, which is by splitting the vector into a top and bottom
half. The other pattern introduced is for a pairwise shuffle.

WebAssembly enables pairwise reductions for int/fp add/sub.</pre>
</div>
</content>
</entry>
</feed>
