This is an archive of the discontinued LLVM Phabricator instance.

[RISCV][NFC] Change type of isOrdered to boolean
ClosedPublic

Authored by wangpc on Jul 26 2023, 3:17 AM.

Details

Summary

The name is isOrdered but it's a string actually, which is a bit
confusing. We change its type to bit and get the order string via
its value.

Diff Detail

Event Timeline

wangpc created this revision.Jul 26 2023, 3:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 26 2023, 3:17 AM
wangpc requested review of this revision.Jul 26 2023, 3:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 26 2023, 3:17 AM
This revision is now accepted and ready to land.Jul 26 2023, 9:21 AM
llvm/lib/Target/RISCV/RISCVInstrInfoV.td
274–277

Do we need to use an argument to accomplish selection of O and U in addition to passing isOrdered? It's a little confusing to the user of this class that they should never pass the order argument. I think it would be a better interface to use !if() twice to avoid adding complexity for users of this class. WDYT?

wangpc added inline comments.Jul 26 2023, 10:04 AM
llvm/lib/Target/RISCV/RISCVInstrInfoV.td
274–277

As what I said in description, I just use it to eliminate redundancies. But you are right, this can be confusing.
I will change it tomorrow. :-)

wangpc updated this revision to Diff 544579.Jul 26 2023, 8:06 PM

Remove argument.

wangpc edited the summary of this revision. (Show Details)Jul 26 2023, 8:06 PM
wangpc marked an inline comment as done.
This revision was landed with ongoing or failed builds.Jul 26 2023, 8:09 PM
This revision was automatically updated to reflect the committed changes.