Lines Matching refs:DI

479     std::pair<Type, std::string> emitDagSaveTemp(DagInit *DI);
480 std::pair<Type, std::string> emitDagSplat(DagInit *DI);
481 std::pair<Type, std::string> emitDagDup(DagInit *DI);
482 std::pair<Type, std::string> emitDagShuffle(DagInit *DI);
483 std::pair<Type, std::string> emitDagCast(DagInit *DI, bool IsBitCast);
484 std::pair<Type, std::string> emitDagCall(DagInit *DI);
485 std::pair<Type, std::string> emitDagNameReplace(DagInit *DI);
486 std::pair<Type, std::string> emitDagLiteral(DagInit *DI);
487 std::pair<Type, std::string> emitDagOp(DagInit *DI);
488 std::pair<Type, std::string> emitDag(DagInit *DI);
1410 } else if (DagInit *DI = dyn_cast<DagInit>(I)) { in emitBody() local
1412 Lines.push_back(DE.emitDag(DI).second + ";"); in emitBody()
1436 std::pair<Type, std::string> Intrinsic::DagEmitter::emitDag(DagInit *DI) { in emitDag() argument
1438 DefInit *DefI = cast<DefInit>(DI->getOperator()); in emitDag()
1442 return emitDagCast(DI, Op == "bitcast"); in emitDag()
1444 return emitDagShuffle(DI); in emitDag()
1446 return emitDagDup(DI); in emitDag()
1448 return emitDagSplat(DI); in emitDag()
1450 return emitDagSaveTemp(DI); in emitDag()
1452 return emitDagOp(DI); in emitDag()
1454 return emitDagCall(DI); in emitDag()
1456 return emitDagNameReplace(DI); in emitDag()
1458 return emitDagLiteral(DI); in emitDag()
1463 std::pair<Type, std::string> Intrinsic::DagEmitter::emitDagOp(DagInit *DI) { in emitDagOp() argument
1464 std::string Op = cast<StringInit>(DI->getArg(0))->getAsUnquotedString(); in emitDagOp()
1465 if (DI->getNumArgs() == 2) { in emitDagOp()
1468 emitDagArg(DI->getArg(1), DI->getArgName(1)); in emitDagOp()
1471 assert(DI->getNumArgs() == 3 && "Can only handle unary and binary ops!"); in emitDagOp()
1473 emitDagArg(DI->getArg(1), DI->getArgName(1)); in emitDagOp()
1475 emitDagArg(DI->getArg(2), DI->getArgName(2)); in emitDagOp()
1481 std::pair<Type, std::string> Intrinsic::DagEmitter::emitDagCall(DagInit *DI) { in emitDagCall() argument
1484 for (unsigned I = 0; I < DI->getNumArgs() - 1; ++I) { in emitDagCall()
1486 emitDagArg(DI->getArg(I + 1), DI->getArgName(I + 1)); in emitDagCall()
1493 if (StringInit *SI = dyn_cast<StringInit>(DI->getArg(0))) in emitDagCall()
1496 N = emitDagArg(DI->getArg(0), "").second; in emitDagCall()
1505 for (unsigned I = 0; I < DI->getNumArgs() - 1; ++I) { in emitDagCall()
1515 std::pair<Type, std::string> Intrinsic::DagEmitter::emitDagCast(DagInit *DI, in emitDagCast() argument
1519 DI->getArg(DI->getNumArgs() - 1), DI->getArgName(DI->getNumArgs() - 1)); in emitDagCast()
1521 for (unsigned ArgIdx = 0; ArgIdx < DI->getNumArgs() - 1; ++ArgIdx) { in emitDagCast()
1530 if (DI->getArgName(ArgIdx).size()) { in emitDagCast()
1531 assert_with_loc(Intr.Variables.find(DI->getArgName(ArgIdx)) != in emitDagCast()
1534 castToType = Intr.Variables[DI->getArgName(ArgIdx)].getType(); in emitDagCast()
1536 StringInit *SI = dyn_cast<StringInit>(DI->getArg(ArgIdx)); in emitDagCast()
1581 std::pair<Type, std::string> Intrinsic::DagEmitter::emitDagShuffle(DagInit *DI){ in emitDagShuffle() argument
1644 emitDagArg(DI->getArg(0), DI->getArgName(0)); in emitDagShuffle()
1646 emitDagArg(DI->getArg(1), DI->getArgName(1)); in emitDagShuffle()
1658 ST.evaluate(DI->getArg(2), Elts, None); in emitDagShuffle()
1686 std::pair<Type, std::string> Intrinsic::DagEmitter::emitDagDup(DagInit *DI) { in emitDagDup() argument
1687 assert_with_loc(DI->getNumArgs() == 1, "dup() expects one argument"); in emitDagDup()
1688 std::pair<Type, std::string> A = emitDagArg(DI->getArg(0), DI->getArgName(0)); in emitDagDup()
1704 std::pair<Type, std::string> Intrinsic::DagEmitter::emitDagSplat(DagInit *DI) { in emitDagSplat() argument
1705 assert_with_loc(DI->getNumArgs() == 2, "splat() expects two arguments"); in emitDagSplat()
1706 std::pair<Type, std::string> A = emitDagArg(DI->getArg(0), DI->getArgName(0)); in emitDagSplat()
1707 std::pair<Type, std::string> B = emitDagArg(DI->getArg(1), DI->getArgName(1)); in emitDagSplat()
1721 std::pair<Type, std::string> Intrinsic::DagEmitter::emitDagSaveTemp(DagInit *DI) { in emitDagSaveTemp() argument
1722 assert_with_loc(DI->getNumArgs() == 2, "save_temp() expects two arguments"); in emitDagSaveTemp()
1723 std::pair<Type, std::string> A = emitDagArg(DI->getArg(1), DI->getArgName(1)); in emitDagSaveTemp()
1728 std::string N = DI->getArgName(0); in emitDagSaveTemp()
1742 Intrinsic::DagEmitter::emitDagNameReplace(DagInit *DI) { in emitDagNameReplace() argument
1745 assert_with_loc(DI->getNumArgs() == 2, "name_replace requires 2 arguments!"); in emitDagNameReplace()
1746 std::string ToReplace = cast<StringInit>(DI->getArg(0))->getAsUnquotedString(); in emitDagNameReplace()
1747 std::string ReplaceWith = cast<StringInit>(DI->getArg(1))->getAsUnquotedString(); in emitDagNameReplace()
1757 std::pair<Type, std::string> Intrinsic::DagEmitter::emitDagLiteral(DagInit *DI){ in emitDagLiteral() argument
1758 std::string Ty = cast<StringInit>(DI->getArg(0))->getAsUnquotedString(); in emitDagLiteral()
1759 std::string Value = cast<StringInit>(DI->getArg(1))->getAsUnquotedString(); in emitDagLiteral()
1775 DagInit *DI = dyn_cast<DagInit>(Arg); in emitDagArg() local
1776 assert_with_loc(DI, "Arguments must either be DAGs or names!"); in emitDagArg()
1778 return emitDag(DI); in emitDagArg()