aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bindings/ocaml/llvm/llvm.ml2
-rw-r--r--bindings/ocaml/llvm/llvm.mli9
-rw-r--r--bindings/ocaml/llvm/llvm_ocaml.c23
-rw-r--r--docs/LangRef.html25
-rw-r--r--include/llvm-c/Core.h2
-rw-r--r--include/llvm/Bitcode/LLVMBitCodes.h4
-rw-r--r--include/llvm/Function.h7
-rw-r--r--lib/AsmParser/LLLexer.cpp1
-rw-r--r--lib/AsmParser/llvmAsmParser.cpp.cvs2418
-rw-r--r--lib/AsmParser/llvmAsmParser.h.cvs20
-rw-r--r--lib/AsmParser/llvmAsmParser.y16
-rw-r--r--lib/AsmParser/llvmAsmParser.y.cvs16
-rw-r--r--lib/Bitcode/Reader/BitcodeReader.cpp15
-rw-r--r--lib/Bitcode/Writer/BitcodeWriter.cpp33
-rw-r--r--lib/Transforms/Utils/CloneModule.cpp2
-rw-r--r--lib/VMCore/AsmWriter.cpp2
-rw-r--r--lib/VMCore/Core.cpp13
-rw-r--r--lib/VMCore/Function.cpp39
-rw-r--r--test/Assembler/2007-09-29-GC.ll12
-rw-r--r--test/Bindings/Ocaml/vmcore.ml19
-rw-r--r--test/CodeGen/Generic/GC/alloc_loop.ll2
21 files changed, 1449 insertions, 1231 deletions
diff --git a/bindings/ocaml/llvm/llvm.ml b/bindings/ocaml/llvm/llvm.ml
index a415b94594..d9ef2d3af3 100644
--- a/bindings/ocaml/llvm/llvm.ml
+++ b/bindings/ocaml/llvm/llvm.ml
@@ -282,6 +282,8 @@ external is_intrinsic : llvalue -> bool = "llvm_is_intrinsic"
external function_call_conv : llvalue -> int = "llvm_function_call_conv"
external set_function_call_conv : int -> llvalue -> unit
= "llvm_set_function_call_conv"
+external collector : llvalue -> string option = "llvm_collector"
+external set_collector : string option -> llvalue -> unit = "llvm_set_collector"
(* TODO: param attrs *)
diff --git a/bindings/ocaml/llvm/llvm.mli b/bindings/ocaml/llvm/llvm.mli
index ac83e42809..02bb58ca6c 100644
--- a/bindings/ocaml/llvm/llvm.mli
+++ b/bindings/ocaml/llvm/llvm.mli
@@ -754,6 +754,15 @@ external function_call_conv : llvalue -> int = "llvm_function_call_conv"
external set_function_call_conv : int -> llvalue -> unit
= "llvm_set_function_call_conv"
+(** [collector f] returns [Some name] if the function [f] has a garbage
+ collection algorithm specified and [None] otherwise.
+ See the method [llvm::Function::getCollector]. **)
+external collector : llvalue -> string option = "llvm_collector"
+
+(** [set_collector gc f] sets the collection algorithm for the function [f] to
+ [gc]. See the method [llvm::Function::setCollector]. **)
+external set_collector : string option -> llvalue -> unit = "llvm_set_collector"
+
(*--... Operations on basic blocks .........................................--*)
(** [basic_blocks fn] returns the basic blocks of the function [f].
diff --git a/bindings/ocaml/llvm/llvm_ocaml.c b/bindings/ocaml/llvm/llvm_ocaml.c
index dd37e3e978..342d890e74 100644
--- a/bindings/ocaml/llvm/llvm_ocaml.c
+++ b/bindings/ocaml/llvm/llvm_ocaml.c
@@ -536,6 +536,29 @@ CAMLprim value llvm_set_function_call_conv(value Id, LLVMValueRef Fn) {
return Val_unit;
}
+/* llvalue -> string option */
+CAMLprim value llvm_collector(LLVMValueRef Fn) {
+ const char *Collector;
+ CAMLparam0();
+ CAMLlocal2(Name, Option);
+
+ if ((Collector = LLVMGetCollector(Fn))) {
+ Name = copy_string(Collector);
+
+ Option = alloc(1, 0);
+ Field(Option, 0) = Name;
+ CAMLreturn(Option);
+ } else {
+ CAMLreturn(Val_int(0));
+ }
+}
+
+/* string option -> llvalue -> unit */
+CAMLprim value llvm_set_collector(value GC, LLVMValueRef Fn) {
+ LLVMSetCollector(Fn, GC == Val_int(0)? 0 : String_val(Field(GC, 0)));
+ return Val_unit;
+}
+
/*--... Operations on basic blocks .........................................--*/
/* llvalue -> llbasicblock array */
diff --git a/docs/LangRef.html b/docs/LangRef.html
index f85a441e53..80817e28dc 100644
--- a/docs/LangRef.html
+++ b/docs/LangRef.html
@@ -26,6 +26,7 @@
<li><a href="#functionstructure">Functions</a></li>
<li><a href="#aliasstructure">Aliases</a>
<li><a href="#paramattrs">Parameter Attributes</a></li>
+ <li><a href="#gc">Garbage Collector Names</a></li>
<li><a href="#moduleasm">Module-Level Inline Assembly</a></li>
<li><a href="#datalayout">Data Layout</a></li>
</ol>
@@ -702,15 +703,16 @@ an optional <a href="#linkage">linkage type</a>, an optional
<a href="#paramattrs">parameter attribute</a> for the return type, a function
name, a (possibly empty) argument list (each with optional
<a href="#paramattrs">parameter attributes</a>), an optional section, an
-optional alignment, an opening curly brace, a list of basic blocks, and a
-closing curly brace.
+optional alignment, an optional <a href="gc">garbage collector name</a>, an
+opening curly brace, a list of basic blocks, and a closing curly brace.
LLVM function declarations consist of the "<tt>declare</tt>" keyword, an
optional <a href="#linkage">linkage type</a>, an optional
<a href="#visibility">visibility style</a>, an optional
<a href="#callingconv">calling convention</a>, a return type, an optional
<a href="#paramattrs">parameter attribute</a> for the return type, a function
-name, a possibly empty list of arguments, and an optional alignment.</p>
+name, a possibly empty list of arguments, an optional alignment, and an optional
+<a href="gc">garbage collector name</a>.</p>
<p>A function definition contains a list of basic blocks, forming the CFG for
the function. Each basic block may optionally start with a label (giving the
@@ -826,6 +828,23 @@ declare i32 @atoi(i8*) nounwind readonly
<!-- ======================================================================= -->
<div class="doc_subsection">
+ <a name="gc">Garbage Collector Names</a>
+</div>
+
+<div class="doc_text">
+<p>Each function may specify a garbage collector name, which is simply a
+string.</p>
+
+<div class="doc_code"><pre
+>define void @f() gc "name" { ...</pre></div>
+
+<p>The compiler declares the supported values of <i>name</i>. Specifying a
+collector which will cause the compiler to alter its output in order to support
+the named garbage collection algorithm.</p>
+</div>
+
+<!-- ======================================================================= -->
+<div class="doc_subsection">
<a name="moduleasm">Module-Level Inline Assembly</a>
</div>
diff --git a/include/llvm-c/Core.h b/include/llvm-c/Core.h
index a9228bcfc3..d3308eff63 100644
--- a/include/llvm-c/Core.h
+++ b/include/llvm-c/Core.h
@@ -339,6 +339,8 @@ LLVMValueRef LLVMGetParam(LLVMValueRef Fn, unsigned Index);
unsigned LLVMGetIntrinsicID(LLVMValueRef Fn);
unsigned LLVMGetFunctionCallConv(LLVMValueRef Fn);
void LLVMSetFunctionCallConv(LLVMValueRef Fn, unsigned CC);
+const char *LLVMGetCollector(LLVMValueRef Fn);
+void LLVMSetCollector(LLVMValueRef Fn, const char *Coll);
/* Operations on basic blocks */
LLVMValueRef LLVMBasicBlockAsValue(LLVMBasicBlockRef Bb);
diff --git a/include/llvm/Bitcode/LLVMBitCodes.h b/include/llvm/Bitcode/LLVMBitCodes.h
index f62af5e17c..32311b26d9 100644
--- a/include/llvm/Bitcode/LLVMBitCodes.h
+++ b/include/llvm/Bitcode/LLVMBitCodes.h
@@ -58,7 +58,9 @@ namespace bitc {
MODULE_CODE_ALIAS = 9,
/// MODULE_CODE_PURGEVALS: [numvals]
- MODULE_CODE_PURGEVALS = 10
+ MODULE_CODE_PURGEVALS = 10,
+
+ MODULE_CODE_COLLECTORNAME = 11 // COLLECTORNAME: [strchr x N]
};
/// PARAMATTR blocks have code for defining a parameter attribute set.
diff --git a/include/llvm/Function.h b/include/llvm/Function.h
index 20a43e285c..ece095d380 100644
--- a/include/llvm/Function.h
+++ b/include/llvm/Function.h
@@ -153,6 +153,13 @@ public:
/// @brief Set the parameter attributes.
void setParamAttrs(const ParamAttrsList *attrs);
+ /// hasCollector/getCollector/setCollector/clearCollector - The name of the
+ /// garbage collection algorithm to use during code generation.
+ bool hasCollector() const;
+ const char *getCollector() const;
+ void setCollector(const char *Str);
+ void clearCollector();
+
/// @brief Determine whether the function has the given attribute.
bool paramHasAttr(uint16_t i, ParameterAttributes attr) const {
return ParamAttrs && ParamAttrs->paramHasAttr(i, attr);
diff --git a/lib/AsmParser/LLLexer.cpp b/lib/AsmParser/LLLexer.cpp
index 72e19f1d4d..ef8d27c8a3 100644
--- a/lib/AsmParser/LLLexer.cpp
+++ b/lib/AsmParser/LLLexer.cpp
@@ -468,6 +468,7 @@ int LLLexer::LexIdentifier() {
KEYWORD("module", MODULE);
KEYWORD("asm", ASM_TOK);
KEYWORD("sideeffect", SIDEEFFECT);
+ KEYWORD("gc", GC);
KEYWORD("cc", CC_TOK);
KEYWORD("ccc", CCC_TOK);
diff --git a/lib/AsmParser/llvmAsmParser.cpp.cvs b/lib/AsmParser/llvmAsmParser.cpp.cvs
index ffe2398a53..3d09b362ff 100644
--- a/lib/AsmParser/llvmAsmParser.cpp.cvs
+++ b/lib/AsmParser/llvmAsmParser.cpp.cvs
@@ -216,9 +216,10 @@
NEST = 397,
READNONE = 398,
READONLY = 399,
- DEFAULT = 400,
- HIDDEN = 401,
- PROTECTED = 402
+ GC = 400,
+ DEFAULT = 401,
+ HIDDEN = 402,
+ PROTECTED = 403
};
#endif
/* Tokens. */
@@ -364,15 +365,16 @@
#define NEST 397
#define READNONE 398
#define READONLY 399
-#define DEFAULT 400
-#define HIDDEN 401
-#define PROTECTED 402
+#define GC 400
+#define DEFAULT 401
+#define HIDDEN 402
+#define PROTECTED 403
/* Copy the first part of user declarations. */
-#line 14 "/home/asl/proj/llvm/src/lib/AsmParser/llvmAsmParser.y"
+#line 14 "/Users/malichus/Source/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
#include "ParserInternals.h"
#include "llvm/CallingConv.h"
@@ -1324,7 +1326,7 @@ Module *llvm::RunVMAsmParser(llvm::MemoryBuffer *MB) {
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 945 "/home/asl/proj/llvm/src/lib/AsmParser/llvmAsmParser.y"
+#line 945 "/Users/malichus/Source/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
{
llvm::Module *ModuleVal;
llvm::Function *FunctionVal;
@@ -1371,8 +1373,8 @@ typedef union YYSTYPE
llvm::ICmpInst::Predicate IPredicate;
llvm::FCmpInst::Predicate FPredicate;
}
-/* Line 187 of yacc.c. */
-#line 1376 "llvmAsmParser.tab.c"
+/* Line 193 of yacc.c. */
+#line 1378 "llvmAsmParser.tab.c"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
@@ -1385,7 +1387,7 @@ typedef union YYSTYPE
/* Line 216 of yacc.c. */
-#line 1389 "llvmAsmParser.tab.c"
+#line 1391 "llvmAsmParser.tab.c"
#ifdef short
# undef short
@@ -1435,7 +1437,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -1600,20 +1602,20 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 43
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 1816
+#define YYLAST 1820
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 162
+#define YYNTOKENS 163
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 82
+#define YYNNTS 83
/* YYNRULES -- Number of rules. */
-#define YYNRULES 314
+#define YYNRULES 316
/* YYNRULES -- Number of states. */
-#define YYNSTATES 608
+#define YYNSTATES 611
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 402
+#define YYMAXUTOK 403
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -1625,15 +1627,15 @@ static const yytype_uint8 yytranslate[] =
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 152, 153, 150, 2, 149, 2, 2, 2, 2, 2,
+ 153, 154, 151, 2, 150, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 157, 148, 158, 2, 2, 2, 2, 2, 2, 2,
+ 158, 149, 159, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 154, 151, 156, 2, 2, 2, 2, 2, 161,
+ 2, 155, 152, 157, 2, 2, 2, 2, 2, 162,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 155, 2, 2, 159, 2, 160, 2, 2, 2, 2,
+ 156, 2, 2, 160, 2, 161, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -1661,7 +1663,7 @@ static const yytype_uint8 yytranslate[] =
115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
- 145, 146, 147
+ 145, 146, 147, 148
};
#if YYDEBUG
@@ -1681,32 +1683,32 @@ static const yytype_uint16 yyprhs[] =
175, 177, 179, 181, 182, 184, 186, 187, 189, 191,
193, 195, 197, 200, 202, 204, 206, 208, 210, 212,
214, 216, 218, 219, 222, 224, 226, 228, 230, 232,
- 234, 235, 238, 239, 242, 243, 247, 250, 251, 253,
- 254, 258, 260, 263, 265, 267, 269, 271, 273, 275,
- 277, 279, 281, 284, 286, 289, 295, 301, 307, 313,
- 317, 320, 326, 331, 334, 336, 338, 340, 344, 346,
- 350, 352, 353, 355, 359, 364, 368, 372, 377, 382,
- 386, 393, 399, 402, 405, 408, 411, 414, 417, 420,
- 423, 426, 429, 432, 435, 442, 448, 457, 464, 471,
- 479, 487, 494, 503, 512, 516, 518, 520, 522, 524,
- 525, 528, 535, 537, 538, 540, 543, 544, 548, 549,
- 553, 557, 561, 565, 566, 574, 575, 584, 585, 594,
- 600, 603, 607, 609, 613, 617, 621, 625, 627, 628,
- 634, 638, 640, 644, 646, 647, 657, 659, 661, 666,
- 668, 670, 673, 677, 678, 680, 682, 684, 686, 688,
- 690, 692, 694, 696, 700, 702, 708, 710, 712, 714,
- 716, 718, 720, 723, 726, 729, 733, 736, 737, 739,
- 742, 745, 749, 759, 769, 778, 793, 795, 797, 804,
- 810, 813, 820, 828, 833, 838, 845, 852, 853, 854,
- 858, 861, 863, 869, 875, 882, 889, 894, 901, 906,
- 911, 918, 925, 928, 937, 939, 941, 942, 946, 953,
- 957, 964, 967, 973, 981
+ 234, 235, 238, 239, 242, 243, 246, 247, 251, 254,
+ 255, 257, 258, 262, 264, 267, 269, 271, 273, 275,
+ 277, 279, 281, 283, 285, 288, 290, 293, 299, 305,
+ 311, 317, 321, 324, 330, 335, 338, 340, 342, 344,
+ 348, 350, 354, 356, 357, 359, 363, 368, 372, 376,
+ 381, 386, 390, 397, 403, 406, 409, 412, 415, 418,
+ 421, 424, 427, 430, 433, 436, 439, 446, 452, 461,
+ 468, 475, 483, 491, 498, 507, 516, 520, 522, 524,
+ 526, 528, 529, 532, 539, 541, 542, 544, 547, 548,
+ 552, 553, 557, 561, 565, 569, 570, 578, 579, 588,
+ 589, 598, 604, 607, 611, 613, 617, 621, 625, 629,
+ 631, 632, 638, 642, 644, 648, 650, 651, 662, 664,
+ 666, 671, 673, 675, 678, 682, 683, 685, 687, 689,
+ 691, 693, 695, 697, 699, 701, 705, 707, 713, 715,
+ 717, 719, 721, 723, 725, 728, 731, 734, 738, 741,
+ 742, 744, 747, 750, 754, 764, 774, 783, 798, 800,
+ 802, 809, 815, 818, 825, 833, 838, 843, 850, 857,
+ 858, 859, 863, 866, 868, 874, 880, 887, 894, 899,
+ 906, 911, 916, 923, 930, 933, 942, 944, 946, 947,
+ 951, 958, 962, 969, 972, 978, 986
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int16 yyrhs[] =
{
- 206, 0, -1, 73, -1, 74, -1, 75, -1, 76,
+ 208, 0, -1, 73, -1, 74, -1, 75, -1, 76,
-1, 77, -1, 78, -1, 79, -1, 80, -1, 81,
-1, 85, -1, 86, -1, 87, -1, 82, -1, 83,
-1, 84, -1, 116, -1, 117, -1, 118, -1, 119,
@@ -1718,93 +1720,94 @@ static const yytype_int16 yyrhs[] =
-1, 107, -1, 108, -1, 109, -1, 96, -1, 97,
-1, 98, -1, 99, -1, 26, -1, 27, -1, 11,
-1, 12, -1, 13, -1, 16, -1, 15, -1, 14,
- -1, 19, -1, 22, -1, 24, -1, 170, -1, -1,
- 170, 148, -1, -1, 20, -1, 23, -1, 175, -1,
- -1, 173, 148, -1, 42, -1, 44, -1, 43, -1,
+ -1, 19, -1, 22, -1, 24, -1, 171, -1, -1,
+ 171, 149, -1, -1, 20, -1, 23, -1, 176, -1,
+ -1, 174, 149, -1, 42, -1, 44, -1, 43, -1,
45, -1, 47, -1, 46, -1, 48, -1, 50, -1,
- -1, 145, -1, 146, -1, 147, -1, -1, 46, -1,
+ -1, 146, -1, 147, -1, 148, -1, -1, 46, -1,
48, -1, -1, 42, -1, 43, -1, 44, -1, 47,
-1, -1, 44, -1, 42, -1, -1, 61, -1, 62,
-1, 63, -1, 64, -1, 65, -1, 60, 4, -1,
135, -1, 117, -1, 134, -1, 118, -1, 137, -1,
- 138, -1, 140, -1, 141, -1, 142, -1, -1, 184,
- 183, -1, 136, -1, 139, -1, 135, -1, 134, -1,
- 143, -1, 144, -1, -1, 186, 185, -1, -1, 53,
- 4, -1, -1, 149, 53, 4, -1, 34, 22, -1,
- -1, 189, -1, -1, 149, 192, 191, -1, 189, -1,
- 53, 4, -1, 11, -1, 12, -1, 13, -1, 16,
- -1, 15, -1, 14, -1, 17, -1, 49, -1, 193,
- -1, 194, 150, -1, 228, -1, 151, 4, -1, 194,
- 152, 198, 153, 186, -1, 10, 152, 198, 153, 186,
- -1, 154, 4, 155, 194, 156, -1, 157, 4, 155,
- 194, 158, -1, 159, 199, 160, -1, 159, 160, -1,
- 157, 159, 199, 160, 158, -1, 157, 159, 160, 158,
- -1, 194, 184, -1, 194, -1, 10, -1, 195, -1,
- 197, 149, 195, -1, 197, -1, 197, 149, 39, -1,
- 39, -1, -1, 194, -1, 199, 149, 194, -1, 194,
- 154, 202, 156, -1, 194, 154, 156, -1, 194, 161,
- 22, -1, 194, 157, 202, 158, -1, 194, 159, 202,
- 160, -1, 194, 159, 160, -1, 194, 157, 159, 202,
- 160, 158, -1, 194, 157, 159, 160, 158, -1, 194,
- 40, -1, 194, 41, -1, 194, 228, -1, 194, 201,
- -1, 194, 25, -1, 168, 3, -1, 168, 5, -1,
- 168, 4, -1, 168, 6, -1, 11, 26, -1, 11,
- 27, -1, 169, 9, -1, 165, 152, 200, 38, 194,
- 153, -1, 115, 152, 200, 239, 153, -1, 129, 152,
- 200, 149, 200, 149, 200, 153, -1, 163, 152, 200,
- 149, 200, 153, -1, 164, 152, 200, 149, 200, 153,
- -1, 88, 166, 152, 200, 149, 200, 153, -1, 89,
- 167, 152, 200, 149, 200, 153, -1, 131, 152, 200,
- 149, 200, 153, -1, 132, 152, 200, 149, 200, 149,
- 200, 153, -1, 133, 152, 200, 149, 200, 149, 200,
- 153, -1, 202, 149, 200, -1, 200, -1, 32, -1,
- 33, -1, 37, -1, -1, 196, 228, -1, 121, 152,
- 205, 38, 194, 153, -1, 207, -1, -1, 208, -1,
- 207, 208, -1, -1, 31, 209, 224, -1, -1, 30,
- 210, 225, -1, 58, 57, 214, -1, 172, 18, 194,
- -1, 172, 18, 10, -1, -1, 174, 178, 204, 203,
- 200, 211, 191, -1, -1, 174, 176, 178, 204, 203,
- 200, 212, 191, -1, -1, 174, 177, 178, 204, 203,
- 194, 213, 191, -1, 174, 178, 35, 181, 205, -1,
- 51, 215, -1, 54, 148, 216, -1, 22, -1, 52,
- 148, 22, -1, 66, 148, 22, -1, 154, 217, 156,
- -1, 217, 149, 22, -1, 22, -1, -1, 218, 149,
- 194, 184, 171, -1, 194, 184, 171, -1, 218, -1,
- 218, 149, 39, -1, 39, -1, -1, 182, 196, 173,
- 152, 219, 153, 186, 190, 187, -1, 28, -1, 159,
- -1, 180, 178, 220, 221, -1, 29, -1, 160, -1,
- 231, 223, -1, 179, 178, 220, -1, -1, 59, -1,
- 3, -1, 4, -1, 9, -1, 26, -1, 27, -1,
- 40, -1, 41, -1, 25, -1, 157, 202, 158, -1,
- 201, -1, 57, 226, 22, 149, 22, -1, 7, -1,
- 8, -1, 170, -1, 173, -1, 228, -1, 227, -1,
- 194, 229, -1, 231, 232, -1, 222, 232, -1, 233,
- 172, 234, -1, 233, 236, -1, -1, 21, -1, 67,
- 230, -1, 67, 10, -1, 68, 17, 229, -1, 68,
- 11, 229, 149, 17, 229, 149, 17, 229, -1, 69,
- 168, 229, 149, 17, 229, 154, 235, 156, -1, 69,
- 168, 229, 149, 17, 229, 154, 156, -1, 70, 182,
- 196, 229, 152, 238, 153, 186, 38, 17, 229, 71,
- 17, 229, -1, 71, -1, 72, -1, 235, 168, 227,
- 149, 17, 229, -1, 168, 227, 149, 17, 229, -1,
- 172, 241, -1, 194, 154, 229, 149, 229, 156, -1,
- 237, 149, 154, 229, 149, 229, 156, -1, 194, 184,
- 229, 184, -1, 17, 184, 229, 184, -1, 238, 149,
- 194, 184, 229, 184, -1, 238, 149, 17, 184, 229,
- 184, -1, -1, -1, 239, 149, 230, -1, 56, 55,
- -1, 55, -1, 163, 194, 229, 149, 229, -1, 164,
- 194, 229, 149, 229, -1, 88, 166, 194, 229, 149,
- 229, -1, 89, 167, 194, 229, 149, 229, -1, 165,
- 230, 38, 194, -1, 129, 230, 149, 230, 149, 230,
- -1, 130, 230, 149, 194, -1, 131, 230, 149, 230,
- -1, 132, 230, 149, 230, 149, 230, -1, 133, 230,
- 149, 230, 149, 230, -1, 128, 237, -1, 240, 182,
- 196, 229, 152, 238, 153, 186, -1, 243, -1, 36,
- -1, -1, 110, 194, 188, -1, 110, 194, 149, 11,
- 229, 188, -1, 111, 194, 188, -1, 111, 194, 149,
- 11, 229, 188, -1, 112, 230, -1, 242, 113, 194,
- 229, 188, -1, 242, 114, 230, 149, 194, 229, 188,
- -1, 115, 194, 229, 239, -1
+ 138, -1, 140, -1, 141, -1, 142, -1, -1, 185,
+ 184, -1, 136, -1, 139, -1, 135, -1, 134, -1,
+ 143, -1, 144, -1, -1, 187, 186, -1, -1, 145,
+ 22, -1, -1, 53, 4, -1, -1, 150, 53, 4,
+ -1, 34, 22, -1, -1, 191, -1, -1, 150, 194,
+ 193, -1, 191, -1, 53, 4, -1, 11, -1, 12,
+ -1, 13, -1, 16, -1, 15, -1, 14, -1, 17,
+ -1, 49, -1, 195, -1, 196, 151, -1, 230, -1,
+ 152, 4, -1, 196, 153, 200, 154, 187, -1, 10,
+ 153, 200, 154, 187, -1, 155, 4, 156, 196, 157,
+ -1, 158, 4, 156, 196, 159, -1, 160, 201, 161,
+ -1, 160, 161, -1, 158, 160, 201, 161, 159, -1,
+ 158, 160, 161, 159, -1, 196, 185, -1, 196, -1,
+ 10, -1, 197, -1, 199, 150, 197, -1, 199, -1,
+ 199, 150, 39, -1, 39, -1, -1, 196, -1, 201,
+ 150, 196, -1, 196, 155, 204, 157, -1, 196, 155,
+ 157, -1, 196, 162, 22, -1, 196, 158, 204, 159,
+ -1, 196, 160, 204, 161, -1, 196, 160, 161, -1,
+ 196, 158, 160, 204, 161, 159, -1, 196, 158, 160,
+ 161, 159, -1, 196, 40, -1, 196, 41, -1, 196,
+ 230, -1, 196, 203, -1, 196, 25, -1, 169, 3,
+ -1, 169, 5, -1, 169, 4, -1, 169, 6, -1,
+ 11, 26, -1, 11, 27, -1, 170, 9, -1, 166,
+ 153, 202, 38, 196, 154, -1, 115, 153, 202, 241,
+ 154, -1, 129, 153, 202, 150, 202, 150, 202, 154,
+ -1, 164, 153, 202, 150, 202, 154, -1, 165, 153,
+ 202, 150, 202, 154, -1, 88, 167, 153, 202, 150,
+ 202, 154, -1, 89, 168, 153, 202, 150, 202, 154,
+ -1, 131, 153, 202, 150, 202, 154, -1, 132, 153,
+ 202, 150, 202, 150, 202, 154, -1, 133, 153, 202,
+ 150, 202, 150, 202, 154, -1, 204, 150, 202, -1,
+ 202, -1, 32, -1, 33, -1, 37, -1, -1, 198,
+ 230, -1, 121, 153, 207, 38, 196, 154, -1, 209,
+ -1, -1, 210, -1, 209, 210, -1, -1, 31, 211,
+ 226, -1, -1, 30, 212, 227, -1, 58, 57, 216,
+ -1, 173, 18, 196, -1, 173, 18, 10, -1, -1,
+ 175, 179, 206, 205, 202, 213, 193, -1, -1, 175,
+ 177, 179, 206, 205, 202, 214, 193, -1, -1, 175,
+ 178, 179, 206, 205, 196, 215, 193, -1, 175, 179,
+ 35, 182, 207, -1, 51, 217, -1, 54, 149, 218,
+ -1, 22, -1, 52, 149, 22, -1, 66, 149, 22,
+ -1, 155, 219, 157, -1, 219, 150, 22, -1, 22,
+ -1, -1, 220, 150, 196, 185, 172, -1, 196, 185,
+ 172, -1, 220, -1, 220, 150, 39, -1, 39, -1,
+ -1, 183, 198, 174, 153, 221, 154, 187, 192, 189,
+ 188, -1, 28, -1, 160, -1, 181, 179, 222, 223,
+ -1, 29, -1, 161, -1, 233, 225, -1, 180, 179,
+ 222, -1, -1, 59, -1, 3, -1, 4, -1, 9,
+ -1, 26, -1, 27, -1, 40, -1, 41, -1, 25,
+ -1, 158, 204, 159, -1, 203, -1, 57, 228, 22,
+ 150, 22, -1, 7, -1, 8, -1, 171, -1, 174,
+ -1, 230, -1, 229, -1, 196, 231, -1, 233, 234,
+ -1, 224, 234, -1, 235, 173, 236, -1, 235, 238,
+ -1, -1, 21, -1, 67, 232, -1, 67, 10, -1,
+ 68, 17, 231, -1, 68, 11, 231, 150, 17, 231,
+ 150, 17, 231, -1, 69, 169, 231, 150, 17, 231,
+ 155, 237, 157, -1, 69, 169, 231, 150, 17, 231,
+ 155, 157, -1, 70, 183, 198, 231, 153, 240, 154,
+ 187, 38, 17, 231, 71, 17, 231, -1, 71, -1,
+ 72, -1, 237, 169, 229, 150, 17, 231, -1, 169,
+ 229, 150, 17, 231, -1, 173, 243, -1, 196, 155,
+ 231, 150, 231, 157, -1, 239, 150, 155, 231, 150,
+ 231, 157, -1, 196, 185, 231, 185, -1, 17, 185,
+ 231, 185, -1, 240, 150, 196, 185, 231, 185, -1,
+ 240, 150, 17, 185, 231, 185, -1, -1, -1, 241,
+ 150, 232, -1, 56, 55, -1, 55, -1, 164, 196,
+ 231, 150, 231, -1, 165, 196, 231, 150, 231, -1,
+ 88, 167, 196, 231, 150, 231, -1, 89, 168, 196,
+ 231, 150, 231, -1, 166, 232, 38, 196, -1, 129,
+ 232, 150, 232, 150, 232, -1, 130, 232, 150, 196,
+ -1, 131, 232, 150, 232, -1, 132, 232, 150, 232,
+ 150, 232, -1, 133, 232, 150, 232, 150, 232, -1,
+ 128, 239, -1, 242, 183, 198, 231, 153, 240, 154,
+ 187, -1, 245, -1, 36, -1, -1, 110, 196, 190,
+ -1, 110, 196, 150, 11, 231, 190, -1, 111, 196,
+ 190, -1, 111, 196, 150, 11, 231, 190, -1, 112,
+ 232, -1, 244, 113, 196, 231, 190, -1, 244, 114,
+ 232, 150, 196, 231, 190, -1, 115, 196, 231, 241,
+ -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
@@ -1822,26 +1825,26 @@ static const yytype_uint16 yyrline[] =
1192, 1193, 1194, 1198, 1199, 1200, 1203, 1204, 1205, 1206,
1207, 1208, 1209, 1216, 1217, 1218, 1219, 1220, 1221, 1222,
1223, 1224, 1227, 1228, 1233, 1234, 1235, 1236, 1237, 1238,
- 1241, 1242, 1249, 1250, 1256, 1257, 1265, 1273, 1274, 1279,
- 1280, 1281, 1286, 1299, 1299, 1299, 1299, 1299, 1299, 1299,
- 1302, 1306, 1310, 1317, 1322, 1330, 1360, 1385, 1390, 1400,
- 1410, 1414, 1424, 1431, 1440, 1447, 1452, 1457, 1464, 1465,
- 1472, 1479, 1487, 1493, 1505, 1533, 1549, 1576, 1604, 1630,
- 1650, 1676, 1696, 1708, 1715, 1781, 1791, 1801, 1807, 1817,
- 1823, 1833, 1838, 1843, 1856, 1868, 1890, 1898, 1904, 1915,
- 1920, 1925, 1931, 1937, 1946, 1950, 1958, 1958, 1961, 1961,
- 1964, 1976, 1997, 2002, 2010, 2011, 2015, 2015, 2019, 2019,
- 2022, 2025, 2049, 2060, 2060, 2071, 2070, 2080, 2079, 2090,
- 2130, 2133, 2139, 2149, 2153, 2158, 2160, 2165, 2170, 2179,
- 2189, 2200, 2204, 2213, 2222, 2227, 2357, 2357, 2359, 2368,
- 2368, 2370, 2375, 2387, 2391, 2396, 2400, 2404, 2408, 2412,
- 2416, 2420, 2424, 2428, 2453, 2457, 2467, 2471, 2475, 2480,
- 2487, 2487, 2493, 2502, 2506, 2515, 2524, 2533, 2537, 2544,
- 2548, 2552, 2557, 2567, 2586, 2595, 2679, 2683, 2690, 2701,
- 2714, 2724, 2735, 2745, 2756, 2764, 2774, 2781, 2784, 2785,
- 2792, 2796, 2801, 2817, 2834, 2848, 2862, 2874, 2882, 2889,
- 2895, 2901, 2907, 2922, 3013, 3018, 3022, 3029, 3036, 3044,
- 3051, 3059, 3067, 3081, 3098
+ 1241, 1242, 1247, 1248, 1255, 1256, 1262, 1263, 1271, 1279,
+ 1280, 1285, 1286, 1287, 1292, 1305, 1305, 1305, 1305, 1305,
+ 1305, 1305, 1308, 1312, 1316, 1323, 1328, 1336, 1366, 1391,
+ 1396, 1406, 1416, 1420, 1430, 1437, 1446, 1453, 1458, 1463,
+ 1470, 1471, 1478, 1485, 1493, 1499, 1511, 1539, 1555, 1582,
+ 1610, 1636, 1656, 1682, 1702, 1714, 1721, 1787, 1797, 1807,
+ 1813, 1823, 1829, 1839, 1844, 1849, 1862, 1874, 1896, 1904,
+ 1910, 1921, 1926, 1931, 1937, 1943, 1952, 1956, 1964, 1964,
+ 1967, 1967, 1970, 1982, 2003, 2008, 2016, 2017, 2021, 2021,
+ 2025, 2025, 2028, 2031, 2055, 2066, 2066, 2077, 2076, 2086,
+ 2085, 2096, 2136, 2139, 2145, 2155, 2159, 2164, 2166, 2171,
+ 2176, 2185, 2195, 2206, 2210, 2219, 2228, 2233, 2367, 2367,
+ 2369, 2378, 2378, 2380, 2385, 2397, 2401, 2406, 2410, 2414,
+ 2418, 2422, 2426, 2430, 2434, 2438, 2463, 2467, 2477, 2481,
+ 2485, 2490, 2497, 2497, 2503, 2512, 2516, 2525, 2534, 2543,
+ 2547, 2554, 2558, 2562, 2567, 2577, 2596, 2605, 2689, 2693,
+ 2700, 2711, 2724, 2734, 2745, 2755, 2766, 2774, 2784, 2791,
+ 2794, 2795, 2802, 2806, 2811, 2827, 2844, 2858, 2872, 2884,
+ 2892, 2899, 2905, 2911, 2917, 2932, 3023, 3028, 3032, 3039,
+ 3046, 3054, 3061, 3069, 3077, 3091, 3108
};
#endif
@@ -1872,7 +1875,7 @@ static const char *const yytname[] =
"PTRTOINT", "PHI_TOK", "SELECT", "VAARG", "EXTRACTELEMENT",
"INSERTELEMENT", "SHUFFLEVECTOR", "SIGNEXT", "ZEROEXT", "NORETURN",
"INREG", "SRET", "NOUNWIND", "NOALIAS", "BYVAL", "NEST", "READNONE",
- "READONLY", "DEFAULT", "HIDDEN", "PROTECTED", "'='", "','", "'*'",
+ "READONLY", "GC", "DEFAULT", "HIDDEN", "PROTECTED", "'='", "','", "'*'",
"'\\\\'", "'('", "')'", "'['", "'x'", "']'", "'<'", "'>'", "'{'", "'}'",
"'c'", "$accept", "ArithmeticOps", "LogicalOps", "CastOps",
"IPredicates", "FPredicates", "IntType", "FPType", "LocalName",
@@ -1880,19 +1883,19 @@ static const char *const yytname[] =
"GlobalAssign", "GVInternalLinkage", "GVExternalLinkage",
"GVVisibilityStyle", "FunctionDeclareLinkage", "FunctionDefineLinkage",
"AliasLinkage", "OptCallingConv", "ParamAttr", "OptParamAttrs",
- "FuncAttr", "OptFuncAttrs", "OptAlign", "OptCAlign", "SectionString",
- "OptSection", "GlobalVarAttributes", "GlobalVarAttribute", "PrimType",
- "Types", "ArgType", "ResultTypes", "ArgTypeList", "ArgTypeListI",
- "TypeListI", "ConstVal", "ConstExpr", "ConstVector", "GlobalType",
- "ThreadLocal", "AliaseeRef", "Module", "DefinitionList", "Definition",
- "@1", "@2", "@3", "@4", "@5", "AsmBlock", "TargetDefinition",
- "LibrariesDefinition", "LibList", "ArgListH", "ArgList",
- "FunctionHeaderH", "BEGIN", "FunctionHeader", "END", "Function",
- "FunctionProto", "OptSideEffect", "ConstValueRef", "SymbolicValueRef",
- "ValueRef", "ResolvedVal", "BasicBlockList", "BasicBlock",
- "InstructionList", "BBTerminatorInst", "JumpTable", "Inst", "PHIList",
- "ParamList", "IndexList", "OptTailCall", "InstVal", "OptVolatile",
- "MemoryInst", 0
+ "FuncAttr", "OptFuncAttrs", "OptGC", "OptAlign", "OptCAlign",
+ "SectionString", "OptSection", "GlobalVarAttributes",
+ "GlobalVarAttribute", "PrimType", "Types", "ArgType", "ResultTypes",
+ "ArgTypeList", "ArgTypeListI", "TypeListI", "ConstVal", "ConstExpr",
+ "ConstVector", "GlobalType", "ThreadLocal", "AliaseeRef", "Module",
+ "DefinitionList", "Definition", "@1", "@2", "@3", "@4", "@5", "AsmBlock",
+ "TargetDefinition", "LibrariesDefinition", "LibList", "ArgListH",
+ "ArgList", "FunctionHeaderH", "BEGIN", "FunctionHeader", "END",
+ "Function", "FunctionProto", "OptSi