Lines Matching refs:TP
45 EEVT::TypeSet::TypeSet(MVT::SimpleValueType VT, TreePattern &TP) { in TypeSet() argument
47 EnforceInteger(TP); in TypeSet()
49 EnforceFloatingPoint(TP); in TypeSet()
51 EnforceVector(TP); in TypeSet()
75 bool EEVT::TypeSet::FillWithPossibleTypes(TreePattern &TP, in FillWithPossibleTypes() argument
80 TP.getDAGPatterns().getTargetInfo().getLegalValueTypes(); in FillWithPossibleTypes()
82 if (TP.hasError()) in FillWithPossibleTypes()
91 TP.error("Type inference contradiction found, no " + in FillWithPossibleTypes()
155 bool EEVT::TypeSet::MergeInTypeInfo(const EEVT::TypeSet &InVT, TreePattern &TP){ in MergeInTypeInfo() argument
156 if (InVT.isCompletelyUnknown() || *this == InVT || TP.hasError()) in MergeInTypeInfo()
173 InCopy.EnforceInteger(TP); in MergeInTypeInfo()
174 InCopy.EnforceScalar(TP); in MergeInTypeInfo()
193 bool MadeChange = EnforceInteger(TP); in MergeInTypeInfo()
230 TP.error("Type inference contradiction found, merging '" + in MergeInTypeInfo()
236 bool EEVT::TypeSet::EnforceInteger(TreePattern &TP) { in EnforceInteger() argument
237 if (TP.hasError()) in EnforceInteger()
241 return FillWithPossibleTypes(TP, isInteger, "integer"); in EnforceInteger()
253 TP.error("Type inference contradiction found, '" + in EnforceInteger()
261 bool EEVT::TypeSet::EnforceFloatingPoint(TreePattern &TP) { in EnforceFloatingPoint() argument
262 if (TP.hasError()) in EnforceFloatingPoint()
266 return FillWithPossibleTypes(TP, isFloatingPoint, "floating point"); in EnforceFloatingPoint()
279 TP.error("Type inference contradiction found, '" + in EnforceFloatingPoint()
287 bool EEVT::TypeSet::EnforceScalar(TreePattern &TP) { in EnforceScalar() argument
288 if (TP.hasError()) in EnforceScalar()
293 return FillWithPossibleTypes(TP, isScalar, "scalar"); in EnforceScalar()
306 TP.error("Type inference contradiction found, '" + in EnforceScalar()
314 bool EEVT::TypeSet::EnforceVector(TreePattern &TP) { in EnforceVector() argument
315 if (TP.hasError()) in EnforceVector()
320 return FillWithPossibleTypes(TP, isVector, "vector"); in EnforceVector()
333 TP.error("Type inference contradiction found, '" + in EnforceVector()
344 bool EEVT::TypeSet::EnforceSmallerThan(EEVT::TypeSet &Other, TreePattern &TP) { in EnforceSmallerThan() argument
345 if (TP.hasError()) in EnforceSmallerThan()
352 MadeChange = FillWithPossibleTypes(TP); in EnforceSmallerThan()
355 MadeChange = Other.FillWithPossibleTypes(TP); in EnforceSmallerThan()
360 MadeChange |= Other.EnforceInteger(TP); in EnforceSmallerThan()
362 MadeChange |= Other.EnforceFloatingPoint(TP); in EnforceSmallerThan()
364 MadeChange |= EnforceInteger(TP); in EnforceSmallerThan()
366 MadeChange |= EnforceFloatingPoint(TP); in EnforceSmallerThan()
373 MadeChange |= Other.EnforceScalar(TP); in EnforceSmallerThan()
375 MadeChange |= EnforceScalar(TP); in EnforceSmallerThan()
395 TP.error("Type inference contradiction found, '" + in EnforceSmallerThan()
405 TP.error("Type inference contradiction found, '" + in EnforceSmallerThan()
470 TP.error("Type inference contradiction found, '" + in EnforceSmallerThan()
528 TP.error("Type inference contradiction found, '" + in EnforceSmallerThan()
539 TreePattern &TP) { in EnforceVectorEltTypeIs() argument
540 if (TP.hasError()) in EnforceVectorEltTypeIs()
545 MadeChange |= EnforceVector(TP); in EnforceVectorEltTypeIs()
546 MadeChange |= VTOperand.EnforceScalar(TP); in EnforceVectorEltTypeIs()
553 VTOperand.MergeInTypeInfo(IVT.getSimpleVT().SimpleTy, TP); in EnforceVectorEltTypeIs()
575 TP.error("Type inference contradiction found, forcing '" + in EnforceVectorEltTypeIs()
585 TreePattern &TP) { in EnforceVectorSubVectorTypeIs() argument
588 MadeChange |= EnforceVector(TP); in EnforceVectorSubVectorTypeIs()
589 MadeChange |= VTOperand.EnforceVector(TP); in EnforceVectorSubVectorTypeIs()
592 MadeChange |= VTOperand.EnforceSmallerThan(*this, TP); in EnforceVectorSubVectorTypeIs()
599 EEVT::TypeSet EltTypeSet(IVT.getSimpleVT().SimpleTy, TP); in EnforceVectorSubVectorTypeIs()
600 MadeChange |= VTOperand.EnforceVectorEltTypeIs(EltTypeSet, TP); in EnforceVectorSubVectorTypeIs()
605 EEVT::TypeSet EltTypeSet(IVT.getSimpleVT().SimpleTy, TP); in EnforceVectorSubVectorTypeIs()
606 MadeChange |= EnforceVectorEltTypeIs(EltTypeSet, TP); in EnforceVectorSubVectorTypeIs()
873 TreePattern &TP) const { in ApplyTypeConstraint()
874 if (TP.hasError()) in ApplyTypeConstraint()
883 return NodeToApply->UpdateNodeType(ResNo, x.SDTCisVT_Info.VT, TP); in ApplyTypeConstraint()
886 return NodeToApply->UpdateNodeType(ResNo, MVT::iPTR, TP); in ApplyTypeConstraint()
889 return NodeToApply->getExtType(ResNo).EnforceInteger(TP); in ApplyTypeConstraint()
892 return NodeToApply->getExtType(ResNo).EnforceFloatingPoint(TP); in ApplyTypeConstraint()
895 return NodeToApply->getExtType(ResNo).EnforceVector(TP); in ApplyTypeConstraint()
900 return NodeToApply->UpdateNodeType(OResNo, OtherNode->getExtType(ResNo),TP)| in ApplyTypeConstraint()
901 OtherNode->UpdateNodeType(ResNo,NodeToApply->getExtType(OResNo),TP); in ApplyTypeConstraint()
910 TP.error(N->getOperator()->getName() + " expects a VT operand!"); in ApplyTypeConstraint()
916 EEVT::TypeSet TypeListTmp(VT, TP); in ApplyTypeConstraint()
923 return TypeListTmp.EnforceSmallerThan(OtherNode->getExtType(OResNo), TP); in ApplyTypeConstraint()
931 EnforceSmallerThan(BigOperand->getExtType(BResNo), TP); in ApplyTypeConstraint()
942 EnforceVectorEltTypeIs(NodeToApply->getExtType(ResNo), TP); in ApplyTypeConstraint()
953 EnforceVectorSubVectorTypeIs(NodeToApply->getExtType(ResNo), TP); in ApplyTypeConstraint()
964 TreePattern &TP) { in UpdateNodeTypeFromInst() argument
973 TP); in UpdateNodeTypeFromInst()
977 return UpdateNodeType(ResNo, MVT::iPTR, TP); in UpdateNodeTypeFromInst()
988 CodeGenTarget &Tgt = TP.getDAGPatterns().getTargetInfo(); in UpdateNodeTypeFromInst()
989 return UpdateNodeType(ResNo, Tgt.getRegisterClass(RC).getValueTypes(), TP); in UpdateNodeTypeFromInst()
1254 TreePatternNode *TreePatternNode::InlinePatternFragments(TreePattern &TP) { in InlinePatternFragments() argument
1255 if (TP.hasError()) in InlinePatternFragments()
1266 TreePatternNode *NewChild = Child->InlinePatternFragments(TP); in InlinePatternFragments()
1279 TreePattern *Frag = TP.getDAGPatterns().getPatternFragment(Op); in InlinePatternFragments()
1283 TP.error("'" + Op->getName() + "' fragment requires " + in InlinePatternFragments()
1299 ArgMap[Frag->getArgName(i)] = getChild(i)->InlinePatternFragments(TP); in InlinePatternFragments()
1306 FragTree->UpdateNodeType(i, getExtType(i), TP); in InlinePatternFragments()
1317 return FragTree->InlinePatternFragments(TP); in InlinePatternFragments()
1325 bool NotRegisters, TreePattern &TP) { in getImplicitType() argument
1332 const CodeGenTarget &T = TP.getDAGPatterns().getTargetInfo(); in getImplicitType()
1341 const CodeGenTarget &T = TP.getDAGPatterns().getTargetInfo(); in getImplicitType()
1355 const CodeGenTarget &T = TP.getDAGPatterns().getTargetInfo(); in getImplicitType()
1367 return EEVT::TypeSet(MVT::Other, TP); in getImplicitType()
1374 return EEVT::TypeSet(TP.getDAGPatterns().getComplexPattern(R).getValueType(), in getImplicitType()
1375 TP); in getImplicitType()
1379 return EEVT::TypeSet(MVT::iPTR, TP); in getImplicitType()
1388 TP.error("Unknown node flavor used in pattern: " + R->getName()); in getImplicitType()
1389 return EEVT::TypeSet(MVT::Other, TP); in getImplicitType()
1461 bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) { in ApplyTypeConstraints() argument
1462 if (TP.hasError()) in ApplyTypeConstraints()
1465 CodeGenDAGPatterns &CDP = TP.getDAGPatterns(); in ApplyTypeConstraints()
1472 NotRegisters, TP), TP); in ApplyTypeConstraints()
1480 bool MadeChange = Types[0].EnforceInteger(TP); in ApplyTypeConstraints()
1499 TP.error("Integer value '" + itostr(II->getValue()) + in ApplyTypeConstraints()
1513 bool MadeChange = SetVal->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1517 MadeChange |= Child->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1520 MadeChange |= Child->UpdateNodeType(0, SetVal->getExtType(i), TP); in ApplyTypeConstraints()
1521 MadeChange |= SetVal->UpdateNodeType(i, Child->getExtType(0), TP); in ApplyTypeConstraints()
1531 MadeChange = getChild(i)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1537 MadeChange |= getChild(0)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1538 MadeChange |= getChild(1)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1549 MadeChange |= getChild(1)->UpdateNodeType(0, RCVT, TP); in ApplyTypeConstraints()
1562 MadeChange |= UpdateNodeType(i, Int->IS.RetVTs[i], TP); in ApplyTypeConstraints()
1565 TP.error("Intrinsic '" + Int->Name + "' expects " + in ApplyTypeConstraints()
1572 MadeChange |= getChild(0)->UpdateNodeType(0, MVT::iPTR, TP); in ApplyTypeConstraints()
1575 MadeChange |= getChild(i+1)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1579 MadeChange |= getChild(i+1)->UpdateNodeType(0, OpVT, TP); in ApplyTypeConstraints()
1590 TP.error(getOperator()->getName() + " node requires exactly " + in ApplyTypeConstraints()
1595 bool MadeChange = NI.ApplyTypeConstraints(this, TP); in ApplyTypeConstraints()
1597 MadeChange |= getChild(i)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1613 MadeChange |= UpdateNodeTypeFromInst(ResNo, Inst.getResult(ResNo), TP); in ApplyTypeConstraints()
1626 MadeChange |= UpdateNodeType(ResNo, VT, TP); in ApplyTypeConstraints()
1633 MadeChange |= UpdateNodeType(0, getChild(0)->getExtType(0), TP); in ApplyTypeConstraints()
1634 MadeChange |= getChild(0)->UpdateNodeType(0, getExtType(0), TP); in ApplyTypeConstraints()
1650 TP.error("Instruction '" + getOperator()->getName() + in ApplyTypeConstraints()
1657 MadeChange |= Child->UpdateNodeTypeFromInst(ChildResNo, OperandNode, TP); in ApplyTypeConstraints()
1658 MadeChange |= Child->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1662 TP.error("Instruction '" + getOperator()->getName() + in ApplyTypeConstraints()
1674 TP.error("Node transform '" + getOperator()->getName() + in ApplyTypeConstraints()
1679 bool MadeChange = getChild(0)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1687 bool MadeChange = UpdateNodeType(getChild(0)->getExtType(), TP); in ApplyTypeConstraints()
1688 MadeChange |= getChild(0)->UpdateNodeType(getExtType(), TP); in ApplyTypeConstraints()
3054 static bool ForceArbitraryInstResultType(TreePatternNode *N, TreePattern &TP) { in ForceArbitraryInstResultType() argument
3060 if (ForceArbitraryInstResultType(N->getChild(i), TP)) in ForceArbitraryInstResultType()
3073 if (N->getExtType(i).MergeInTypeInfo(N->getExtType(i).getTypeList()[0], TP)) in ForceArbitraryInstResultType()