summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Function.h14
-rw-r--r--lib/AsmParser/llvmAsmParser.cpp.cvs12
-rw-r--r--lib/AsmParser/llvmAsmParser.y12
-rw-r--r--lib/AsmParser/llvmAsmParser.y.cvs12
-rw-r--r--lib/Transforms/IPO/Inliner.cpp4
-rw-r--r--lib/VMCore/AsmWriter.cpp6
6 files changed, 30 insertions, 30 deletions
diff --git a/include/llvm/Function.h b/include/llvm/Function.h
index 58edab480a..d47746d161 100644
--- a/include/llvm/Function.h
+++ b/include/llvm/Function.h
@@ -52,10 +52,10 @@ template<> struct ilist_traits<Argument>
};
typedef unsigned FunctionNotes;
-const FunctionNotes FP_None = 0;
-const FunctionNotes FP_NoInline = 1<<0;
-const FunctionNotes FP_AlwaysInline = 1<<1;
-const FunctionNotes FP_OptimizeForSize = 1<<2;
+const FunctionNotes FN_NOTE_None = 0;
+const FunctionNotes FN_NOTE_NoInline = 1<<0;
+const FunctionNotes FN_NOTE_AlwaysInline = 1<<1;
+const FunctionNotes FN_NOTE_OptimizeForSize = 1<<2;
class Function : public GlobalValue, public Annotable,
public ilist_node<Function> {
@@ -155,13 +155,13 @@ public:
///
void setParamAttrs(const PAListPtr &attrs) { ParamAttrs = attrs; }
- /// getNotes - Return this function properties
+ /// getNotes - Return function notes
///
const FunctionNotes &getNotes() const { return Notes; }
- /// setNotes - Set properties for this function
+ /// setNotes - Set notes for this function
///
- void setNotes(const FunctionNotes P) { Notes = P;}
+ void setNotes(const FunctionNotes P) { Notes = Notes | P;}
/// hasGC/getGC/setGC/clearGC - The name of the garbage collection algorithm
/// to use during code generation.
diff --git a/lib/AsmParser/llvmAsmParser.cpp.cvs b/lib/AsmParser/llvmAsmParser.cpp.cvs
index 45a57998b7..80d1059085 100644
--- a/lib/AsmParser/llvmAsmParser.cpp.cvs
+++ b/lib/AsmParser/llvmAsmParser.cpp.cvs
@@ -4125,9 +4125,9 @@ yyreduce:
#line 1298 "/Volumes/Nanpura/fn_prop/llvm/lib/AsmParser/llvmAsmParser.y"
{
FunctionNotes tmp = (yyvsp[(1) - (3)].FunctionNotes) | (yyvsp[(3) - (3)].FunctionNotes);
- if ((yyvsp[(3) - (3)].FunctionNotes) == FP_NoInline && ((yyvsp[(1) - (3)].FunctionNotes) & FP_AlwaysInline))
+ if ((yyvsp[(3) - (3)].FunctionNotes) == FN_NOTE_NoInline && ((yyvsp[(1) - (3)].FunctionNotes) & FN_NOTE_AlwaysInline))
GEN_ERROR("Function Notes may include only one inline notes!")
- if ((yyvsp[(3) - (3)].FunctionNotes) == FP_AlwaysInline && ((yyvsp[(1) - (3)].FunctionNotes) & FP_NoInline))
+ if ((yyvsp[(3) - (3)].FunctionNotes) == FN_NOTE_AlwaysInline && ((yyvsp[(1) - (3)].FunctionNotes) & FN_NOTE_NoInline))
GEN_ERROR("Function Notes may include only one inline notes!")
(yyval.FunctionNotes) = tmp;
CHECK_FOR_ERROR
@@ -4136,22 +4136,22 @@ yyreduce:
case 130:
#line 1309 "/Volumes/Nanpura/fn_prop/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.FunctionNotes) = FP_NoInline; ;}
+ { (yyval.FunctionNotes) = FN_NOTE_NoInline; ;}
break;
case 131:
#line 1310 "/Volumes/Nanpura/fn_prop/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.FunctionNotes) = FP_AlwaysInline; ;}
+ { (yyval.FunctionNotes) = FN_NOTE_AlwaysInline; ;}
break;
case 132:
#line 1311 "/Volumes/Nanpura/fn_prop/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.FunctionNotes) = FP_OptimizeForSize; ;}
+ { (yyval.FunctionNotes) = FN_NOTE_OptimizeForSize; ;}
break;
case 133:
#line 1314 "/Volumes/Nanpura/fn_prop/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.FunctionNotes) = FP_None; ;}
+ { (yyval.FunctionNotes) = FN_NOTE_None; ;}
break;
case 134:
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y
index d004a4e399..5db76429b5 100644
--- a/lib/AsmParser/llvmAsmParser.y
+++ b/lib/AsmParser/llvmAsmParser.y
@@ -1297,21 +1297,21 @@ OptFuncAttrs : /* empty */ { $$ = ParamAttr::None; }
FuncNoteList : FuncNote { $$ = $1; }
| FuncNoteList ',' FuncNote {
FunctionNotes tmp = $1 | $3;
- if ($3 == FP_NoInline && ($1 & FP_AlwaysInline))
+ if ($3 == FN_NOTE_NoInline && ($1 & FN_NOTE_AlwaysInline))
GEN_ERROR("Function Notes may include only one inline notes!")
- if ($3 == FP_AlwaysInline && ($1 & FP_NoInline))
+ if ($3 == FN_NOTE_AlwaysInline && ($1 & FN_NOTE_NoInline))
GEN_ERROR("Function Notes may include only one inline notes!")
$$ = tmp;
CHECK_FOR_ERROR
}
;
-FuncNote : INLINE '=' NEVER { $$ = FP_NoInline; }
- | INLINE '=' ALWAYS { $$ = FP_AlwaysInline; }
- | OPTIMIZEFORSIZE { $$ = FP_OptimizeForSize; }
+FuncNote : INLINE '=' NEVER { $$ = FN_NOTE_NoInline; }
+ | INLINE '=' ALWAYS { $$ = FN_NOTE_AlwaysInline; }
+ | OPTIMIZEFORSIZE { $$ = FN_NOTE_OptimizeForSize; }
;
-OptFuncNotes : /* empty */ { $$ = FP_None; }
+OptFuncNotes : /* empty */ { $$ = FN_NOTE_None; }
| FNNOTE '(' FuncNoteList ')' {
$$ = $3;
}
diff --git a/lib/AsmParser/llvmAsmParser.y.cvs b/lib/AsmParser/llvmAsmParser.y.cvs
index d004a4e399..5db76429b5 100644
--- a/lib/AsmParser/llvmAsmParser.y.cvs
+++ b/lib/AsmParser/llvmAsmParser.y.cvs
@@ -1297,21 +1297,21 @@ OptFuncAttrs : /* empty */ { $$ = ParamAttr::None; }
FuncNoteList : FuncNote { $$ = $1; }
| FuncNoteList ',' FuncNote {
FunctionNotes tmp = $1 | $3;
- if ($3 == FP_NoInline && ($1 & FP_AlwaysInline))
+ if ($3 == FN_NOTE_NoInline && ($1 & FN_NOTE_AlwaysInline))
GEN_ERROR("Function Notes may include only one inline notes!")
- if ($3 == FP_AlwaysInline && ($1 & FP_NoInline))
+ if ($3 == FN_NOTE_AlwaysInline && ($1 & FN_NOTE_NoInline))
GEN_ERROR("Function Notes may include only one inline notes!")
$$ = tmp;
CHECK_FOR_ERROR
}
;
-FuncNote : INLINE '=' NEVER { $$ = FP_NoInline; }
- | INLINE '=' ALWAYS { $$ = FP_AlwaysInline; }
- | OPTIMIZEFORSIZE { $$ = FP_OptimizeForSize; }
+FuncNote : INLINE '=' NEVER { $$ = FN_NOTE_NoInline; }
+ | INLINE '=' ALWAYS { $$ = FN_NOTE_AlwaysInline; }
+ | OPTIMIZEFORSIZE { $$ = FN_NOTE_OptimizeForSize; }
;
-OptFuncNotes : /* empty */ { $$ = FP_None; }
+OptFuncNotes : /* empty */ { $$ = FN_NOTE_None; }
| FNNOTE '(' FuncNoteList ')' {
$$ = $3;
}
diff --git a/lib/Transforms/IPO/Inliner.cpp b/lib/Transforms/IPO/Inliner.cpp
index e9ae21f795..845ffd864e 100644
--- a/lib/Transforms/IPO/Inliner.cpp
+++ b/lib/Transforms/IPO/Inliner.cpp
@@ -142,9 +142,9 @@ bool Inliner::runOnSCC(const std::vector<CallGraphNode*> &SCC) {
Function *Fn = CS.getCalledFunction();
bool AlwaysInline = false;
- if (Fn && (Fn->getNotes() & FP_AlwaysInline))
+ if (Fn && (Fn->getNotes() & FN_NOTE_AlwaysInline))
AlwaysInline = true;
- if (Fn && (Fn->getNotes() & FP_NoInline))
+ if (Fn && (Fn->getNotes() & FN_NOTE_NoInline))
DOUT << "NOT Inlining: inline=never is set" << *CS.getInstruction();
else if (!AlwaysInline
&& InlineCost >= (int)(InlineThreshold * FudgeFactor)) {
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index 724b34f460..b518b2c177 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/lib/VMCore/AsmWriter.cpp
@@ -1396,11 +1396,11 @@ void AssemblyWriter::printFunction(const Function *F) {
if (F->hasGC())
Out << " gc \"" << F->getGC() << '"';
FunctionNotes FNotes = F->getNotes();
- if (FNotes != FP_None) {
+ if (FNotes != FN_NOTE_None) {
Out << " notes(";
- if (FNotes & FP_AlwaysInline)
+ if (FNotes & FN_NOTE_AlwaysInline)
Out << "inline=always";
- else if (FNotes & FP_NoInline)
+ else if (FNotes & FN_NOTE_NoInline)
Out << "inline=never";
Out << ")";
}