The backend now has a 32bit feature as part of the recent mtune
patch. We can now use that make our rv32-only builtin error checking
work the same way as rv64-only errors.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Overall LGTM.
I have one concern, though. The old error message was more user friendly. Referring to RV32 as an extension is... weird. You're already massaging the error with the OF = "RV64" / OF = "RV32". Can't you special case this feature check error handling to make it print something more like the err_32_bit_builtin_64_bit_tgt message, "this builtin is only available on 32-bit targets"? (if so, the same goes for the 64-bit case).
Also, arguably this could be two separate patches, but maybe it's not worth splitting...?
clang/lib/Sema/SemaChecking.cpp | ||
---|---|---|
4362 | That tablegen def is still being used for X86. Maybe you could make a similar patch for X86? |
clang/lib/Sema/SemaChecking.cpp | ||
---|---|---|
4362 | There's no "32bit" feature in X86.td in the backend. This was possible for RISC-V because I added "32bit" when I refactored mtune recently. |
That tablegen def is still being used for X86. Maybe you could make a similar patch for X86?