<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/CodeGen/RegisterPressure.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>[NFC] Simplify checks using isDebugOrPseudoInstr API (#145127)</title>
<updated>2025-10-11T02:30:22+00:00</updated>
<author>
<name>Lei Wang</name>
<email>wlei@fb.com</email>
</author>
<published>2025-10-11T02:30:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8a598f1044040ac07d098bec66100f9928c5cbdd'/>
<id>8a598f1044040ac07d098bec66100f9928c5cbdd</id>
<content type='text'>
Merge the two checks using the existing API, NFC.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Merge the two checks using the existing API, NFC.</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Remove an unnecessary cast (NFC) (#152643)</title>
<updated>2025-08-08T14:44:51+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-08-08T14:44:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9beb18a6f07f0e97b791c64a0dd730a99d382c8c'/>
<id>9beb18a6f07f0e97b791c64a0dd730a99d382c8c</id>
<content type='text'>
getUnitInc() already returns int.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
getUnitInc() already returns int.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[CodeGen] Remove static member function Register::isVirtualRegister. NFC (#127968)"</title>
<updated>2025-02-20T22:06:21+00:00</updated>
<author>
<name>Christopher Di Bella</name>
<email>cjdb@google.com</email>
</author>
<published>2025-02-20T22:02:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=08c69b2ef6eeba19956ad24fb7e9d29e9778cbaa'/>
<id>08c69b2ef6eeba19956ad24fb7e9d29e9778cbaa</id>
<content type='text'>
This reverts commit ff99af7ea03b3be46bec7203bd2b74048d29a52a.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit ff99af7ea03b3be46bec7203bd2b74048d29a52a.
</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Remove static member function Register::isVirtualRegister. NFC (#127968)</title>
<updated>2025-02-20T16:35:50+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2025-02-20T16:35:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ff99af7ea03b3be46bec7203bd2b74048d29a52a'/>
<id>ff99af7ea03b3be46bec7203bd2b74048d29a52a</id>
<content type='text'>
Use nonstatic member instead. This requires explicit conversions, but
many will go away as we continue converting unsigned to Register.

In a few places where it was simple, I changed unsigned to Register.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use nonstatic member instead. This requires explicit conversions, but
many will go away as we continue converting unsigned to Register.

In a few places where it was simple, I changed unsigned to Register.</pre>
</div>
</content>
</entry>
<entry>
<title>[MISched] Small debug improvements (#125072)</title>
<updated>2025-02-05T09:14:51+00:00</updated>
<author>
<name>Cullen Rhodes</name>
<email>cullen.rhodes@arm.com</email>
</author>
<published>2025-02-05T09:14:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1cf909208e509aedbd63edb5af0b96f85d5ae28b'/>
<id>1cf909208e509aedbd63edb5af0b96f85d5ae28b</id>
<content type='text'>
Changes:
1. Fix inconsistencies in register pressure set printing. "Max Pressure"
   printing is inconsistent with "Bottom Pressure" and "Top Pressure".
   For the former, register class begins on the same line vs newline for
   latter. Also for the former, the first register class is on the same
   line, but subsequent register classes are newline separated. That's
   removed so all are on the same line.

   Before:
     Max Pressure: FPR8=1
     GPR32=14
     Top Pressure:
     GPR32=2
     Bottom Pressure:
     FPR8=7
     GPR32=17

   After:
     Max Pressure: FPR8=1 GPR32=14
     Top Pressure: GPR32=2
     Bottom Pressure: FPR8=7 GPR32=17

2. After scheduling an instruction, don't print pressure diff if there
   isn't one. Also s/UpdateRegP/UpdateRegPressure. E.g.,

   Before:
     UpdateRegP: SU(3) %0:gpr64common = ADDXrr %58:gpr64common, gpr64
                 to
     UpdateRegP: SU(4) %393:gpr64sp = ADDXri %58:gpr64common, 390, 12
                 to GPR32 -1

   After:
     UpdateRegPressure: SU(4) %393:gpr64sp = ADDXri %58:gpr64common, 12
                        to GPR32 -1
3. Don't print excess pressure sets if there are none.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Changes:
1. Fix inconsistencies in register pressure set printing. "Max Pressure"
   printing is inconsistent with "Bottom Pressure" and "Top Pressure".
   For the former, register class begins on the same line vs newline for
   latter. Also for the former, the first register class is on the same
   line, but subsequent register classes are newline separated. That's
   removed so all are on the same line.

   Before:
     Max Pressure: FPR8=1
     GPR32=14
     Top Pressure:
     GPR32=2
     Bottom Pressure:
     FPR8=7
     GPR32=17

   After:
     Max Pressure: FPR8=1 GPR32=14
     Top Pressure: GPR32=2
     Bottom Pressure: FPR8=7 GPR32=17

2. After scheduling an instruction, don't print pressure diff if there
   isn't one. Also s/UpdateRegP/UpdateRegPressure. E.g.,

   Before:
     UpdateRegP: SU(3) %0:gpr64common = ADDXrr %58:gpr64common, gpr64
                 to
     UpdateRegP: SU(4) %393:gpr64sp = ADDXri %58:gpr64common, 390, 12
                 to GPR32 -1

   After:
     UpdateRegPressure: SU(4) %393:gpr64sp = ADDXri %58:gpr64common, 12
                        to GPR32 -1
3. Don't print excess pressure sets if there are none.</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Rename RegisterMaskPair to VRegMaskOrUnit. NFC (#123799)</title>
<updated>2025-01-22T17:11:22+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2025-01-22T17:11:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9e6494c0fb29dfb5d4d2b7bf3ed7af261efee034'/>
<id>9e6494c0fb29dfb5d4d2b7bf3ed7af261efee034</id>
<content type='text'>
This holds a physical register unit or virtual register and mask.

While I was here I've used emplace_back and removed an unneeded use of a
template.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This holds a physical register unit or virtual register and mask.

While I was here I've used emplace_back and removed an unneeded use of a
template.</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Remove unused includes (NFC) (#115996)</title>
<updated>2024-11-13T07:15:06+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-11-13T07:15:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=735ab61ac828bd61398e6847d60e308fdf2b54ec'/>
<id>735ab61ac828bd61398e6847d60e308fdf2b54ec</id>
<content type='text'>
Identified with misc-include-cleaner.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Identified with misc-include-cleaner.</pre>
</div>
</content>
</entry>
<entry>
<title>[RegisterPressure] NFC: Clean up RP handling for instructions with overlapping Def/Use (#109875)</title>
<updated>2024-10-01T15:09:59+00:00</updated>
<author>
<name>Jeffrey Byrnes</name>
<email>jeffrey.byrnes@amd.com</email>
</author>
<published>2024-10-01T15:09:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cd40070bfc77ab2641e69d3e749206ee5c5bbb42'/>
<id>cd40070bfc77ab2641e69d3e749206ee5c5bbb42</id>
<content type='text'>
The current RP handling for uses of an MI that overlap with defs is
confusing and unnecessary. Moreover, the lane masks do not accurately
model the liveness behavior of the subregs. This cleans things up a bit
and more accurately models subreg lane liveness by sinking the use
handling into subsent Uses loop.

The effect of this PR is to replace

A. `increaseRegPressure(Reg, LiveAfter, ~LiveAfter &amp; LiveBefore)`

with 

B. `increaseRegPressure(Reg, LiveAfter, LiveBefore)`

Note that A (Defs loop) and B (Uses loop) have different definitions of
LiveBefore

A. `LiveBefore = (LiveAfter &amp; ~DefLanes) | UseLanes`

and 

B. `LiveBefore =  LiveAfter | UseLanes`

Also note, `increaseRegPressure` will exit if `PrevMask` (`LiveAfter`
for both A/B) has any active lanes, thus these calls will only have an
effect if `LiveAfter` is 0.


A. NewMask = ~LiveAfter &amp; ((LiveAfter &amp; ~DefLanes) | UseLanes) =&gt; (1 &amp;
UseLanes) =&gt; UseLanes = (0 | UseLanes) =&gt; (LiveAfter | UseLanes) =
NewMask B.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current RP handling for uses of an MI that overlap with defs is
confusing and unnecessary. Moreover, the lane masks do not accurately
model the liveness behavior of the subregs. This cleans things up a bit
and more accurately models subreg lane liveness by sinking the use
handling into subsent Uses loop.

The effect of this PR is to replace

A. `increaseRegPressure(Reg, LiveAfter, ~LiveAfter &amp; LiveBefore)`

with 

B. `increaseRegPressure(Reg, LiveAfter, LiveBefore)`

Note that A (Defs loop) and B (Uses loop) have different definitions of
LiveBefore

A. `LiveBefore = (LiveAfter &amp; ~DefLanes) | UseLanes`

and 

B. `LiveBefore =  LiveAfter | UseLanes`

Also note, `increaseRegPressure` will exit if `PrevMask` (`LiveAfter`
for both A/B) has any active lanes, thus these calls will only have an
effect if `LiveAfter` is 0.


A. NewMask = ~LiveAfter &amp; ((LiveAfter &amp; ~DefLanes) | UseLanes) =&gt; (1 &amp;
UseLanes) =&gt; UseLanes = (0 | UseLanes) =&gt; (LiveAfter | UseLanes) =
NewMask B.</pre>
</div>
</content>
</entry>
<entry>
<title>RegPressure: Fix incorrect comment. NFC (#95896)</title>
<updated>2024-06-18T09:22:06+00:00</updated>
<author>
<name>csstormq</name>
<email>swust_xiaoqiangxu@163.com</email>
</author>
<published>2024-06-18T09:22:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7ea203b7d91b8533059e43f8eec18e2b47da28f1'/>
<id>7ea203b7d91b8533059e43f8eec18e2b47da28f1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
