-
Notifications
You must be signed in to change notification settings - Fork 100
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
[CIR][LowerToLLVM][CXXABI] Lower cir.va.arg #573
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, thanks for the PR, this is much needed.
You should also add LLVM checks on the relevant part of the end result, we need to make sure it's correct overall (i.e. if parts are connected right).
clang/lib/CIR/Dialect/Transforms/LoweringPrepareArm64CXXABI.cpp
Outdated
Show resolved
Hide resolved
clang/lib/CIR/Dialect/Transforms/LoweringPrepareArm64CXXABI.cpp
Outdated
Show resolved
Hide resolved
168ca49
to
0a6e761
Compare
@@ -1,4 +1,5 @@ | |||
//====- LoweringPrepareItaniumCXXABI.h - Itanium ABI specific code --------===// | |||
//====- LoweringPrepareItaniumCXXABI.cpp - Itanium ABI specific code | |||
//--------===// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ops, this should fit in 80 instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not resolved, please address this.
clang/lib/CIR/Dialect/Transforms/LoweringPrepareItaniumCXXABI.cpp
Outdated
Show resolved
Hide resolved
clang/lib/CIR/Dialect/Transforms/LoweringPrepareAArch64CXXABI.cpp
Outdated
Show resolved
Hide resolved
clang/lib/CIR/Dialect/Transforms/LoweringPrepareAArch64CXXABI.cpp
Outdated
Show resolved
Hide resolved
clang/lib/CIR/Dialect/Transforms/LoweringPrepareAArch64CXXABI.cpp
Outdated
Show resolved
Hide resolved
clang/lib/CIR/Dialect/Transforms/LoweringPrepareAArch64CXXABI.cpp
Outdated
Show resolved
Hide resolved
clang/lib/CIR/Dialect/Transforms/LoweringPrepareAArch64CXXABI.cpp
Outdated
Show resolved
Hide resolved
3adfff7
to
acede3e
Compare
@@ -1,4 +1,5 @@ | |||
//====- LoweringPrepareItaniumCXXABI.h - Itanium ABI specific code --------===// | |||
//====- LoweringPrepareItaniumCXXABI.cpp - Itanium ABI specific code | |||
//--------===// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not resolved, please address this.
clang/lib/CIR/Dialect/Transforms/LoweringPrepareItaniumCXXABI.cpp
Outdated
Show resolved
Hide resolved
clang/lib/CIR/Dialect/Transforms/LoweringPrepareItaniumCXXABI.cpp
Outdated
Show resolved
Hide resolved
clang/lib/CIR/Dialect/Transforms/LoweringPrepareAArch64CXXABI.cpp
Outdated
Show resolved
Hide resolved
clang/lib/CIR/Dialect/Transforms/LoweringPrepareAArch64CXXABI.cpp
Outdated
Show resolved
Hide resolved
clang/lib/CIR/Dialect/Transforms/LoweringPrepareItaniumCXXABI.h
Outdated
Show resolved
Hide resolved
clang/lib/CIR/Dialect/Transforms/LoweringPrepareItaniumCXXABI.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for applying the reviews, few more nits!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your patience, LGTM!
lowering var_arg op for ARM64 architecture. This is CIR lowering. This PR modified LoweringPrepare CXXABI code to make LoweringPrepareArm64CXXABI class inherit more generic LoweringPrepareItaniumCXXABI, this way lowering var_arg would be only meaningful for arm64 targets and for other arch its no op for now. The ABI doc and detailed algorithm description can be found in this official doc. [](https://github.com/ARM-software/abi-aa/blob/617079d8a0d45bec83d351974849483cf0cc66d5/aapcs64/aapcs64.rst#appendix-variable-argument-lists)
lowering var_arg op for ARM64 architecture. This is CIR lowering. This PR modified LoweringPrepare CXXABI code to make LoweringPrepareArm64CXXABI class inherit more generic LoweringPrepareItaniumCXXABI, this way lowering var_arg would be only meaningful for arm64 targets and for other arch its no op for now. The ABI doc and detailed algorithm description can be found in this official doc. [](https://github.com/ARM-software/abi-aa/blob/617079d8a0d45bec83d351974849483cf0cc66d5/aapcs64/aapcs64.rst#appendix-variable-argument-lists)
lowering var_arg op for ARM64 architecture. This is CIR lowering. This PR modified LoweringPrepare CXXABI code to make LoweringPrepareArm64CXXABI class inherit more generic LoweringPrepareItaniumCXXABI, this way lowering var_arg would be only meaningful for arm64 targets and for other arch its no op for now. The ABI doc and detailed algorithm description can be found in this official doc. [](https://github.com/ARM-software/abi-aa/blob/617079d8a0d45bec83d351974849483cf0cc66d5/aapcs64/aapcs64.rst#appendix-variable-argument-lists)
lowering var_arg op for ARM64 architecture. This is CIR lowering. This PR modified LoweringPrepare CXXABI code to make LoweringPrepareArm64CXXABI class inherit more generic LoweringPrepareItaniumCXXABI, this way lowering var_arg would be only meaningful for arm64 targets and for other arch its no op for now. The ABI doc and detailed algorithm description can be found in this official doc. [](https://github.com/ARM-software/abi-aa/blob/617079d8a0d45bec83d351974849483cf0cc66d5/aapcs64/aapcs64.rst#appendix-variable-argument-lists)
lowering var_arg op for ARM64 architecture. This is CIR lowering. This PR modified LoweringPrepare CXXABI code to make LoweringPrepareArm64CXXABI class inherit more generic LoweringPrepareItaniumCXXABI, this way lowering var_arg would be only meaningful for arm64 targets and for other arch its no op for now. The ABI doc and detailed algorithm description can be found in this official doc. [](https://github.com/ARM-software/abi-aa/blob/617079d8a0d45bec83d351974849483cf0cc66d5/aapcs64/aapcs64.rst#appendix-variable-argument-lists)
lowering var_arg op for ARM64 architecture. This is CIR lowering.
This PR modified LoweringPrepare CXXABI code to make LoweringPrepareArm64CXXABI class inherit more generic LoweringPrepareItaniumCXXABI, this way lowering var_arg would be only meaningful for arm64 targets and for other arch its no op for now.
The ABI doc and detailed algorithm description can be found in this official doc.
The following pic is a easier-to-understand and close to lowered code explanation