X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=utils%2Fllvm.grm;h=4499d4b35a9f7c5124a3aa34a84f90683d040e4a;hb=fce4aef806b1578710f9cbf7683dbd4df39c1c18;hp=4095858cd4b64722d74ebcb97959991643617ecc;hpb=8f56ebaf5cdd9e1c6579e0d637ccc65c6aea0726;p=oota-llvm.git diff --git a/utils/llvm.grm b/utils/llvm.grm index 4095858cd4b..4499d4b35a9 100644 --- a/utils/llvm.grm +++ b/utils/llvm.grm @@ -53,7 +53,8 @@ FPVAL ::= ESAPINTVAL ^ "." ^ EUAPINTVAL | "0x" ^ HexDigitSeq ; The rest of this file is derived directly from llvmAsmParser.y. *) -ArithmeticOps ::= add | sub | mul | udiv | sdiv | fdiv | urem | srem | frem ; +ArithmeticOps ::= + OptNW add | fadd | OptNW sub | fsub | OptNW mul | fmul | + udiv | OptExact sdiv | fdiv | urem | srem | frem ; LogicalOps ::= shl | lshr | ashr | and | or | xor; CastOps ::= trunc | zext | sext | fptrunc | fpext | bitcast | uitofp | sitofp | fptoui | fptosi | inttoptr | ptrtoint ; @@ -82,10 +83,13 @@ GlobalAssign ::= GlobalName "=" ; GVInternalLinkage ::= + internal | weak + | "weak_odr" | linkonce + | "linkonce_odr" | appending | dllexport | common + | private ; GVExternalLinkage @@ -111,11 +115,13 @@ FunctionDefineLinkage ::= + _ | internal | linkonce + | "linkonce_odr" | weak + | "weak_odr" | dllexport ; -AliasLinkage ::= + _ | weak | internal ; +AliasLinkage ::= + _ | weak | "weak_odr" | internal ; OptCallingConv ::= + _ | ccc | @@ -126,9 +132,7 @@ OptCallingConv ::= + _ | cc EUINT64VAL ; ParamAttr ::= zeroext - | zext | signext - | sext | inreg | sret | noalias @@ -229,14 +233,12 @@ ConstVal::= Types "[" ^ ConstVector ^ "]" | Types FPVAL ; ConstExpr::= CastOps "(" ^ ConstVal to Types ^ ")" - | getelementptr "(" ^ ConstVal IndexList ^ ")" + | getelementptr OptInBounds "(" ^ ConstVal IndexList ^ ")" | select "(" ^ ConstVal ^ "," ConstVal ^ "," ConstVal ^ ")" | ArithmeticOps "(" ^ ConstVal ^ "," ConstVal ^ ")" | LogicalOps "(" ^ ConstVal ^ "," ConstVal ^ ")" | icmp IPredicates "(" ^ ConstVal ^ "," ConstVal ^ ")" | fcmp FPredicates "(" ^ ConstVal ^ "," ConstVal ^ ")" - | vicmp IPredicates "(" ^ ConstVal ^ "," ConstVal ^ ")" - | vfcmp FPredicates "(" ^ ConstVal ^ "," ConstVal ^ ")" | extractelement "(" ^ ConstVal ^ "," ConstVal ^ ")" | insertelement "(" ^ ConstVal ^ "," ConstVal ^ "," ConstVal ^ ")" | shufflevector "(" ^ ConstVal ^ "," ConstVal ^ "," ConstVal ^ ")" @@ -261,7 +263,7 @@ Definition | declare FunctionProto | - module asm AsmBlock | OptLocalAssign type Types - | OptGlobalAssign GVVisibilityStyle ThreadLocal OptAddrSpace OptAddrSpace + | OptGlobalAssign GVVisibilityStyle ThreadLocal OptAddrSpace GlobalType ConstVal GlobalVarAttributes | OptGlobalAssign GVInternalLinkage GVVisibilityStyle ThreadLocal OptAddrSpace GlobalType ConstVal GlobalVarAttributes @@ -379,8 +381,6 @@ InstVal ::= | LogicalOps Types ValueRef ^ "," ValueRef | icmp IPredicates Types ValueRef ^ "," ValueRef | fcmp FPredicates Types ValueRef ^ "," ValueRef - | vicmp IPredicates Types ValueRef ^ "," ValueRef - | vfcmp FPredicates Types ValueRef ^ "," ValueRef | CastOps ResolvedVal to Types | select ResolvedVal ^ "," ResolvedVal ^ "," ResolvedVal | "va_arg" ResolvedVal ^ "," Types @@ -393,6 +393,11 @@ InstVal ::= | MemoryInst ; OptVolatile ::= - volatile | _ ; +OptExact ::= - exact | _ ; +OptNSW ::= - nsw | _ ; +OptNUW ::= - nuw | _ ; +OptNW ::= OptNUW OptNSW ; +OptInBounds ::= - inbounds | _ ; MemoryInst ::= malloc Types OptCAlign | malloc Types ^ "," INTTYPE ValueRef OptCAlign @@ -402,6 +407,6 @@ MemoryInst ::= malloc Types OptCAlign | OptVolatile load Types ValueRef OptCAlign | OptVolatile store ResolvedVal ^ "," Types ValueRef OptCAlign | getresult Types ValueRef ^ "," EUINT64VAL - | getelementptr Types ValueRef IndexList + | getelementptr OptInBounds Types ValueRef IndexList | extractvalue Types ValueRef ^ ConstantIndexList | insertvalue Types ValueRef ^ "," Types ValueRef ^ ConstantIndexList ;