This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Merge SExtWRemoval and StripWSuffix into a single pass.
ClosedPublic

Authored by craig.topper on Mar 29 2023, 11:27 AM.

Details

Summary

These run together in the pipeline and are the only users of
TII.hasAllWUsers. Merging them will allow us to move hasAllWUsers
back from TII.

Diff Detail

Event Timeline

craig.topper created this revision.Mar 29 2023, 11:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2023, 11:27 AM
craig.topper requested review of this revision.Mar 29 2023, 11:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2023, 11:27 AM
asb accepted this revision.Mar 29 2023, 2:01 PM

LGTM. I'd note that clang-format prefers different formatting for some of the functions here - it's probably worth reformatting while you're doing this merge into a new pass.

llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp
9–18

couple => couple of

This revision is now accepted and ready to land.Mar 29 2023, 2:01 PM

LGTM. I'd note that clang-format prefers different formatting for some of the functions here - it's probably worth reformatting while you're doing this merge into a new pass.

As a separate commit though, please, so the diffs are clearer

LGTM. I'd note that clang-format prefers different formatting for some of the functions here - it's probably worth reformatting while you're doing this merge into a new pass.

Is it just the switch statement I intentionally wrote with the lines compacted?

This revision was landed with ongoing or failed builds.Mar 29 2023, 3:17 PM
This revision was automatically updated to reflect the committed changes.
asb added a comment.Mar 29 2023, 4:16 PM

LGTM. I'd note that clang-format prefers different formatting for some of the functions here - it's probably worth reformatting while you're doing this merge into a new pass.

Is it just the switch statement I intentionally wrote with the lines compacted?

There were other instances too, but I ran it after applying D147174 so may have been from changed lines there. As for the switch - it's short enough I personally wouldn't bother opting out of clang-format's preferences, but I don't have a problem with it as is.

craig.topper added a comment.EditedMar 29 2023, 4:23 PM

LGTM. I'd note that clang-format prefers different formatting for some of the functions here - it's probably worth reformatting while you're doing this merge into a new pass.

Is it just the switch statement I intentionally wrote with the lines compacted?

There were other instances too, but I ran it after applying D147174 so may have been from changed lines there. As for the switch - it's short enough I personally wouldn't bother opting out of clang-format's preferences, but I don't have a problem with it as is.

Ok I fixed D147174 when I committed it.

For the switch I like it on one line because it makes it easy to see the correspondence between W and non-W across the line. And having the components lined up for each line.

llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp