<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Target/RISCV/RISCVCallingConv.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] Provide original IR type to CC lowering (NFC) (#152709)</title>
<updated>2025-08-11T06:57:53+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-08-11T06:57:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e92b7e9641949f9d9c2ca8964c31a437272d15af'/>
<id>e92b7e9641949f9d9c2ca8964c31a437272d15af</id>
<content type='text'>
It is common to have ABI requirements for illegal types: For example,
two i64 argument parts that originally came from an fp128 argument may
have a different call ABI than ones that came from a i128 argument.

The current calling convention lowering does not provide access to this
information, so backends come up with various hacks to support it (like
additional pre-analysis cached in CCState, or bypassing the default
logic entirely).

This PR adds the original IR type to InputArg/OutputArg and passes it
down to CCAssignFn. It is not actually used anywhere yet, this just does
the mechanical changes to thread through the new argument.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is common to have ABI requirements for illegal types: For example,
two i64 argument parts that originally came from an fp128 argument may
have a different call ABI than ones that came from a i128 argument.

The current calling convention lowering does not provide access to this
information, so backends come up with various hacks to support it (like
additional pre-analysis cached in CCState, or bypassing the default
logic entirely).

This PR adds the original IR type to InputArg/OutputArg and passes it
down to CCAssignFn. It is not actually used anywhere yet, this just does
the mechanical changes to thread through the new argument.</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Move IsFixed into ArgFlags (NFCI) (#152319)</title>
<updated>2025-08-07T07:12:40+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-08-07T07:12:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=406d9b1dd6522cf18e61c4c4af66db765de8afed'/>
<id>406d9b1dd6522cf18e61c4c4af66db765de8afed</id>
<content type='text'>
The information whether a specific argument is vararg or fixed is
currently stored separately from all the other argument information in
ArgFlags. This means that it is not accessible from CCAssign, and
backends have developed all kinds of workarounds for how they can access
it after all.

Move this information to ArgFlags to make it directly available in all
relevant places.

I've opted to invert this and store it as IsVarArg, as I think that both
makes the meaning more obvious and provides for a better default (which
is IsVarArg=false).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The information whether a specific argument is vararg or fixed is
currently stored separately from all the other argument information in
ArgFlags. This means that it is not accessible from CCAssign, and
backends have developed all kinds of workarounds for how they can access
it after all.

Move this information to ArgFlags to make it directly available in all
relevant places.

I've opted to invert this and store it as IsVarArg, as I think that both
makes the meaning more obvious and provides for a better default (which
is IsVarArg=false).</pre>
</div>
</content>
</entry>
<entry>
<title>[RISCV] Guard the alternative static chain register use on ILP32E/LP64E (#142715)</title>
<updated>2025-06-11T18:24:10+00:00</updated>
<author>
<name>Jesse Huang</name>
<email>jesse.huang@sifive.com</email>
</author>
<published>2025-06-11T18:24:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=806333063ff9a09ca001dcd77d4d5d6f0b9ecd74'/>
<id>806333063ff9a09ca001dcd77d4d5d6f0b9ecd74</id>
<content type='text'>
Asserts the use of t3(x28) as the static chain register when branch control flow protection is enabled with ILP32E/LP64E, because such register is not present within the ABI.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Asserts the use of t3(x28) as the static chain register when branch control flow protection is enabled with ILP32E/LP64E, because such register is not present within the ABI.</pre>
</div>
</content>
</entry>
<entry>
<title>[RISCV] Use t3 for static chain register when branch CFI is enabled (#142344)</title>
<updated>2025-06-02T19:13:38+00:00</updated>
<author>
<name>Jesse Huang</name>
<email>jesse.huang@sifive.com</email>
</author>
<published>2025-06-02T19:13:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=890f8729a240f3e3ae5605b6d997624ad45f1ac6'/>
<id>890f8729a240f3e3ae5605b6d997624ad45f1ac6</id>
<content type='text'>
Use t3 for static chain register when branch CFI is enabled to align
with gcc.[1]

[1]
https://github.com/gcc-mirror/gcc/blob/master/gcc/config/riscv/riscv.h#L417</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use t3 for static chain register when branch CFI is enabled to align
with gcc.[1]

[1]
https://github.com/gcc-mirror/gcc/blob/master/gcc/config/riscv/riscv.h#L417</pre>
</div>
</content>
</entry>
<entry>
<title>[RISCV] Add 32 bit GPR sub-register for Zfinx. (#108336)</title>
<updated>2024-10-02T05:09:27+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2024-10-02T05:09:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bc91f3cdd57cbe4b0a456626f52960158cb3232f'/>
<id>bc91f3cdd57cbe4b0a456626f52960158cb3232f</id>
<content type='text'>
This patches adds a 32 bit register class for use with Zfinx instructions. This makes them more similar to F instructions and allows us to only spill 32 bits.
    
I've added CodeGenOnly instructions for load/store using GPRF32 as that gave better results than insert_subreg/extract_subreg.
    
Function arguments use this new GPRF32 register class for f32 arguments with Zfinx. Eliminating the need to use RISCVISD::FMV* nodes.
    
This is similar to #107446 which adds a 16 bit register class.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patches adds a 32 bit register class for use with Zfinx instructions. This makes them more similar to F instructions and allows us to only spill 32 bits.
    
I've added CodeGenOnly instructions for load/store using GPRF32 as that gave better results than insert_subreg/extract_subreg.
    
Function arguments use this new GPRF32 register class for f32 arguments with Zfinx. Eliminating the need to use RISCVISD::FMV* nodes.
    
This is similar to #107446 which adds a 16 bit register class.</pre>
</div>
</content>
</entry>
<entry>
<title>[RISCV] Add 16 bit GPR sub-register for Zhinx. (#107446)</title>
<updated>2024-09-27T05:56:12+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2024-09-27T05:56:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8a7843ca0ff56a2d5c22bc78ba16309d5af39869'/>
<id>8a7843ca0ff56a2d5c22bc78ba16309d5af39869</id>
<content type='text'>
This patches adds a 16 bit register class for use with Zhinx
instructions. This makes them more similar to Zfh instructions and
allows us to only spill 16 bits.

I've added CodeGenOnly instructions for load/store using GPRF16 as that
gave better results than insert_subreg/extract_subreg. I'm using FSGNJ
for GPRF16 copy with Zhinx as that gave better results. Zhinxmin will
use ADDI+subreg operations.

Function arguments use this new GPRF16 register class for f16 arguments
with Zhinxmin. Eliminating the need to use RISCVISD::FMV* nodes.

I plan to extend this idea to Zfinx next.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patches adds a 16 bit register class for use with Zhinx
instructions. This makes them more similar to Zfh instructions and
allows us to only spill 16 bits.

I've added CodeGenOnly instructions for load/store using GPRF16 as that
gave better results than insert_subreg/extract_subreg. I'm using FSGNJ
for GPRF16 copy with Zhinx as that gave better results. Zhinxmin will
use ADDI+subreg operations.

Function arguments use this new GPRF16 register class for f16 arguments
with Zhinxmin. Eliminating the need to use RISCVISD::FMV* nodes.

I plan to extend this idea to Zfinx next.</pre>
</div>
</content>
</entry>
<entry>
<title>[RISCV][NFC] Fix typo: ILP64E =&gt; LP64E</title>
<updated>2024-09-26T13:15:07+00:00</updated>
<author>
<name>Alex Bradbury</name>
<email>asb@igalia.com</email>
</author>
<published>2024-09-26T13:15:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a43a2981e4f041c148709496857b678b2734fa10'/>
<id>a43a2981e4f041c148709496857b678b2734fa10</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[RISCV] Use CCValAssign::getCustomReg for fixed vector arguments/returns with RVV. (#108470)</title>
<updated>2024-09-13T14:23:44+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2024-09-13T14:23:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ee4582f9c8c395b1a9d901b522510af622206049'/>
<id>ee4582f9c8c395b1a9d901b522510af622206049</id>
<content type='text'>
We need to insert a insert_subvector or extract_subvector which feels
pretty custom.

This should make it easier to support fixed vector arguments for GISel.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need to insert a insert_subvector or extract_subvector which feels
pretty custom.

This should make it easier to support fixed vector arguments for GISel.</pre>
</div>
</content>
</entry>
<entry>
<title>[RISCV] Restructure CC_RISCV_FastCC to reduce code duplication. NFC (#107671)</title>
<updated>2024-09-12T15:29:18+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2024-09-12T15:29:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=859b785bb6a1ee20ffca58102d877fc9a4a639e4'/>
<id>859b785bb6a1ee20ffca58102d877fc9a4a639e4</id>
<content type='text'>
Move GPR handling closer to the end so we can share it with the indirect
handling for vector. Use a single block for storing any type to the
stack.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move GPR handling closer to the end so we can share it with the indirect
handling for vector. Use a single block for storing any type to the
stack.</pre>
</div>
</content>
</entry>
<entry>
<title>[RISCV] Separate more of scalar FP in CC_RISCV. NFC (#107908)</title>
<updated>2024-09-10T16:29:03+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2024-09-10T16:29:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=14b43563d1618c71385f3ac15a475adf9d0ef5f9'/>
<id>14b43563d1618c71385f3ac15a475adf9d0ef5f9</id>
<content type='text'>
Scalar FP calling convention has gotten more complicated with recent
changes to Zfinx/Zdinx, proposed addition of a GPRF16 register class,
and using customReg for f16/bf16 and other FP types small than XLen.

The previous code tried to share a single getReg and getMem call for
many different cases. This patch separates all the FP register handling
to the top of the function with their own getReg calls. The only
exception is f64 with XLen==32, when we are out of FPRs or not able to
use FPRs due to ABI.

The way I've structured this, we no longer need to correct the LocVT for
FP back to ValVT before the call to getMem.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Scalar FP calling convention has gotten more complicated with recent
changes to Zfinx/Zdinx, proposed addition of a GPRF16 register class,
and using customReg for f16/bf16 and other FP types small than XLen.

The previous code tried to share a single getReg and getMem call for
many different cases. This patch separates all the FP register handling
to the top of the function with their own getReg calls. The only
exception is f64 with XLen==32, when we are out of FPRs or not able to
use FPRs due to ABI.

The way I've structured this, we no longer need to correct the LocVT for
FP back to ValVT before the call to getMem.</pre>
</div>
</content>
</entry>
</feed>
