[PATCH] D137612: [PowerPC] add a new subtarget feature CheapMFLR

Roland Froese via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 8 12:48:24 PST 2022


RolandF added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPC.td:320
+def FeatureCheapMFLR :
+  SubtargetFeature<"cheap-MFLR", "CheapMFLR", "true", "Enable cheap MFLR">;
+
----------------
I would suggest fast-MFLR rather than cheap-MFLR, and for the description I would suggest "MFLR is a fast instruction"


================
Comment at: llvm/lib/Target/PowerPC/PPCSubtarget.h:442
+  bool isCheapMFLR() const {
+    return CheapMFLR;
+  }
----------------
As this function has only a return, it can be a one line function and be put with the other one line functions.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137612/new/

https://reviews.llvm.org/D137612



More information about the llvm-commits mailing list