CXX_FAST_TLS calling convention: target independent portion.
authorManman Ren <manman.ren@gmail.com>
Wed, 16 Dec 2015 20:45:48 +0000 (20:45 +0000)
committerManman Ren <manman.ren@gmail.com>
Wed, 16 Dec 2015 20:45:48 +0000 (20:45 +0000)
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
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

index a105917..a30b060 100644 (file)
@@ -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;
   }
 
index 5f3e4a0..853a21a 100644 (file)
@@ -470,9 +470,9 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
   FuncInfo->SplitCSR = false;
   SmallVector<MachineBasicBlock*, 4> 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.