<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Target/LoongArch, 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>[LoongArch] TableGen-erate SDNode descriptions (#168129)</title>
<updated>2025-11-20T15:29:46+00:00</updated>
<author>
<name>Sergei Barannikov</name>
<email>barannikov88@gmail.com</email>
</author>
<published>2025-11-20T15:29:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b5812c0cf789aa4cb60d42681cb2e46a417e1bc7'/>
<id>b5812c0cf789aa4cb60d42681cb2e46a417e1bc7</id>
<content type='text'>
This allows SDNodes to be validated against their expected type profiles
and reduces the number of changes required to add a new node.

I had to split `VSHUF4I` into two variants (`VSHUF4I` and `VSHUF4I_D`)
since `loongarch_vshuf4i` and `loongarch_vshuf4i_d` have different
number of operands, and this prevented the node from being imported.

There is just one node that currently fails validation, see
`LoongArchSelectionDAGInfo::verifyTargetNode()`.

Part of #119709.

Pull Request: https://github.com/llvm/llvm-project/pull/168129</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows SDNodes to be validated against their expected type profiles
and reduces the number of changes required to add a new node.

I had to split `VSHUF4I` into two variants (`VSHUF4I` and `VSHUF4I_D`)
since `loongarch_vshuf4i` and `loongarch_vshuf4i_d` have different
number of operands, and this prevented the node from being imported.

There is just one node that currently fails validation, see
`LoongArchSelectionDAGInfo::verifyTargetNode()`.

Part of #119709.

Pull Request: https://github.com/llvm/llvm-project/pull/168129</pre>
</div>
</content>
</entry>
<entry>
<title>CodeGen: Add subtarget to TargetLoweringBase constructor (#168620)</title>
<updated>2025-11-19T19:18:13+00:00</updated>
<author>
<name>Matt Arsenault</name>
<email>Matthew.Arsenault@amd.com</email>
</author>
<published>2025-11-19T19:18:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a757c4e74e6a3130c708b26903d5117a9279bef8'/>
<id>a757c4e74e6a3130c708b26903d5117a9279bef8</id>
<content type='text'>
Currently LibcallLoweringInfo is defined inside of TargetLowering,
which is owned by the subtarget. Pass in the subtarget so we can
construct LibcallLoweringInfo with the subtarget. This is a temporary
step that should be revertable in the future, after LibcallLoweringInfo
is moved out of TargetLowering.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently LibcallLoweringInfo is defined inside of TargetLowering,
which is owned by the subtarget. Pass in the subtarget so we can
construct LibcallLoweringInfo with the subtarget. This is a temporary
step that should be revertable in the future, after LibcallLoweringInfo
is moved out of TargetLowering.</pre>
</div>
</content>
</entry>
<entry>
<title>Reland "[LoongArch] Add `isSafeToMove` hook to prevent unsafe instruction motion" (#167465)</title>
<updated>2025-11-12T00:51:08+00:00</updated>
<author>
<name>hev</name>
<email>wangrui@loongson.cn</email>
</author>
<published>2025-11-12T00:51:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ea10026b64f66b3b69c0545db20f9daa8579f5cb'/>
<id>ea10026b64f66b3b69c0545db20f9daa8579f5cb</id>
<content type='text'>
This patch introduces a new virtual method
`TargetInstrInfo::isSafeToMove()` to allow backends to control whether a
machine instruction can be safely moved by optimization passes.

The `BranchFolder` pass now respects this hook when hoisting common
code. By default, all instructions are considered safe to to move.

For LoongArch, `isSafeToMove()` is overridden to prevent
relocation-related instruction sequences (e.g. PC-relative addressing
and calls) from being broken by instruction motion. Correspondingly,
`isSchedulingBoundary()` is updated to reuse this logic for consistency.

Relands #163725</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch introduces a new virtual method
`TargetInstrInfo::isSafeToMove()` to allow backends to control whether a
machine instruction can be safely moved by optimization passes.

The `BranchFolder` pass now respects this hook when hoisting common
code. By default, all instructions are considered safe to to move.

For LoongArch, `isSafeToMove()` is overridden to prevent
relocation-related instruction sequences (e.g. PC-relative addressing
and calls) from being broken by instruction motion. Correspondingly,
`isSchedulingBoundary()` is updated to reuse this logic for consistency.

Relands #163725</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[LoongArch] Add `isSafeToMove` hook to prevent unsafe instruction motion" (#167463)</title>
<updated>2025-11-11T07:24:38+00:00</updated>
<author>
<name>hev</name>
<email>wangrui@loongson.cn</email>
</author>
<published>2025-11-11T07:24:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=464cb33d1114fa3daddd26691fb0935b93b21776'/>
<id>464cb33d1114fa3daddd26691fb0935b93b21776</id>
<content type='text'>
Reverts llvm/llvm-project#163725</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#163725</pre>
</div>
</content>
</entry>
<entry>
<title>CodeGen: Remove TRI arguments from stack load/store hooks (#158240)</title>
<updated>2025-11-11T00:24:39+00:00</updated>
<author>
<name>Matt Arsenault</name>
<email>Matthew.Arsenault@amd.com</email>
</author>
<published>2025-11-11T00:24:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1f3f522866ae483836cd39c13695a0ab41b547d5'/>
<id>1f3f522866ae483836cd39c13695a0ab41b547d5</id>
<content type='text'>
This is directly available in TargetInstrInfo</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is directly available in TargetInstrInfo</pre>
</div>
</content>
</entry>
<entry>
<title>CodeGen: Remove TRI argument from getRegClass (#158225)</title>
<updated>2025-11-10T23:43:55+00:00</updated>
<author>
<name>Matt Arsenault</name>
<email>Matthew.Arsenault@amd.com</email>
</author>
<published>2025-11-10T23:43:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=55422e804b3bd2fcb1a330673af40240e359540f'/>
<id>55422e804b3bd2fcb1a330673af40240e359540f</id>
<content type='text'>
TargetInstrInfo now directly holds a reference to TargetRegisterInfo
and does not need TRI passed in anywhere.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
TargetInstrInfo now directly holds a reference to TargetRegisterInfo
and does not need TRI passed in anywhere.</pre>
</div>
</content>
</entry>
<entry>
<title>CodeGen: Keep reference to TargetRegisterInfo in TargetInstrInfo (#158224)</title>
<updated>2025-11-10T22:40:39+00:00</updated>
<author>
<name>Matt Arsenault</name>
<email>Matthew.Arsenault@amd.com</email>
</author>
<published>2025-11-10T22:40:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=11ab23c33db5c990489023c91260435db288efd8'/>
<id>11ab23c33db5c990489023c91260435db288efd8</id>
<content type='text'>
Both conceptually belong to the same subtarget, so it should not
be necessary to pass in the context TargetRegisterInfo to any
TargetInstrInfo member. Add this reference so those superfluous
arguments can be removed.

Most targets placed their TargetRegisterInfo as a member
in TargetInstrInfo. A few had this owned by the TargetSubtargetInfo,
so unify all targets to look the same.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Both conceptually belong to the same subtarget, so it should not
be necessary to pass in the context TargetRegisterInfo to any
TargetInstrInfo member. Add this reference so those superfluous
arguments can be removed.

Most targets placed their TargetRegisterInfo as a member
in TargetInstrInfo. A few had this owned by the TargetSubtargetInfo,
so unify all targets to look the same.</pre>
</div>
</content>
</entry>
<entry>
<title>[LoongArch] Initial implementation for `enableMemCmpExpansion` hook (#166526)</title>
<updated>2025-11-10T03:43:37+00:00</updated>
<author>
<name>ZhaoQi</name>
<email>zhaoqi01@loongson.cn</email>
</author>
<published>2025-11-10T03:43:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f734cebc396bfb0a3523d205071764f689432ab4'/>
<id>f734cebc396bfb0a3523d205071764f689432ab4</id>
<content type='text'>
After overriding `TargetTransformInfo::enableMemCmpExpansion` in this
commit, `MergeICmps` and `ExpandMemCmp` passes will be enabled on
LoongArch.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After overriding `TargetTransformInfo::enableMemCmpExpansion` in this
commit, `MergeICmps` and `ExpandMemCmp` passes will be enabled on
LoongArch.</pre>
</div>
</content>
</entry>
<entry>
<title>[LoongArch] Add `isSafeToMove` hook to prevent unsafe instruction motion (#163725)</title>
<updated>2025-11-07T13:01:53+00:00</updated>
<author>
<name>hev</name>
<email>wangrui@loongson.cn</email>
</author>
<published>2025-11-07T13:01:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cdc3cb20543bcb574f08ab23bffe0699f7a9cdc8'/>
<id>cdc3cb20543bcb574f08ab23bffe0699f7a9cdc8</id>
<content type='text'>
This patch introduces a new virtual method
`TargetInstrInfo::isSafeToMove()` to allow backends to control whether a
machine instruction can be safely moved by optimization passes.

The `BranchFolder` pass now respects this hook when hoisting common
code. By default, all instructions are considered safe to to move.

For LoongArch, `isSafeToMove()` is overridden to prevent
relocation-related instruction sequences (e.g. PC-relative addressing
and calls) from being broken by instruction motion. Correspondingly,
`isSchedulingBoundary()` is updated to reuse this logic for consistency.

Fixes #163681</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch introduces a new virtual method
`TargetInstrInfo::isSafeToMove()` to allow backends to control whether a
machine instruction can be safely moved by optimization passes.

The `BranchFolder` pass now respects this hook when hoisting common
code. By default, all instructions are considered safe to to move.

For LoongArch, `isSafeToMove()` is overridden to prevent
relocation-related instruction sequences (e.g. PC-relative addressing
and calls) from being broken by instruction motion. Correspondingly,
`isSchedulingBoundary()` is updated to reuse this logic for consistency.

Fixes #163681</pre>
</div>
</content>
</entry>
<entry>
<title>[LoongArch] Override hooks to enable sink-and-fold support in MachineSink (#163721)</title>
<updated>2025-11-06T06:02:55+00:00</updated>
<author>
<name>ZhaoQi</name>
<email>zhaoqi01@loongson.cn</email>
</author>
<published>2025-11-06T06:02:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=868f23f8cc1aec26c40f070d85f70ed3cb6b72cb'/>
<id>868f23f8cc1aec26c40f070d85f70ed3cb6b72cb</id>
<content type='text'>
Add option `loongarch-enable-sink-fold` to enable sink-fold and set
`true` as default. This pass can fold `addi+load/store` to a single
`load/store` with offset.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add option `loongarch-enable-sink-fold` to enable sink-fold and set
`true` as default. This pass can fold `addi+load/store` to a single
`load/store` with offset.</pre>
</div>
</content>
</entry>
</feed>
