<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/CodeGen/MachineScheduler.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>[CodeGen] Use VirtRegOrUnit where appropriate (NFCI) (#167730)</title>
<updated>2025-11-13T10:26:58+00:00</updated>
<author>
<name>Sergei Barannikov</name>
<email>barannikov88@gmail.com</email>
</author>
<published>2025-11-13T10:26:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ef9a02ce028782684f9a43dcda756804635ba86a'/>
<id>ef9a02ce028782684f9a43dcda756804635ba86a</id>
<content type='text'>
Use it in `printVRegOrUnit()`, `getPressureSets()`/`PSetIterator`,
and in functions/classes dealing with register pressure.

Static type checking revealed several bugs, mainly in MachinePipeliner.
I'm not very familiar with this pass, so I left a bunch of FIXMEs.

There is one bug in `findUseBetween()` in RegisterPressure.cpp, also
annotated with a FIXME.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use it in `printVRegOrUnit()`, `getPressureSets()`/`PSetIterator`,
and in functions/classes dealing with register pressure.

Static type checking revealed several bugs, mainly in MachinePipeliner.
I'm not very familiar with this pass, so I left a bunch of FIXMEs.

There is one bug in `findUseBetween()` in RegisterPressure.cpp, also
annotated with a FIXME.</pre>
</div>
</content>
</entry>
<entry>
<title>[MISched][NFC] Rename isUnbufferedGroup to isReservedGroup (#166439)</title>
<updated>2025-11-05T00:21:37+00:00</updated>
<author>
<name>Min-Yih Hsu</name>
<email>min.hsu@sifive.com</email>
</author>
<published>2025-11-05T00:21:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6d4e75cc931a82108526dafb645f68494eb45973'/>
<id>6d4e75cc931a82108526dafb645f68494eb45973</id>
<content type='text'>
In both ScheduleDAGInstrs and MachineScheduler, we call `BufferSize = 0`
as _reserved_ and `BufferSize = 1` as _unbuffered_. This convention is
stem from the fact that we set `SUnit::hasReservedResource` to true when
any of the SUnit's consumed resources has BufferSize equal to zero; set
`SUnit::isUnbuffered` to true when any of its consumed resources has
BufferSize equal to one.

However, `SchedBoundary::isUnbufferedGroup` doesn't really follow this
convention: it returns true when the resource in question is a
`ProcResGroup` and its BufferSize equals to **zero** rather than one.
This could be really confusing for the reader. This patch renames this
function to `isReservedGroup` in aligned with the convention mentioned
above.

NFC.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In both ScheduleDAGInstrs and MachineScheduler, we call `BufferSize = 0`
as _reserved_ and `BufferSize = 1` as _unbuffered_. This convention is
stem from the fact that we set `SUnit::hasReservedResource` to true when
any of the SUnit's consumed resources has BufferSize equal to zero; set
`SUnit::isUnbuffered` to true when any of its consumed resources has
BufferSize equal to one.

However, `SchedBoundary::isUnbufferedGroup` doesn't really follow this
convention: it returns true when the resource in question is a
`ProcResGroup` and its BufferSize equals to **zero** rather than one.
This could be really confusing for the reader. This patch renames this
function to `isReservedGroup` in aligned with the convention mentioned
above.

NFC.</pre>
</div>
</content>
</entry>
<entry>
<title>[Analysis, CodeGen] Use "= default" (NFC) (#166024)</title>
<updated>2025-11-02T06:20:11+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-11-02T06:20:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b82bde695e96a56a472b1bb60e3593a4064c60cc'/>
<id>b82bde695e96a56a472b1bb60e3593a4064c60cc</id>
<content type='text'>
Identified with modernize-use-equals-default.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Identified with modernize-use-equals-default.</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][LLVM][CodeGen] Namespace related cleanups (#162999)</title>
<updated>2025-10-13T14:54:50+00:00</updated>
<author>
<name>Rahul Joshi</name>
<email>rjoshi@nvidia.com</email>
</author>
<published>2025-10-13T14:54:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2a4f5b2751efbddd7bfe9818ab9ea57d03a13752'/>
<id>2a4f5b2751efbddd7bfe9818ab9ea57d03a13752</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[MachineScheduler] Convert some of the debug prints into using LDBG. NFC (#161997)"</title>
<updated>2025-10-05T07:04:27+00:00</updated>
<author>
<name>Timm Bäder</name>
<email>tbaeder@redhat.com</email>
</author>
<published>2025-10-05T07:04:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5284c83a8ff143b2d93853d1209f06d7d571f865'/>
<id>5284c83a8ff143b2d93853d1209f06d7d571f865</id>
<content type='text'>
This reverts commit a7414796c0854a9e6f649d922a58aa63147ae2e4.

This breaks builds:
 3355 |            &lt;&lt; SchedModel-&gt;getResourceName(CurrZone.getZoneCritResIdx()) &lt;&lt; "\n";
      |               ~~~~~~~~~~  ^
/home/buildbot/workspace/bolt-aarch64-ubuntu-clang/llvm-project/llvm/lib/CodeGen/MachineScheduler.cpp:3358:51: error: no member named 'getResourceName' in 'llvm::TargetSchedModel'
 3358 |     LDBG() &lt;&lt; "  RemainingLimit: " &lt;&lt; SchedModel-&gt;getResourceName(OtherCritIdx)
      |                                       ~~~~~~~~~~  ^
2 errors generated.

E.g. https://lab.llvm.org/buildbot/#/builders/128/builds/7522
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit a7414796c0854a9e6f649d922a58aa63147ae2e4.

This breaks builds:
 3355 |            &lt;&lt; SchedModel-&gt;getResourceName(CurrZone.getZoneCritResIdx()) &lt;&lt; "\n";
      |               ~~~~~~~~~~  ^
/home/buildbot/workspace/bolt-aarch64-ubuntu-clang/llvm-project/llvm/lib/CodeGen/MachineScheduler.cpp:3358:51: error: no member named 'getResourceName' in 'llvm::TargetSchedModel'
 3358 |     LDBG() &lt;&lt; "  RemainingLimit: " &lt;&lt; SchedModel-&gt;getResourceName(OtherCritIdx)
      |                                       ~~~~~~~~~~  ^
2 errors generated.

E.g. https://lab.llvm.org/buildbot/#/builders/128/builds/7522
</pre>
</div>
</content>
</entry>
<entry>
<title>[MachineScheduler] Convert some of the debug prints into using LDBG. NFC (#161997)</title>
<updated>2025-10-05T06:19:20+00:00</updated>
<author>
<name>Min-Yih Hsu</name>
<email>min.hsu@sifive.com</email>
</author>
<published>2025-10-05T06:19:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a7414796c0854a9e6f649d922a58aa63147ae2e4'/>
<id>a7414796c0854a9e6f649d922a58aa63147ae2e4</id>
<content type='text'>
These lines are heavily skewed and hard to read. Using the new LDBG
there instead.

NFC.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These lines are heavily skewed and hard to read. Using the new LDBG
there instead.

NFC.</pre>
</div>
</content>
</entry>
<entry>
<title>[MachineScheduler] Turn SU-&gt;isScheduled check into an assert in pickNode() (#160145)</title>
<updated>2025-09-24T08:28:35+00:00</updated>
<author>
<name>Jonas Paulsson</name>
<email>paulson1@linux.ibm.com</email>
</author>
<published>2025-09-24T08:28:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=eaff28c93e95a101d02292acdfac3e1f78719677'/>
<id>eaff28c93e95a101d02292acdfac3e1f78719677</id>
<content type='text'>
It is unnecessary and confusing to have a do/while loop that checks
SU-&gt;isScheduled as this should never be true.

ScheduleDAGMI::updateQueues() is always called after pickNode() and it
sets isScheduled on the SU. Turn this into an assertion instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is unnecessary and confusing to have a do/while loop that checks
SU-&gt;isScheduled as this should never be true.

ScheduleDAGMI::updateQueues() is always called after pickNode() and it
sets isScheduled on the SU. Turn this into an assertion instead.
</pre>
</div>
</content>
</entry>
<entry>
<title>[MachineScheduler] Make cluster check more efficient (#150884)</title>
<updated>2025-08-01T08:00:42+00:00</updated>
<author>
<name>Ruiling, Song</name>
<email>ruiling.song@amd.com</email>
</author>
<published>2025-08-01T08:00:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=451912a24a6040798eba752b69ec92c448bffbcf'/>
<id>451912a24a6040798eba752b69ec92c448bffbcf</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[MISched] Use SchedRegion in overrideSchedPolicy and overridePostRASchedPolicy (#149297)</title>
<updated>2025-07-22T07:55:12+00:00</updated>
<author>
<name>Harrison Hao</name>
<email>57025411+harrisonGPU@users.noreply.github.com</email>
</author>
<published>2025-07-22T07:55:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8c14d3f44f51be053e91612f4ad2d77bf04b6b3a'/>
<id>8c14d3f44f51be053e91612f4ad2d77bf04b6b3a</id>
<content type='text'>
This patch updates `overrideSchedPolicy` and `overridePostRASchedPolicy`
to take a
`SchedRegion` parameter instead of just `NumRegionInstrs`. This provides
access to both the
instruction range and the parent `MachineBasicBlock`, which enables
looking up function-level
attributes.

With this change, targets can select post-RA scheduling direction per
function using a function
attribute. For example:

```cpp
void overridePostRASchedPolicy(MachineSchedPolicy &amp;Policy,
                               const SchedRegion &amp;Region) const {
  const Function &amp;F = Region.RegionBegin-&gt;getMF()-&gt;getFunction();
  Attribute Attr = F.getFnAttribute("amdgpu-post-ra-direction");
  ...
}</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch updates `overrideSchedPolicy` and `overridePostRASchedPolicy`
to take a
`SchedRegion` parameter instead of just `NumRegionInstrs`. This provides
access to both the
instruction range and the parent `MachineBasicBlock`, which enables
looking up function-level
attributes.

With this change, targets can select post-RA scheduling direction per
function using a function
attribute. For example:

```cpp
void overridePostRASchedPolicy(MachineSchedPolicy &amp;Policy,
                               const SchedRegion &amp;Region) const {
  const Function &amp;F = Region.RegionBegin-&gt;getMF()-&gt;getFunction();
  Attribute Attr = F.getFnAttribute("amdgpu-post-ra-direction");
  ...
}</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Use std::tie to implement a comparison functor (NFC) (#146252)</title>
<updated>2025-06-29T15:25:53+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-06-29T15:25:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=43ab5bb92115c8fd02e5da030a13b4ae1f83cb0a'/>
<id>43ab5bb92115c8fd02e5da030a13b4ae1f83cb0a</id>
<content type='text'>
std::tie clearly expresses the intent while slightly shortening the
code.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
std::tie clearly expresses the intent while slightly shortening the
code.</pre>
</div>
</content>
</entry>
</feed>
