<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/CodeGen/LiveRangeEdit.cpp, branch users/mingmingl-llvm/section-prefix</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>[RegAlloc] Fix register's live range for early-clobber (#152895)</title>
<updated>2025-08-20T01:02:59+00:00</updated>
<author>
<name>Luo, Yuanke</name>
<email>lyk_03@hotmail.com</email>
</author>
<published>2025-08-20T01:02:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ba6bb6929e7eb934f86adb1a942d2d274d18b1dd'/>
<id>ba6bb6929e7eb934f86adb1a942d2d274d18b1dd</id>
<content type='text'>
When rematerialize a virtual register the register may be early
clobbered.
However rematerializeAt(...) just return the slot index of Slot_Register
which cause mis-calculating live range for the register

---------

Co-authored-by: Yuanke Luo &lt;ykluo@birentech.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When rematerialize a virtual register the register may be early
clobbered.
However rematerializeAt(...) just return the slot index of Slot_Register
which cause mis-calculating live range for the register

---------

Co-authored-by: Yuanke Luo &lt;ykluo@birentech.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Remove parameter from LiveRangeEdit::canRematerializeAt [NFC]</title>
<updated>2025-03-14T16:12:07+00:00</updated>
<author>
<name>Philip Reames</name>
<email>preames@rivosinc.com</email>
</author>
<published>2025-03-14T16:04:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bdb4012fe3f9e30e2ea3e1d92524ad7725b2957e'/>
<id>bdb4012fe3f9e30e2ea3e1d92524ad7725b2957e</id>
<content type='text'>
Only one caller cares about the true case of this parameter, so move
the check to that single caller.  Note that RegisterCoalescer seems
like it should care, but it already duplicates the check several
lines above.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only one caller cares about the true case of this parameter, so move
the check to that single caller.  Note that RegisterCoalescer seems
like it should care, but it already duplicates the check several
lines above.
</pre>
</div>
</content>
</entry>
<entry>
<title>[aarch64][win] Update Called Globals info when updating Call Site info (#122762)</title>
<updated>2025-01-13T22:00:31+00:00</updated>
<author>
<name>Daniel Paoliello</name>
<email>danpao@microsoft.com</email>
</author>
<published>2025-01-13T22:00:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=19032bfe87fa0f4a3a7b3e68daafc93331b71e0d'/>
<id>19032bfe87fa0f4a3a7b3e68daafc93331b71e0d</id>
<content type='text'>
Fixes the "use after poison" issue introduced by #121516 (see
&lt;https://github.com/llvm/llvm-project/pull/121516#issuecomment-2585912395&gt;).

The root cause of this issue is that #121516 introduced "Called Global"
information for call instructions modeling how "Call Site" info is
stored in the machine function, HOWEVER it didn't copy the
copy/move/erase operations for call site information.

The fix is to rename and update the existing copy/move/erase functions
so they also take care of Called Global info.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes the "use after poison" issue introduced by #121516 (see
&lt;https://github.com/llvm/llvm-project/pull/121516#issuecomment-2585912395&gt;).

The root cause of this issue is that #121516 introduced "Called Global"
information for call instructions modeling how "Call Site" info is
stored in the machine function, HOWEVER it didn't copy the
copy/move/erase operations for call site information.

The fix is to rename and update the existing copy/move/erase functions
so they also take care of Called Global info.</pre>
</div>
</content>
</entry>
<entry>
<title>[LiveRangeEdit] Remove any MemoryOperand on MI when converting it to KILL. (#114407)</title>
<updated>2024-11-05T17:08:27+00:00</updated>
<author>
<name>Jonas Paulsson</name>
<email>paulson1@linux.ibm.com</email>
</author>
<published>2024-11-05T17:08:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=117e952a53ea97680293b7d8d6950090284ef198'/>
<id>117e952a53ea97680293b7d8d6950090284ef198</id>
<content type='text'>
When LiveRangeEdit::eliminateDeadDef() converts an MI to a KILL instruction,
it should also call dropMemRefs() in order to erase any MachineMemOperand
present.

This was discovered in testing as the MachineVerifier does not accept an MMO
without the corresponding MI mayLoad/mayStore flag, which the KILL opcode
lacks.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When LiveRangeEdit::eliminateDeadDef() converts an MI to a KILL instruction,
it should also call dropMemRefs() in order to erase any MachineMemOperand
present.

This was discovered in testing as the MachineVerifier does not accept an MMO
without the corresponding MI mayLoad/mayStore flag, which the KILL opcode
lacks.</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Remove AA parameter of isSafeToMove (#100691)</title>
<updated>2024-07-26T07:47:47+00:00</updated>
<author>
<name>Pengcheng Wang</name>
<email>wangpengcheng.pp@bytedance.com</email>
</author>
<published>2024-07-26T07:47:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ed4e75d5e5ada30c37c57df032378a77e6dd598e'/>
<id>ed4e75d5e5ada30c37c57df032378a77e6dd598e</id>
<content type='text'>
This `AA` parameter is not used and for most uses they just pass
a nullptr.

The use of `AA` was removed since 8d0383e.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This `AA` parameter is not used and for most uses they just pass
a nullptr.

The use of `AA` was removed since 8d0383e.</pre>
</div>
</content>
</entry>
<entry>
<title>LiveRangeEdit: Replace setIsDead with an assert (#92964)</title>
<updated>2024-05-22T15:04:17+00:00</updated>
<author>
<name>Matt Arsenault</name>
<email>Matthew.Arsenault@amd.com</email>
</author>
<published>2024-05-22T15:04:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d41dde70c44a10f9761242df73fdd288c4660c8d'/>
<id>d41dde70c44a10f9761242df73fdd288c4660c8d</id>
<content type='text'>
I noticed this was possibly buggy with implicit operands with the same
dest register, and should maybe be using addRegisterDead. However, this
is never called in a situation where the operand wasn't already marked
dead. This is eliminateDeadDef, implying the def was already known to be
dead.

Add an assert to detect inconsistencies in dead flags. This was
apparently added in 9a16d655c71826bef98b7d6e9590e4494ac0e1a9.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I noticed this was possibly buggy with implicit operands with the same
dest register, and should maybe be using addRegisterDead. However, this
is never called in a situation where the operand wasn't already marked
dead. This is eliminateDeadDef, implying the def was already known to be
dead.

Add an assert to detect inconsistencies in dead flags. This was
apparently added in 9a16d655c71826bef98b7d6e9590e4494ac0e1a9.</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Use range-based for loops (NFC)</title>
<updated>2023-12-25T06:45:50+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2023-12-25T06:45:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=41cb686d0f05d2ed35e52f8c5e498ca3dd0809c4'/>
<id>41cb686d0f05d2ed35e52f8c5e498ca3dd0809c4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>LiveRangeEdit: Clear all dead flags when rematerializing (#73933)</title>
<updated>2023-12-05T03:40:13+00:00</updated>
<author>
<name>Matt Arsenault</name>
<email>Matthew.Arsenault@amd.com</email>
</author>
<published>2023-12-05T03:40:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=74c00d432944ca4ada5f105b0d396b55f2692f05'/>
<id>74c00d432944ca4ada5f105b0d396b55f2692f05</id>
<content type='text'>
It's allowed to rematerialize instructions with implicit-defs of the
same register as the single explicit def. If this happened, it was only
clearing the dead flags on the one main result.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's allowed to rematerialize instructions with implicit-defs of the
same register as the single explicit def. If this happened, it was only
clearing the dead flags on the one main result.</pre>
</div>
</content>
</entry>
<entry>
<title>Reapply "[CodeGen]Allow targets to use target specific COPY instructions for live range splitting"</title>
<updated>2023-08-01T00:15:45+00:00</updated>
<author>
<name>Matt Arsenault</name>
<email>Matthew.Arsenault@amd.com</email>
</author>
<published>2023-07-28T17:05:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4d42e8b5d1fa87e49768d100dd1bc53515391e89'/>
<id>4d42e8b5d1fa87e49768d100dd1bc53515391e89</id>
<content type='text'>
This reverts commit a496c8be6e638ae58bb45f13113dbe3a4b7b23fd.

The workaround in c26dfc81e254c78dc23579cf3d1336f77249e1f6 should work
around the underlying problem with SUBREG_TO_REG.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit a496c8be6e638ae58bb45f13113dbe3a4b7b23fd.

The workaround in c26dfc81e254c78dc23579cf3d1336f77249e1f6 should work
around the underlying problem with SUBREG_TO_REG.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[CodeGen]Allow targets to use target specific COPY instructions for live range splitting"</title>
<updated>2023-07-27T05:13:32+00:00</updated>
<author>
<name>Vitaly Buka</name>
<email>vitalybuka@google.com</email>
</author>
<published>2023-07-26T22:41:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a496c8be6e638ae58bb45f13113dbe3a4b7b23fd'/>
<id>a496c8be6e638ae58bb45f13113dbe3a4b7b23fd</id>
<content type='text'>
And dependent commits.

Details in D150388.

This reverts commit 825b7f0ca5f2211ec3c93139f98d1e24048c225c.
This reverts commit 7a98f084c4d121244ef7286bc6503b6a181d446e.
This reverts commit b4a62b1fa546312d882fa12dfdcd015177d66826.
This reverts commit b7836d856206ec39509d42529f958c920368166b.

No conflicts in the code, few tests had conflicts in autogenerated CHECKs:
llvm/test/CodeGen/Thumb2/mve-float32regloops.ll
llvm/test/CodeGen/AMDGPU/fix-frame-reg-in-custom-csr-spills.ll

Reviewed By: alexfh

Differential Revision: https://reviews.llvm.org/D156381
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
And dependent commits.

Details in D150388.

This reverts commit 825b7f0ca5f2211ec3c93139f98d1e24048c225c.
This reverts commit 7a98f084c4d121244ef7286bc6503b6a181d446e.
This reverts commit b4a62b1fa546312d882fa12dfdcd015177d66826.
This reverts commit b7836d856206ec39509d42529f958c920368166b.

No conflicts in the code, few tests had conflicts in autogenerated CHECKs:
llvm/test/CodeGen/Thumb2/mve-float32regloops.ll
llvm/test/CodeGen/AMDGPU/fix-frame-reg-in-custom-csr-spills.ll

Reviewed By: alexfh

Differential Revision: https://reviews.llvm.org/D156381
</pre>
</div>
</content>
</entry>
</feed>
