summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-09-26 23:51:19 +0000
committerDevang Patel <dpatel@apple.com>2008-09-26 23:51:19 +0000
commit9eb525d4f9f12f266e18bf659c876bda59738807 (patch)
treec66f9b5510c21a7eb5e4b3d65b036651bbbca3bb /llvm/lib/Transforms/IPO
parentc4b02eb4e5aa028ddb6c45e4779555934ccdace8 (diff)
downloadbcm5719-llvm-9eb525d4f9f12f266e18bf659c876bda59738807.tar.gz
bcm5719-llvm-9eb525d4f9f12f266e18bf659c876bda59738807.zip
Implement function notes as function attributes.
llvm-svn: 56716
Diffstat (limited to 'llvm/lib/Transforms/IPO')
-rw-r--r--llvm/lib/Transforms/IPO/InlineAlways.cpp2
-rw-r--r--llvm/lib/Transforms/IPO/InlineSimple.cpp2
-rw-r--r--llvm/lib/Transforms/IPO/Inliner.cpp3
3 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/InlineAlways.cpp b/llvm/lib/Transforms/IPO/InlineAlways.cpp
index 448f2461411..1079c4ad738 100644
--- a/llvm/lib/Transforms/IPO/InlineAlways.cpp
+++ b/llvm/lib/Transforms/IPO/InlineAlways.cpp
@@ -63,7 +63,7 @@ bool AlwaysInliner::doInitialization(CallGraph &CG) {
for (Module::iterator I = M.begin(), E = M.end();
I != E; ++I)
- if (!I->isDeclaration() && !I->hasNote(Attribute::AlwaysInline))
+ if (!I->isDeclaration() && !I->hasFnAttr(Attribute::AlwaysInline))
NeverInline.insert(I);
return false;
diff --git a/llvm/lib/Transforms/IPO/InlineSimple.cpp b/llvm/lib/Transforms/IPO/InlineSimple.cpp
index b19494a6a41..02cae2a6e67 100644
--- a/llvm/lib/Transforms/IPO/InlineSimple.cpp
+++ b/llvm/lib/Transforms/IPO/InlineSimple.cpp
@@ -65,7 +65,7 @@ bool SimpleInliner::doInitialization(CallGraph &CG) {
for (Module::iterator I = M.begin(), E = M.end();
I != E; ++I)
- if (!I->isDeclaration() && I->hasNote(Attribute::NoInline))
+ if (!I->isDeclaration() && I->hasFnAttr(Attribute::NoInline))
NeverInline.insert(I);
// Get llvm.noinline
diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp
index abc10944141..c2672720040 100644
--- a/llvm/lib/Transforms/IPO/Inliner.cpp
+++ b/llvm/lib/Transforms/IPO/Inliner.cpp
@@ -141,7 +141,8 @@ bool Inliner::runOnSCC(const std::vector<CallGraphNode*> &SCC) {
int CurrentThreshold = InlineThreshold;
Function *Fn = CS.getCaller();
- if (Fn && !Fn->isDeclaration() && Fn->hasNote(Attribute::OptimizeForSize)
+ if (Fn && !Fn->isDeclaration()
+ && Fn->hasFnAttr(Attribute::OptimizeForSize)
&& InlineThreshold != 50) {
CurrentThreshold = 50;
}
OpenPOWER on IntegriCloud