Similar to the X86 and AMDGPU targets, this uses a macro to cut down on
repetitive and error-prone code when converting RISCVISD node names to
strings in getTargetNodeName.
Details
- Reviewers
asb - Commits
- rGfe9dc2e54a6d: [RISCV] Use a macro to simplify getTargetNodeName
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Time | Test | |
---|---|---|
350 ms | linux > HWAddressSanitizer-x86_64.TestCases::sizes.cpp |
Event Timeline
The formatting was done by clang-format and it does look a little "off". We can go against it if people like.
If anyone's concerned about merge conflicts with ongoing work, just shout. This isn't the most important thing to get in ASAP, after all.
I think moving NODE_NAME_CASE(foo) to the left so it's aligned where the case statement would be (same as the equivalent in X86ISelLowering and AMDGPUISelLowering) would be slightly better. I wouldn't be opposed to using // clang-format off to stop clang-format from reformatting (though it seems more common in LLVM right now to just ignore clang-format's preference).
But basically this looks good to me, and I leave it to your judgement if you want to further mess with the whitespace as suggested above. Thanks Fraser!
Yep okay I'll align the cases left and go with clang-format off/on even though it's rarely used in the codebase. That should help to avoid having people use clang-format and wonder what's going on or manually having to undo bits. It's meant to make developers' lives easier, after all :)