|
|
|
@@ -1,5 +1,5 @@
|
|
|
|
|
|
|
|
|
|
/* A Bison parser, made from /Users/sabre/llvm/utils/TableGen/FileParser.y
|
|
|
|
|
/* A Bison parser, made from /Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y
|
|
|
|
|
by GNU Bison version 1.28 */
|
|
|
|
|
|
|
|
|
|
#define YYBISON 1 /* Identify Bison output. */
|
|
|
|
@@ -32,7 +32,7 @@
|
|
|
|
|
#define STRVAL 275
|
|
|
|
|
#define CODEFRAGMENT 276
|
|
|
|
|
|
|
|
|
|
#line 14 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 14 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
|
|
|
|
|
#include "Record.h"
|
|
|
|
|
#include "llvm/ADT/StringExtras.h"
|
|
|
|
@@ -207,7 +207,7 @@ static void addSubClass(Record *SC, const std::vector<Init*> &TemplateArgs) {
|
|
|
|
|
using namespace llvm;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#line 189 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 189 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
typedef union {
|
|
|
|
|
std::string* StrVal;
|
|
|
|
|
int IntVal;
|
|
|
|
@@ -1005,7 +1005,7 @@ yyreduce:
|
|
|
|
|
switch (yyn) {
|
|
|
|
|
|
|
|
|
|
case 1:
|
|
|
|
|
#line 223 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 223 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.Rec = Records.getClass(*yyvsp[0].StrVal);
|
|
|
|
|
if (yyval.Rec == 0) {
|
|
|
|
@@ -1016,97 +1016,97 @@ case 1:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 2:
|
|
|
|
|
#line 234 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 234 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{ // string type
|
|
|
|
|
yyval.Ty = new StringRecTy();
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 3:
|
|
|
|
|
#line 236 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 236 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{ // bit type
|
|
|
|
|
yyval.Ty = new BitRecTy();
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 4:
|
|
|
|
|
#line 238 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 238 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{ // bits<x> type
|
|
|
|
|
yyval.Ty = new BitsRecTy(yyvsp[-1].IntVal);
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 5:
|
|
|
|
|
#line 240 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 240 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{ // int type
|
|
|
|
|
yyval.Ty = new IntRecTy();
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 6:
|
|
|
|
|
#line 242 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 242 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{ // list<x> type
|
|
|
|
|
yyval.Ty = new ListRecTy(yyvsp[-1].Ty);
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 7:
|
|
|
|
|
#line 244 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 244 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{ // code type
|
|
|
|
|
yyval.Ty = new CodeRecTy();
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 8:
|
|
|
|
|
#line 246 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 246 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{ // dag type
|
|
|
|
|
yyval.Ty = new DagRecTy();
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 9:
|
|
|
|
|
#line 248 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 248 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{ // Record Type
|
|
|
|
|
yyval.Ty = new RecordRecTy(yyvsp[0].Rec);
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 10:
|
|
|
|
|
#line 252 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 252 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{ yyval.IntVal = 0; ;
|
|
|
|
|
break;}
|
|
|
|
|
case 11:
|
|
|
|
|
#line 252 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 252 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{ yyval.IntVal = 1; ;
|
|
|
|
|
break;}
|
|
|
|
|
case 12:
|
|
|
|
|
#line 254 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 254 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{ yyval.Initializer = 0; ;
|
|
|
|
|
break;}
|
|
|
|
|
case 13:
|
|
|
|
|
#line 254 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 254 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{ yyval.Initializer = yyvsp[0].Initializer; ;
|
|
|
|
|
break;}
|
|
|
|
|
case 14:
|
|
|
|
|
#line 256 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 256 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.Initializer = new IntInit(yyvsp[0].IntVal);
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 15:
|
|
|
|
|
#line 258 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 258 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.Initializer = new StringInit(*yyvsp[0].StrVal);
|
|
|
|
|
delete yyvsp[0].StrVal;
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 16:
|
|
|
|
|
#line 261 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 261 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.Initializer = new CodeInit(*yyvsp[0].StrVal);
|
|
|
|
|
delete yyvsp[0].StrVal;
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 17:
|
|
|
|
|
#line 264 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 264 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.Initializer = new UnsetInit();
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 18:
|
|
|
|
|
#line 266 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 266 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
BitsInit *Init = new BitsInit(yyvsp[-1].FieldList->size());
|
|
|
|
|
for (unsigned i = 0, e = yyvsp[-1].FieldList->size(); i != e; ++i) {
|
|
|
|
@@ -1123,7 +1123,7 @@ case 18:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 19:
|
|
|
|
|
#line 279 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 279 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
// This is a CLASS<initvalslist> expression. This is supposed to synthesize
|
|
|
|
|
// a new anonymous definition, deriving from CLASS<initvalslist> with no
|
|
|
|
@@ -1155,7 +1155,7 @@ case 19:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 20:
|
|
|
|
|
#line 307 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 307 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
if (const RecordVal *RV = (CurRec ? CurRec->getValue(*yyvsp[0].StrVal) : 0)) {
|
|
|
|
|
yyval.Initializer = new VarInit(*yyvsp[0].StrVal, RV->getType());
|
|
|
|
@@ -1174,7 +1174,7 @@ case 20:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 21:
|
|
|
|
|
#line 322 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 322 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.Initializer = yyvsp[-3].Initializer->convertInitializerBitRange(*yyvsp[-1].BitList);
|
|
|
|
|
if (yyval.Initializer == 0) {
|
|
|
|
@@ -1185,14 +1185,14 @@ case 21:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 22:
|
|
|
|
|
#line 329 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 329 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.Initializer = new ListInit(*yyvsp[-1].FieldList);
|
|
|
|
|
delete yyvsp[-1].FieldList;
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 23:
|
|
|
|
|
#line 332 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 332 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
if (!yyvsp[-2].Initializer->getFieldType(*yyvsp[0].StrVal)) {
|
|
|
|
|
err() << "Cannot access field '" << *yyvsp[0].StrVal << "' of value '" << *yyvsp[-2].Initializer << "!\n";
|
|
|
|
@@ -1203,7 +1203,7 @@ case 23:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 24:
|
|
|
|
|
#line 339 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 339 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
Record *D = Records.getDef(*yyvsp[-2].StrVal);
|
|
|
|
|
if (D == 0) {
|
|
|
|
@@ -1215,7 +1215,7 @@ case 24:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 25:
|
|
|
|
|
#line 347 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 347 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
std::reverse(yyvsp[-1].BitList->begin(), yyvsp[-1].BitList->end());
|
|
|
|
|
yyval.Initializer = yyvsp[-3].Initializer->convertInitListSlice(*yyvsp[-1].BitList);
|
|
|
|
@@ -1227,7 +1227,7 @@ case 25:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 26:
|
|
|
|
|
#line 355 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 355 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.Initializer = yyvsp[-3].Initializer->getBinaryOp(Init::SHL, yyvsp[-1].Initializer);
|
|
|
|
|
if (yyval.Initializer == 0) {
|
|
|
|
@@ -1237,7 +1237,7 @@ case 26:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 27:
|
|
|
|
|
#line 361 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 361 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.Initializer = yyvsp[-3].Initializer->getBinaryOp(Init::SRA, yyvsp[-1].Initializer);
|
|
|
|
|
if (yyval.Initializer == 0) {
|
|
|
|
@@ -1247,7 +1247,7 @@ case 27:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 28:
|
|
|
|
|
#line 367 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 367 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.Initializer = yyvsp[-3].Initializer->getBinaryOp(Init::SRL, yyvsp[-1].Initializer);
|
|
|
|
|
if (yyval.Initializer == 0) {
|
|
|
|
@@ -1257,19 +1257,19 @@ case 28:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 29:
|
|
|
|
|
#line 375 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 375 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.StrVal = new std::string();
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 30:
|
|
|
|
|
#line 378 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 378 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.StrVal = yyvsp[0].StrVal;
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 31:
|
|
|
|
|
#line 382 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 382 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.DagValueList = new std::vector<std::pair<Init*, std::string> >();
|
|
|
|
|
yyval.DagValueList->push_back(std::make_pair(yyvsp[-1].Initializer, *yyvsp[0].StrVal));
|
|
|
|
@@ -1277,7 +1277,7 @@ case 31:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 32:
|
|
|
|
|
#line 387 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 387 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyvsp[-3].DagValueList->push_back(std::make_pair(yyvsp[-1].Initializer, *yyvsp[0].StrVal));
|
|
|
|
|
delete yyvsp[0].StrVal;
|
|
|
|
@@ -1285,24 +1285,24 @@ case 32:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 33:
|
|
|
|
|
#line 393 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 393 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.DagValueList = new std::vector<std::pair<Init*, std::string> >();
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 34:
|
|
|
|
|
#line 396 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 396 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{ yyval.DagValueList = yyvsp[0].DagValueList; ;
|
|
|
|
|
break;}
|
|
|
|
|
case 35:
|
|
|
|
|
#line 399 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 399 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.BitList = new std::vector<unsigned>();
|
|
|
|
|
yyval.BitList->push_back(yyvsp[0].IntVal);
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 36:
|
|
|
|
|
#line 402 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 402 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
if (yyvsp[-2].IntVal < 0 || yyvsp[0].IntVal < 0) {
|
|
|
|
|
err() << "Invalid range: " << yyvsp[-2].IntVal << "-" << yyvsp[0].IntVal << "!\n";
|
|
|
|
@@ -1319,7 +1319,7 @@ case 36:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 37:
|
|
|
|
|
#line 415 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 415 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyvsp[0].IntVal = -yyvsp[0].IntVal;
|
|
|
|
|
if (yyvsp[-1].IntVal < 0 || yyvsp[0].IntVal < 0) {
|
|
|
|
@@ -1337,13 +1337,13 @@ case 37:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 38:
|
|
|
|
|
#line 429 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 429 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
(yyval.BitList=yyvsp[-2].BitList)->push_back(yyvsp[0].IntVal);
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 39:
|
|
|
|
|
#line 431 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 431 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
if (yyvsp[-2].IntVal < 0 || yyvsp[0].IntVal < 0) {
|
|
|
|
|
err() << "Invalid range: " << yyvsp[-2].IntVal << "-" << yyvsp[0].IntVal << "!\n";
|
|
|
|
@@ -1360,7 +1360,7 @@ case 39:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 40:
|
|
|
|
|
#line 444 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 444 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyvsp[0].IntVal = -yyvsp[0].IntVal;
|
|
|
|
|
if (yyvsp[-1].IntVal < 0 || yyvsp[0].IntVal < 0) {
|
|
|
|
@@ -1378,44 +1378,44 @@ case 40:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 41:
|
|
|
|
|
#line 460 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 460 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{ yyval.BitList = yyvsp[0].BitList; std::reverse(yyvsp[0].BitList->begin(), yyvsp[0].BitList->end()); ;
|
|
|
|
|
break;}
|
|
|
|
|
case 42:
|
|
|
|
|
#line 462 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 462 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{ yyval.BitList = 0; ;
|
|
|
|
|
break;}
|
|
|
|
|
case 43:
|
|
|
|
|
#line 462 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 462 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{ yyval.BitList = yyvsp[-1].BitList; ;
|
|
|
|
|
break;}
|
|
|
|
|
case 44:
|
|
|
|
|
#line 466 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 466 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.FieldList = new std::vector<Init*>();
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 45:
|
|
|
|
|
#line 468 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 468 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.FieldList = yyvsp[0].FieldList;
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 46:
|
|
|
|
|
#line 472 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 472 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.FieldList = new std::vector<Init*>();
|
|
|
|
|
yyval.FieldList->push_back(yyvsp[0].Initializer);
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 47:
|
|
|
|
|
#line 475 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 475 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
(yyval.FieldList = yyvsp[-2].FieldList)->push_back(yyvsp[0].Initializer);
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 48:
|
|
|
|
|
#line 479 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 479 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
std::string DecName = *yyvsp[-1].StrVal;
|
|
|
|
|
if (ParsingTemplateArgs)
|
|
|
|
@@ -1427,13 +1427,13 @@ case 48:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 49:
|
|
|
|
|
#line 489 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 489 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
delete yyvsp[-1].StrVal;
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 50:
|
|
|
|
|
#line 491 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 491 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
setValue(*yyvsp[-4].StrVal, yyvsp[-3].BitList, yyvsp[-1].Initializer);
|
|
|
|
|
delete yyvsp[-4].StrVal;
|
|
|
|
@@ -1441,19 +1441,19 @@ case 50:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 55:
|
|
|
|
|
#line 500 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 500 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.SubClassRef = new SubClassRefTy(yyvsp[0].Rec, new std::vector<Init*>());
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 56:
|
|
|
|
|
#line 502 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 502 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.SubClassRef = new SubClassRefTy(yyvsp[-3].Rec, yyvsp[-1].FieldList);
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 57:
|
|
|
|
|
#line 506 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 506 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.SubClassList = new std::vector<SubClassRefTy>();
|
|
|
|
|
yyval.SubClassList->push_back(*yyvsp[0].SubClassRef);
|
|
|
|
@@ -1461,52 +1461,52 @@ case 57:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 58:
|
|
|
|
|
#line 511 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 511 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
(yyval.SubClassList=yyvsp[-2].SubClassList)->push_back(*yyvsp[0].SubClassRef);
|
|
|
|
|
delete yyvsp[0].SubClassRef;
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 59:
|
|
|
|
|
#line 516 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 516 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.SubClassList = new std::vector<SubClassRefTy>();
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 60:
|
|
|
|
|
#line 519 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 519 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.SubClassList = yyvsp[0].SubClassList;
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 61:
|
|
|
|
|
#line 523 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 523 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
CurRec->addTemplateArg(*yyvsp[0].StrVal);
|
|
|
|
|
delete yyvsp[0].StrVal;
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 62:
|
|
|
|
|
#line 526 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 526 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
CurRec->addTemplateArg(*yyvsp[0].StrVal);
|
|
|
|
|
delete yyvsp[0].StrVal;
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 63:
|
|
|
|
|
#line 531 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 531 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{;
|
|
|
|
|
break;}
|
|
|
|
|
case 66:
|
|
|
|
|
#line 534 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 534 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{ yyval.StrVal = yyvsp[0].StrVal; ;
|
|
|
|
|
break;}
|
|
|
|
|
case 67:
|
|
|
|
|
#line 534 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 534 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{ yyval.StrVal = new std::string(); ;
|
|
|
|
|
break;}
|
|
|
|
|
case 68:
|
|
|
|
|
#line 536 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 536 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
static unsigned AnonCounter = 0;
|
|
|
|
|
if (yyvsp[0].StrVal->empty())
|
|
|
|
@@ -1515,7 +1515,7 @@ case 68:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 69:
|
|
|
|
|
#line 543 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 543 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
// If a class of this name already exists, it must be a forward ref.
|
|
|
|
|
if ((CurRec = Records.getClass(*yyvsp[0].StrVal))) {
|
|
|
|
@@ -1535,7 +1535,7 @@ case 69:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 70:
|
|
|
|
|
#line 561 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 561 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
CurRec = new Record(*yyvsp[0].StrVal);
|
|
|
|
|
delete yyvsp[0].StrVal;
|
|
|
|
@@ -1549,7 +1549,7 @@ case 70:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 71:
|
|
|
|
|
#line 573 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 573 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
for (unsigned i = 0, e = yyvsp[0].SubClassList->size(); i != e; ++i) {
|
|
|
|
|
addSubClass((*yyvsp[0].SubClassList)[i].first, *(*yyvsp[0].SubClassList)[i].second);
|
|
|
|
@@ -1567,32 +1567,32 @@ case 71:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 72:
|
|
|
|
|
#line 587 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 587 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.Rec = CurRec;
|
|
|
|
|
CurRec = 0;
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 73:
|
|
|
|
|
#line 592 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 592 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
ParsingTemplateArgs = true;
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 74:
|
|
|
|
|
#line 594 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 594 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
ParsingTemplateArgs = false;
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 75:
|
|
|
|
|
#line 596 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 596 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyval.Rec = yyvsp[0].Rec;
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 76:
|
|
|
|
|
#line 600 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 600 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
yyvsp[0].Rec->resolveReferences();
|
|
|
|
|
|
|
|
|
@@ -1602,38 +1602,38 @@ case 76:
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 79:
|
|
|
|
|
#line 611 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 611 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
LetStack.back().push_back(LetRecord(*yyvsp[-3].StrVal, yyvsp[-2].BitList, yyvsp[0].Initializer));
|
|
|
|
|
delete yyvsp[-3].StrVal; delete yyvsp[-2].BitList;
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 82:
|
|
|
|
|
#line 619 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 619 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{ LetStack.push_back(std::vector<LetRecord>()); ;
|
|
|
|
|
break;}
|
|
|
|
|
case 84:
|
|
|
|
|
#line 622 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 622 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
LetStack.pop_back();
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 85:
|
|
|
|
|
#line 625 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 625 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{
|
|
|
|
|
LetStack.pop_back();
|
|
|
|
|
;
|
|
|
|
|
break;}
|
|
|
|
|
case 86:
|
|
|
|
|
#line 629 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 629 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{;
|
|
|
|
|
break;}
|
|
|
|
|
case 87:
|
|
|
|
|
#line 629 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 629 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{;
|
|
|
|
|
break;}
|
|
|
|
|
case 88:
|
|
|
|
|
#line 631 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 631 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
{;
|
|
|
|
|
break;}
|
|
|
|
|
}
|
|
|
|
@@ -1858,7 +1858,7 @@ yyerrhandle:
|
|
|
|
|
}
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
#line 633 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
|
|
|
|
#line 633 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int yyerror(const char *ErrorMsg) {
|
|
|
|
|