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()
88 TP.error("Type inference contradiction found, no " + in FillWithPossibleTypes()
150 bool EEVT::TypeSet::MergeInTypeInfo(const EEVT::TypeSet &InVT, TreePattern &TP){ in MergeInTypeInfo() argument
168 InCopy.EnforceInteger(TP); in MergeInTypeInfo()
169 InCopy.EnforceScalar(TP); in MergeInTypeInfo()
188 bool MadeChange = EnforceInteger(TP); in MergeInTypeInfo()
225 TP.error("Type inference contradiction found, merging '" + in MergeInTypeInfo()
231 bool EEVT::TypeSet::EnforceInteger(TreePattern &TP) { in EnforceInteger() argument
234 return FillWithPossibleTypes(TP, isInteger, "integer"); in EnforceInteger()
246 TP.error("Type inference contradiction found, '" + in EnforceInteger()
252 bool EEVT::TypeSet::EnforceFloatingPoint(TreePattern &TP) { in EnforceFloatingPoint() argument
255 return FillWithPossibleTypes(TP, isFloatingPoint, "floating point"); in EnforceFloatingPoint()
268 TP.error("Type inference contradiction found, '" + in EnforceFloatingPoint()
274 bool EEVT::TypeSet::EnforceScalar(TreePattern &TP) { in EnforceScalar() argument
277 return FillWithPossibleTypes(TP, isScalar, "scalar"); in EnforceScalar()
290 TP.error("Type inference contradiction found, '" + in EnforceScalar()
296 bool EEVT::TypeSet::EnforceVector(TreePattern &TP) { in EnforceVector() argument
299 return FillWithPossibleTypes(TP, isVector, "vector"); in EnforceVector()
312 TP.error("Type inference contradiction found, '" + in EnforceVector()
321 bool EEVT::TypeSet::EnforceSmallerThan(EEVT::TypeSet &Other, TreePattern &TP) { in EnforceSmallerThan() argument
326 MadeChange = FillWithPossibleTypes(TP); in EnforceSmallerThan()
329 MadeChange = Other.FillWithPossibleTypes(TP); in EnforceSmallerThan()
334 MadeChange |= Other.EnforceInteger(TP); in EnforceSmallerThan()
336 MadeChange |= Other.EnforceFloatingPoint(TP); in EnforceSmallerThan()
338 MadeChange |= EnforceInteger(TP); in EnforceSmallerThan()
340 MadeChange |= EnforceFloatingPoint(TP); in EnforceSmallerThan()
347 MadeChange |= Other.EnforceScalar(TP); in EnforceSmallerThan()
349 MadeChange |= EnforceScalar(TP); in EnforceSmallerThan()
369 TP.error("Type inference contradiction found, '" + in EnforceSmallerThan()
377 TP.error("Type inference contradiction found, '" + in EnforceSmallerThan()
441 TP.error("Type inference contradiction found, '" + in EnforceSmallerThan()
497 TP.error("Type inference contradiction found, '" + in EnforceSmallerThan()
506 TreePattern &TP) { in EnforceVectorEltTypeIs() argument
509 MadeChange |= EnforceVector(TP); in EnforceVectorEltTypeIs()
510 MadeChange |= VTOperand.EnforceScalar(TP); in EnforceVectorEltTypeIs()
517 VTOperand.MergeInTypeInfo(IVT.getSimpleVT().SimpleTy, TP); in EnforceVectorEltTypeIs()
539 TP.error("Type inference contradiction found, forcing '" + in EnforceVectorEltTypeIs()
547 TreePattern &TP) { in EnforceVectorSubVectorTypeIs() argument
550 MadeChange |= EnforceVector(TP); in EnforceVectorSubVectorTypeIs()
551 MadeChange |= VTOperand.EnforceVector(TP); in EnforceVectorSubVectorTypeIs()
554 MadeChange |= VTOperand.EnforceSmallerThan(*this, TP); in EnforceVectorSubVectorTypeIs()
561 EEVT::TypeSet EltTypeSet(IVT.getSimpleVT().SimpleTy, TP); in EnforceVectorSubVectorTypeIs()
562 MadeChange |= VTOperand.EnforceVectorEltTypeIs(EltTypeSet, TP); in EnforceVectorSubVectorTypeIs()
567 EEVT::TypeSet EltTypeSet(IVT.getSimpleVT().SimpleTy, TP); in EnforceVectorSubVectorTypeIs()
568 MadeChange |= EnforceVectorEltTypeIs(EltTypeSet, TP); in EnforceVectorSubVectorTypeIs()
840 TreePattern &TP) const { in ApplyTypeConstraint()
847 return NodeToApply->UpdateNodeType(ResNo, x.SDTCisVT_Info.VT, TP); in ApplyTypeConstraint()
850 return NodeToApply->UpdateNodeType(ResNo, MVT::iPTR, TP); in ApplyTypeConstraint()
853 return NodeToApply->getExtType(ResNo).EnforceInteger(TP); in ApplyTypeConstraint()
856 return NodeToApply->getExtType(ResNo).EnforceFloatingPoint(TP); in ApplyTypeConstraint()
859 return NodeToApply->getExtType(ResNo).EnforceVector(TP); in ApplyTypeConstraint()
864 return NodeToApply->UpdateNodeType(OResNo, OtherNode->getExtType(ResNo),TP)| in ApplyTypeConstraint()
865 OtherNode->UpdateNodeType(ResNo,NodeToApply->getExtType(OResNo),TP); in ApplyTypeConstraint()
874 TP.error(N->getOperator()->getName() + " expects a VT operand!"); in ApplyTypeConstraint()
878 EEVT::TypeSet TypeListTmp(VT, TP); in ApplyTypeConstraint()
885 return TypeListTmp.EnforceSmallerThan(OtherNode->getExtType(OResNo), TP); in ApplyTypeConstraint()
893 EnforceSmallerThan(BigOperand->getExtType(BResNo), TP); in ApplyTypeConstraint()
904 EnforceVectorEltTypeIs(NodeToApply->getExtType(ResNo), TP); in ApplyTypeConstraint()
915 EnforceVectorSubVectorTypeIs(NodeToApply->getExtType(ResNo), TP); in ApplyTypeConstraint()
1181 TreePatternNode *TreePatternNode::InlinePatternFragments(TreePattern &TP) { in InlinePatternFragments() argument
1189 TreePatternNode *NewChild = Child->InlinePatternFragments(TP); in InlinePatternFragments()
1202 TreePattern *Frag = TP.getDAGPatterns().getPatternFragment(Op); in InlinePatternFragments()
1206 TP.error("'" + Op->getName() + "' fragment requires " + in InlinePatternFragments()
1220 ArgMap[Frag->getArgName(i)] = getChild(i)->InlinePatternFragments(TP); in InlinePatternFragments()
1227 FragTree->UpdateNodeType(i, getExtType(i), TP); in InlinePatternFragments()
1238 return FragTree->InlinePatternFragments(TP); in InlinePatternFragments()
1246 bool NotRegisters, TreePattern &TP) { in getImplicitType() argument
1253 const CodeGenTarget &T = TP.getDAGPatterns().getTargetInfo(); in getImplicitType()
1262 const CodeGenTarget &T = TP.getDAGPatterns().getTargetInfo(); in getImplicitType()
1276 const CodeGenTarget &T = TP.getDAGPatterns().getTargetInfo(); in getImplicitType()
1288 return EEVT::TypeSet(MVT::Other, TP); in getImplicitType()
1295 return EEVT::TypeSet(TP.getDAGPatterns().getComplexPattern(R).getValueType(), in getImplicitType()
1296 TP); in getImplicitType()
1300 return EEVT::TypeSet(MVT::iPTR, TP); in getImplicitType()
1309 TP.error("Unknown node flavor used in pattern: " + R->getName()); in getImplicitType()
1310 return EEVT::TypeSet(MVT::Other, TP); in getImplicitType()
1384 bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) { in ApplyTypeConstraints() argument
1385 CodeGenDAGPatterns &CDP = TP.getDAGPatterns(); in ApplyTypeConstraints()
1392 NotRegisters, TP), TP); in ApplyTypeConstraints()
1400 bool MadeChange = Types[0].EnforceInteger(TP); in ApplyTypeConstraints()
1419 TP.error("Integer value '" + itostr(II->getValue()) + in ApplyTypeConstraints()
1433 bool MadeChange = SetVal->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1437 MadeChange |= Child->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1440 MadeChange |= Child->UpdateNodeType(0, SetVal->getExtType(i), TP); in ApplyTypeConstraints()
1441 MadeChange |= SetVal->UpdateNodeType(i, Child->getExtType(0), TP); in ApplyTypeConstraints()
1451 MadeChange = getChild(i)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1457 MadeChange |= getChild(0)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1458 MadeChange |= getChild(1)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1469 MadeChange |= getChild(1)->UpdateNodeType(0, RCVT, TP); in ApplyTypeConstraints()
1482 MadeChange |= UpdateNodeType(i, Int->IS.RetVTs[i], TP); in ApplyTypeConstraints()
1485 TP.error("Intrinsic '" + Int->Name + "' expects " + in ApplyTypeConstraints()
1490 MadeChange |= getChild(0)->UpdateNodeType(0, MVT::iPTR, TP); in ApplyTypeConstraints()
1493 MadeChange |= getChild(i+1)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1497 MadeChange |= getChild(i+1)->UpdateNodeType(0, OpVT, TP); in ApplyTypeConstraints()
1508 TP.error(getOperator()->getName() + " node requires exactly " + in ApplyTypeConstraints()
1511 bool MadeChange = NI.ApplyTypeConstraints(this, TP); in ApplyTypeConstraints()
1513 MadeChange |= getChild(i)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1532 MadeChange |= UpdateNodeType(ResNo, MVT::iPTR, TP); in ApplyTypeConstraints()
1537 MadeChange |= UpdateNodeType(ResNo, RC.getValueTypes(), TP); in ApplyTypeConstraints()
1545 MadeChange |= UpdateNodeType(ResNo, RC.getValueTypes(), TP); in ApplyTypeConstraints()
1560 MadeChange |= UpdateNodeType(ResNo, VT, TP); in ApplyTypeConstraints()
1567 MadeChange |= UpdateNodeType(0, getChild(0)->getExtType(0), TP); in ApplyTypeConstraints()
1568 MadeChange |= getChild(0)->UpdateNodeType(0, getExtType(0), TP); in ApplyTypeConstraints()
1584 TP.error("Instruction '" + getOperator()->getName() + in ApplyTypeConstraints()
1594 MadeChange |= Child->UpdateNodeType(ChildResNo, RC.getValueTypes(), TP); in ApplyTypeConstraints()
1599 MadeChange |= Child->UpdateNodeType(ChildResNo, RC.getValueTypes(), TP); in ApplyTypeConstraints()
1602 MadeChange |= Child->UpdateNodeType(ChildResNo, VT, TP); in ApplyTypeConstraints()
1604 MadeChange |= Child->UpdateNodeType(ChildResNo, MVT::iPTR, TP); in ApplyTypeConstraints()
1610 MadeChange |= Child->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1614 TP.error("Instruction '" + getOperator()->getName() + in ApplyTypeConstraints()
1624 TP.error("Node transform '" + getOperator()->getName() + in ApplyTypeConstraints()
1627 bool MadeChange = getChild(0)->ApplyTypeConstraints(TP, NotRegisters); in ApplyTypeConstraints()
1635 bool MadeChange = UpdateNodeType(getChild(0)->getExtType(), TP); in ApplyTypeConstraints()
1636 MadeChange |= getChild(0)->UpdateNodeType(getExtType(), TP); in ApplyTypeConstraints()
3004 static bool ForceArbitraryInstResultType(TreePatternNode *N, TreePattern &TP) { in ForceArbitraryInstResultType() argument
3010 if (ForceArbitraryInstResultType(N->getChild(i), TP)) in ForceArbitraryInstResultType()
3023 if (N->getExtType(i).MergeInTypeInfo(N->getExtType(i).getTypeList()[0], TP)) in ForceArbitraryInstResultType()