Skip to content
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

[NVPTX][NFC] cleanup dead vars, use MAKE_CASE #81161

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

AlexMaclean
Copy link
Member

@AlexMaclean AlexMaclean commented Feb 8, 2024

Cleanup some dead variables. In addition, switch to a MAKE_CASE macro, similar to other targets, to reduce boilerplate.

@AlexMaclean
Copy link
Member Author

@Artem-B, could you please review this when you have a moment. Thanks!

Copy link
Member

@Artem-B Artem-B left a comment

Choose a reason for hiding this comment

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

Thank you for the clean-up. Few nits, but looks good otherwise.

@@ -858,623 +858,433 @@ NVPTXTargetLowering::NVPTXTargetLowering(const NVPTXTargetMachine &TM,
}

const char *NVPTXTargetLowering::getTargetNodeName(unsigned Opcode) const {

#define MAKE_CASE(V) \
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we could do it the way WebAssembly does:

WebAssemblyTargetLowering::getTargetNodeName(unsigned Opcode) const {

This approach is fine, but it's still too much of a boilerplate.

Copy link
Member Author

Choose a reason for hiding this comment

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

Interesting. Something to consider for sure.

llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp Outdated Show resolved Hide resolved
@AlexMaclean
Copy link
Member Author

@Artem-B, could you please merge this on my behalf? Thanks!

@Artem-B Artem-B merged commit 4b54b47 into llvm:main Feb 8, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants