From e4977cf750eaff28275429191821420c20b0c64f Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 23 May 2008 01:55:30 +0000 Subject: Make structs and arrays first-class types, and add assembly and bitcode support for the extractvalue and insertvalue instructions and constant expressions. Note that this does not yet include CodeGen support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51468 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/llvm.grm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'utils/llvm.grm') diff --git a/utils/llvm.grm b/utils/llvm.grm index 8a2ce0d..c24b9c2 100644 --- a/utils/llvm.grm +++ b/utils/llvm.grm @@ -222,7 +222,9 @@ ConstExpr::= CastOps "(" ^ ConstVal to Types ^ ")" | vfcmp FPredicates "(" ^ ConstVal ^ "," ConstVal ^ ")" | extractelement "(" ^ ConstVal ^ "," ConstVal ^ ")" | insertelement "(" ^ ConstVal ^ "," ConstVal ^ "," ConstVal ^ ")" - | shufflevector "(" ^ ConstVal ^ "," ConstVal ^ "," ConstVal ^ ")" ; + | shufflevector "(" ^ ConstVal ^ "," ConstVal ^ "," ConstVal ^ ")" + | extractvalue "(" ^ ConstVal IndexList ^ ")" + | insertvalue "(" ^ ConstVal ^ "," ConstVal IndexList ^ ")" ; ConstVector ::= ConstVector ^ "," ConstVal | ConstVal ; @@ -373,4 +375,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 Types ValueRef IndexList + | extractvalue Types ValueRef IndexList + | insertvalue Types ValueRef ^ "," Types ValueRef IndexList ; -- cgit v1.1