This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Replace AddiPair ComplexPattern with a PatLeaf.
ClosedPublic

Authored by craig.topper on May 14 2021, 9:50 AM.

Details

Summary

The ComplexPattern is looking for an immediate in a certain range
that has a single use. This can be handled with a PatLeaf since
we aren't matching multiple patterns or checking any complicated
relationships between nodes.

This shrinks the isel table a little bit since tablegen no longer
has to generate patterns with commuted operands. With the PatLeaf,
tablegen can see we're matching an immediate which should always
be on the right hand side of add.

Diff Detail

Event Timeline

craig.topper created this revision.May 14 2021, 9:50 AM
craig.topper requested review of this revision.May 14 2021, 9:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 14 2021, 9:50 AM
Herald added a subscriber: MaskRay. · View Herald Transcript
benshi001 accepted this revision.May 14 2021, 6:41 PM

Thanks for improving my previous commit.

One more suggestion: How about change the title to [RISCV][NFC] Replace AddiPair ComplexPattern with a PatLeaf.

This revision is now accepted and ready to land.May 14 2021, 6:41 PM