Home | History | Annotate | Download | only in TableGen

Lines Matching refs:TP

48 EEVT::TypeSet::TypeSet(MVT::SimpleValueType VT, TreePattern &TP) {
50 EnforceInteger(TP);
52 EnforceFloatingPoint(TP);
54 EnforceVector(TP);
78 bool EEVT::TypeSet::FillWithPossibleTypes(TreePattern &TP,
83 TP.getDAGPatterns().getTargetInfo().getLegalValueTypes();
85 if (TP.hasError())
94 TP.error("Type inference contradiction found, no " +
154 bool EEVT::TypeSet::MergeInTypeInfo(const EEVT::TypeSet &InVT, TreePattern &TP){
155 if (InVT.isCompletelyUnknown() || *this == InVT || TP.hasError())
172 InCopy.EnforceInteger(TP);
173 InCopy.EnforceScalar(TP);
192 bool MadeChange = EnforceInteger(TP);
223 TP.error("Type inference contradiction found, merging '" +
229 bool EEVT::TypeSet::EnforceInteger(TreePattern &TP) {
230 if (TP.hasError())
234 return FillWithPossibleTypes(TP, isInteger, "integer");
247 TP.error("Type inference contradiction found, '" +
255 bool EEVT::TypeSet::EnforceFloatingPoint(TreePattern &TP) {
256 if (TP.hasError())
260 return FillWithPossibleTypes(TP, isFloatingPoint, "floating point");
273 TP.error("Type inference contradiction found, '" +
281 bool EEVT::TypeSet::EnforceScalar(TreePattern &TP) {
282 if (TP.hasError())
287 return FillWithPossibleTypes(TP, isScalar, "scalar");
300 TP.error("Type inference contradiction found, '" +
308 bool EEVT::TypeSet::EnforceVector(TreePattern &TP) {
309 if (TP.hasError())
314 return FillWithPossibleTypes(TP, isVector, "vector");
325 TP.error("Type inference contradiction found, '" +
337 bool EEVT::TypeSet::EnforceSmallerThan(EEVT::TypeSet &Other, TreePattern &TP) {
338 if (TP.hasError())
345 MadeChange = FillWithPossibleTypes(TP);
348 MadeChange = Other.FillWithPossibleTypes(TP);
353 MadeChange |= Other.EnforceInteger(TP);
355 MadeChange |= Other.EnforceFloatingPoint(TP);
357 MadeChange |= EnforceInteger(TP);
359 MadeChange |= EnforceFloatingPoint(TP);
366 MadeChange |= Other.EnforceScalar(TP);
368 MadeChange |= Other.EnforceVector(TP);
370 MadeChange |= EnforceScalar(TP);
372 MadeChange |= EnforceVector(TP);
381 if (TP.hasError())
412 TP.error("Type inference contradiction found, '" + InputSet.getName() +
443 TP.error("Type inference contradiction found, '" + InputSet.getName() +
455 TreePattern &TP) {
458 MadeChange |= EnforceVector(TP);
471 TP.error("Type inference contradiction found, forcing '" +
483 TreePattern &TP) {
484 if (TP.hasError())
489 MadeChange |= EnforceVector(TP);
490 MadeChange |= VTOperand.EnforceScalar(TP);
496 return MadeChange || VTOperand.MergeInTypeInfo(IVT.SimpleTy, TP);
506 MadeChange |= EnforceVectorEltTypeIs(VT, TP);
514 TreePattern &TP) {
515 if (TP.hasError())
520 MadeChange |= EnforceVector(TP);
521 MadeChange |= VTOperand.EnforceVector(TP);
526 MadeChange |= VTOperand.EnforceInteger(TP);
528 MadeChange |= VTOperand.EnforceFloatingPoint(TP);
530 MadeChange |= EnforceInteger(TP);
532 MadeChange |= EnforceFloatingPoint(TP);
544 EEVT::TypeSet EltTypeSet(IVT.SimpleTy, TP);
545 MadeChange |= VTOperand.EnforceVectorEltTypeIs(EltTypeSet, TP);
558 TP.error("Type inference contradiction found, forcing '" +
568 EEVT::TypeSet EltTypeSet(IVT.SimpleTy, TP);
569 MadeChange |= EnforceVectorEltTypeIs(EltTypeSet, TP);
582 TP.error("Type inference contradiction found, forcing '" +
595 TreePattern &TP) {
596 if (TP.hasError())
601 MadeChange |= EnforceVector(TP);
602 MadeChange |= VTOperand.EnforceVector(TP);
620 TP.error("Type inference contradiction found, forcing '" +
640 TP.error("Type inference contradiction found, forcing '" +
652 TreePattern &TP) {
653 if (TP.hasError())
674 TP.error("Type inference contradiction found, forcing '" +
694 TP.error("Type inference contradiction found, forcing '" +
989 TreePattern &TP) const {
990 if (TP.hasError())
999 return NodeToApply->UpdateNodeType(ResNo, x.SDTCisVT_Info.VT, TP);
1002 return NodeToApply->UpdateNodeType(ResNo, MVT::iPTR, TP);
1005 return NodeToApply->getExtType(ResNo).EnforceInteger(TP);
1008 return NodeToApply->getExtType(ResNo).EnforceFloatingPoint(TP);
1011 return NodeToApply->getExtType(ResNo).EnforceVector(TP);
1016 return NodeToApply->UpdateNodeType(ResNo, OtherNode->getExtType(OResNo),TP)|
1017 OtherNode->UpdateNodeType(OResNo,NodeToApply->getExtType(ResNo),TP);
1026 TP.error(N->getOperator()->getName() + " expects a VT operand!");
1032 EEVT::TypeSet TypeListTmp(VT, TP);
1039 return TypeListTmp.EnforceSmallerThan(OtherNode->getExtType(OResNo), TP);
1047 EnforceSmallerThan(BigOperand->getExtType(BResNo), TP);
1058 EnforceVectorEltTypeIs(NodeToApply->getExtType(ResNo), TP);
1069 EnforceVectorSubVectorTypeIs(NodeToApply->getExtType(ResNo), TP);
1073 EnforceVectorEltTypeIs(x.SDTCVecEltisVT_Info.VT, TP);
1081 EnforceVectorSameNumElts(NodeToApply->getExtType(ResNo), TP);
1089 EnforceSameSize(NodeToApply->getExtType(ResNo), TP);
1100 TreePattern &TP) {
1109 TP);
1113 return UpdateNodeType(ResNo, MVT::iPTR, TP);
1124 CodeGenTarget &Tgt = TP.getDAGPatterns().getTargetInfo();
1125 return UpdateNodeType(ResNo, Tgt.getRegisterClass(RC).getValueTypes(), TP);
1404 TreePatternNode *TreePatternNode::InlinePatternFragments(TreePattern &TP) {
1405 if (TP.hasError())
1416 TreePatternNode *NewChild = Child->InlinePatternFragments(TP);
1429 TreePattern *Frag = TP.getDAGPatterns().getPatternFragment(Op);
1433 TP.error("'" + Op->getName() + "' fragment requires " +
1449 ArgMap[Frag->getArgName(i)] = getChild(i)->InlinePatternFragments(TP);
1456 FragTree->UpdateNodeType(i, getExtType(i), TP);
1467 return FragTree->InlinePatternFragments(TP);
1485 TreePattern &TP) {
1492 const CodeGenTarget &T = TP.getDAGPatterns().getTargetInfo();
1502 return EEVT::TypeSet(MVT::i32, TP);
1508 const CodeGenTarget &T = TP.getDAGPatterns().getTargetInfo();
1522 const CodeGenTarget &T = TP.getDAGPatterns().getTargetInfo();
1528 return EEVT::TypeSet(MVT::i32, TP);
1538 return EEVT::TypeSet(MVT::Other, TP);
1546 return EEVT::TypeSet(getValueType(R), TP);
1552 return EEVT::TypeSet(MVT::Other, TP);
1559 return EEVT::TypeSet(TP.getDAGPatterns().getComplexPattern(R).getValueType(),
1560 TP);
1564 return EEVT::TypeSet(MVT::iPTR, TP);
1576 TP.error("Unknown node flavor used in pattern: " + R->getName());
1577 return EEVT::TypeSet(MVT::Other, TP);
1681 static void emitTooManyOperandsError(TreePattern &TP,
1685 TP.error("Instruction '" + InstName + "' was provided " + Twine(Actual) +
1689 static void emitTooFewOperandsError(TreePattern &TP,
1692 TP.error("Instruction '" + InstName +
1699 bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) {
1700 if (TP.hasError())
1703 CodeGenDAGPatterns &CDP = TP.getDAGPatterns();
1711 !hasName(), TP), TP);
1719 bool MadeChange = Types[0].EnforceInteger(TP);
1738 TP.error("Integer value '" + itostr(II->getValue()) +
1752 bool MadeChange = SetVal->ApplyTypeConstraints(TP, NotRegisters);
1756 MadeChange |= Child->ApplyTypeConstraints(TP, NotRegisters);
1759 MadeChange |= Child->UpdateNodeType(0, SetVal->getExtType(i), TP);
1760 MadeChange |= SetVal->UpdateNodeType(i, Child->getExtType(0), TP);
1770 MadeChange = getChild(i)->ApplyTypeConstraints(TP, NotRegisters);
1782 MadeChange |= UpdateNodeType(i, Int->IS.RetVTs[i], TP);
1785 TP.error("Intrinsic '" + Int->Name + "' expects " +
1792 MadeChange |= getChild(0)->UpdateNodeType(0, MVT::iPTR, TP);
1795 MadeChange |= getChild(i+1)->ApplyTypeConstraints(TP, NotRegisters);
1799 MadeChange |= getChild(i+1)->UpdateNodeType(0, OpVT, TP);
1810 TP.error(getOperator()->getName() + " node requires exactly " +
1815 bool MadeChange = NI.ApplyTypeConstraints(this, TP);
1817 MadeChange |= getChild(i)->ApplyTypeConstraints(TP, NotRegisters);
1833 MadeChange |= UpdateNodeTypeFromInst(ResNo, Inst.getResult(ResNo), TP);
1846 MadeChange |= UpdateNodeType(ResNo, VT, TP);
1853 MadeChange |= UpdateNodeType(0, getChild(0)->getExtType(0), TP);
1854 MadeChange |= getChild(0)->UpdateNodeType(0, getExtType(0), TP);
1861 TP.error("REG_SEQUENCE requires at least 3 operands!");
1866 TP.error("REG_SEQUENCE requires an odd number of operands!");
1871 TP.error("REG_SEQUENCE requires a RegisterClass for first operand!");
1878 TP.error("REG_SEQUENCE requires a SubRegIndex for operand " +
1898 emitTooFewOperandsError(TP, getOperator()->getName(), getNumChildren());
1917 Child->UpdateNodeTypeFromInst(ChildResNo, SubRec, TP);
1922 emitTooFewOperandsError(TP, getOperator()->getName(),
1930 Child->UpdateNodeTypeFromInst(ChildResNo, SubRec, TP);
1939 MadeChange |= Child->UpdateNodeTypeFromInst(ChildResNo, OperandNode, TP);
1943 emitTooManyOperandsError(TP, getOperator()->getName(),
1949 MadeChange |= getChild(i)->ApplyTypeConstraints(TP, NotRegisters);
1957 MadeChange |= getChild(i)->ApplyTypeConstraints(TP, NotRegisters);
1966 TP.error("Node transform '" + getOperator()->getName() +
1971 bool MadeChange = getChild(0)->ApplyTypeConstraints(TP, NotRegisters);
1979 bool MadeChange = UpdateNodeType(getChild(0)->getExtType(), TP);
1980 MadeChange |= getChild(0)->UpdateNodeType(getExtType(), TP);
3407 static bool ForceArbitraryInstResultType(TreePatternNode *N, TreePattern &TP) {
3413 if (ForceArbitraryInstResultType(N->getChild(i), TP))
3426 if (N->getExtType(i).MergeInTypeInfo(N->getExtType(i).getTypeList()[0], TP))