[llvm-commits] [llvm] r56221 - /llvm/trunk/utils/llvm.grm

Dan Gohman gohman at apple.com
Mon Sep 15 09:10:51 PDT 2008


Author: djg
Date: Mon Sep 15 11:10:51 2008
New Revision: 56221

URL: http://llvm.org/viewvc/llvm-project?rev=56221&view=rev
Log:
Update the LLVM polygen grammar for recent language changes:
x86_ssecallcc, function notes, and some whitespace adjustments.

Modified:
    llvm/trunk/utils/llvm.grm

Modified: llvm/trunk/utils/llvm.grm
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm.grm?rev=56221&r1=56220&r2=56221&view=diff

==============================================================================
--- llvm/trunk/utils/llvm.grm (original)
+++ llvm/trunk/utils/llvm.grm Mon Sep 15 11:10:51 2008
@@ -123,6 +123,7 @@
                  coldcc |
                  "x86_stdcallcc" |
                  "x86_fastcallcc" |
+                 "x86_ssecallcc" |
                  cc EUINT64VAL ;
 
 ParamAttr ::= zeroext
@@ -149,6 +150,19 @@
 
 OptFuncAttrs  ::= + _ | OptFuncAttrs FuncAttr ;
 
+FuncNoteList  ::= FuncNote
+              | FuncNoteList ^ "," FuncNote
+              ;
+
+FuncNote      ::= inline ^ "=" ^ never
+              | inline ^ "=" ^ always
+              | "opt_size"
+              ;
+
+OptFuncNotes  ::= _
+              | notes ^ "(" ^ FuncNoteList ^ ")"
+              ;
+
 OptGC         ::= + _ | gc STRINGCONSTANT ;
 
 OptAlign      ::= + _ | align EUINT64VAL ;
@@ -175,9 +189,9 @@
  | "[" ^ EUINT64VAL "x" Types ^ "]"
  | "<" ^ EUINT64VAL "x" Types ^ ">"
  | "{" TypeListI "}"
- | "{" "}"
+ | "{" ^ "}"
  | "<" ^ "{" TypeListI "}" ^ ">"
- | "<" ^ "{" "}" ^ ">"
+ | "<" ^ "{" ^ "}" ^ ">"
  ;
 
 ArgType ::= Types OptParamAttrs ;
@@ -191,13 +205,13 @@
 TypeListI ::= Types | TypeListI ^ "," Types ;
 
 ConstVal::= Types "[" ^ ConstVector ^ "]"
- | Types "[" "]"
+ | Types "[" ^ "]"
  | Types "c" ^ STRINGCONSTANT
  | Types "<" ^ ConstVector ^ ">"
  | Types "{" ConstVector "}"
- | Types "{" "}"
+ | Types "{" ^ "}"
  | Types "<" ^ "{" ConstVector "}" ^ ">"
- | Types "<" ^ "{" "}" ^ ">"
+ | Types "<" ^ "{" ^ "}" ^ ">"
  | Types null
  | Types undef
  | Types SymbolicValueRef
@@ -271,7 +285,7 @@
 ArgList ::= ArgListH | ArgListH ^ "," "..." | "..." | _ ;
 
 FunctionHeaderH ::= OptCallingConv ResultTypes GlobalName "(" ^ ArgList ^ ")"
-                  OptFuncAttrs OptSection OptAlign OptGC ;
+                  OptFuncAttrs OptSection OptAlign OptGC OptFuncNotes ;
 
 BEGIN ::= ( begin | "{" ) ^ "\n";
 
@@ -296,12 +310,12 @@
  | zeroinitializer
  | "<" ConstVector ">"
  | "[" ConstVector "]"
- | "[" "]"
+ | "[" ^ "]"
  | "c" ^ STRINGCONSTANT
  | "{" ConstVector "}"
- | "{" "}"
+ | "{" ^ "}"
  | "<" ^ "{" ConstVector "}" ^ ">"
- | "<" ^ "{" "}" ^ ">"
+ | "<" ^ "{" ^ "}" ^ ">"
  | ConstExpr
  | asm OptSideEffect STRINGCONSTANT ^ "," STRINGCONSTANT ;
 
@@ -330,8 +344,9 @@
  | br label ValueRef
  | br INTTYPE ValueRef ^ "," label ValueRef ^ "," label ValueRef
  | switch IntType ValueRef ^ "," label ValueRef "[" JumpTable "]"
- | switch IntType ValueRef ^ "," label ValueRef "[" "]"
- | invoke OptCallingConv ResultTypes ValueRef "(" ^ ParamList ^ ")" OptFuncAttrs
+ | switch IntType ValueRef ^ "," label ValueRef "[" ^ "]"
+ | invoke OptCallingConv ResultTypes ValueRef ^ "(" ^ ParamList ^ ")"
+   OptFuncAttrs
    to label ValueRef unwind label ValueRef
  | unwind
  | unreachable ) ^ "\n";
@@ -370,7 +385,7 @@
  | insertelement ResolvedVal ^ "," ResolvedVal ^ "," ResolvedVal
  | shufflevector ResolvedVal ^ "," ResolvedVal ^ "," ResolvedVal
  | phi PHIList
- | OptTailCall OptCallingConv ResultTypes ValueRef "(" ^ ParamList ^ ")"
+ | OptTailCall OptCallingConv ResultTypes ValueRef ^ "(" ^ ParamList ^ ")"
    OptFuncAttrs
  | MemoryInst ;
 





More information about the llvm-commits mailing list