[llvm-commits] [126994] Do not apply inreg attribute to static chain.

dpatel at apple.com dpatel at apple.com
Mon May 7 15:27:34 PDT 2007


Revision: 126994
Author:   dpatel
Date:     2007-05-07 15:27:34 -0700 (Mon, 07 May 2007)

Log Message:
-----------
Do not apply inreg attribute to static chain.
Patch by Duncan Sands.

Modified Paths:
--------------
    apple-local/branches/llvm/gcc/llvm-types.cpp

Modified: apple-local/branches/llvm/gcc/llvm-types.cpp
===================================================================
--- apple-local/branches/llvm/gcc/llvm-types.cpp	2007-05-07 22:23:43 UTC (rev 126993)
+++ apple-local/branches/llvm/gcc/llvm-types.cpp	2007-05-07 22:27:34 UTC (rev 126994)
@@ -752,17 +752,7 @@
   for (; Args && TREE_TYPE(Args) != void_type_node; Args = TREE_CHAIN(Args))
     ABIConverter.HandleArgument(TREE_TYPE(Args));
 
-  ParamAttrsList *PAL = 0;
-
-  if (static_chain) {
-    // Pass the static chain in a register.
-    ParamAttrsVector Attrs;
-    ParamAttrsWithIndex PAWI; PAWI.index = 1; PAWI.attrs = ParamAttr::InReg;
-    Attrs.push_back(PAWI);
-    PAL = ParamAttrsList::get(Attrs);
-  }
-
-  return FunctionType::get(RetTy, ArgTys, false, PAL);
+  return FunctionType::get(RetTy, ArgTys, false, 0);
 }
 
 const FunctionType *TypeConverter::ConvertFunctionType(tree type,
@@ -843,12 +833,6 @@
   LLVM_TARGET_INIT_REGPARM(lparam, type);
 #endif // LLVM_TARGET_ENABLE_REGPARM
 
-  if (static_chain) {
-    // Pass the static chain in a register.
-    ParamAttrsWithIndex PAWI; PAWI.index = Idx++; PAWI.attrs = ParamAttr::InReg;
-    Attrs.push_back(PAWI);
-  }
-  
   // The struct return attribute must be associated with the first
   // parameter but that parameter may have other attributes too so we set up
   // the first Attributes value here based on struct return. This only works





More information about the llvm-commits mailing list