Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2 |
|
#
bc91f3cd |
| 02-Oct-2024 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Add 32 bit GPR sub-register for Zfinx. (#108336)
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 on
[RISCV] Add 32 bit GPR sub-register for Zfinx. (#108336)
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.
show more ...
|
Revision tags: llvmorg-19.1.1 |
|
#
8a7843ca |
| 27-Sep-2024 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Add 16 bit GPR sub-register for Zhinx. (#107446)
This patches adds a 16 bit register class for use with Zhinx
instructions. This makes them more similar to Zfh instructions and
allows us t
[RISCV] Add 16 bit GPR sub-register for Zhinx. (#107446)
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.
show more ...
|
#
a43a2981 |
| 26-Sep-2024 |
Alex Bradbury <asb@igalia.com> |
[RISCV][NFC] Fix typo: ILP64E => LP64E
|
Revision tags: llvmorg-19.1.0 |
|
#
ee4582f9 |
| 13-Sep-2024 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Use CCValAssign::getCustomReg for fixed vector arguments/returns with RVV. (#108470)
We need to insert a insert_subvector or extract_subvector which feels
pretty custom.
This should make
[RISCV] Use CCValAssign::getCustomReg for fixed vector arguments/returns with RVV. (#108470)
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.
show more ...
|
#
859b785b |
| 12-Sep-2024 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Restructure CC_RISCV_FastCC to reduce code duplication. NFC (#107671)
Move GPR handling closer to the end so we can share it with the indirect
handling for vector. Use a single block for st
[RISCV] Restructure CC_RISCV_FastCC to reduce code duplication. NFC (#107671)
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.
show more ...
|
#
14b43563 |
| 10-Sep-2024 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Separate more of scalar FP in CC_RISCV. NFC (#107908)
Scalar FP calling convention has gotten more complicated with recent
changes to Zfinx/Zdinx, proposed addition of a GPRF16 register cla
[RISCV] Separate more of scalar FP in CC_RISCV. NFC (#107908)
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.
show more ...
|
#
0e775b8c |
| 07-Sep-2024 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Move fixed vector LocVT change in CC_RISCV. NFC
We don't need to change the LocVT unless we succesfully allocated a register.
|
#
1b8e26ff |
| 07-Sep-2024 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Use RISCVSubtarget to get XLen in CC_RISCV. NFC
|
#
f93114d7 |
| 07-Sep-2024 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Use int64_t for offsets returned from CCState::AllocateStack. NFC
AllocateStack returns int64_t and CCValAssign::getMem expects an int64_t. The interfaces used unsigned prior to da42b2846c82
[RISCV] Use int64_t for offsets returned from CCState::AllocateStack. NFC
AllocateStack returns int64_t and CCValAssign::getMem expects an int64_t. The interfaces used unsigned prior to da42b2846c82063bd1bce78d6a046f78f218eb72.
Offsets for RISC-V should be positive and less than 32-bits so this shouldn't be a functional change.
show more ...
|
#
d5ef3f8c |
| 07-Sep-2024 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Support fastcc passing scalable vectors indirectly with no free GPRs. (#107623)
We can still pass indirectly by putting the pointer on the stack. This
is what we do in the normal calling co
[RISCV] Support fastcc passing scalable vectors indirectly with no free GPRs. (#107623)
We can still pass indirectly by putting the pointer on the stack. This
is what we do in the normal calling convention.
show more ...
|
#
748ae69b |
| 06-Sep-2024 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Add fastcc support for bf16 with Zfbfmin.
|
#
49660e55 |
| 06-Sep-2024 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Pass f32/f64 directly without a bitcast for Zfinx/Zdinx. (#107464)
With Zfinx/Zdinx, f32/f64 are legal types for a GPR, we don't need a
bitcast.
This avoids turning fneg/fabs into bitwis
[RISCV] Pass f32/f64 directly without a bitcast for Zfinx/Zdinx. (#107464)
With Zfinx/Zdinx, f32/f64 are legal types for a GPR, we don't need a
bitcast.
This avoids turning fneg/fabs into bitwise operations purely because of
these bitcasts. If the bitwise operations are faster for some reason on
a Zfinx CPU, then that seems like it should be done for all fneg/fabs,
not just ones near function arguments/returns.
I don't have much interest in Zfinx, this just makes the code more
similar to what I proposed for Zhinx in #107446.
show more ...
|
#
fd13cc03 |
| 06-Sep-2024 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Use Subtarget variable instaed of TLI.getSubtarget(). NFC
|
#
62180dfd |
| 06-Sep-2024 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Reduce the interface to RISCVCCAssignFn. NFC (#107503)
DataLayout, ABI, and TargetLowering can all be obtained via the
MachineFunction reference in the State object. This is how the targets
[RISCV] Reduce the interface to RISCVCCAssignFn. NFC (#107503)
DataLayout, ABI, and TargetLowering can all be obtained via the
MachineFunction reference in the State object. This is how the targets
that use TableGen for CC handlers get these objects.
This might be a little slower, but it simplies all the callers in
SelectionDAG and GlobalISel.
show more ...
|
#
093b8bfe |
| 06-Sep-2024 |
Craig Topper <craig.topper@sifive.com> |
[RISCV] Separate the calling convention handlers into their own file. NFC (#107484)
These are used by both SelectionDAG and GlobalISel and are separate from
RISCVTargetLowering.
Having a separat
[RISCV] Separate the calling convention handlers into their own file. NFC (#107484)
These are used by both SelectionDAG and GlobalISel and are separate from
RISCVTargetLowering.
Having a separate file is how other targets are structured. Though other
targets generate most of their calling convention code through tablegen.
I moved the `CC_RISV` functions from the `llvm::RISCV` namespace to
`llvm::`. That's what the tablegen code on other targets does and the
functions already have RISCV in their name. `RISCVCCAssignFn` is moved
from `RISCVTargetLowering` to the `llvm` namespace.
show more ...
|