Lines Matching refs:TP
42 EEVT::TypeSet::TypeSet(MVT::SimpleValueType VT, TreePattern &TP) { in TypeSet() argument
44 EnforceInteger(TP); in TypeSet()
46 EnforceFloatingPoint(TP); in TypeSet()
48 EnforceVector(TP); in TypeSet()
72 bool EEVT::TypeSet::FillWithPossibleTypes(TreePattern &TP, in FillWithPossibleTypes() argument
77 TP.getDAGPatterns().getTargetInfo().getLegalValueTypes(); in FillWithPossibleTypes()
85 TP.error("Type inference contradiction found, no " + in FillWithPossibleTypes()
147 bool EEVT::TypeSet::MergeInTypeInfo(const EEVT::TypeSet &InVT, TreePattern &TP){ in MergeInTypeInfo() argument
165 InCopy.EnforceInteger(TP); in MergeInTypeInfo()
166 InCopy.EnforceScalar(TP); in MergeInTypeInfo()
185 bool MadeChange = EnforceInteger(TP); in MergeInTypeInfo()
222 TP.error("Type inference contradiction found, merging '" + in MergeInTypeInfo()
228 bool EEVT::TypeSet::EnforceInteger(TreePattern &TP) { in EnforceInteger() argument
231 return FillWithPossibleTypes(TP, isInteger, "integer"); in EnforceInteger()
243 TP.error("Type inference contradiction found, '" + in EnforceInteger()
249 bool EEVT::TypeSet::EnforceFloatingPoint(TreePattern &TP) { in EnforceFloatingPoint() argument
252 return FillWithPossibleTypes(TP, isFloatingPoint, "floating point"); in EnforceFloatingPoint()
265 TP.error("Type inference contradiction found, '" + in EnforceFloatingPoint()
271 bool EEVT::TypeSet::EnforceScalar(TreePattern &TP) { in EnforceScalar() argument
274 return FillWithPossibleTypes(TP, isScalar, "scalar"); in EnforceScalar()
287 TP.error("Type inference contradiction found, '" + in EnforceScalar()
293 bool EEVT::TypeSet::EnforceVector(TreePattern &TP) { in EnforceVector() argument
296 return FillWithPossibleTypes(TP, isVector, "vector"); in EnforceVector()
309 TP.error("Type inference contradiction found, '" + in EnforceVector()
318 bool EEVT::TypeSet::EnforceSmallerThan(EEVT::TypeSet &Other, TreePattern &TP) { in EnforceSmallerThan() argument
323 MadeChange = FillWithPossibleTypes(TP); in EnforceSmallerThan()
326 MadeChange = Other.FillWithPossibleTypes(TP); in EnforceSmallerThan()
331 MadeChange |= Other.EnforceInteger(TP); in EnforceSmallerThan()
333 MadeChange |= Other.EnforceFloatingPoint(TP); in EnforceSmallerThan()
335 MadeChange |= EnforceInteger(TP); in EnforceSmallerThan()
337 MadeChange |= EnforceFloatingPoint(TP); in EnforceSmallerThan()
344 MadeChange |= Other.EnforceScalar(TP); in EnforceSmallerThan()
346 MadeChange |= EnforceScalar(TP); in EnforceSmallerThan()
366 TP.error("Type inference contradiction found, '" + in EnforceSmallerThan()
374 TP.error("Type inference contradiction found, '" + in EnforceSmallerThan()
438 TP.error("Type inference contradiction found, '" + in EnforceSmallerThan()
494 TP.error("Type inference contradiction found, '" + in EnforceSmallerThan()
503 TreePattern &TP) { in EnforceVectorEltTypeIs() argument
506 MadeChange |= EnforceVector(TP); in EnforceVectorEltTypeIs()
507 MadeChange |= VTOperand.EnforceScalar(TP); in EnforceVectorEltTypeIs()
514 VTOperand.MergeInTypeInfo(IVT.getSimpleVT().SimpleTy, TP); in EnforceVectorEltTypeIs()
536 TP.error("Type inference contradiction found, forcing '" + in EnforceVectorEltTypeIs()
544 TreePattern &TP) { in EnforceVectorSubVectorTypeIs() argument
547 MadeChange |= EnforceVector(TP); in EnforceVectorSubVectorTypeIs()
548 MadeChange |= VTOperand.EnforceVector(TP); in EnforceVectorSubVectorTypeIs()
551 MadeChange |= VTOperand.EnforceSmallerThan(*this, TP); in EnforceVectorSubVectorTypeIs()
558 EEVT::TypeSet EltTypeSet(IVT.getSimpleVT().SimpleTy, TP); in EnforceVectorSubVectorTypeIs()
559 MadeChange |= VTOperand.EnforceVectorEltTypeIs(EltTypeSet, TP); in EnforceVectorSubVectorTypeIs()
564 EEVT::TypeSet EltTypeSet(IVT.getSimpleVT().SimpleTy, TP); in EnforceVectorSubVectorTypeIs()
565 MadeChange |= EnforceVectorEltTypeIs(EltTypeSet, TP); in EnforceVectorSubVectorTypeIs()
837 TreePattern &TP) const { in ApplyTypeConstraint()
845 return NodeToApply->UpdateNodeType(ResNo, x.SDTCisVT_Info.VT, TP); in ApplyTypeConstraint()
848 return NodeToApply->UpdateNodeType(ResNo, MVT::iPTR, TP); in ApplyTypeConstraint()
851 return NodeToApply->getExtType(ResNo).EnforceInteger(TP); in ApplyTypeConstraint()
854 return NodeToApply->getExtType(ResNo).EnforceFloatingPoint(TP); in ApplyTypeConstraint()
857 return NodeToApply->getExtType(ResNo).EnforceVector(TP); in ApplyTypeConstraint()
862 return NodeToApply->UpdateNodeType(OResNo, OtherNode->getExtType(ResNo),TP)| in ApplyTypeConstraint()
863 OtherNode->UpdateNodeType(ResNo,NodeToApply->getExtType(OResNo),TP); in ApplyTypeConstraint()
872 TP.error(N->getOperator()->getName() + " expects a VT operand!"); in ApplyTypeConstraint()
876 EEVT::TypeSet TypeListTmp(VT, TP); in ApplyTypeConstraint()
883 return TypeListTmp.EnforceSmallerThan(OtherNode->getExtType(OResNo), TP); in ApplyTypeConstraint()
891 EnforceSmallerThan(BigOperand->getExtType(BResNo), TP); in ApplyTypeConstraint()
902 EnforceVectorEltTypeIs(NodeToApply->getExtType(ResNo), TP); in ApplyTypeConstraint()
913 EnforceVectorSubVectorTypeIs(NodeToApply->getExtType(ResNo), TP); in ApplyTypeConstraint()
1179 TreePatternNode *TreePatternNode::InlinePatternFragments(TreePattern &TP) { in InlinePatternFragments() argument
1187 TreePatternNode *NewChild = Child->InlinePatternFragments(TP); in InlinePatternFragments()
1200 TreePattern *Frag = TP.getDAGPatterns().getPatternFragment(Op); in InlinePatternFragments()
1204 TP.error("'" + Op->getName() + "' fragment requires " + in InlinePatternFragments()
1218 ArgMap[Frag->getArgName(i)] = getChild(i)->InlinePatternFragments(TP); in InlinePatternFragments()
1225 FragTree->UpdateNodeType(i, getExtType(i), TP); in InlinePatternFragments()
1236 return FragTree->InlinePatternFragments(TP); in InlinePatternFragments()
1244 bool NotRegisters, TreePattern &TP) { in getImplicitType() argument
1251 const CodeGenTarget &T = TP.getDAGPatterns().getTargetInfo(); in getImplicitType()
1260 const CodeGenTarget &T = TP.getDAGPatterns().getTargetInfo(); in getImplicitType()
1274 const CodeGenTarget &T = TP.getDAGPatterns().getTargetInfo(); in getImplicitType()
1286 return EEVT::TypeSet(MVT::Other, TP); in getImplicitType()
1293 return EEVT::TypeSet(TP.getDAGPatterns().getComplexPattern(R).getValueType(), in getImplicitType()
1294 TP); in getImplicitType()
1298 return EEVT::TypeSet(MVT::iPTR, TP); in getImplicitType()
1307 TP.error("Unknown node flavor used in pattern: " + R->getName()); in getImplicitType()
1308 return EEVT::TypeSet(MVT::Other, TP); in getImplicitType()
1382 bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) { in ApplyTypeConstraints() argument
1383 CodeGenDAGPatterns &CDP = TP.getDAGPatterns(); in ApplyTypeConstraints()
1390 NotRegisters, TP), TP); in ApplyTypeConstraints()
1398 bool MadeChange = Types[0].EnforceInteger(TP); in ApplyTypeConstraints()
1423 TP.error("Integer value '" + itostr(II->getValue())+ in ApplyTypeConstraints()
1437 bool MadeChange = SetVal->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1441 MadeChange |= Child->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1444 MadeChange |= Child->UpdateNodeType(0, SetVal->getExtType(i), TP); in ApplyTypeConstraints()
1445 MadeChange |= SetVal->UpdateNodeType(i, Child->getExtType(0), TP); in ApplyTypeConstraints()
1455 MadeChange = getChild(i)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1461 MadeChange |= getChild(0)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1462 MadeChange |= getChild(1)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1473 MadeChange |= getChild(1)->UpdateNodeType(0, RCVT, TP); in ApplyTypeConstraints()
1486 MadeChange |= UpdateNodeType(i, Int->IS.RetVTs[i], TP); in ApplyTypeConstraints()
1489 TP.error("Intrinsic '" + Int->Name + "' expects " + in ApplyTypeConstraints()
1494 MadeChange |= getChild(0)->UpdateNodeType(0, MVT::iPTR, TP); in ApplyTypeConstraints()
1497 MadeChange |= getChild(i+1)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1501 MadeChange |= getChild(i+1)->UpdateNodeType(0, OpVT, TP); in ApplyTypeConstraints()
1512 TP.error(getOperator()->getName() + " node requires exactly " + in ApplyTypeConstraints()
1515 bool MadeChange = NI.ApplyTypeConstraints(this, TP); in ApplyTypeConstraints()
1517 MadeChange |= getChild(i)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1536 MadeChange |= UpdateNodeType(ResNo, MVT::iPTR, TP); in ApplyTypeConstraints()
1541 MadeChange |= UpdateNodeType(ResNo, RC.getValueTypes(), TP); in ApplyTypeConstraints()
1549 MadeChange |= UpdateNodeType(ResNo, RC.getValueTypes(), TP); in ApplyTypeConstraints()
1564 MadeChange |= UpdateNodeType(ResNo, VT, TP); in ApplyTypeConstraints()
1571 MadeChange |= UpdateNodeType(0, getChild(0)->getExtType(0), TP); in ApplyTypeConstraints()
1572 MadeChange |= getChild(0)->UpdateNodeType(0, getExtType(0), TP); in ApplyTypeConstraints()
1589 TP.error("Instruction '" + getOperator()->getName() + in ApplyTypeConstraints()
1599 MadeChange |= Child->UpdateNodeType(ChildResNo, RC.getValueTypes(), TP); in ApplyTypeConstraints()
1604 MadeChange |= Child->UpdateNodeType(ChildResNo, RC.getValueTypes(), TP); in ApplyTypeConstraints()
1607 MadeChange |= Child->UpdateNodeType(ChildResNo, VT, TP); in ApplyTypeConstraints()
1609 MadeChange |= Child->UpdateNodeType(ChildResNo, MVT::iPTR, TP); in ApplyTypeConstraints()
1616 MadeChange |= Child->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1620 TP.error("Instruction '" + getOperator()->getName() + in ApplyTypeConstraints()
1630 TP.error("Node transform '" + getOperator()->getName() + in ApplyTypeConstraints()
1633 bool MadeChange = getChild(0)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1641 bool MadeChange = UpdateNodeType(getChild(0)->getExtType(), TP); in ApplyTypeConstraints()
1642 MadeChange |= getChild(0)->UpdateNodeType(getExtType(), TP); in ApplyTypeConstraints()
2837 static bool ForceArbitraryInstResultType(TreePatternNode *N, TreePattern &TP) { in ForceArbitraryInstResultType() argument
2843 if (ForceArbitraryInstResultType(N->getChild(i), TP)) in ForceArbitraryInstResultType()
2856 if (N->getExtType(i).MergeInTypeInfo(N->getExtType(i).getTypeList()[0], TP)) in ForceArbitraryInstResultType()