aboutsummaryrefslogtreecommitdiff
path: root/tools/llvm-upgrade/UpgradeParser.cpp.cvs
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-02-08 09:08:52 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-02-08 09:08:52 +0000
commited96d1e78c96f385900ec1accb014d2b89e218cd (patch)
treecbd3a1038d9360b6c561cb54821fa175b60079b2 /tools/llvm-upgrade/UpgradeParser.cpp.cvs
parent2dcb5834c0db29d2d1e1f6d9b509533df25bd85e (diff)
Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34050 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-upgrade/UpgradeParser.cpp.cvs')
-rw-r--r--tools/llvm-upgrade/UpgradeParser.cpp.cvs2323
1 files changed, 1193 insertions, 1130 deletions
diff --git a/tools/llvm-upgrade/UpgradeParser.cpp.cvs b/tools/llvm-upgrade/UpgradeParser.cpp.cvs
index 239f6a4cb5..c93b7e9a46 100644
--- a/tools/llvm-upgrade/UpgradeParser.cpp.cvs
+++ b/tools/llvm-upgrade/UpgradeParser.cpp.cvs
@@ -531,7 +531,6 @@ static struct PerFunctionInfo {
std::map<BasicBlock*, std::pair<ValID, int> > BBForwardRefs;
std::vector<BasicBlock*> NumberedBlocks;
RenameMapType RenameMap;
- unsigned LastCC;
unsigned NextBBNum;
inline PerFunctionInfo() {
@@ -628,6 +627,55 @@ static const Type *getType(const ValID &D, bool DoNotImprovise = false) {
return Typ;
}
+/// This function determines if two function types differ only in their use of
+/// the sret parameter attribute in the first argument. If they are identical
+/// in all other respects, it returns true. Otherwise, it returns false.
+bool FuncTysDifferOnlyBySRet(const FunctionType *F1,
+ const FunctionType *F2) {
+ if (F1->getReturnType() != F2->getReturnType() ||
+ F1->getNumParams() != F2->getNumParams() ||
+ F1->getParamAttrs(0) != F2->getParamAttrs(0))
+ return false;
+ unsigned SRetMask = ~unsigned(FunctionType::StructRetAttribute);
+ for (unsigned i = 0; i < F1->getNumParams(); ++i) {
+ if (F1->getParamType(i) != F2->getParamType(i) ||
+ unsigned(F1->getParamAttrs(i+1)) & SRetMask !=
+ unsigned(F2->getParamAttrs(i+1)) & SRetMask)
+ return false;
+ }
+ return true;
+}
+
+// The upgrade of csretcc to sret param attribute may have caused a function
+// to not be found because the param attribute changed the type of the called
+// function. This helper function, used in getExistingValue, detects that
+// situation and returns V if it occurs and 0 otherwise.
+static Value* handleSRetFuncTypeMerge(Value *V, const Type* Ty) {
+ // Handle degenerate cases
+ if (!V)
+ return 0;
+ if (V->getType() == Ty)
+ return V;
+
+ Value* Result = 0;
+ const PointerType *PF1 = dyn_cast<PointerType>(Ty);
+ const PointerType *PF2 = dyn_cast<PointerType>(V->getType());
+ if (PF1 && PF2) {
+ const FunctionType *FT1 =
+ dyn_cast<FunctionType>(PF1->getElementType());
+ const FunctionType *FT2 =
+ dyn_cast<FunctionType>(PF2->getElementType());
+ if (FT1 && FT2 && FuncTysDifferOnlyBySRet(FT1, FT2))
+ if (FT2->paramHasAttr(1, FunctionType::StructRetAttribute))
+ Result = V;
+ else if (Constant *C = dyn_cast<Constant>(V))
+ Result = ConstantExpr::getBitCast(C, PF1);
+ else
+ Result = new BitCastInst(V, PF1, "upgrd.cast", CurBB);
+ }
+ return Result;
+}
+
// getExistingValue - Look up the value specified by the provided type and
// the provided ValID. If the value exists and has already been defined, return
// it. Otherwise return null.
@@ -674,8 +722,7 @@ static Value *getExistingValue(const Type *Ty, const ValID &D) {
LookupName = Name;
ValueSymbolTable &SymTab = CurFun.CurrentFunction->getValueSymbolTable();
V = SymTab.lookup(LookupName);
- if (V && V->getType() != Ty)
- V = 0;
+ V = handleSRetFuncTypeMerge(V, Ty);
}
if (!V) {
RenameMapType::const_iterator I = CurModule.RenameMap.find(Key);
@@ -685,8 +732,7 @@ static Value *getExistingValue(const Type *Ty, const ValID &D) {
else
LookupName = Name;
V = CurModule.CurrentModule->getValueSymbolTable().lookup(LookupName);
- if (V && V->getType() != Ty)
- V = 0;
+ V = handleSRetFuncTypeMerge(V, Ty);
}
if (!V)
return 0;
@@ -789,6 +835,14 @@ static Value *getVal(const Type *Ty, const ValID &ID) {
return V;
}
+/// @brief This just makes any name given to it unique, up to MAX_UINT times.
+static std::string makeNameUnique(const std::string& Name) {
+ static unsigned UniqueNameCounter = 1;
+ std::string Result(Name);
+ Result += ".upgrd." + llvm::utostr(UniqueNameCounter++);
+ return Result;
+}
+
/// getBBVal - This is used for two purposes:
/// * If isDefinition is true, a new basic block with the specified ID is being
/// defined.
@@ -813,9 +867,18 @@ static BasicBlock *getBBVal(const ValID &ID, bool isDefinition = false) {
Name = ID.Name;
if (Value *N = CurFun.CurrentFunction->
getValueSymbolTable().lookup(Name)) {
- if (N->getType() != Type::LabelTy)
- error("Name '" + Name + "' does not refer to a BasicBlock");
- BB = cast<BasicBlock>(N);
+ if (N->getType() != Type::LabelTy) {
+ // Register names didn't use to conflict with basic block names
+ // because of type planes. Now they all have to be unique. So, we just
+ // rename the register and treat this name as if no basic block
+ // had been found.
+ RenameMapKey Key = std::make_pair(N->getName(),N->getType());
+ N->setName(makeNameUnique(N->getName()));
+ CurModule.RenameMap[Key] = N->getName();
+ BB = 0;
+ } else {
+ BB = cast<BasicBlock>(N);
+ }
}
break;
}
@@ -869,25 +932,6 @@ static BasicBlock *getBBVal(const ValID &ID, bool isDefinition = false) {
// and back patchs after we are done.
//
-/// This function determines if two function types differ only in their use of
-/// the sret parameter attribute in the first argument. If they are identical
-/// in all other respects, it returns true. Otherwise, it returns false.
-bool FuncTysDifferOnlyBySRet(const FunctionType *F1,
- const FunctionType *F2) {
- if (F1->getReturnType() != F2->getReturnType() ||
- F1->getNumParams() != F2->getNumParams() ||
- F1->getParamAttrs(0) != F2->getParamAttrs(0))
- return false;
- unsigned SRetMask = ~unsigned(FunctionType::StructRetAttribute);
- for (unsigned i = 0; i < F1->getNumParams(); ++i) {
- if (F1->getParamType(i) != F2->getParamType(i) ||
- unsigned(F1->getParamAttrs(i+1)) & SRetMask !=
- unsigned(F2->getParamAttrs(i+1)) & SRetMask)
- return false;
- }
- return true;
-}
-
// ResolveDefinitions - If we could not resolve some defs at parsing
// time (forward branches, phi functions for loops, etc...) resolve the
// defs now...
@@ -895,9 +939,11 @@ bool FuncTysDifferOnlyBySRet(const FunctionType *F1,
static void
ResolveDefinitions(std::map<const Type*,ValueList> &LateResolvers,
std::map<const Type*,ValueList> *FutureLateResolvers) {
+
// Loop over LateResolveDefs fixing up stuff that couldn't be resolved
for (std::map<const Type*,ValueList>::iterator LRI = LateResolvers.begin(),
E = LateResolvers.end(); LRI != E; ++LRI) {
+ const Type* Ty = LRI->first;
ValueList &List = LRI->second;
while (!List.empty()) {
Value *V = List.back();
@@ -909,7 +955,7 @@ ResolveDefinitions(std::map<const Type*,ValueList> &LateResolvers,
ValID &DID = PHI->second.first;
- Value *TheRealValue = getExistingValue(LRI->first, DID);
+ Value *TheRealValue = getExistingValue(Ty, DID);
if (TheRealValue) {
V->replaceAllUsesWith(TheRealValue);
delete V;
@@ -920,26 +966,10 @@ ResolveDefinitions(std::map<const Type*,ValueList> &LateResolvers,
InsertValue(V, *FutureLateResolvers);
} else {
if (DID.Type == ValID::NameVal) {
- // The upgrade of csretcc to sret param attribute may have caused a
- // function to not be found because the param attribute changed the
- // type of the called function. Detect this situation and insert a
- // cast as necessary.
- bool fixed = false;
- if (const PointerType *PTy = dyn_cast<PointerType>(V->getType()))
- if (const FunctionType *FTy =
- dyn_cast<FunctionType>(PTy->getElementType()))
- if (Function *OtherF =
- CurModule.CurrentModule->getFunction(DID.getName()))
- if (FuncTysDifferOnlyBySRet(FTy,OtherF->getFunctionType())) {
- V->replaceAllUsesWith(ConstantExpr::getBitCast(OtherF, PTy));
- fixed = true;
- }
- if (!fixed) {
- error("Reference to an invalid definition: '" +DID.getName()+
- "' of type '" + V->getType()->getDescription() + "'",
- PHI->second.second);
+ error("Reference to an invalid definition: '" + DID.getName() +
+ "' of type '" + V->getType()->getDescription() + "'",
+ PHI->second.second);
return;
- }
} else {
error("Reference to an invalid definition: #" +
itostr(DID.Num) + " of type '" +
@@ -970,14 +1000,6 @@ static void ResolveTypeTo(char *Name, const Type *ToTy) {
}
}
-/// @brief This just makes any name given to it unique, up to MAX_UINT times.
-static std::string makeNameUnique(const std::string& Name) {
- static unsigned UniqueNameCounter = 1;
- std::string Result(Name);
- Result += ".upgrd." + llvm::utostr(UniqueNameCounter++);
- return Result;
-}
-
/// This is the implementation portion of TypeHasInteger. It traverses the
/// type given, avoiding recursive types, and returns true as soon as it finds
/// an integer type. If no integer type is found, it returns false.
@@ -1807,7 +1829,7 @@ using namespace llvm;
#endif
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 1431 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
+#line 1453 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
typedef union YYSTYPE {
llvm::Module *ModuleVal;
llvm::Function *FunctionVal;
@@ -1850,7 +1872,7 @@ typedef union YYSTYPE {
llvm::Module::Endianness Endianness;
} YYSTYPE;
/* Line 196 of yacc.c. */
-#line 1854 "UpgradeParser.tab.c"
+#line 1876 "UpgradeParser.tab.c"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
@@ -1862,7 +1884,7 @@ typedef union YYSTYPE {
/* Line 219 of yacc.c. */
-#line 1866 "UpgradeParser.tab.c"
+#line 1888 "UpgradeParser.tab.c"
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
@@ -2013,16 +2035,16 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 4
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 1736
+#define YYLAST 1762
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 166
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 79
+#define YYNNTS 80
/* YYNRULES -- Number of rules. */
-#define YYNRULES 308
+#define YYNRULES 309
/* YYNRULES -- Number of states. */
-#define YYNSTATES 604
+#define YYNSTATES 605
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
@@ -2105,14 +2127,14 @@ static const unsigned short int yyprhs[] =
567, 569, 571, 575, 579, 583, 587, 591, 595, 597,
598, 600, 602, 604, 605, 608, 612, 614, 616, 620,
622, 623, 632, 634, 636, 640, 642, 644, 647, 648,
- 650, 652, 653, 658, 659, 661, 663, 665, 667, 669,
- 671, 673, 675, 677, 681, 683, 689, 691, 693, 695,
- 697, 700, 703, 706, 710, 713, 714, 716, 718, 720,
- 723, 726, 730, 740, 750, 759, 773, 775, 777, 784,
- 790, 793, 800, 808, 810, 814, 816, 817, 820, 822,
- 828, 834, 840, 847, 854, 857, 862, 867, 874, 879,
- 884, 889, 894, 901, 908, 911, 919, 921, 924, 925,
- 927, 928, 932, 939, 943, 950, 953, 958, 965
+ 650, 652, 653, 654, 660, 661, 663, 665, 667, 669,
+ 671, 673, 675, 677, 679, 683, 685, 691, 693, 695,
+ 697, 699, 702, 705, 708, 712, 715, 716, 718, 720,
+ 722, 725, 728, 732, 742, 752, 761, 775, 777, 779,
+ 786, 792, 795, 802, 810, 812, 816, 818, 819, 822,
+ 824, 830, 836, 842, 849, 856, 859, 864, 869, 876,
+ 881, 886, 891, 896, 903, 910, 913, 921, 923, 926,
+ 927, 929, 930, 934, 941, 945, 952, 955, 960, 967
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
@@ -2143,7 +2165,7 @@ static const short int yyrhs[] =
-1, 191, -1, 8, -1, 193, -1, 8, -1, 193,
-1, 9, -1, 10, -1, 11, -1, 12, -1, 13,
-1, 14, -1, 15, -1, 16, -1, 17, -1, 18,
- -1, 19, -1, 21, -1, 192, -1, 48, -1, 227,
+ -1, 19, -1, 21, -1, 192, -1, 48, -1, 228,
-1, 154, 4, -1, 190, 155, 195, 156, -1, 157,
4, 158, 193, 159, -1, 160, 4, 158, 193, 161,
-1, 162, 194, 163, -1, 162, 163, -1, 160, 162,
@@ -2154,10 +2176,10 @@ static const short int yyrhs[] =
191, 160, 198, 161, -1, 191, 162, 198, 163, -1,
191, 162, 163, -1, 191, 160, 162, 198, 163, 161,
-1, 191, 160, 162, 163, 161, -1, 191, 38, -1,
- 191, 39, -1, 191, 227, -1, 191, 197, -1, 191,
+ 191, 39, -1, 191, 228, -1, 191, 197, -1, 191,
26, -1, 176, 168, -1, 177, 4, -1, 9, 27,
-1, 9, 28, -1, 179, 7, -1, 175, 155, 196,
- 36, 191, 156, -1, 110, 155, 196, 242, 156, -1,
+ 36, 191, 156, -1, 110, 155, 196, 243, 156, -1,
112, 155, 196, 153, 196, 153, 196, 156, -1, 169,
155, 196, 153, 196, 156, -1, 170, 155, 196, 153,
196, 156, -1, 171, 155, 196, 153, 196, 156, -1,
@@ -2182,75 +2204,76 @@ static const short int yyrhs[] =
214, -1, 214, -1, 215, -1, 215, 153, 37, -1,
37, -1, -1, 182, 189, 212, 155, 216, 156, 186,
183, -1, 29, -1, 162, -1, 181, 217, 218, -1,
- 30, -1, 163, -1, 230, 220, -1, -1, 45, -1,
- 47, -1, -1, 31, 224, 222, 217, -1, -1, 63,
- -1, 3, -1, 4, -1, 7, -1, 27, -1, 28,
- -1, 38, -1, 39, -1, 26, -1, 160, 198, 161,
- -1, 197, -1, 61, 225, 24, 153, 24, -1, 167,
- -1, 212, -1, 227, -1, 226, -1, 191, 228, -1,
- 230, 231, -1, 219, 231, -1, 232, 180, 234, -1,
- 232, 236, -1, -1, 23, -1, 77, -1, 78, -1,
- 72, 229, -1, 72, 8, -1, 73, 21, 228, -1,
- 73, 9, 228, 153, 21, 228, 153, 21, 228, -1,
- 74, 178, 228, 153, 21, 228, 157, 235, 159, -1,
- 74, 178, 228, 153, 21, 228, 157, 159, -1, 75,
- 182, 189, 228, 155, 239, 156, 36, 21, 228, 233,
- 21, 228, -1, 233, -1, 76, -1, 235, 178, 226,
- 153, 21, 228, -1, 178, 226, 153, 21, 228, -1,
- 180, 241, -1, 191, 157, 228, 153, 228, 159, -1,
- 237, 153, 157, 228, 153, 228, 159, -1, 229, -1,
- 238, 153, 229, -1, 238, -1, -1, 60, 59, -1,
- 59, -1, 169, 191, 228, 153, 228, -1, 170, 191,
- 228, 153, 228, -1, 171, 191, 228, 153, 228, -1,
- 103, 172, 191, 228, 153, 228, -1, 104, 173, 191,
- 228, 153, 228, -1, 49, 229, -1, 174, 229, 153,
- 229, -1, 175, 229, 36, 191, -1, 112, 229, 153,
- 229, 153, 229, -1, 113, 229, 153, 191, -1, 117,
- 229, 153, 191, -1, 118, 229, 153, 191, -1, 114,
- 229, 153, 229, -1, 115, 229, 153, 229, 153, 229,
- -1, 116, 229, 153, 229, 153, 229, -1, 111, 237,
- -1, 240, 182, 189, 228, 155, 239, 156, -1, 244,
- -1, 153, 238, -1, -1, 35, -1, -1, 105, 191,
- 184, -1, 105, 191, 153, 15, 228, 184, -1, 106,
- 191, 184, -1, 106, 191, 153, 15, 228, 184, -1,
- 107, 229, -1, 243, 108, 191, 228, -1, 243, 109,
- 229, 153, 191, 228, -1, 110, 191, 228, 242, -1
+ 30, -1, 163, -1, 231, 220, -1, -1, 45, -1,
+ 47, -1, -1, -1, 31, 224, 222, 225, 217, -1,
+ -1, 63, -1, 3, -1, 4, -1, 7, -1, 27,
+ -1, 28, -1, 38, -1, 39, -1, 26, -1, 160,
+ 198, 161, -1, 197, -1, 61, 226, 24, 153, 24,
+ -1, 167, -1, 212, -1, 228, -1, 227, -1, 191,
+ 229, -1, 231, 232, -1, 219, 232, -1, 233, 180,
+ 235, -1, 233, 237, -1, -1, 23, -1, 77, -1,
+ 78, -1, 72, 230, -1, 72, 8, -1, 73, 21,
+ 229, -1, 73, 9, 229, 153, 21, 229, 153, 21,
+ 229, -1, 74, 178, 229, 153, 21, 229, 157, 236,
+ 159, -1, 74, 178, 229, 153, 21, 229, 157, 159,
+ -1, 75, 182, 189, 229, 155, 240, 156, 36, 21,
+ 229, 234, 21, 229, -1, 234, -1, 76, -1, 236,
+ 178, 227, 153, 21, 229, -1, 178, 227, 153, 21,
+ 229, -1, 180, 242, -1, 191, 157, 229, 153, 229,
+ 159, -1, 238, 153, 157, 229, 153, 229, 159, -1,
+ 230, -1, 239, 153, 230, -1, 239, -1, -1, 60,
+ 59, -1, 59, -1, 169, 191, 229, 153, 229, -1,
+ 170, 191, 229, 153, 229, -1, 171, 191, 229, 153,
+ 229, -1, 103, 172, 191, 229, 153, 229, -1, 104,
+ 173, 191, 229, 153, 229, -1, 49, 230, -1, 174,
+ 230, 153, 230, -1, 175, 230, 36, 191, -1, 112,
+ 230, 153, 230, 153, 230, -1, 113, 230, 153, 191,
+ -1, 117, 230, 153, 191, -1, 118, 230, 153, 191,
+ -1, 114, 230, 153, 230, -1, 115, 230, 153, 230,
+ 153, 230, -1, 116, 230, 153, 230, 153, 230, -1,
+ 111, 238, -1, 241, 182, 189, 229, 155, 240, 156,
+ -1, 245, -1, 153, 239, -1, -1, 35, -1, -1,
+ 105, 191, 184, -1, 105, 191, 153, 15, 229, 184,
+ -1, 106, 191, 184, -1, 106, 191, 153, 15, 229,
+ 184, -1, 107, 230, -1, 244, 108, 191, 229, -1,
+ 244, 109, 230, 153, 191, 229, -1, 110, 191, 229,
+ 243, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const unsigned short int yyrline[] =
{
- 0, 1571, 1571, 1572, 1580, 1581, 1591, 1591, 1591, 1591,
- 1591, 1591, 1591, 1591, 1591, 1591, 1591, 1595, 1595, 1595,
- 1599, 1599, 1599, 1599, 1599, 1599, 1603, 1603, 1604, 1604,
- 1605, 1605, 1606, 1606, 1607, 1607, 1611, 1611, 1612, 1612,
- 1613, 1613, 1614, 1614, 1615, 1615, 1616, 1616, 1617, 1617,
- 1618, 1619, 1622, 1622, 1622, 1622, 1626, 1626, 1626, 1626,
- 1626, 1626, 1626, 1627, 1627, 1627, 1627, 1627, 1627, 1633,
- 1633, 1633, 1633, 1637, 1637, 1637, 1637, 1641, 1641, 1645,
- 1645, 1650, 1653, 1658, 1659, 1660, 1661, 1662, 1663, 1664,
- 1665, 1669, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1686,
- 1687, 1695, 1696, 1704, 1713, 1714, 1721, 1722, 1726, 1730,
- 1746, 1747, 1754, 1755, 1762, 1770, 1770, 1770, 1770, 1770,
- 1770, 1770, 1771, 1771, 1771, 1771, 1771, 1776, 1780, 1784,
- 1789, 1798, 1818, 1824, 1837, 1846, 1850, 1861, 1865, 1878,
- 1882, 1889, 1890, 1896, 1903, 1915, 1945, 1958, 1981, 2009,
- 2031, 2042, 2064, 2075, 2084, 2089, 2147, 2154, 2162, 2169,
- 2176, 2180, 2184, 2193, 2208, 2221, 2230, 2258, 2271, 2280,
- 2286, 2292, 2303, 2309, 2315, 2326, 2327, 2336, 2337, 2349,
- 2358, 2359, 2360, 2361, 2362, 2378, 2398, 2400, 2402, 2402,
- 2409, 2409, 2416, 2416, 2423, 2423, 2431, 2433, 2435, 2440,
- 2454, 2455, 2459, 2462, 2470, 2474, 2481, 2485, 2489, 2493,
- 2501, 2501, 2506, 2507, 2511, 2519, 2524, 2532, 2533, 2540,
- 2547, 2551, 2711, 2711, 2715, 2725, 2725, 2729, 2733, 2735,
- 2736, 2740, 2740, 2752, 2753, 2758, 2759, 2760, 2761, 2762,
- 2763, 2764, 2765, 2766, 2787, 2790, 2805, 2806, 2811, 2811,
- 2819, 2828, 2831, 2840, 2850, 2855, 2864, 2875, 2875, 2878,
- 2881, 2884, 2888, 2894, 2909, 2915, 2971, 2974, 2980, 2990,
- 3003, 3032, 3040, 3048, 3052, 3059, 3060, 3064, 3067, 3073,
- 3090, 3106, 3120, 3132, 3144, 3155, 3173, 3182, 3191, 3198,
- 3219, 3243, 3249, 3255, 3261, 3277, 3355, 3363, 3364, 3368,
- 3369, 3373, 3379, 3385, 3391, 3397, 3404, 3416, 3430
+ 0, 1593, 1593, 1594, 1602, 1603, 1613, 1613, 1613, 1613,
+ 1613, 1613, 1613, 1613, 1613, 1613, 1613, 1617, 1617, 1617,
+ 1621, 1621, 1621, 1621, 1621, 1621, 1625, 1625, 1626, 1626,
+ 1627, 1627, 1628, 1628, 1629, 1629, 1633, 1633, 1634, 1634,
+ 1635, 1635, 1636, 1636, 1637, 1637, 1638, 1638, 1639, 1639,
+ 1640, 1641, 1644, 1644, 1644, 1644, 1648, 1648, 1648, 1648,
+ 1648, 1648, 1648, 1649, 1649, 1649, 1649, 1649, 1649, 1655,
+ 1655, 1655, 1655, 1659, 1659, 1659, 1659, 1663, 1663, 1667,
+ 1667, 1672, 1675, 1680, 1681, 1682, 1683, 1684, 1685, 1686,
+ 1687, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1708,
+ 1709, 1717, 1718, 1726, 1735, 1736, 1743, 1744, 1748, 1752,
+ 1768, 1769, 1776, 1777, 1784, 1792, 1792, 1792, 1792, 1792,
+ 1792, 1792, 1793, 1793, 1793, 1793, 1793, 1798, 1802, 1806,
+ 1811, 1820, 1837, 1843, 1856, 1865, 1869, 1880, 1884, 1897,
+ 1901, 1908, 1909, 1915, 1922, 1934, 1964, 1977, 2000, 2028,
+ 2050, 2061, 2083, 2094, 2103, 2108, 2166, 2173, 2181, 2188,
+ 2195, 2199, 2203, 2212, 2227, 2240, 2249, 2277, 2290, 2299,
+ 2305, 2311, 2322, 2328, 2334, 2345, 2346, 2355, 2356, 2368,
+ 2377, 2378, 2379, 2380, 2381, 2397, 2417, 2419, 2421, 2421,
+ 2428, 2428, 2435, 2435, 2442, 2442, 2450, 2452, 2454, 2459,
+ 2473, 2474, 2478, 2481, 2489, 2493, 2500, 2504, 2508, 2512,
+ 2520, 2520, 2524, 2525, 2529, 2537, 2542, 2550, 2551, 2558,
+ 2565, 2569, 2745, 2745, 2749, 2759, 2759, 2763, 2768, 2769,
+ 2770, 2774, 2775, 2774, 2787, 2788, 2793, 2794, 2795, 2796,
+ 2797, 2798, 2799, 2800, 2801, 2822, 2825, 2840, 2841, 2846,
+ 2846, 2854, 2863, 2866, 2875, 2885, 2890, 2899, 2910, 2910,
+ 2913, 2916, 2919, 2923, 2929, 2944, 2950, 3006, 3009, 3015,
+ 3025, 3038, 3067, 3075, 3083, 3087, 3094, 3095, 3099, 3102,
+ 3108, 3125, 3141, 3155, 3167, 3179, 3190, 3208, 3217, 3226,
+ 3233, 3254, 3278, 3284, 3290, 3296, 3312, 3390, 3398, 3399,
+ 3403, 3404, 3408, 3414, 3420, 3426, 3432, 3439, 3451, 3476
};
#endif
@@ -2293,7 +2316,7 @@ static const char *const yytname[] =
"@2", "@3", "@4", "AsmBlock", "BigOrLittle", "TargetDefinition",
"LibrariesDefinition", "LibList", "Name", "OptName", "ArgVal",
"ArgListH", "ArgList", "FunctionHeaderH", "BEGIN", "FunctionHeader",
- "END", "Function", "FnDeclareLinkage", "FunctionProto", "@5",
+ "END", "Function", "FnDeclareLinkage", "FunctionProto", "@5", "@6",
"OptSideEffect", "ConstValueRef", "SymbolicValueRef", "ValueRef",
"ResolvedVal", "BasicBlockList", "BasicBlock", "InstructionList",
"Unwind", "BBTerminatorInst", "JumpTable", "Inst", "PHIList",
@@ -2353,14 +2376,14 @@ static const unsigned char yyr1[] =
208, 208, 209, 209, 209, 209, 210, 211, 211, 211,
212, 212, 213, 213, 214, 215, 215, 216, 216, 216,
216, 217, 218, 218, 219, 220, 220, 221, 222, 222,
- 222, 224, 223, 225, 225, 226, 226, 226, 226, 226,
- 226, 226, 226, 226, 226, 226, 227, 227, 228, 228,
- 229, 230, 230, 231, 232, 232, 232, 233, 233, 234,
- 234, 234, 234, 234, 234, 234, 234, 234, 235, 235,
- 236, 237, 237, 238, 238, 239, 239, 240, 240, 241,
- 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
- 241, 241, 241, 241, 241, 241, 241, 242, 242, 243,
- 243, 244, 244, 244, 244, 244, 244, 244, 244
+ 222, 224, 225, 223, 226, 226, 227, 227, 227, 227,
+ 227, 227, 227, 227, 227, 227, 227, 228, 228, 229,
+ 229, 230, 231, 231, 232, 233, 233, 233, 234, 234,
+ 235, 235, 235, 235, 235, 235, 235, 235, 235, 236,
+ 236, 237, 238, 238, 239, 239, 240, 240, 241, 241,
+ 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242, 243, 243,
+ 244, 244, 245, 245, 245, 245, 245, 245, 245, 245
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -2389,14 +2412,14 @@ static const unsigned char yyr2[] =
1, 1, 3, 3, 3, 3, 3, 3, 1, 0,
1, 1, 1, 0, 2, 3, 1, 1, 3, 1,
0, 8, 1, 1, 3, 1, 1, 2, 0, 1,
- 1, 0, 4, 0, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 3, 1, 5, 1, 1, 1, 1,
- 2, 2, 2, 3, 2, 0, 1, 1, 1, 2,
- 2, 3, 9, 9, 8, 13, 1, 1, 6, 5,
- 2, 6, 7, 1, 3, 1, 0, 2, 1, 5,
- 5, 5, 6, 6, 2, 4, 4, 6, 4, 4,
- 4, 4, 6, 6, 2, 7, 1, 2, 0, 1,
- 0, 3, 6, 3, 6, 2, 4, 6, 4
+ 1, 0, 0, 5, 0, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 3, 1, 5, 1, 1, 1,
+ 1, 2, 2, 2, 3, 2, 0, 1, 1, 1,
+ 2, 2, 3, 9, 9, 8, 13, 1, 1, 6,
+ 5, 2, 6, 7, 1, 3, 1, 0, 2, 1,
+ 5, 5, 5, 6, 6, 2, 4, 4, 6, 4,
+ 4, 4, 4, 6, 6, 2, 7, 1, 2, 0,
+ 1, 0, 3, 6, 3, 6, 2, 4, 6, 4
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -2405,160 +2428,160 @@ static const unsigned char yyr2[] =
static const unsigned short int yydefact[] =
{
198, 0, 90, 184, 1, 183, 231, 83, 84, 85,
- 86, 87, 88, 89, 0, 91, 255, 180, 181, 255,
+ 86, 87, 88, 89, 0, 91, 256, 180, 181, 256,
210, 211, 0, 0, 0, 90, 0, 186, 228, 0,
- 0, 92, 93, 94, 95, 96, 97, 0, 0, 256,
- 252, 82, 225, 226, 227, 251, 0, 0, 0, 0,
+ 0, 92, 93, 94, 95, 96, 97, 0, 0, 257,
+ 253, 82, 225, 226, 227, 252, 0, 0, 0, 0,
196, 0, 0, 0, 0, 0, 0, 0, 81, 229,
- 230, 91, 199, 182, 98, 2, 3, 111, 115, 116,
+ 230, 232, 199, 182, 98, 2, 3, 111, 115, 116,
117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
- 128, 0, 0, 0, 0, 246, 0, 0, 110, 127,
- 114, 247, 129, 222, 223, 224, 300, 254, 0, 0,
+ 128, 0, 0, 0, 0, 247, 0, 0, 110, 127,
+ 114, 248, 129, 222, 223, 224, 301, 255, 0, 0,
0, 0, 209, 197, 187, 185, 177, 178, 0, 0,
- 0, 0, 232, 130, 0, 0, 0, 113, 135, 139,
- 0, 0, 144, 138, 299, 0, 278, 0, 0, 0,
- 0, 91, 267, 257, 258, 6, 7, 8, 9, 10,
+ 0, 0, 91, 130, 0, 0, 0, 113, 135, 139,
+ 0, 0, 144, 138, 300, 0, 279, 0, 0, 0,
+ 0, 91, 268, 258, 259, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 52,
53, 54, 55, 20, 21, 22, 23, 24, 25, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 68, 56, 57, 58, 59, 60, 61,
62, 63, 64, 65, 66, 67, 0, 0, 0, 0,
- 0, 266, 253, 91, 270, 0, 296, 204, 201, 200,
+ 0, 267, 254, 91, 271, 0, 297, 204, 201, 200,
202, 203, 205, 208, 0, 192, 194, 190, 115, 116,
117, 118, 119, 120, 121, 122, 123, 124, 125, 0,
- 0, 0, 0, 188, 0, 0, 0, 0, 0, 134,
- 220, 143, 141, 0, 0, 284, 277, 260, 259, 0,
- 0, 72, 76, 71, 75, 70, 74, 69, 73, 77,
- 78, 0, 0, 26, 27, 28, 29, 30, 31, 32,
- 33, 34, 35, 0, 50, 51, 46, 47, 48, 49,
- 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
- 0, 101, 101, 305, 0, 0, 294, 0, 0, 0,
+ 0, 0, 0, 188, 233, 0, 0, 0, 0, 0,
+ 134, 220, 143, 141, 0, 0, 285, 278, 261, 260,
+ 0, 0, 72, 76, 71, 75, 70, 74, 69, 73,
+ 77, 78, 0, 0, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 0, 50, 51, 46, 47, 48,
+ 49, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 0, 101, 101, 306, 0, 0, 295, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 206, 106, 106, 106, 160, 161, 4,
- 5, 158, 159, 162, 157, 153, 154, 0, 0, 0,
+ 0, 0, 0, 0, 206, 106, 106, 106, 160, 161,
+ 4, 5, 158, 159, 162, 157, 153, 154, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 156, 155, 106, 112, 112, 137, 0,
- 140, 219, 213, 216, 217, 0, 0, 131, 235, 236,
- 237, 242, 238, 239, 240, 241, 233, 0, 244, 249,
- 248, 250, 0, 261, 0, 0, 0, 0, 0, 301,
- 0, 303, 298, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 156, 155, 106, 112, 112, 137,
+ 0, 140, 219, 213, 216, 217, 0, 0, 131, 236,
+ 237, 238, 243, 239, 240, 241, 242, 234, 0, 245,
+ 250, 249, 251, 0, 262, 0, 0, 0, 0, 0,
+ 302, 0, 304, 299, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 207, 0, 193, 195, 191, 0, 0, 0, 0, 0,
- 0, 0, 146, 176, 0, 0, 0, 150, 0, 147,
- 0, 0, 0, 0, 0, 189, 132, 133, 136, 212,
- 214, 0, 104, 142, 234, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 308, 0, 0, 0,
- 288, 291, 0, 0, 289, 290, 0, 0, 0, 285,
- 286, 0, 306, 0, 0, 0, 108, 106, 0, 0,
- 298, 0, 0, 0, 0, 0, 145, 135, 114, 0,
- 148, 149, 0, 0, 0, 0, 0, 218, 215, 105,
- 99, 0, 243, 0, 0, 276, 0, 0, 101, 102,
- 101, 273, 297, 0, 0, 0, 0, 0, 279, 280,
- 281, 276, 0, 103, 109, 107, 0, 0, 0, 0,
- 0, 0, 0, 175, 152, 0, 0, 0, 0, 0,
- 0, 0, 221, 0, 0, 0, 275, 0, 282, 283,
- 0, 302, 304, 0, 0, 0, 287, 292, 293, 0,
- 307, 0, 0, 164, 0, 0, 0, 0, 151, 0,
- 0, 0, 0, 0, 100, 245, 0, 0, 0, 274,
- 271, 0, 295, 0, 0, 0, 172, 0, 0, 166,
- 167, 168, 171, 163, 0, 264, 0, 0, 0, 272,
- 169, 170, 0, 0, 0, 262, 0, 263, 0, 0,
- 165, 173, 174, 0, 0, 0, 0, 0, 0, 269,
- 0, 0, 268, 265
+ 0, 207, 0, 193, 195, 191, 0, 0, 0, 0,
+ 0, 0, 0, 146, 176, 0, 0, 0, 150, 0,
+ 147, 0, 0, 0, 0, 0, 189, 132, 133, 136,
+ 212, 214, 0, 104, 142, 235, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 309, 0, 0,
+ 0, 289, 292, 0, 0, 290, 291, 0, 0, 0,
+ 286, 287, 0, 307, 0, 0, 0, 108, 106, 0,
+ 0, 299, 0, 0, 0, 0, 0, 145, 135, 114,
+ 0, 148, 149, 0, 0, 0, 0, 0, 218, 215,
+ 105, 99, 0, 244, 0, 0, 277, 0, 0, 101,
+ 102, 101, 274, 298, 0, 0, 0, 0, 0, 280,
+ 281, 282, 277, 0, 103, 109, 107, 0, 0, 0,
+ 0, 0, 0, 0, 175, 152, 0, 0, 0, 0,
+ 0, 0, 0, 221, 0, 0, 0, 276, 0, 283,
+ 284, 0, 303, 305, 0, 0, 0, 288, 293, 294,
+ 0, 308, 0, 0, 164, 0, 0, 0, 0, 151,
+ 0, 0, 0, 0, 0, 100, 246, 0, 0, 0,
+ 275, 272, 0, 296, 0, 0, 0, 172, 0, 0,
+ 166, 167, 168, 171, 163, 0, 265, 0, 0, 0,
+ 273, 169, 170, 0, 0, 0, 263, 0, 264, 0,
+ 0, 165, 173, 174, 0, 0, 0, 0, 0, 0,
+ 270, 0, 0, 269, 266
};
/* YYDEFGOTO[NTERM-NUM]. */
static const short int yydefgoto[] =
{
- -1, 85, 311, 328, 329, 330, 263, 280, 331, 332,
- 219, 220, 251, 221, 25, 15, 37, 522, 369, 456,
- 480, 392, 457, 86, 87, 222, 89, 90, 120, 233,
- 403, 358, 404, 108, 1, 2, 3, 335, 306, 304,
- 305, 63, 200, 50, 103, 204, 91, 420, 343, 344,
- 345, 38, 95, 16, 44, 17, 61, 18, 28, 425,
- 359, 92, 361, 491, 19, 40, 41, 191, 192, 577,
- 97, 286, 526, 527, 193, 194, 436, 195, 196
+ -1, 85, 312, 329, 330, 331, 264, 281, 332, 333,
+ 219, 220, 252, 221, 25, 15, 37, 523, 370, 457,
+ 481, 393, 458, 86, 87, 222, 89, 90, 120, 234,
+ 404, 359, 405, 108, 1, 2, 3, 336, 307, 305,
+ 306, 63, 200, 50, 103, 204, 91, 421, 344, 345,
+ 346, 38, 95, 16, 44, 17, 61, 18, 28, 112,
+ 426, 360, 92, 362, 492, 19, 40, 41, 191, 192,
+ 578, 97, 287, 527, 528, 193, 194, 437, 195, 196
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -541
+#define YYPACT_NINF -555
static const short int yypact[] =
{
- -541, 28, 61, 478, -541, -541, -541, -541, -541, -541,
- -541, -541, -541, -541, 23, 152, 45, -541, -541, -9,
- -541, -541, -20, -51, 76, 69, 12, -541, 97, 149,
- 172, -541, -541, -541, -541, -541, -541, 1331, -19, -541,
- -541, 137, -541, -541, -541, -541, 49, 58, 60, 62,
- -541, 72, 149, 1331, 88, 88, 88, 88, -541, -541,
- -541, 152, -541, -541, -541, -541, -541, 75, -541, -541,
- -541, -541, -541, -541, -541, -541, -541, -541, -541, -541,
- -541, 227, 228, 3, 691, -541, 137, 79, -541, -541,
- -46, -541, -541, -541, -541, -541, 1585, -541, 212, 136,
- 233, 214, 216, -541, -541, -541, -541, -541, 1392, 1392,
- 1392, 1433, -541, -541, 83, 87, 711, -541, -541, -46,
- -70, 89, 777, -541, -541, 1392, -541, 183, 1453, 6,
- 309, 152, -541, -541, -541, -541, -541, -541, -541, -541,
- -541, -541, -541, -541, -541, -541, -541, -541, -541, -541,
- -541, -541, -541, -541, -541, -541, -541, -541, -541, 59,
- 142, 1392, 1392, 1392, 1392, 1392, 1392, 1392, 1392, 1392,
- 1392, 1392, 1392, -541, -541, -541, -541, -541, -541, -541,
- -541, -541, -541, -541, -541, -541, 1392, 1392, 1392, 1392,
- 1392, -541, -541, 152, -541, 86, -541, -541, -541, -541,
- -541, -541, -541, -541, -129, -541, -541, -541, 169, 196,
- 242, 200, 246, 203, 252, 205, 253, 251, 258, 221,
- 255, 259, 533, -541, 1392, 1392, 99, -63, 1392, -541,
- 1173, -541, 128, 126, 894, -541, -541, 75, -541, 894,
- 894, -541, -541, -541, -541, -541, -541, -541, -541, -541,
- -541, 894, 1331, -541, -541, -541, -541, -541, -541, -541,
- -541, -541, -541, 1392, -541, -541, -541, -541, -541, -541,
- -541, -541, -541, -541, -541, -541, -541, -541, -541, -541,
- 1392, 130, 133, -541, 894, 132, 138, 139, 143, 144,
- 151, 155, 156, 157, 894, 894, 894, 163, 254, 1331,
- 1392, 1392, 271, -541, 164, 164, 164, -541, -541, -541,
- -541, -541, -541, -541, -541, -541, -541, 59, 142, 173,
- 174, 175, 176, 177, 1214, 1494, 732, 281, 178, 179,
- 180, 182, 190, -541, -541, 164, -42, -135, -541, 166,
- -46, -541, 137, -541, 193, 191, 1234, -541, -541, -541,
- -541, -541, -541, -541, -541, -541, 290, 1433, -541, -541,
- -541, -541, 201, -541, 202, 894, 894, 894, 7, -541,
- 10, -541, 204, 894, 199, 1392, 1392, 1392, 1392, 1392,
- 1392, 1392, 211, 215, 217, 1392, 1392, 894, 894, 223,
- -541, -21, -541, -541, -541, 210, 219, 1433, 1433, 1433,
- 1433, 1433, -541, -541, 4, 752, -91, -541, -8, -541,
- 1433, 1433, 1433, 1433, 1433, -541, -541, -541, -541, -541,
- -541, 1275, 324, -541, -541, 343, 37, 348, 356, 224,
- 225, 229, 894, 376, 894, 1392, -541, 230, 894, 232,
- -541, -541, 234, 235, -541, -541, 894, 894, 894, -541,
- -541, 226, -541, 1392, 362, 385, -541, 164, 1433, 1433,
- 204, 238, 239, 240, 241, 1433, -541, 243, -17, -5,
- -541, -541, 247, 250, 261, 262, 359, -541, -541, -541,
- 339, 268, -541, 894, 894, 1392, 894, 894, 269, -541,
- 269, -541, 270, 894, 272, 1392, 1392, 1392, -541, -541,
- -541, 1392, 894, -541, -541, -541, 273, 274, 249, 1433,
- 1433, 1433, 1433, -541, -541, 245, 1433, 1433, 1433, 1433,
- 1392, 395, -541, 383, 275, 267, 270, 279, -541, -541,
- 351, -541, -541, 1392, 277, 894, -541, -541, -