tablegen: Add a simple heuristic to get better names for pressure sets
[oota-llvm.git] / utils / llvm.grm
index cbb72e92831a5aeabe5faefe5c37692112c26281..92a4053173d64f87b08460cc956d83a0e46da449 100644 (file)
@@ -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"
@@ -161,11 +163,18 @@ FuncAttr      ::= noreturn
  | signext
  | readnone
  | readonly
+ | inlinehint
+ | alignstack
  | noinline
  | alwaysinline
  | optsize
  | ssp
  | sspreq
+ | returns_twice
+ | nonlazybind
+ | sanitize_address
+ | sanitize_thread
+ | sanitize_memory
  ;
 
 OptFuncAttrs  ::= + _ | OptFuncAttrs FuncAttr ;
@@ -233,7 +242,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 +405,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 +416,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 ;