Skip to content

[RISCV] Add documentation in the LangRef on GHC CC #72762

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 9, 2024

Conversation

boomanaiden154
Copy link
Contributor

The GHC CC got added to RISCV in a8dc211 but it never got documented in the LangRef. This adds documentation in the LangRef noting that RISCV is supports the GHC calling convention and notes the specific limitations of the GHC CC on RISCV.

@boomanaiden154
Copy link
Contributor Author

This is complementary to #72760.

@llvmbot
Copy link
Member

llvmbot commented Nov 18, 2023

@llvm/pr-subscribers-llvm-ir

Author: Aiden Grossman (boomanaiden154)

Changes

The GHC CC got added to RISCV in a8dc211 but it never got documented in the LangRef. This adds documentation in the LangRef noting that RISCV is supports the GHC calling convention and notes the specific limitations of the GHC CC on RISCV.


Full diff: https://github.com/llvm/llvm-project/pull/72762.diff

1 Files Affected:

  • (modified) llvm/docs/LangRef.rst (+5-2)
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index bc1eab1e0b7a07f..7ba1a1a53d67e25 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -317,13 +317,16 @@ added in the future:
     not be used lightly but only for specific situations such as an
     alternative to the *register pinning* performance technique often
     used when implementing functional programming languages. At the
-    moment only X86 supports this convention and it has the following
-    limitations:
+    moment only X86 and RISCV support this convention. They have the
+    following limitations:
 
     -  On *X86-32* only supports up to 4 bit type parameters. No
        floating-point types are supported.
     -  On *X86-64* only supports up to 10 bit type parameters and 6
        floating-point parameters.
+    -  *RISCV64* only supports up to 11 bit type parameters and 4
+       32-bit floating-point parameters and 4 64-bit floating-point
+       parameters.
 
     This calling convention supports `tail call
     optimization <CodeGenerator.html#tail-call-optimization>`_ but requires

@boomanaiden154
Copy link
Contributor Author

Bump on this when reviewers have a chance. Thanks!

The GHC CC got added to RISCV in a8dc211
but it never got documented in the LangRef. This adds documentation in
the LangRef noting that RISCV is supports the GHC calling convention and
notes the specific limitations of the GHC CC on RISCV.
@boomanaiden154
Copy link
Contributor Author

Bump on this when reviewers have a chance. Thanks!

1 similar comment
@boomanaiden154
Copy link
Contributor Author

Bump on this when reviewers have a chance. Thanks!

Copy link
Contributor

@asb asb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If someone else had a chance to re-check the RISC-V specific limitations that would be great, but LGTM from what I can see.

@boomanaiden154
Copy link
Contributor Author

Thanks for the review! I'll wait a couple days to see if anyone else has comments and then I'll land it at that point.

@boomanaiden154 boomanaiden154 merged commit cf6e9c4 into llvm:main Jan 9, 2024
justinfargnoli pushed a commit to justinfargnoli/llvm-project that referenced this pull request Jan 28, 2024
The GHC CC got added to RISCV in
a8dc211 but it never got documented in
the LangRef. This adds documentation in the LangRef noting that RISCV is
supports the GHC calling convention and notes the specific limitations
of the GHC CC on RISCV.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants