[PATCH] D158445: [llvm][NFC] Refactor AutoUpgrade case 'n'

Nathan Sidwell via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 21 12:36:43 PDT 2023


urnathan created this revision.
urnathan added reviewers: nikic, arsenm.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
urnathan requested review of this revision.
Herald added subscribers: llvm-commits, wangpc, wdng.
Herald added a project: LLVM.

The NVPTX intrinsics are under 'n'. While that does first check for 'nvvm.', it didn't use the `consume_front` API, so fix that. Refactor the helper function to group matchers on the first component and check that first, rather than as a single monolithic list. Do similarly with the final set of intrinsics, which have a lot of commonality in the matching.
Finally reorder the argument/return type checking wrt name checking -- the former is going to be cheaper, so do that first before checking the name.


https://reviews.llvm.org/D158445

Files:
  llvm/lib/IR/AutoUpgrade.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158445.552102.patch
Type: text/x-patch
Size: 11584 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230821/0fa70c96/attachment.bin>


More information about the llvm-commits mailing list