[PATCH] D78545: [RISCV] Make CanLowerReturn protected for downstream maintenance

Jim Lin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 4 23:07:57 PDT 2020


Jim updated this revision to Diff 262007.
Jim retitled this revision from "[RISCV] Make Lower* functions public for downstream maintenance" to "[RISCV] Make CanLowerReturn protected for downstream maintenance".
Jim edited the summary of this revision.
Jim added a comment.

Only move CanLowerReturn to protected. In our case,  we need to override this function for passing special type indirectly.
And the remaining type would be handled by the function of the basic class. It would be easier to integrate with the existing code.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78545

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.h


Index: llvm/lib/Target/RISCV/RISCVISelLowering.h
===================================================================
--- llvm/lib/Target/RISCV/RISCVISelLowering.h
+++ llvm/lib/Target/RISCV/RISCVISelLowering.h
@@ -161,6 +161,12 @@
   Register getRegisterByName(const char *RegName, LLT VT,
                              const MachineFunction &MF) const override;
 
+protected:
+  bool CanLowerReturn(CallingConv::ID CallConv, MachineFunction &MF,
+                      bool IsVarArg,
+                      const SmallVectorImpl<ISD::OutputArg> &Outs,
+                      LLVMContext &Context) const override;
+
 private:
   void analyzeInputArgs(MachineFunction &MF, CCState &CCInfo,
                         const SmallVectorImpl<ISD::InputArg> &Ins,
@@ -174,10 +180,6 @@
                                const SmallVectorImpl<ISD::InputArg> &Ins,
                                const SDLoc &DL, SelectionDAG &DAG,
                                SmallVectorImpl<SDValue> &InVals) const override;
-  bool CanLowerReturn(CallingConv::ID CallConv, MachineFunction &MF,
-                      bool IsVarArg,
-                      const SmallVectorImpl<ISD::OutputArg> &Outs,
-                      LLVMContext &Context) const override;
   SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool IsVarArg,
                       const SmallVectorImpl<ISD::OutputArg> &Outs,
                       const SmallVectorImpl<SDValue> &OutVals, const SDLoc &DL,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78545.262007.patch
Type: text/x-patch
Size: 1467 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200505/ae9a6f35/attachment.bin>


More information about the llvm-commits mailing list