This is an archive of the discontinued LLVM Phabricator instance.

[RISCV][GlobalISel] Select add i32, i32
AbandonedPublic

Authored by StephenFan on Nov 22 2020, 6:34 AM.

Details

Summary

Support the global instruction selection of add i32, i32.
This patch is minimal support. And this patch referenced ARM and AArch64's GlobalISel implementation.
I use the tablegen to generate the CCAssignFn. And the generated function just support the current requirement of
select add i32, i32. The reason for using the generated function is the globalisel infrastructure handleAssignments function
needs the CCAssignFn as one of the parameters. However, The RISCV backend handwriting the CC_RISCV function to deal
with calling conventions. But this function was not matched the CCAssignFn format. So I have to use the tablegen to generate the CCAssignFn.

Diff Detail

Event Timeline

StephenFan created this revision.Nov 22 2020, 6:34 AM
StephenFan requested review of this revision.Nov 22 2020, 6:34 AM
StephenFan edited the summary of this revision. (Show Details)Nov 22 2020, 6:46 AM
jrtc27 requested changes to this revision.Nov 22 2020, 7:23 AM
jrtc27 added inline comments.
llvm/lib/Target/RISCV/RISCVCallingConv.td
66–79

RISC-V calling conventions are implemented in C++ and that was a deliberate choice. Please do not duplicate what is already there (which is a huge nuisance for downstream forks like ours) and instead reuse the perfectly-good well-tested CC_RISCV that already exists. Also TableGen calling conventions are far too opaque to have any hope of actually convincing yourself they're correct in all the subtle edge-cases, whereas imperative code is clear and unambiguous.

This revision now requires changes to proceed.Nov 22 2020, 7:23 AM

There's already a series of patches to add more GlobalISel support for RISCV. For example, https://reviews.llvm.org/D76445. The others can be found in the stack of patches attached to that one.

There's already a series of patches to add more GlobalISel support for RISCV. For example, https://reviews.llvm.org/D76445. The others can be found in the stack of patches attached to that one.

I noticed that these patches have been silent for several months, how can I promote this?

There's already a series of patches to add more GlobalISel support for RISCV. For example, https://reviews.llvm.org/D76445. The others can be found in the stack of patches attached to that one.

I noticed that these patches have been silent for several months, how can I promote this?

I've not been able to work on those patches for some time but if someone might commandeer them to rebase them and work on top of them I think that would be a good starting point and I would happily take a look at the changes. Otherwise I may get some time to update them myself within a month or two.

There's already a series of patches to add more GlobalISel support for RISCV. For example, https://reviews.llvm.org/D76445. The others can be found in the stack of patches attached to that one.

I noticed that these patches have been silent for several months, how can I promote this?

I've not been able to work on those patches for some time but if someone might commandeer them to rebase them and work on top of them I think that would be a good starting point and I would happily take a look at the changes. Otherwise I may get some time to update them myself within a month or two.

Thank you. I am very willing to work based on your patches. And I will start to do recently!

lenary resigned from this revision.Jan 14 2021, 11:39 AM
StephenFan abandoned this revision.Jan 25 2022, 10:17 PM