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

Dan Gohman gohman at apple.com
Mon Jul 27 14:55:32 PDT 2009


Author: djg
Date: Mon Jul 27 16:55:32 2009
New Revision: 77261

URL: http://llvm.org/viewvc/llvm-project?rev=77261&view=rev
Log:
Add inbounds to the polygen grammar.

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=77261&r1=77260&r2=77261&view=diff

==============================================================================
--- llvm/trunk/utils/llvm.grm (original)
+++ llvm/trunk/utils/llvm.grm Mon Jul 27 16:55:32 2009
@@ -233,7 +233,7 @@
  | Types FPVAL ;
 
 ConstExpr::= CastOps "(" ^ ConstVal to Types ^ ")"
- | getelementptr "(" ^ ConstVal IndexList ^ ")"
+ | getelementptr OptInBounds "(" ^ ConstVal IndexList ^ ")"
  | select "(" ^ ConstVal ^ "," ConstVal ^ "," ConstVal ^ ")"
  | ArithmeticOps "(" ^ ConstVal ^ "," ConstVal ^ ")"
  | LogicalOps "(" ^ ConstVal ^ "," ConstVal ^ ")"
@@ -397,6 +397,7 @@
 OptNSW ::= - nsw | _ ;
 OptNUW ::= - nuw | _ ;
 OptNW  ::= OptNUW OptNSW ;
+OptInBounds  ::= - inbounds | _ ;
 
 MemoryInst ::= malloc Types OptCAlign
  | malloc Types ^ "," INTTYPE ValueRef OptCAlign
@@ -406,6 +407,6 @@
  | 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 ;





More information about the llvm-commits mailing list