This is done for consistency with other Predicate/SubtargetFeature pairs, where the second parameter of the SubtargetFeature correspond to the NAME of the def of the Predicate associated to the SubtargetFeature.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks for making this suggestion.
The suggested renaming would be consistent with those other predicates, but RV{32,64}{I,E} are different base ISAs while the other predicates refer to instruction set extensions. Because of this logical distinction IsRV32/IsRV64 make more sense to me at least.
It's a bit less clear for RVE given the way me model it within LLVM is somewhat like as if it was an instruction set extension. Though I still think I personally prefer IsRVE for that case.
Oh I see - thank you for explaining.
Would it be OK if I change the SubtargetFeature param from "HasRV32" to "IsRV32" then? (same for the 64 bit one) So that we can associate SubtargetFeature and Predicate.
I have updated the patch modifying the SubtargetFeature definition instead of the Predicate NAME.