mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
Added support for the extractelement operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25181 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
56107e21a5
commit
b52ee7f5ff
@ -102,6 +102,8 @@ Constant *llvm::ConstantFoldInstruction(Instruction *I) {
|
|||||||
if (Constant *Op2 = dyn_cast<Constant>(I->getOperand(2)))
|
if (Constant *Op2 = dyn_cast<Constant>(I->getOperand(2)))
|
||||||
return ConstantExpr::getSelect(Op0, Op1, Op2);
|
return ConstantExpr::getSelect(Op0, Op1, Op2);
|
||||||
return 0;
|
return 0;
|
||||||
|
case Instruction::ExtractElement:
|
||||||
|
return ConstantExpr::getExtractElement(Op0, Op1);
|
||||||
case Instruction::GetElementPtr:
|
case Instruction::GetElementPtr:
|
||||||
std::vector<Constant*> IdxList;
|
std::vector<Constant*> IdxList;
|
||||||
IdxList.reserve(I->getNumOperands()-1);
|
IdxList.reserve(I->getNumOperands()-1);
|
||||||
|
@ -347,6 +347,19 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// ExtractElementConstantExpr - This class is private to Constants.cpp, and is used
|
||||||
|
/// behind the scenes to implement extractelement constant exprs.
|
||||||
|
class ExtractElementConstantExpr : public ConstantExpr {
|
||||||
|
Use Ops[2];
|
||||||
|
public:
|
||||||
|
ExtractElementConstantExpr(Constant *C1, Constant *C2)
|
||||||
|
: ConstantExpr(cast<PackedType>(C1->getType())->getElementType(),
|
||||||
|
Instruction::ExtractElement, Ops, 2) {
|
||||||
|
Ops[0].init(C1, this);
|
||||||
|
Ops[1].init(C2, this);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/// GetElementPtrConstantExpr - This class is private to Constants.cpp, and is
|
/// GetElementPtrConstantExpr - This class is private to Constants.cpp, and is
|
||||||
/// used behind the scenes to implement getelementpr constant exprs.
|
/// used behind the scenes to implement getelementpr constant exprs.
|
||||||
struct GetElementPtrConstantExpr : public ConstantExpr {
|
struct GetElementPtrConstantExpr : public ConstantExpr {
|
||||||
@ -1141,6 +1154,8 @@ namespace llvm {
|
|||||||
return new BinaryConstantExpr(V.first, V.second[0], V.second[1]);
|
return new BinaryConstantExpr(V.first, V.second[0], V.second[1]);
|
||||||
if (V.first == Instruction::Select)
|
if (V.first == Instruction::Select)
|
||||||
return new SelectConstantExpr(V.second[0], V.second[1], V.second[2]);
|
return new SelectConstantExpr(V.second[0], V.second[1], V.second[2]);
|
||||||
|
if (V.first == Instruction::ExtractElement)
|
||||||
|
return new ExtractElementConstantExpr(V.second[0], V.second[1]);
|
||||||
|
|
||||||
assert(V.first == Instruction::GetElementPtr && "Invalid ConstantExpr!");
|
assert(V.first == Instruction::GetElementPtr && "Invalid ConstantExpr!");
|
||||||
|
|
||||||
@ -1386,6 +1401,23 @@ Constant *ConstantExpr::getGetElementPtr(Constant *C,
|
|||||||
return getGetElementPtrTy(PointerType::get(Ty), C, IdxList);
|
return getGetElementPtrTy(PointerType::get(Ty), C, IdxList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Constant *ConstantExpr::getExtractElementTy(const Type *ReqTy, Constant *Val,
|
||||||
|
Constant *Idx) {
|
||||||
|
// Look up the constant in the table first to ensure uniqueness
|
||||||
|
std::vector<Constant*> ArgVec(1, Val);
|
||||||
|
ArgVec.push_back(Idx);
|
||||||
|
const ExprMapKeyType &Key = std::make_pair(Instruction::ExtractElement,ArgVec);
|
||||||
|
return ExprConstants.getOrCreate(ReqTy, Key);
|
||||||
|
}
|
||||||
|
|
||||||
|
Constant *ConstantExpr::getExtractElement(Constant *Val, Constant *Idx) {
|
||||||
|
assert(isa<PackedType>(Val->getType()) &&
|
||||||
|
"Tried to create extractelement operation on non-packed type!");
|
||||||
|
assert(Idx->getType() == Type::UIntTy &&
|
||||||
|
"Index must be uint type!");
|
||||||
|
return getExtractElementTy(cast<PackedType>(Val->getType())->getElementType(),
|
||||||
|
Val, Idx);
|
||||||
|
}
|
||||||
|
|
||||||
// destroyConstant - Remove the constant from the constant table...
|
// destroyConstant - Remove the constant from the constant table...
|
||||||
//
|
//
|
||||||
@ -1581,6 +1613,12 @@ void ConstantExpr::replaceUsesOfWithOnConstant(Value *From, Value *ToV,
|
|||||||
if (C2 == From) C2 = To;
|
if (C2 == From) C2 = To;
|
||||||
if (C3 == From) C3 = To;
|
if (C3 == From) C3 = To;
|
||||||
Replacement = ConstantExpr::getSelect(C1, C2, C3);
|
Replacement = ConstantExpr::getSelect(C1, C2, C3);
|
||||||
|
} else if (getOpcode() == Instruction::ExtractElement) {
|
||||||
|
Constant *C1 = getOperand(0);
|
||||||
|
Constant *C2 = getOperand(1);
|
||||||
|
if (C1 == From) C1 = To;
|
||||||
|
if (C2 == From) C2 = To;
|
||||||
|
Replacement = ConstantExpr::getExtractElement(C1, C2);
|
||||||
} else if (getNumOperands() == 2) {
|
} else if (getNumOperands() == 2) {
|
||||||
Constant *C1 = getOperand(0);
|
Constant *C1 = getOperand(0);
|
||||||
Constant *C2 = getOperand(1);
|
Constant *C2 = getOperand(1);
|
||||||
|
@ -120,6 +120,7 @@ const char *Instruction::getOpcodeName(unsigned OpCode) {
|
|||||||
case Shl: return "shl";
|
case Shl: return "shl";
|
||||||
case Shr: return "shr";
|
case Shr: return "shr";
|
||||||
case VAArg: return "va_arg";
|
case VAArg: return "va_arg";
|
||||||
|
case ExtractElement: return "extractelement";
|
||||||
|
|
||||||
default: return "<Invalid operator> ";
|
default: return "<Invalid operator> ";
|
||||||
}
|
}
|
||||||
|
@ -795,6 +795,26 @@ const Type* GetElementPtrInst::getIndexedType(const Type *Ptr, Value *Idx) {
|
|||||||
return PTy->getElementType();
|
return PTy->getElementType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//===----------------------------------------------------------------------===//
|
||||||
|
// ExtractElementInst Implementation
|
||||||
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
ExtractElementInst::ExtractElementInst(Value *Val, Value *Index,
|
||||||
|
const std::string &Name, Instruction *InsertBef)
|
||||||
|
: Instruction(cast<PackedType>(Val->getType())->getElementType(),
|
||||||
|
ExtractElement, Ops, 2, Name, InsertBef) {
|
||||||
|
Ops[0].init(Val, this);
|
||||||
|
Ops[1].init(Index, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
ExtractElementInst::ExtractElementInst(Value *Val, Value *Index,
|
||||||
|
const std::string &Name, BasicBlock *InsertAE)
|
||||||
|
: Instruction(cast<PackedType>(Val->getType())->getElementType(),
|
||||||
|
ExtractElement, Ops, 2, Name, InsertAE) {
|
||||||
|
Ops[0].init(Val, this);
|
||||||
|
Ops[1].init(Index, this);
|
||||||
|
}
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// BinaryOperator Class
|
// BinaryOperator Class
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
@ -1155,6 +1175,7 @@ CallInst *CallInst::clone() const { return new CallInst(*this); }
|
|||||||
ShiftInst *ShiftInst::clone() const { return new ShiftInst(*this); }
|
ShiftInst *ShiftInst::clone() const { return new ShiftInst(*this); }
|
||||||
SelectInst *SelectInst::clone() const { return new SelectInst(*this); }
|
SelectInst *SelectInst::clone() const { return new SelectInst(*this); }
|
||||||
VAArgInst *VAArgInst::clone() const { return new VAArgInst(*this); }
|
VAArgInst *VAArgInst::clone() const { return new VAArgInst(*this); }
|
||||||
|
ExtractElementInst *ExtractElementInst::clone() const {return new ExtractElementInst(*this); }
|
||||||
PHINode *PHINode::clone() const { return new PHINode(*this); }
|
PHINode *PHINode::clone() const { return new PHINode(*this); }
|
||||||
ReturnInst *ReturnInst::clone() const { return new ReturnInst(*this); }
|
ReturnInst *ReturnInst::clone() const { return new ReturnInst(*this); }
|
||||||
BranchInst *BranchInst::clone() const { return new BranchInst(*this); }
|
BranchInst *BranchInst::clone() const { return new BranchInst(*this); }
|
||||||
|
@ -178,6 +178,7 @@ namespace { // Anonymous namespace for class
|
|||||||
void visitPHINode(PHINode &PN);
|
void visitPHINode(PHINode &PN);
|
||||||
void visitBinaryOperator(BinaryOperator &B);
|
void visitBinaryOperator(BinaryOperator &B);
|
||||||
void visitShiftInst(ShiftInst &SI);
|
void visitShiftInst(ShiftInst &SI);
|
||||||
|
void visitExtractElementInst(ExtractElementInst &EI);
|
||||||
void visitVAArgInst(VAArgInst &VAA) { visitInstruction(VAA); }
|
void visitVAArgInst(VAArgInst &VAA) { visitInstruction(VAA); }
|
||||||
void visitCallInst(CallInst &CI);
|
void visitCallInst(CallInst &CI);
|
||||||
void visitGetElementPtrInst(GetElementPtrInst &GEP);
|
void visitGetElementPtrInst(GetElementPtrInst &GEP);
|
||||||
@ -532,6 +533,18 @@ void Verifier::visitShiftInst(ShiftInst &SI) {
|
|||||||
visitInstruction(SI);
|
visitInstruction(SI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Verifier::visitExtractElementInst(ExtractElementInst &EI) {
|
||||||
|
Assert1(isa<PackedType>(EI.getOperand(0)->getType()),
|
||||||
|
"First operand to extractelement must be packed type!", &EI);
|
||||||
|
Assert1(EI.getOperand(1)->getType() == Type::UIntTy,
|
||||||
|
"Second operand to extractelement must be uint type!", &EI);
|
||||||
|
Assert1(EI.getType() ==
|
||||||
|
cast<PackedType>(EI.getOperand(0)->getType())->getElementType(),
|
||||||
|
"Extractelement return type must be same as "
|
||||||
|
"first operand element type!", &EI);
|
||||||
|
visitInstruction(EI);
|
||||||
|
}
|
||||||
|
|
||||||
void Verifier::visitGetElementPtrInst(GetElementPtrInst &GEP) {
|
void Verifier::visitGetElementPtrInst(GetElementPtrInst &GEP) {
|
||||||
const Type *ElTy =
|
const Type *ElTy =
|
||||||
GetElementPtrInst::getIndexedType(GEP.getOperand(0)->getType(),
|
GetElementPtrInst::getIndexedType(GEP.getOperand(0)->getType(),
|
||||||
|
@ -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 */
|
by GNU Bison version 1.28 */
|
||||||
|
|
||||||
#define YYBISON 1 /* Identify Bison output. */
|
#define YYBISON 1 /* Identify Bison output. */
|
||||||
@ -32,7 +32,7 @@
|
|||||||
#define STRVAL 275
|
#define STRVAL 275
|
||||||
#define CODEFRAGMENT 276
|
#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 "Record.h"
|
||||||
#include "llvm/ADT/StringExtras.h"
|
#include "llvm/ADT/StringExtras.h"
|
||||||
@ -207,7 +207,7 @@ static void addSubClass(Record *SC, const std::vector<Init*> &TemplateArgs) {
|
|||||||
using namespace llvm;
|
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 {
|
typedef union {
|
||||||
std::string* StrVal;
|
std::string* StrVal;
|
||||||
int IntVal;
|
int IntVal;
|
||||||
@ -1005,7 +1005,7 @@ yyreduce:
|
|||||||
switch (yyn) {
|
switch (yyn) {
|
||||||
|
|
||||||
case 1:
|
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);
|
yyval.Rec = Records.getClass(*yyvsp[0].StrVal);
|
||||||
if (yyval.Rec == 0) {
|
if (yyval.Rec == 0) {
|
||||||
@ -1016,97 +1016,97 @@ case 1:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 2:
|
case 2:
|
||||||
#line 234 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
#line 234 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
||||||
{ // string type
|
{ // string type
|
||||||
yyval.Ty = new StringRecTy();
|
yyval.Ty = new StringRecTy();
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 3:
|
case 3:
|
||||||
#line 236 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
#line 236 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
||||||
{ // bit type
|
{ // bit type
|
||||||
yyval.Ty = new BitRecTy();
|
yyval.Ty = new BitRecTy();
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 4:
|
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
|
{ // bits<x> type
|
||||||
yyval.Ty = new BitsRecTy(yyvsp[-1].IntVal);
|
yyval.Ty = new BitsRecTy(yyvsp[-1].IntVal);
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 5:
|
case 5:
|
||||||
#line 240 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
#line 240 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
||||||
{ // int type
|
{ // int type
|
||||||
yyval.Ty = new IntRecTy();
|
yyval.Ty = new IntRecTy();
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 6:
|
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
|
{ // list<x> type
|
||||||
yyval.Ty = new ListRecTy(yyvsp[-1].Ty);
|
yyval.Ty = new ListRecTy(yyvsp[-1].Ty);
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 7:
|
case 7:
|
||||||
#line 244 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
#line 244 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
||||||
{ // code type
|
{ // code type
|
||||||
yyval.Ty = new CodeRecTy();
|
yyval.Ty = new CodeRecTy();
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 8:
|
case 8:
|
||||||
#line 246 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
#line 246 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
||||||
{ // dag type
|
{ // dag type
|
||||||
yyval.Ty = new DagRecTy();
|
yyval.Ty = new DagRecTy();
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 9:
|
case 9:
|
||||||
#line 248 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
#line 248 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
||||||
{ // Record Type
|
{ // Record Type
|
||||||
yyval.Ty = new RecordRecTy(yyvsp[0].Rec);
|
yyval.Ty = new RecordRecTy(yyvsp[0].Rec);
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 10:
|
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; ;
|
{ yyval.IntVal = 0; ;
|
||||||
break;}
|
break;}
|
||||||
case 11:
|
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; ;
|
{ yyval.IntVal = 1; ;
|
||||||
break;}
|
break;}
|
||||||
case 12:
|
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; ;
|
{ yyval.Initializer = 0; ;
|
||||||
break;}
|
break;}
|
||||||
case 13:
|
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; ;
|
{ yyval.Initializer = yyvsp[0].Initializer; ;
|
||||||
break;}
|
break;}
|
||||||
case 14:
|
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);
|
yyval.Initializer = new IntInit(yyvsp[0].IntVal);
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 15:
|
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);
|
yyval.Initializer = new StringInit(*yyvsp[0].StrVal);
|
||||||
delete yyvsp[0].StrVal;
|
delete yyvsp[0].StrVal;
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 16:
|
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);
|
yyval.Initializer = new CodeInit(*yyvsp[0].StrVal);
|
||||||
delete yyvsp[0].StrVal;
|
delete yyvsp[0].StrVal;
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 17:
|
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();
|
yyval.Initializer = new UnsetInit();
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 18:
|
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());
|
BitsInit *Init = new BitsInit(yyvsp[-1].FieldList->size());
|
||||||
for (unsigned i = 0, e = yyvsp[-1].FieldList->size(); i != e; ++i) {
|
for (unsigned i = 0, e = yyvsp[-1].FieldList->size(); i != e; ++i) {
|
||||||
@ -1123,7 +1123,7 @@ case 18:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 19:
|
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
|
// This is a CLASS<initvalslist> expression. This is supposed to synthesize
|
||||||
// a new anonymous definition, deriving from CLASS<initvalslist> with no
|
// a new anonymous definition, deriving from CLASS<initvalslist> with no
|
||||||
@ -1155,7 +1155,7 @@ case 19:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 20:
|
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)) {
|
if (const RecordVal *RV = (CurRec ? CurRec->getValue(*yyvsp[0].StrVal) : 0)) {
|
||||||
yyval.Initializer = new VarInit(*yyvsp[0].StrVal, RV->getType());
|
yyval.Initializer = new VarInit(*yyvsp[0].StrVal, RV->getType());
|
||||||
@ -1174,7 +1174,7 @@ case 20:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 21:
|
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);
|
yyval.Initializer = yyvsp[-3].Initializer->convertInitializerBitRange(*yyvsp[-1].BitList);
|
||||||
if (yyval.Initializer == 0) {
|
if (yyval.Initializer == 0) {
|
||||||
@ -1185,14 +1185,14 @@ case 21:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 22:
|
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);
|
yyval.Initializer = new ListInit(*yyvsp[-1].FieldList);
|
||||||
delete yyvsp[-1].FieldList;
|
delete yyvsp[-1].FieldList;
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 23:
|
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)) {
|
if (!yyvsp[-2].Initializer->getFieldType(*yyvsp[0].StrVal)) {
|
||||||
err() << "Cannot access field '" << *yyvsp[0].StrVal << "' of value '" << *yyvsp[-2].Initializer << "!\n";
|
err() << "Cannot access field '" << *yyvsp[0].StrVal << "' of value '" << *yyvsp[-2].Initializer << "!\n";
|
||||||
@ -1203,7 +1203,7 @@ case 23:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 24:
|
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);
|
Record *D = Records.getDef(*yyvsp[-2].StrVal);
|
||||||
if (D == 0) {
|
if (D == 0) {
|
||||||
@ -1215,7 +1215,7 @@ case 24:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 25:
|
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());
|
std::reverse(yyvsp[-1].BitList->begin(), yyvsp[-1].BitList->end());
|
||||||
yyval.Initializer = yyvsp[-3].Initializer->convertInitListSlice(*yyvsp[-1].BitList);
|
yyval.Initializer = yyvsp[-3].Initializer->convertInitListSlice(*yyvsp[-1].BitList);
|
||||||
@ -1227,7 +1227,7 @@ case 25:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 26:
|
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);
|
yyval.Initializer = yyvsp[-3].Initializer->getBinaryOp(Init::SHL, yyvsp[-1].Initializer);
|
||||||
if (yyval.Initializer == 0) {
|
if (yyval.Initializer == 0) {
|
||||||
@ -1237,7 +1237,7 @@ case 26:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 27:
|
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);
|
yyval.Initializer = yyvsp[-3].Initializer->getBinaryOp(Init::SRA, yyvsp[-1].Initializer);
|
||||||
if (yyval.Initializer == 0) {
|
if (yyval.Initializer == 0) {
|
||||||
@ -1247,7 +1247,7 @@ case 27:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 28:
|
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);
|
yyval.Initializer = yyvsp[-3].Initializer->getBinaryOp(Init::SRL, yyvsp[-1].Initializer);
|
||||||
if (yyval.Initializer == 0) {
|
if (yyval.Initializer == 0) {
|
||||||
@ -1257,19 +1257,19 @@ case 28:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 29:
|
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();
|
yyval.StrVal = new std::string();
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 30:
|
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;
|
yyval.StrVal = yyvsp[0].StrVal;
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 31:
|
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 = new std::vector<std::pair<Init*, std::string> >();
|
||||||
yyval.DagValueList->push_back(std::make_pair(yyvsp[-1].Initializer, *yyvsp[0].StrVal));
|
yyval.DagValueList->push_back(std::make_pair(yyvsp[-1].Initializer, *yyvsp[0].StrVal));
|
||||||
@ -1277,7 +1277,7 @@ case 31:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 32:
|
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));
|
yyvsp[-3].DagValueList->push_back(std::make_pair(yyvsp[-1].Initializer, *yyvsp[0].StrVal));
|
||||||
delete yyvsp[0].StrVal;
|
delete yyvsp[0].StrVal;
|
||||||
@ -1285,24 +1285,24 @@ case 32:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 33:
|
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> >();
|
yyval.DagValueList = new std::vector<std::pair<Init*, std::string> >();
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 34:
|
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; ;
|
{ yyval.DagValueList = yyvsp[0].DagValueList; ;
|
||||||
break;}
|
break;}
|
||||||
case 35:
|
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 = new std::vector<unsigned>();
|
||||||
yyval.BitList->push_back(yyvsp[0].IntVal);
|
yyval.BitList->push_back(yyvsp[0].IntVal);
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 36:
|
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) {
|
if (yyvsp[-2].IntVal < 0 || yyvsp[0].IntVal < 0) {
|
||||||
err() << "Invalid range: " << yyvsp[-2].IntVal << "-" << yyvsp[0].IntVal << "!\n";
|
err() << "Invalid range: " << yyvsp[-2].IntVal << "-" << yyvsp[0].IntVal << "!\n";
|
||||||
@ -1319,7 +1319,7 @@ case 36:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 37:
|
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;
|
yyvsp[0].IntVal = -yyvsp[0].IntVal;
|
||||||
if (yyvsp[-1].IntVal < 0 || yyvsp[0].IntVal < 0) {
|
if (yyvsp[-1].IntVal < 0 || yyvsp[0].IntVal < 0) {
|
||||||
@ -1337,13 +1337,13 @@ case 37:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 38:
|
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);
|
(yyval.BitList=yyvsp[-2].BitList)->push_back(yyvsp[0].IntVal);
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 39:
|
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) {
|
if (yyvsp[-2].IntVal < 0 || yyvsp[0].IntVal < 0) {
|
||||||
err() << "Invalid range: " << yyvsp[-2].IntVal << "-" << yyvsp[0].IntVal << "!\n";
|
err() << "Invalid range: " << yyvsp[-2].IntVal << "-" << yyvsp[0].IntVal << "!\n";
|
||||||
@ -1360,7 +1360,7 @@ case 39:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 40:
|
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;
|
yyvsp[0].IntVal = -yyvsp[0].IntVal;
|
||||||
if (yyvsp[-1].IntVal < 0 || yyvsp[0].IntVal < 0) {
|
if (yyvsp[-1].IntVal < 0 || yyvsp[0].IntVal < 0) {
|
||||||
@ -1378,44 +1378,44 @@ case 40:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 41:
|
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()); ;
|
{ yyval.BitList = yyvsp[0].BitList; std::reverse(yyvsp[0].BitList->begin(), yyvsp[0].BitList->end()); ;
|
||||||
break;}
|
break;}
|
||||||
case 42:
|
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; ;
|
{ yyval.BitList = 0; ;
|
||||||
break;}
|
break;}
|
||||||
case 43:
|
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; ;
|
{ yyval.BitList = yyvsp[-1].BitList; ;
|
||||||
break;}
|
break;}
|
||||||
case 44:
|
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*>();
|
yyval.FieldList = new std::vector<Init*>();
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 45:
|
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;
|
yyval.FieldList = yyvsp[0].FieldList;
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 46:
|
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 = new std::vector<Init*>();
|
||||||
yyval.FieldList->push_back(yyvsp[0].Initializer);
|
yyval.FieldList->push_back(yyvsp[0].Initializer);
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 47:
|
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);
|
(yyval.FieldList = yyvsp[-2].FieldList)->push_back(yyvsp[0].Initializer);
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 48:
|
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;
|
std::string DecName = *yyvsp[-1].StrVal;
|
||||||
if (ParsingTemplateArgs)
|
if (ParsingTemplateArgs)
|
||||||
@ -1427,13 +1427,13 @@ case 48:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 49:
|
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;
|
delete yyvsp[-1].StrVal;
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 50:
|
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);
|
setValue(*yyvsp[-4].StrVal, yyvsp[-3].BitList, yyvsp[-1].Initializer);
|
||||||
delete yyvsp[-4].StrVal;
|
delete yyvsp[-4].StrVal;
|
||||||
@ -1441,19 +1441,19 @@ case 50:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 55:
|
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*>());
|
yyval.SubClassRef = new SubClassRefTy(yyvsp[0].Rec, new std::vector<Init*>());
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 56:
|
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);
|
yyval.SubClassRef = new SubClassRefTy(yyvsp[-3].Rec, yyvsp[-1].FieldList);
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 57:
|
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 = new std::vector<SubClassRefTy>();
|
||||||
yyval.SubClassList->push_back(*yyvsp[0].SubClassRef);
|
yyval.SubClassList->push_back(*yyvsp[0].SubClassRef);
|
||||||
@ -1461,52 +1461,52 @@ case 57:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 58:
|
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);
|
(yyval.SubClassList=yyvsp[-2].SubClassList)->push_back(*yyvsp[0].SubClassRef);
|
||||||
delete yyvsp[0].SubClassRef;
|
delete yyvsp[0].SubClassRef;
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 59:
|
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>();
|
yyval.SubClassList = new std::vector<SubClassRefTy>();
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 60:
|
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;
|
yyval.SubClassList = yyvsp[0].SubClassList;
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 61:
|
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);
|
CurRec->addTemplateArg(*yyvsp[0].StrVal);
|
||||||
delete yyvsp[0].StrVal;
|
delete yyvsp[0].StrVal;
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 62:
|
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);
|
CurRec->addTemplateArg(*yyvsp[0].StrVal);
|
||||||
delete yyvsp[0].StrVal;
|
delete yyvsp[0].StrVal;
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 63:
|
case 63:
|
||||||
#line 531 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
#line 531 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
||||||
{;
|
{;
|
||||||
break;}
|
break;}
|
||||||
case 66:
|
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; ;
|
{ yyval.StrVal = yyvsp[0].StrVal; ;
|
||||||
break;}
|
break;}
|
||||||
case 67:
|
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(); ;
|
{ yyval.StrVal = new std::string(); ;
|
||||||
break;}
|
break;}
|
||||||
case 68:
|
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;
|
static unsigned AnonCounter = 0;
|
||||||
if (yyvsp[0].StrVal->empty())
|
if (yyvsp[0].StrVal->empty())
|
||||||
@ -1515,7 +1515,7 @@ case 68:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 69:
|
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 a class of this name already exists, it must be a forward ref.
|
||||||
if ((CurRec = Records.getClass(*yyvsp[0].StrVal))) {
|
if ((CurRec = Records.getClass(*yyvsp[0].StrVal))) {
|
||||||
@ -1535,7 +1535,7 @@ case 69:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 70:
|
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);
|
CurRec = new Record(*yyvsp[0].StrVal);
|
||||||
delete yyvsp[0].StrVal;
|
delete yyvsp[0].StrVal;
|
||||||
@ -1549,7 +1549,7 @@ case 70:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 71:
|
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) {
|
for (unsigned i = 0, e = yyvsp[0].SubClassList->size(); i != e; ++i) {
|
||||||
addSubClass((*yyvsp[0].SubClassList)[i].first, *(*yyvsp[0].SubClassList)[i].second);
|
addSubClass((*yyvsp[0].SubClassList)[i].first, *(*yyvsp[0].SubClassList)[i].second);
|
||||||
@ -1567,32 +1567,32 @@ case 71:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 72:
|
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;
|
yyval.Rec = CurRec;
|
||||||
CurRec = 0;
|
CurRec = 0;
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 73:
|
case 73:
|
||||||
#line 592 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
#line 592 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
||||||
{
|
{
|
||||||
ParsingTemplateArgs = true;
|
ParsingTemplateArgs = true;
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 74:
|
case 74:
|
||||||
#line 594 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
#line 594 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
||||||
{
|
{
|
||||||
ParsingTemplateArgs = false;
|
ParsingTemplateArgs = false;
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 75:
|
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;
|
yyval.Rec = yyvsp[0].Rec;
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 76:
|
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();
|
yyvsp[0].Rec->resolveReferences();
|
||||||
|
|
||||||
@ -1602,38 +1602,38 @@ case 76:
|
|||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 79:
|
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));
|
LetStack.back().push_back(LetRecord(*yyvsp[-3].StrVal, yyvsp[-2].BitList, yyvsp[0].Initializer));
|
||||||
delete yyvsp[-3].StrVal; delete yyvsp[-2].BitList;
|
delete yyvsp[-3].StrVal; delete yyvsp[-2].BitList;
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 82:
|
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>()); ;
|
{ LetStack.push_back(std::vector<LetRecord>()); ;
|
||||||
break;}
|
break;}
|
||||||
case 84:
|
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();
|
LetStack.pop_back();
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 85:
|
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();
|
LetStack.pop_back();
|
||||||
;
|
;
|
||||||
break;}
|
break;}
|
||||||
case 86:
|
case 86:
|
||||||
#line 629 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
#line 629 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
||||||
{;
|
{;
|
||||||
break;}
|
break;}
|
||||||
case 87:
|
case 87:
|
||||||
#line 629 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
#line 629 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
||||||
{;
|
{;
|
||||||
break;}
|
break;}
|
||||||
case 88:
|
case 88:
|
||||||
#line 631 "/Users/sabre/llvm/utils/TableGen/FileParser.y"
|
#line 631 "/Users/bocchino/vllvm-checkin/src/utils/TableGen/FileParser.y"
|
||||||
{;
|
{;
|
||||||
break;}
|
break;}
|
||||||
}
|
}
|
||||||
@ -1858,7 +1858,7 @@ yyerrhandle:
|
|||||||
}
|
}
|
||||||
return 1;
|
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) {
|
int yyerror(const char *ErrorMsg) {
|
||||||
|
Loading…
Reference in New Issue
Block a user