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,6 +4340,15 @@ 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"
{ {
// map llvm.isunordered to "fcmp uno"
if (*(yyvsp[-3].Value).val == "%llvm.isunordered.f32" ||
*(yyvsp[-3].Value).val == "%llvm.isunordered.f64") {
(yyval.Value).val = new std::string( "fcmp uno " + *(*(yyvsp[-1].ValList))[0].val + ", ");
size_t pos = (*(yyvsp[-1].ValList))[1].val->find(' ');
assert(pos != std::string::npos && "no space?");
*(yyval.Value).val += (*(yyvsp[-1].ValList))[1].val->substr(pos+1);
(yyval.Value).type = TypeInfo::get("bool", BoolTy);
} else {
if (!(yyvsp[-5].String)->empty()) if (!(yyvsp[-5].String)->empty())
*(yyvsp[-6].String) += " " + *(yyvsp[-5].String); *(yyvsp[-6].String) += " " + *(yyvsp[-5].String);
if (!(yyvsp[-6].String)->empty()) if (!(yyvsp[-6].String)->empty())
@ -4355,27 +4364,28 @@ yyreduce:
*(yyvsp[-6].String) += ")"; *(yyvsp[-6].String) += ")";
(yyval.Value).val = (yyvsp[-6].String); (yyval.Value).val = (yyvsp[-6].String);
(yyval.Value).type = getFunctionReturnType((yyvsp[-4].Type)); (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,6 +4340,15 @@ 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"
{ {
// map llvm.isunordered to "fcmp uno"
if (*(yyvsp[-3].Value).val == "%llvm.isunordered.f32" ||
*(yyvsp[-3].Value).val == "%llvm.isunordered.f64") {
(yyval.Value).val = new std::string( "fcmp uno " + *(*(yyvsp[-1].ValList))[0].val + ", ");
size_t pos = (*(yyvsp[-1].ValList))[1].val->find(' ');
assert(pos != std::string::npos && "no space?");
*(yyval.Value).val += (*(yyvsp[-1].ValList))[1].val->substr(pos+1);
(yyval.Value).type = TypeInfo::get("bool", BoolTy);
} else {
if (!(yyvsp[-5].String)->empty()) if (!(yyvsp[-5].String)->empty())
*(yyvsp[-6].String) += " " + *(yyvsp[-5].String); *(yyvsp[-6].String) += " " + *(yyvsp[-5].String);
if (!(yyvsp[-6].String)->empty()) if (!(yyvsp[-6].String)->empty())
@ -4355,27 +4364,28 @@ yyreduce:
*(yyvsp[-6].String) += ")"; *(yyvsp[-6].String) += ")";
(yyval.Value).val = (yyvsp[-6].String); (yyval.Value).val = (yyvsp[-6].String);
(yyval.Value).type = getFunctionReturnType((yyvsp[-4].Type)); (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,6 +1872,15 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
delete $2.val; delete $2.val;
} }
| OptTailCall OptCallingConv TypesV ValueRef '(' ValueRefListE ')' { | OptTailCall OptCallingConv TypesV ValueRef '(' ValueRefListE ')' {
// map llvm.isunordered to "fcmp uno"
if (*$4.val == "%llvm.isunordered.f32" ||
*$4.val == "%llvm.isunordered.f64") {
$$.val = new std::string( "fcmp uno " + *(*$6)[0].val + ", ");
size_t pos = (*$6)[1].val->find(' ');
assert(pos != std::string::npos && "no space?");
*$$.val += (*$6)[1].val->substr(pos+1);
$$.type = TypeInfo::get("bool", BoolTy);
} else {
if (!$2->empty()) if (!$2->empty())
*$1 += " " + *$2; *$1 += " " + *$2;
if (!$1->empty()) if (!$1->empty())
@ -1887,6 +1896,7 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
*$1 += ")"; *$1 += ")";
$$.val = $1; $$.val = $1;
$$.type = getFunctionReturnType($3); $$.type = getFunctionReturnType($3);
}
delete $2; $4.destroy(); delete $6; delete $2; $4.destroy(); delete $6;
} }
| MemoryInst ; | MemoryInst ;