[llvm-commits] [llvm] r55676 - in /llvm/trunk: include/llvm/Function.h lib/AsmParser/llvmAsmParser.cpp.cvs lib/AsmParser/llvmAsmParser.y lib/AsmParser/llvmAsmParser.y.cvs lib/Transforms/IPO/Inliner.cpp lib/VMCore/AsmWriter.cpp
Devang Patel
dpatel at apple.com
Tue Sep 2 15:43:57 PDT 2008
Author: dpatel
Date: Tue Sep 2 17:43:57 2008
New Revision: 55676
URL: http://llvm.org/viewvc/llvm-project?rev=55676&view=rev
Log:
s/FP_AlwaysInline/FN_NOTE_AlwaysInline/g
Modified:
llvm/trunk/include/llvm/Function.h
llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs
llvm/trunk/lib/AsmParser/llvmAsmParser.y
llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs
llvm/trunk/lib/Transforms/IPO/Inliner.cpp
llvm/trunk/lib/VMCore/AsmWriter.cpp
Modified: llvm/trunk/include/llvm/Function.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Function.h?rev=55676&r1=55675&r2=55676&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Function.h (original)
+++ llvm/trunk/include/llvm/Function.h Tue Sep 2 17:43:57 2008
@@ -52,10 +52,10 @@
};
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 @@
///
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.
Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs?rev=55676&r1=55675&r2=55676&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs (original)
+++ llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs Tue Sep 2 17:43:57 2008
@@ -4125,9 +4125,9 @@
#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 @@
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:
Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y?rev=55676&r1=55675&r2=55676&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/llvmAsmParser.y (original)
+++ llvm/trunk/lib/AsmParser/llvmAsmParser.y Tue Sep 2 17:43:57 2008
@@ -1297,21 +1297,21 @@
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;
}
Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs?rev=55676&r1=55675&r2=55676&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs (original)
+++ llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs Tue Sep 2 17:43:57 2008
@@ -1297,21 +1297,21 @@
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;
}
Modified: llvm/trunk/lib/Transforms/IPO/Inliner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/Inliner.cpp?rev=55676&r1=55675&r2=55676&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/Inliner.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/Inliner.cpp Tue Sep 2 17:43:57 2008
@@ -142,9 +142,9 @@
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)) {
Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=55676&r1=55675&r2=55676&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
+++ llvm/trunk/lib/VMCore/AsmWriter.cpp Tue Sep 2 17:43:57 2008
@@ -1396,11 +1396,11 @@
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 << ")";
}
More information about the llvm-commits
mailing list