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