[llvm-commits] [llvm-gcc-4.2] r56717 - in /llvm-gcc-4.2/trunk/gcc: llvm-backend.cpp llvm-convert.cpp
Devang Patel
dpatel at apple.com
Fri Sep 26 16:51:47 PDT 2008
Author: dpatel
Date: Fri Sep 26 18:51:47 2008
New Revision: 56717
URL: http://llvm.org/viewvc/llvm-project?rev=56717&view=rev
Log:
Implement function notes as function attributes.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=56717&r1=56716&r2=56717&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Fri Sep 26 18:51:47 2008
@@ -386,7 +386,7 @@
// marked as always_inline.
for (Module::iterator I = TheModule->begin(), E = TheModule->end();
I != E; ++I)
- if (I->hasNote(Attribute::AlwaysInline)) {
+ if (I->hasFnAttr(Attribute::AlwaysInline)) {
NeedAlwaysInliner = true;
break;
}
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=56717&r1=56716&r2=56717&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Fri Sep 26 18:51:47 2008
@@ -649,7 +649,7 @@
// Handle noinline Functions
if (lookup_attribute ("noinline", DECL_ATTRIBUTES (FnDecl)))
- Fn->setNotes(Attribute::NoInline);
+ Fn->addFnAttr(Attribute::NoInline);
/* FIXME: Remove llvm.noinline related code.
{
const Type *SBP= PointerType::getUnqual(Type::Int8Ty);
@@ -660,10 +660,10 @@
// Handle always_inline attribute
if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (FnDecl)))
- Fn->setNotes(Attribute::AlwaysInline);
+ Fn->addFnAttr(Attribute::AlwaysInline);
if (optimize_size)
- Fn->setNotes(Attribute::OptimizeForSize);
+ Fn->addFnAttr(Attribute::OptimizeForSize);
// Handle annotate attributes
if (DECL_ATTRIBUTES(FnDecl))
More information about the llvm-commits
mailing list