<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/lib/Dialect/SCF/Transforms/LoopPipelining.cpp, branch main</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>[mlir][SCF] `scf.for`: Add support for unsigned integer comparison (#153379)</title>
<updated>2025-08-15T08:59:14+00:00</updated>
<author>
<name>Matthias Springer</name>
<email>me@m-sp.org</email>
</author>
<published>2025-08-15T08:59:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=21b607adbeb4326c10f899fb293d057ee1199794'/>
<id>21b607adbeb4326c10f899fb293d057ee1199794</id>
<content type='text'>
Add a new unit attribute to allow for unsigned integer comparison.

Example:
```mlir
scf.for unsigned %iv_32 = %lb_32 to %ub_32 step %step_32 : i32 {
  // body
}
```

Discussion:
https://discourse.llvm.org/t/scf-should-scf-for-support-unsigned-comparison/84655</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new unit attribute to allow for unsigned integer comparison.

Example:
```mlir
scf.for unsigned %iv_32 = %lb_32 to %ub_32 step %step_32 : i32 {
  // body
}
```

Discussion:
https://discourse.llvm.org/t/scf-should-scf-for-support-unsigned-comparison/84655</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Switch to new LDBG macro (#150616)</title>
<updated>2025-07-25T16:22:46+00:00</updated>
<author>
<name>Jacques Pienaar</name>
<email>jpienaar@google.com</email>
</author>
<published>2025-07-25T16:22:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=07967d4af854e50f94ce217788fa75c3e7e9ea86'/>
<id>07967d4af854e50f94ce217788fa75c3e7e9ea86</id>
<content type='text'>
Change local variants to use new central one.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change local variants to use new central one.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][NFC] update `mlir/Dialect` create APIs (20/n) (#149927)</title>
<updated>2025-07-24T12:09:58+00:00</updated>
<author>
<name>Maksim Levental</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2025-07-24T12:09:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=588845defd09359a8b87db339b563af848cf45a7'/>
<id>588845defd09359a8b87db339b563af848cf45a7</id>
<content type='text'>
See https://github.com/llvm/llvm-project/pull/147168 for more info.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See https://github.com/llvm/llvm-project/pull/147168 for more info.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][SCF] fix loop pipelining pass use of uninitialized value (#146991)</title>
<updated>2025-07-05T19:21:28+00:00</updated>
<author>
<name>Hu Yufan</name>
<email>58105986+Hyffer@users.noreply.github.com</email>
</author>
<published>2025-07-05T19:21:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=945ed2ed5eea4f9cde48cfa66e37839a2787205e'/>
<id>945ed2ed5eea4f9cde48cfa66e37839a2787205e</id>
<content type='text'>
fix issue https://github.com/llvm/llvm-project/issues/146990</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fix issue https://github.com/llvm/llvm-project/issues/146990</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][MLIR] Add {} for `else` when `if` body has {} (#139422)</title>
<updated>2025-05-12T17:29:03+00:00</updated>
<author>
<name>Rahul Joshi</name>
<email>rjoshi@nvidia.com</email>
</author>
<published>2025-05-12T17:29:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b17f3c63de038eac7f93f56dd099ba8995be7e55'/>
<id>b17f3c63de038eac7f93f56dd099ba8995be7e55</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Use *Set::insert_range (NFC) (#133043)</title>
<updated>2025-03-26T14:47:02+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-03-26T14:47:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1cc07a0865c1828792fbc7427d175c4ce753a27d'/>
<id>1cc07a0865c1828792fbc7427d175c4ce753a27d</id>
<content type='text'>
We can use *Set::insert_range to collapse:

  for (auto Elem : Range)
    Set.insert(E);

down to:

  Set.insert_range(Range);

In some cases, we can further fold that into the set declaration.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can use *Set::insert_range to collapse:

  for (auto Elem : Range)
    Set.insert(E);

down to:

  Set.insert_range(Range);

In some cases, we can further fold that into the set declaration.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][scf] Fix a div-by-zero bug when step of `scf.for` is zero (#131079)</title>
<updated>2025-03-20T01:23:59+00:00</updated>
<author>
<name>Longsheng Mou</name>
<email>longshengmou@gmail.com</email>
</author>
<published>2025-03-20T01:23:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ead272460004519ccbd98d08d68c70123892cd4e'/>
<id>ead272460004519ccbd98d08d68c70123892cd4e</id>
<content type='text'>
Fixes #130095.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #130095.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][SCF] Fix dynamic loop pipeline peeling for num_stages &gt; total_iters (#112418)</title>
<updated>2024-10-15T20:13:49+00:00</updated>
<author>
<name>SJW</name>
<email>48454132+sjw36@users.noreply.github.com</email>
</author>
<published>2024-10-15T20:13:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8da5aa16f65bc297663573bacd3030f975b9fcde'/>
<id>8da5aa16f65bc297663573bacd3030f975b9fcde</id>
<content type='text'>
When pipelining an `scf.for` with dynamic loop bounds, the epilogue
ramp-down must align with the prologue when num_stages &gt;
total_iterations.

For example:
```
scf.for (0..ub) {
  load(i)
  add(i)
  store(i)
}
```
When num_stages=3 the pipeline follows:
```
load(0)  -  add(0)      -  scf.for (0..ub-2)    -  store(ub-2)
            load(1)     -                       -  add(ub-1)     -  store(ub-1)

```
The trailing `store(ub-2)`, `i=ub-2`, must align with the ramp-up for
`i=0` when `ub &lt; num_stages-1`, so the index `i` should be `max(0,
ub-2)` and each subsequent index is an increment. The predicate must
also handle this scenario, so it becomes `predicate[0] =
total_iterations &gt; epilogue_stage`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When pipelining an `scf.for` with dynamic loop bounds, the epilogue
ramp-down must align with the prologue when num_stages &gt;
total_iterations.

For example:
```
scf.for (0..ub) {
  load(i)
  add(i)
  store(i)
}
```
When num_stages=3 the pipeline follows:
```
load(0)  -  add(0)      -  scf.for (0..ub-2)    -  store(ub-2)
            load(1)     -                       -  add(ub-1)     -  store(ub-1)

```
The trailing `store(ub-2)`, `i=ub-2`, must align with the ramp-up for
`i=0` when `ub &lt; num_stages-1`, so the index `i` should be `max(0,
ub-2)` and each subsequent index is an increment. The predicate must
also handle this scenario, so it becomes `predicate[0] =
total_iterations &gt; epilogue_stage`.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][scf] Fix loop iteration calculation for negative step in LoopPipelining (#110035)</title>
<updated>2024-09-25T20:32:12+00:00</updated>
<author>
<name>SJW</name>
<email>48454132+sjw36@users.noreply.github.com</email>
</author>
<published>2024-09-25T20:32:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7645d9c77d390cff68ec2d253bc5b23c37bc665f'/>
<id>7645d9c77d390cff68ec2d253bc5b23c37bc665f</id>
<content type='text'>
This fixes loop iteration count calculation if the step is
    a negative value, where we should adjust the added
    delta from `step-1` to `step+1` when doing the ceil div.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes loop iteration count calculation if the step is
    a negative value, where we should adjust the added
    delta from `step-1` to `step+1` when doing the ceil div.</pre>
</div>
</content>
</entry>
<entry>
<title>[SCF] Fixed epilogue predicates in loop pipelining (#108964)</title>
<updated>2024-09-24T05:06:19+00:00</updated>
<author>
<name>SJW</name>
<email>48454132+sjw36@users.noreply.github.com</email>
</author>
<published>2024-09-24T05:06:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fa089b014b41db4ef90378c7eae35306402cfcb3'/>
<id>fa089b014b41db4ef90378c7eae35306402cfcb3</id>
<content type='text'>
The computed loop iteration is zero based, so only check it is less than
zero. This fixes the case when lower bound is not zero.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The computed loop iteration is zero based, so only check it is less than
zero. This fixes the case when lower bound is not zero.</pre>
</div>
</content>
</entry>
</feed>
