3 Commits

Author SHA1 Message Date
Craig Topper
fd13cc03bd [RISCV] Use Subtarget variable instaed of TLI.getSubtarget(). NFC 2024-09-06 10:13:26 -07:00
Craig Topper
62180dfd8d
[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.
2024-09-06 09:28:33 -07:00
Craig Topper
093b8bfe6b
[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.
2024-09-05 22:29:23 -07:00