X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=utils%2Fllvm.grm;h=9d6bdf79f539a23b1250af13a79d778bff1cba0e;hb=40989a40f085ca027ba322fbcffc771cb360e854;hp=cbb72e92831a5aeabe5faefe5c37692112c26281;hpb=bfacb7e057d05ab150c0ead03f6a03bba13c09b5;p=oota-llvm.git diff --git a/utils/llvm.grm b/utils/llvm.grm index cbb72e92831..9d6bdf79f53 100644 --- a/utils/llvm.grm +++ b/utils/llvm.grm @@ -8,6 +8,8 @@ It is strictly syntax-based, and makes no attempt to generate IR that is semantically valid. Most of the IR produced doesn't pass the Verifier. +TODO: Metadata, in all its forms + *) I ::= "title: LLVM assembly language\n" @@ -90,6 +92,8 @@ GVInternalLinkage | dllexport | common | private + | "linker_private" + | "linker_private_weak" ; GVExternalLinkage @@ -161,6 +165,8 @@ FuncAttr ::= noreturn | signext | readnone | readonly + | inlinehint + | alignstack | noinline | alwaysinline | optsize @@ -233,7 +239,7 @@ 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 ^ ")" @@ -396,7 +402,8 @@ OptVolatile ::= - volatile | _ ; OptExact ::= - exact | _ ; OptNSW ::= - nsw | _ ; OptNUW ::= - nuw | _ ; -OptNW ::= OptNUW OptNSW ; +OptNW ::= OptNUW OptNSW | OptNSW OptNUW ; +OptInBounds ::= - inbounds | _ ; MemoryInst ::= malloc Types OptCAlign | malloc Types ^ "," INTTYPE ValueRef OptCAlign @@ -406,6 +413,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 ;