From 8f2b4f1f9eaca4e4c7afaf7a3225557f53bb0f73 Mon Sep 17 00:00:00 2001 From: Manman Ren Date: Wed, 16 Dec 2015 20:45:48 +0000 Subject: [PATCH] CXX_FAST_TLS calling convention: target independent portion. Update supportSplitCSR's interface to take machine function instead of the calling convention. Review comments for http://reviews.llvm.org/D15341 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255818 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/TargetLowering.h | 4 ++-- lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index a105917958d..a30b060622a 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -2264,8 +2264,8 @@ public: } /// Return true if the target supports that a subset of CSRs for the given - /// calling convention is handled explicitly via copies. - virtual bool supportSplitCSR(CallingConv::ID CC) const { + /// machine function is handled explicitly via copies. + virtual bool supportSplitCSR(MachineFunction *MF) const { return false; } diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 5f3e4a02341..853a21a15eb 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -470,9 +470,9 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) { FuncInfo->SplitCSR = false; SmallVector Returns; - // We split CSR if the target supports it for the given calling convention + // We split CSR if the target supports it for the given function // and the function has only return exits. - if (TLI->supportSplitCSR(Fn.getCallingConv())) { + if (TLI->supportSplitCSR(MF)) { FuncInfo->SplitCSR = true; // Collect all the return blocks. -- 2.34.1