Regenerate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32987 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2007-01-07 08:07:39 +00:00
parent e3671f90f2
commit 12969887a3
3 changed files with 104 additions and 74 deletions

View File

@ -1580,9 +1580,9 @@ static const unsigned short int yyrline[] =
1598, 1601, 1607, 1607, 1609, 1614, 1619, 1624, 1632, 1640, 1598, 1601, 1607, 1607, 1609, 1614, 1619, 1624, 1632, 1640,
1647, 1669, 1674, 1680, 1686, 1694, 1712, 1720, 1729, 1733, 1647, 1669, 1674, 1680, 1686, 1694, 1712, 1720, 1729, 1733,
1740, 1741, 1745, 1750, 1753, 1762, 1770, 1779, 1787, 1795, 1740, 1741, 1745, 1750, 1753, 1762, 1770, 1779, 1787, 1795,
1800, 1809, 1837, 1843, 1849, 1856, 1862, 1868, 1874, 1892, 1800, 1809, 1837, 1843, 1849, 1856, 1862, 1868, 1874, 1902,
1897, 1898, 1902, 1903, 1906, 1914, 1923, 1931, 1940, 1946, 1907, 1908, 1912, 1913, 1916, 1924, 1933, 1941, 1950, 1956,
1955, 1964 1965, 1974
}; };
#endif #endif
@ -4340,42 +4340,52 @@ yyreduce:
case 288: case 288:
#line 1874 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1874 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ {
if (!(yyvsp[-5].String)->empty()) // map llvm.isunordered to "fcmp uno"
*(yyvsp[-6].String) += " " + *(yyvsp[-5].String); if (*(yyvsp[-3].Value).val == "%llvm.isunordered.f32" ||
if (!(yyvsp[-6].String)->empty()) *(yyvsp[-3].Value).val == "%llvm.isunordered.f64") {
*(yyvsp[-6].String) += " "; (yyval.Value).val = new std::string( "fcmp uno " + *(*(yyvsp[-1].ValList))[0].val + ", ");
*(yyvsp[-6].String) += (yyvsp[-4].Type)->getNewTy() + " " + *(yyvsp[-3].Value).val + "("; size_t pos = (*(yyvsp[-1].ValList))[1].val->find(' ');
for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) { assert(pos != std::string::npos && "no space?");
ValueInfo& VI = (*(yyvsp[-1].ValList))[i]; *(yyval.Value).val += (*(yyvsp[-1].ValList))[1].val->substr(pos+1);
*(yyvsp[-6].String) += *VI.val; (yyval.Value).type = TypeInfo::get("bool", BoolTy);
if (i+1 < (yyvsp[-1].ValList)->size()) } else {
*(yyvsp[-6].String) += ", "; if (!(yyvsp[-5].String)->empty())
VI.destroy(); *(yyvsp[-6].String) += " " + *(yyvsp[-5].String);
if (!(yyvsp[-6].String)->empty())
*(yyvsp[-6].String) += " ";
*(yyvsp[-6].String) += (yyvsp[-4].Type)->getNewTy() + " " + *(yyvsp[-3].Value).val + "(";
for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
ValueInfo& VI = (*(yyvsp[-1].ValList))[i];
*(yyvsp[-6].String) += *VI.val;
if (i+1 < (yyvsp[-1].ValList)->size())
*(yyvsp[-6].String) += ", ";
VI.destroy();
}
*(yyvsp[-6].String) += ")";
(yyval.Value).val = (yyvsp[-6].String);
(yyval.Value).type = getFunctionReturnType((yyvsp[-4].Type));
} }
*(yyvsp[-6].String) += ")";
(yyval.Value).val = (yyvsp[-6].String);
(yyval.Value).type = getFunctionReturnType((yyvsp[-4].Type));
delete (yyvsp[-5].String); (yyvsp[-3].Value).destroy(); delete (yyvsp[-1].ValList); delete (yyvsp[-5].String); (yyvsp[-3].Value).destroy(); delete (yyvsp[-1].ValList);
;} ;}
break; break;
case 290: case 290:
#line 1897 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1907 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.ValList) = (yyvsp[0].ValList); ;} { (yyval.ValList) = (yyvsp[0].ValList); ;}
break; break;
case 291: case 291:
#line 1898 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1908 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.ValList) = new ValueList(); ;} { (yyval.ValList) = new ValueList(); ;}
break; break;
case 293: case 293:
#line 1903 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1913 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(); ;} { (yyval.String) = new std::string(); ;}
break; break;
case 294: case 294:
#line 1906 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1916 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ {
*(yyvsp[-2].String) += " " + (yyvsp[-1].Type)->getNewTy(); *(yyvsp[-2].String) += " " + (yyvsp[-1].Type)->getNewTy();
if (!(yyvsp[0].String)->empty()) if (!(yyvsp[0].String)->empty())
@ -4387,7 +4397,7 @@ yyreduce:
break; break;
case 295: case 295:
#line 1914 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1924 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ {
std::string Name = getUniqueName((yyvsp[-1].Value).val, (yyvsp[-2].Type)); std::string Name = getUniqueName((yyvsp[-1].Value).val, (yyvsp[-2].Type));
*(yyvsp[-5].String) += " " + (yyvsp[-4].Type)->getNewTy() + ", " + (yyvsp[-2].Type)->getNewTy() + " " + Name; *(yyvsp[-5].String) += " " + (yyvsp[-4].Type)->getNewTy() + ", " + (yyvsp[-2].Type)->getNewTy() + " " + Name;
@ -4400,7 +4410,7 @@ yyreduce:
break; break;
case 296: case 296:
#line 1923 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1933 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ {
*(yyvsp[-2].String) += " " + (yyvsp[-1].Type)->getNewTy(); *(yyvsp[-2].String) += " " + (yyvsp[-1].Type)->getNewTy();
if (!(yyvsp[0].String)->empty()) if (!(yyvsp[0].String)->empty())
@ -4412,7 +4422,7 @@ yyreduce:
break; break;
case 297: case 297:
#line 1931 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1941 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ {
std::string Name = getUniqueName((yyvsp[-1].Value).val, (yyvsp[-2].Type)); std::string Name = getUniqueName((yyvsp[-1].Value).val, (yyvsp[-2].Type));
*(yyvsp[-5].String) += " " + (yyvsp[-4].Type)->getNewTy() + ", " + (yyvsp[-2].Type)->getNewTy() + " " + Name; *(yyvsp[-5].String) += " " + (yyvsp[-4].Type)->getNewTy() + ", " + (yyvsp[-2].Type)->getNewTy() + " " + Name;
@ -4425,7 +4435,7 @@ yyreduce:
break; break;
case 298: case 298:
#line 1940 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1950 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ {
*(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val; *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
(yyval.Value).val = (yyvsp[-1].String); (yyval.Value).val = (yyvsp[-1].String);
@ -4435,7 +4445,7 @@ yyreduce:
break; break;
case 299: case 299:
#line 1946 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1956 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ {
std::string Name = getUniqueName((yyvsp[0].Value).val, (yyvsp[-1].Type)); std::string Name = getUniqueName((yyvsp[0].Value).val, (yyvsp[-1].Type));
if (!(yyvsp[-3].String)->empty()) if (!(yyvsp[-3].String)->empty())
@ -4448,7 +4458,7 @@ yyreduce:
break; break;
case 300: case 300:
#line 1955 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1965 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ {
std::string Name = getUniqueName((yyvsp[0].Value).val, (yyvsp[-1].Type)); std::string Name = getUniqueName((yyvsp[0].Value).val, (yyvsp[-1].Type));
if (!(yyvsp[-5].String)->empty()) if (!(yyvsp[-5].String)->empty())
@ -4461,7 +4471,7 @@ yyreduce:
break; break;
case 301: case 301:
#line 1964 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1974 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ {
std::string Name = getUniqueName((yyvsp[-1].Value).val, (yyvsp[-2].Type)); std::string Name = getUniqueName((yyvsp[-1].Value).val, (yyvsp[-2].Type));
// Upgrade the indices // Upgrade the indices
@ -4491,7 +4501,7 @@ yyreduce:
} }
/* Line 1126 of yacc.c. */ /* Line 1126 of yacc.c. */
#line 4495 "UpgradeParser.tab.c" #line 4505 "UpgradeParser.tab.c"
yyvsp -= yylen; yyvsp -= yylen;
yyssp -= yylen; yyssp -= yylen;
@ -4759,7 +4769,7 @@ yyreturn:
} }
#line 1987 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1997 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
int yyerror(const char *ErrorMsg) { int yyerror(const char *ErrorMsg) {

View File

@ -1580,9 +1580,9 @@ static const unsigned short int yyrline[] =
1598, 1601, 1607, 1607, 1609, 1614, 1619, 1624, 1632, 1640, 1598, 1601, 1607, 1607, 1609, 1614, 1619, 1624, 1632, 1640,
1647, 1669, 1674, 1680, 1686, 1694, 1712, 1720, 1729, 1733, 1647, 1669, 1674, 1680, 1686, 1694, 1712, 1720, 1729, 1733,
1740, 1741, 1745, 1750, 1753, 1762, 1770, 1779, 1787, 1795, 1740, 1741, 1745, 1750, 1753, 1762, 1770, 1779, 1787, 1795,
1800, 1809, 1837, 1843, 1849, 1856, 1862, 1868, 1874, 1892, 1800, 1809, 1837, 1843, 1849, 1856, 1862, 1868, 1874, 1902,
1897, 1898, 1902, 1903, 1906, 1914, 1923, 1931, 1940, 1946, 1907, 1908, 1912, 1913, 1916, 1924, 1933, 1941, 1950, 1956,
1955, 1964 1965, 1974
}; };
#endif #endif
@ -4340,42 +4340,52 @@ yyreduce:
case 288: case 288:
#line 1874 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1874 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ {
if (!(yyvsp[-5].String)->empty()) // map llvm.isunordered to "fcmp uno"
*(yyvsp[-6].String) += " " + *(yyvsp[-5].String); if (*(yyvsp[-3].Value).val == "%llvm.isunordered.f32" ||
if (!(yyvsp[-6].String)->empty()) *(yyvsp[-3].Value).val == "%llvm.isunordered.f64") {
*(yyvsp[-6].String) += " "; (yyval.Value).val = new std::string( "fcmp uno " + *(*(yyvsp[-1].ValList))[0].val + ", ");
*(yyvsp[-6].String) += (yyvsp[-4].Type)->getNewTy() + " " + *(yyvsp[-3].Value).val + "("; size_t pos = (*(yyvsp[-1].ValList))[1].val->find(' ');
for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) { assert(pos != std::string::npos && "no space?");
ValueInfo& VI = (*(yyvsp[-1].ValList))[i]; *(yyval.Value).val += (*(yyvsp[-1].ValList))[1].val->substr(pos+1);
*(yyvsp[-6].String) += *VI.val; (yyval.Value).type = TypeInfo::get("bool", BoolTy);
if (i+1 < (yyvsp[-1].ValList)->size()) } else {
*(yyvsp[-6].String) += ", "; if (!(yyvsp[-5].String)->empty())
VI.destroy(); *(yyvsp[-6].String) += " " + *(yyvsp[-5].String);
if (!(yyvsp[-6].String)->empty())
*(yyvsp[-6].String) += " ";
*(yyvsp[-6].String) += (yyvsp[-4].Type)->getNewTy() + " " + *(yyvsp[-3].Value).val + "(";
for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
ValueInfo& VI = (*(yyvsp[-1].ValList))[i];
*(yyvsp[-6].String) += *VI.val;
if (i+1 < (yyvsp[-1].ValList)->size())
*(yyvsp[-6].String) += ", ";
VI.destroy();
}
*(yyvsp[-6].String) += ")";
(yyval.Value).val = (yyvsp[-6].String);
(yyval.Value).type = getFunctionReturnType((yyvsp[-4].Type));
} }
*(yyvsp[-6].String) += ")";
(yyval.Value).val = (yyvsp[-6].String);
(yyval.Value).type = getFunctionReturnType((yyvsp[-4].Type));
delete (yyvsp[-5].String); (yyvsp[-3].Value).destroy(); delete (yyvsp[-1].ValList); delete (yyvsp[-5].String); (yyvsp[-3].Value).destroy(); delete (yyvsp[-1].ValList);
;} ;}
break; break;
case 290: case 290:
#line 1897 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1907 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.ValList) = (yyvsp[0].ValList); ;} { (yyval.ValList) = (yyvsp[0].ValList); ;}
break; break;
case 291: case 291:
#line 1898 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1908 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.ValList) = new ValueList(); ;} { (yyval.ValList) = new ValueList(); ;}
break; break;
case 293: case 293:
#line 1903 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1913 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(); ;} { (yyval.String) = new std::string(); ;}
break; break;
case 294: case 294:
#line 1906 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1916 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ {
*(yyvsp[-2].String) += " " + (yyvsp[-1].Type)->getNewTy(); *(yyvsp[-2].String) += " " + (yyvsp[-1].Type)->getNewTy();
if (!(yyvsp[0].String)->empty()) if (!(yyvsp[0].String)->empty())
@ -4387,7 +4397,7 @@ yyreduce:
break; break;
case 295: case 295:
#line 1914 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1924 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ {
std::string Name = getUniqueName((yyvsp[-1].Value).val, (yyvsp[-2].Type)); std::string Name = getUniqueName((yyvsp[-1].Value).val, (yyvsp[-2].Type));
*(yyvsp[-5].String) += " " + (yyvsp[-4].Type)->getNewTy() + ", " + (yyvsp[-2].Type)->getNewTy() + " " + Name; *(yyvsp[-5].String) += " " + (yyvsp[-4].Type)->getNewTy() + ", " + (yyvsp[-2].Type)->getNewTy() + " " + Name;
@ -4400,7 +4410,7 @@ yyreduce:
break; break;
case 296: case 296:
#line 1923 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1933 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ {
*(yyvsp[-2].String) += " " + (yyvsp[-1].Type)->getNewTy(); *(yyvsp[-2].String) += " " + (yyvsp[-1].Type)->getNewTy();
if (!(yyvsp[0].String)->empty()) if (!(yyvsp[0].String)->empty())
@ -4412,7 +4422,7 @@ yyreduce:
break; break;
case 297: case 297:
#line 1931 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1941 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ {
std::string Name = getUniqueName((yyvsp[-1].Value).val, (yyvsp[-2].Type)); std::string Name = getUniqueName((yyvsp[-1].Value).val, (yyvsp[-2].Type));
*(yyvsp[-5].String) += " " + (yyvsp[-4].Type)->getNewTy() + ", " + (yyvsp[-2].Type)->getNewTy() + " " + Name; *(yyvsp[-5].String) += " " + (yyvsp[-4].Type)->getNewTy() + ", " + (yyvsp[-2].Type)->getNewTy() + " " + Name;
@ -4425,7 +4435,7 @@ yyreduce:
break; break;
case 298: case 298:
#line 1940 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1950 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ {
*(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val; *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
(yyval.Value).val = (yyvsp[-1].String); (yyval.Value).val = (yyvsp[-1].String);
@ -4435,7 +4445,7 @@ yyreduce:
break; break;
case 299: case 299:
#line 1946 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1956 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ {
std::string Name = getUniqueName((yyvsp[0].Value).val, (yyvsp[-1].Type)); std::string Name = getUniqueName((yyvsp[0].Value).val, (yyvsp[-1].Type));
if (!(yyvsp[-3].String)->empty()) if (!(yyvsp[-3].String)->empty())
@ -4448,7 +4458,7 @@ yyreduce:
break; break;
case 300: case 300:
#line 1955 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1965 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ {
std::string Name = getUniqueName((yyvsp[0].Value).val, (yyvsp[-1].Type)); std::string Name = getUniqueName((yyvsp[0].Value).val, (yyvsp[-1].Type));
if (!(yyvsp[-5].String)->empty()) if (!(yyvsp[-5].String)->empty())
@ -4461,7 +4471,7 @@ yyreduce:
break; break;
case 301: case 301:
#line 1964 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1974 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
{ {
std::string Name = getUniqueName((yyvsp[-1].Value).val, (yyvsp[-2].Type)); std::string Name = getUniqueName((yyvsp[-1].Value).val, (yyvsp[-2].Type));
// Upgrade the indices // Upgrade the indices
@ -4491,7 +4501,7 @@ yyreduce:
} }
/* Line 1126 of yacc.c. */ /* Line 1126 of yacc.c. */
#line 4495 "UpgradeParser.tab.c" #line 4505 "UpgradeParser.tab.c"
yyvsp -= yylen; yyvsp -= yylen;
yyssp -= yylen; yyssp -= yylen;
@ -4759,7 +4769,7 @@ yyreturn:
} }
#line 1987 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #line 1997 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
int yyerror(const char *ErrorMsg) { int yyerror(const char *ErrorMsg) {

View File

@ -1872,21 +1872,31 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
delete $2.val; delete $2.val;
} }
| OptTailCall OptCallingConv TypesV ValueRef '(' ValueRefListE ')' { | OptTailCall OptCallingConv TypesV ValueRef '(' ValueRefListE ')' {
if (!$2->empty()) // map llvm.isunordered to "fcmp uno"
*$1 += " " + *$2; if (*$4.val == "%llvm.isunordered.f32" ||
if (!$1->empty()) *$4.val == "%llvm.isunordered.f64") {
*$1 += " "; $$.val = new std::string( "fcmp uno " + *(*$6)[0].val + ", ");
*$1 += $3->getNewTy() + " " + *$4.val + "("; size_t pos = (*$6)[1].val->find(' ');
for (unsigned i = 0; i < $6->size(); ++i) { assert(pos != std::string::npos && "no space?");
ValueInfo& VI = (*$6)[i]; *$$.val += (*$6)[1].val->substr(pos+1);
*$1 += *VI.val; $$.type = TypeInfo::get("bool", BoolTy);
if (i+1 < $6->size()) } else {
*$1 += ", "; if (!$2->empty())
VI.destroy(); *$1 += " " + *$2;
if (!$1->empty())
*$1 += " ";
*$1 += $3->getNewTy() + " " + *$4.val + "(";
for (unsigned i = 0; i < $6->size(); ++i) {
ValueInfo& VI = (*$6)[i];
*$1 += *VI.val;
if (i+1 < $6->size())
*$1 += ", ";
VI.destroy();
}
*$1 += ")";
$$.val = $1;
$$.type = getFunctionReturnType($3);
} }
*$1 += ")";
$$.val = $1;
$$.type = getFunctionReturnType($3);
delete $2; $4.destroy(); delete $6; delete $2; $4.destroy(); delete $6;
} }
| MemoryInst ; | MemoryInst ;