This is an archive of the discontinued LLVM Phabricator instance.

[RISCV][NFC] Use more Arrayref in TargetLowering functions.
ClosedPublic

Authored by jacquesguan on May 15 2022, 8:02 PM.

Details

Summary

This patch replaces some foreach with Arrayref, and abstract some same literal array with a variable.

Diff Detail

Event Timeline

jacquesguan created this revision.May 15 2022, 8:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 15 2022, 8:02 PM
jacquesguan requested review of this revision.May 15 2022, 8:02 PM
reames added a subscriber: reames.May 16 2022, 7:56 AM
reames added inline comments.
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
285

Er, this looks like an undesirable change. Could we add a typed overload for setOperationAction instead?

jacquesguan added inline comments.May 18 2022, 12:38 AM
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
285

Do you mean create a new function with ArrayRef<ISD::NodeType> as argument? I think this may cause ambiguous calling when we use setOperationAction with a single ISD::NodeType.

reames removed a subscriber: reames.May 31 2022, 10:47 AM
This revision is now accepted and ready to land.Jul 16 2022, 10:38 PM
This revision was landed with ongoing or failed builds.Jul 17 2022, 8:51 PM
This revision was automatically updated to reflect the committed changes.