[llvm-commits] [128186] Use attribute directly instead of flag.

lattner at apple.com lattner at apple.com
Wed Jun 6 13:41:08 PDT 2007


Revision: 128186
Author:   lattner
Date:     2007-06-06 13:41:07 -0700 (Wed, 06 Jun 2007)

Log Message:
-----------
Use attribute directly instead of flag. Removing ifdef since I'm using the attribute now.

Modified Paths:
--------------
    apple-local/branches/llvm/gcc/llvm-backend.cpp
    apple-local/branches/llvm/gcc/llvm-convert.cpp
    apple-local/branches/llvm/gcc/tree-inline.c

Modified: apple-local/branches/llvm/gcc/llvm-backend.cpp
===================================================================
--- apple-local/branches/llvm/gcc/llvm-backend.cpp	2007-06-06 19:47:00 UTC (rev 128185)
+++ apple-local/branches/llvm/gcc/llvm-backend.cpp	2007-06-06 20:41:07 UTC (rev 128186)
@@ -476,7 +476,6 @@
   }
   
   // Add llvm.noinline
-#if 0
   if (!AttributeNoinlineFunctions.empty()) {
     const Type *SBP= PointerType::get(Type::Int8Ty);
     ArrayType *AT = ArrayType::get(SBP, AttributeNoinlineFunctions.size());
@@ -489,7 +488,6 @@
     // Clear vector
     AttributeNoinlineFunctions.clear();
   }
-#endif
   
   // Finish off the per-function pass.
   if (PerFunctionPasses)

Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp
===================================================================
--- apple-local/branches/llvm/gcc/llvm-convert.cpp	2007-06-06 19:47:00 UTC (rev 128185)
+++ apple-local/branches/llvm/gcc/llvm-convert.cpp	2007-06-06 20:41:07 UTC (rev 128186)
@@ -595,7 +595,7 @@
   }
   
   // Handle noinline Functions
-  if (DECL_UNINLINABLE (FnDecl)) {
+  if (lookup_attribute ("noinline", DECL_ATTRIBUTES (FnDecl))) {
     const Type *SBP= PointerType::get(Type::Int8Ty);
     AttributeNoinlineFunctions.push_back(ConstantExpr::getBitCast(Fn,SBP));
   }

Modified: apple-local/branches/llvm/gcc/tree-inline.c
===================================================================
--- apple-local/branches/llvm/gcc/tree-inline.c	2007-06-06 19:47:00 UTC (rev 128185)
+++ apple-local/branches/llvm/gcc/tree-inline.c	2007-06-06 20:41:07 UTC (rev 128186)
@@ -1220,15 +1220,8 @@
       inlinable = false;
     }
 
-  /* APPLE LOCAL begin LLVM */
-  #ifndef ENABLE_LLVM
-  /* LLVM uses the uninlinable flag to know when the noinline attribute
-    was used. This code will cause all functions that this inliner decides
-    not to inline to appear to have been marked noinline. */
   /* Squirrel away the result so that we don't have to check again.  */
   DECL_UNINLINABLE (fn) = !inlinable;
-  #endif
-  /* APPLE LOCAL end LLVM */
   
   return inlinable;
 }





More information about the llvm-commits mailing list