Lines Matching refs:TP
47 EEVT::TypeSet::TypeSet(MVT::SimpleValueType VT, TreePattern &TP) { in TypeSet() argument
49 EnforceInteger(TP); in TypeSet()
51 EnforceFloatingPoint(TP); in TypeSet()
53 EnforceVector(TP); in TypeSet()
77 bool EEVT::TypeSet::FillWithPossibleTypes(TreePattern &TP, in FillWithPossibleTypes() argument
82 TP.getDAGPatterns().getTargetInfo().getLegalValueTypes(); in FillWithPossibleTypes()
84 if (TP.hasError()) in FillWithPossibleTypes()
93 TP.error("Type inference contradiction found, no " + in FillWithPossibleTypes()
165 bool EEVT::TypeSet::MergeInTypeInfo(const EEVT::TypeSet &InVT, TreePattern &TP){ in MergeInTypeInfo() argument
166 if (InVT.isCompletelyUnknown() || *this == InVT || TP.hasError()) in MergeInTypeInfo()
183 InCopy.EnforceInteger(TP); in MergeInTypeInfo()
184 InCopy.EnforceScalar(TP); in MergeInTypeInfo()
203 bool MadeChange = EnforceInteger(TP); in MergeInTypeInfo()
240 TP.error("Type inference contradiction found, merging '" + in MergeInTypeInfo()
246 bool EEVT::TypeSet::EnforceInteger(TreePattern &TP) { in EnforceInteger() argument
247 if (TP.hasError()) in EnforceInteger()
251 return FillWithPossibleTypes(TP, isInteger, "integer"); in EnforceInteger()
263 TP.error("Type inference contradiction found, '" + in EnforceInteger()
271 bool EEVT::TypeSet::EnforceFloatingPoint(TreePattern &TP) { in EnforceFloatingPoint() argument
272 if (TP.hasError()) in EnforceFloatingPoint()
276 return FillWithPossibleTypes(TP, isFloatingPoint, "floating point"); in EnforceFloatingPoint()
289 TP.error("Type inference contradiction found, '" + in EnforceFloatingPoint()
297 bool EEVT::TypeSet::EnforceScalar(TreePattern &TP) { in EnforceScalar() argument
298 if (TP.hasError()) in EnforceScalar()
303 return FillWithPossibleTypes(TP, isScalar, "scalar"); in EnforceScalar()
316 TP.error("Type inference contradiction found, '" + in EnforceScalar()
324 bool EEVT::TypeSet::EnforceVector(TreePattern &TP) { in EnforceVector() argument
325 if (TP.hasError()) in EnforceVector()
330 return FillWithPossibleTypes(TP, isVector, "vector"); in EnforceVector()
343 TP.error("Type inference contradiction found, '" + in EnforceVector()
355 bool EEVT::TypeSet::EnforceSmallerThan(EEVT::TypeSet &Other, TreePattern &TP) { in EnforceSmallerThan() argument
356 if (TP.hasError()) in EnforceSmallerThan()
363 MadeChange = FillWithPossibleTypes(TP); in EnforceSmallerThan()
366 MadeChange = Other.FillWithPossibleTypes(TP); in EnforceSmallerThan()
371 MadeChange |= Other.EnforceInteger(TP); in EnforceSmallerThan()
373 MadeChange |= Other.EnforceFloatingPoint(TP); in EnforceSmallerThan()
375 MadeChange |= EnforceInteger(TP); in EnforceSmallerThan()
377 MadeChange |= EnforceFloatingPoint(TP); in EnforceSmallerThan()
384 MadeChange |= Other.EnforceScalar(TP); in EnforceSmallerThan()
386 MadeChange |= Other.EnforceVector(TP); in EnforceSmallerThan()
388 MadeChange |= EnforceScalar(TP); in EnforceSmallerThan()
390 MadeChange |= EnforceVector(TP); in EnforceSmallerThan()
399 if (TP.hasError()) in EnforceSmallerThan()
424 TP.error("Type inference contradiction found, '" + InputSet.getName() + in EnforceSmallerThan()
451 TP.error("Type inference contradiction found, '" + InputSet.getName() + in EnforceSmallerThan()
462 TreePattern &TP) { in EnforceVectorEltTypeIs() argument
465 MadeChange |= EnforceVector(TP); in EnforceVectorEltTypeIs()
479 TP.error("Type inference contradiction found, forcing '" + in EnforceVectorEltTypeIs()
490 TreePattern &TP) { in EnforceVectorEltTypeIs() argument
491 if (TP.hasError()) in EnforceVectorEltTypeIs()
496 MadeChange |= EnforceVector(TP); in EnforceVectorEltTypeIs()
497 MadeChange |= VTOperand.EnforceScalar(TP); in EnforceVectorEltTypeIs()
504 VTOperand.MergeInTypeInfo(IVT.SimpleTy, TP); in EnforceVectorEltTypeIs()
526 TP.error("Type inference contradiction found, forcing '" + in EnforceVectorEltTypeIs()
536 TreePattern &TP) { in EnforceVectorSubVectorTypeIs() argument
537 if (TP.hasError()) in EnforceVectorSubVectorTypeIs()
542 MadeChange |= EnforceVector(TP); in EnforceVectorSubVectorTypeIs()
543 MadeChange |= VTOperand.EnforceVector(TP); in EnforceVectorSubVectorTypeIs()
548 MadeChange |= VTOperand.EnforceInteger(TP); in EnforceVectorSubVectorTypeIs()
550 MadeChange |= VTOperand.EnforceFloatingPoint(TP); in EnforceVectorSubVectorTypeIs()
552 MadeChange |= EnforceInteger(TP); in EnforceVectorSubVectorTypeIs()
554 MadeChange |= EnforceFloatingPoint(TP); in EnforceVectorSubVectorTypeIs()
566 EEVT::TypeSet EltTypeSet(IVT.SimpleTy, TP); in EnforceVectorSubVectorTypeIs()
567 MadeChange |= VTOperand.EnforceVectorEltTypeIs(EltTypeSet, TP); in EnforceVectorSubVectorTypeIs()
580 TP.error("Type inference contradiction found, forcing '" + in EnforceVectorSubVectorTypeIs()
590 EEVT::TypeSet EltTypeSet(IVT.SimpleTy, TP); in EnforceVectorSubVectorTypeIs()
591 MadeChange |= EnforceVectorEltTypeIs(EltTypeSet, TP); in EnforceVectorSubVectorTypeIs()
604 TP.error("Type inference contradiction found, forcing '" + in EnforceVectorSubVectorTypeIs()
617 TreePattern &TP) { in EnforceVectorSameNumElts() argument
618 if (TP.hasError()) in EnforceVectorSameNumElts()
623 MadeChange |= EnforceVector(TP); in EnforceVectorSameNumElts()
624 MadeChange |= VTOperand.EnforceVector(TP); in EnforceVectorSameNumElts()
642 TP.error("Type inference contradiction found, forcing '" + in EnforceVectorSameNumElts()
662 TP.error("Type inference contradiction found, forcing '" + in EnforceVectorSameNumElts()
950 TreePattern &TP) const { in ApplyTypeConstraint()
951 if (TP.hasError()) in ApplyTypeConstraint()
960 return NodeToApply->UpdateNodeType(ResNo, x.SDTCisVT_Info.VT, TP); in ApplyTypeConstraint()
963 return NodeToApply->UpdateNodeType(ResNo, MVT::iPTR, TP); in ApplyTypeConstraint()
966 return NodeToApply->getExtType(ResNo).EnforceInteger(TP); in ApplyTypeConstraint()
969 return NodeToApply->getExtType(ResNo).EnforceFloatingPoint(TP); in ApplyTypeConstraint()
972 return NodeToApply->getExtType(ResNo).EnforceVector(TP); in ApplyTypeConstraint()
977 return NodeToApply->UpdateNodeType(ResNo, OtherNode->getExtType(OResNo),TP)| in ApplyTypeConstraint()
978 OtherNode->UpdateNodeType(OResNo,NodeToApply->getExtType(ResNo),TP); in ApplyTypeConstraint()
987 TP.error(N->getOperator()->getName() + " expects a VT operand!"); in ApplyTypeConstraint()
993 EEVT::TypeSet TypeListTmp(VT, TP); in ApplyTypeConstraint()
1000 return TypeListTmp.EnforceSmallerThan(OtherNode->getExtType(OResNo), TP); in ApplyTypeConstraint()
1008 EnforceSmallerThan(BigOperand->getExtType(BResNo), TP); in ApplyTypeConstraint()
1019 EnforceVectorEltTypeIs(NodeToApply->getExtType(ResNo), TP); in ApplyTypeConstraint()
1030 EnforceVectorSubVectorTypeIs(NodeToApply->getExtType(ResNo), TP); in ApplyTypeConstraint()
1034 EnforceVectorEltTypeIs(x.SDTCVecEltisVT_Info.VT, TP); in ApplyTypeConstraint()
1042 EnforceVectorSameNumElts(NodeToApply->getExtType(ResNo), TP); in ApplyTypeConstraint()
1053 TreePattern &TP) { in UpdateNodeTypeFromInst() argument
1062 TP); in UpdateNodeTypeFromInst()
1066 return UpdateNodeType(ResNo, MVT::iPTR, TP); in UpdateNodeTypeFromInst()
1077 CodeGenTarget &Tgt = TP.getDAGPatterns().getTargetInfo(); in UpdateNodeTypeFromInst()
1078 return UpdateNodeType(ResNo, Tgt.getRegisterClass(RC).getValueTypes(), TP); in UpdateNodeTypeFromInst()
1359 TreePatternNode *TreePatternNode::InlinePatternFragments(TreePattern &TP) { in InlinePatternFragments() argument
1360 if (TP.hasError()) in InlinePatternFragments()
1371 TreePatternNode *NewChild = Child->InlinePatternFragments(TP); in InlinePatternFragments()
1384 TreePattern *Frag = TP.getDAGPatterns().getPatternFragment(Op); in InlinePatternFragments()
1388 TP.error("'" + Op->getName() + "' fragment requires " + in InlinePatternFragments()
1404 ArgMap[Frag->getArgName(i)] = getChild(i)->InlinePatternFragments(TP); in InlinePatternFragments()
1411 FragTree->UpdateNodeType(i, getExtType(i), TP); in InlinePatternFragments()
1422 return FragTree->InlinePatternFragments(TP); in InlinePatternFragments()
1440 TreePattern &TP) { in getImplicitType() argument
1447 const CodeGenTarget &T = TP.getDAGPatterns().getTargetInfo(); in getImplicitType()
1457 return EEVT::TypeSet(MVT::i32, TP); in getImplicitType()
1463 const CodeGenTarget &T = TP.getDAGPatterns().getTargetInfo(); in getImplicitType()
1477 const CodeGenTarget &T = TP.getDAGPatterns().getTargetInfo(); in getImplicitType()
1483 return EEVT::TypeSet(MVT::i32, TP); in getImplicitType()
1493 return EEVT::TypeSet(MVT::Other, TP); in getImplicitType()
1501 return EEVT::TypeSet(getValueType(R), TP); in getImplicitType()
1507 return EEVT::TypeSet(MVT::Other, TP); in getImplicitType()
1514 return EEVT::TypeSet(TP.getDAGPatterns().getComplexPattern(R).getValueType(), in getImplicitType()
1515 TP); in getImplicitType()
1519 return EEVT::TypeSet(MVT::iPTR, TP); in getImplicitType()
1531 TP.error("Unknown node flavor used in pattern: " + R->getName()); in getImplicitType()
1532 return EEVT::TypeSet(MVT::Other, TP); in getImplicitType()
1636 static void emitTooManyOperandsError(TreePattern &TP, in emitTooManyOperandsError() argument
1640 TP.error("Instruction '" + InstName + "' was provided " + Twine(Actual) + in emitTooManyOperandsError()
1644 static void emitTooFewOperandsError(TreePattern &TP, in emitTooFewOperandsError() argument
1647 TP.error("Instruction '" + InstName + in emitTooFewOperandsError()
1654 bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) { in ApplyTypeConstraints() argument
1655 if (TP.hasError()) in ApplyTypeConstraints()
1658 CodeGenDAGPatterns &CDP = TP.getDAGPatterns(); in ApplyTypeConstraints()
1666 !hasName(), TP), TP); in ApplyTypeConstraints()
1674 bool MadeChange = Types[0].EnforceInteger(TP); in ApplyTypeConstraints()
1693 TP.error("Integer value '" + itostr(II->getValue()) + in ApplyTypeConstraints()
1707 bool MadeChange = SetVal->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1711 MadeChange |= Child->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1714 MadeChange |= Child->UpdateNodeType(0, SetVal->getExtType(i), TP); in ApplyTypeConstraints()
1715 MadeChange |= SetVal->UpdateNodeType(i, Child->getExtType(0), TP); in ApplyTypeConstraints()
1725 MadeChange = getChild(i)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1737 MadeChange |= UpdateNodeType(i, Int->IS.RetVTs[i], TP); in ApplyTypeConstraints()
1740 TP.error("Intrinsic '" + Int->Name + "' expects " + in ApplyTypeConstraints()
1747 MadeChange |= getChild(0)->UpdateNodeType(0, MVT::iPTR, TP); in ApplyTypeConstraints()
1750 MadeChange |= getChild(i+1)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1754 MadeChange |= getChild(i+1)->UpdateNodeType(0, OpVT, TP); in ApplyTypeConstraints()
1765 TP.error(getOperator()->getName() + " node requires exactly " + in ApplyTypeConstraints()
1770 bool MadeChange = NI.ApplyTypeConstraints(this, TP); in ApplyTypeConstraints()
1772 MadeChange |= getChild(i)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1788 MadeChange |= UpdateNodeTypeFromInst(ResNo, Inst.getResult(ResNo), TP); in ApplyTypeConstraints()
1801 MadeChange |= UpdateNodeType(ResNo, VT, TP); in ApplyTypeConstraints()
1808 MadeChange |= UpdateNodeType(0, getChild(0)->getExtType(0), TP); in ApplyTypeConstraints()
1809 MadeChange |= getChild(0)->UpdateNodeType(0, getExtType(0), TP); in ApplyTypeConstraints()
1816 TP.error("REG_SEQUENCE requires at least 3 operands!"); in ApplyTypeConstraints()
1821 TP.error("REG_SEQUENCE requires an odd number of operands!"); in ApplyTypeConstraints()
1826 TP.error("REG_SEQUENCE requires a RegisterClass for first operand!"); in ApplyTypeConstraints()
1833 TP.error("REG_SEQUENCE requires a SubRegIndex for operand " + in ApplyTypeConstraints()
1853 emitTooFewOperandsError(TP, getOperator()->getName(), getNumChildren()); in ApplyTypeConstraints()
1872 Child->UpdateNodeTypeFromInst(ChildResNo, SubRec, TP); in ApplyTypeConstraints()
1877 emitTooFewOperandsError(TP, getOperator()->getName(), in ApplyTypeConstraints()
1885 Child->UpdateNodeTypeFromInst(ChildResNo, SubRec, TP); in ApplyTypeConstraints()
1894 MadeChange |= Child->UpdateNodeTypeFromInst(ChildResNo, OperandNode, TP); in ApplyTypeConstraints()
1898 emitTooManyOperandsError(TP, getOperator()->getName(), in ApplyTypeConstraints()
1904 MadeChange |= getChild(i)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1912 MadeChange |= getChild(i)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1921 TP.error("Node transform '" + getOperator()->getName() + in ApplyTypeConstraints()
1926 bool MadeChange = getChild(0)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1934 bool MadeChange = UpdateNodeType(getChild(0)->getExtType(), TP); in ApplyTypeConstraints()
1935 MadeChange |= getChild(0)->UpdateNodeType(getExtType(), TP); in ApplyTypeConstraints()
3361 static bool ForceArbitraryInstResultType(TreePatternNode *N, TreePattern &TP) { in ForceArbitraryInstResultType() argument
3367 if (ForceArbitraryInstResultType(N->getChild(i), TP)) in ForceArbitraryInstResultType()
3380 if (N->getExtType(i).MergeInTypeInfo(N->getExtType(i).getTypeList()[0], TP)) in ForceArbitraryInstResultType()