[PATCH] D94211: [NFC][PowerPC] Format and clean the logic for setOperationActions to make it easier to maintain

Qing Shan Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 6 19:17:56 PST 2021


steven.zhang created this revision.
steven.zhang added reviewers: nemanjai, jsji, PowerPC.
Herald added subscribers: shchenz, jfb, kbarton, hiraditya.
steven.zhang requested review of this revision.
Herald added a project: LLVM.

We are adding more and more operation actions for with different sub-features, and they are scatter over different places without clean logic.

  if (hasVSX())
     ...
  if (hasP9Vector())
    ...
  ...
  if (hasVSX())
   ...

This NFC patch tried to set operation actions as following order:

By default -> hasAltivec -> hasVSX -> hasP8Altivec() -> hasP8Vector() -> hasP9Altivec() -> hasP9Vector()

So that, some operation actions could be override later and we will have clean picture on the place that setOperationAction should be added.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94211

Files:
  llvm/lib/Target/PowerPC/PPCISelLowering.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94211.315037.patch
Type: text/x-patch
Size: 88421 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210107/b8ee1e9e/attachment.bin>


More information about the llvm-commits mailing list