Lines Matching refs:TP

47 EEVT::TypeSet::TypeSet(MVT::SimpleValueType VT, TreePattern &TP) {
49 EnforceInteger(TP);
51 EnforceFloatingPoint(TP);
53 EnforceVector(TP);
77 bool EEVT::TypeSet::FillWithPossibleTypes(TreePattern &TP,
82 TP.getDAGPatterns().getTargetInfo().getLegalValueTypes();
84 if (TP.hasError())
93 TP.error("Type inference contradiction found, no " +
165 bool EEVT::TypeSet::MergeInTypeInfo(const EEVT::TypeSet &InVT, TreePattern &TP){
166 if (InVT.isCompletelyUnknown() || *this == InVT || TP.hasError())
183 InCopy.EnforceInteger(TP);
184 InCopy.EnforceScalar(TP);
203 bool MadeChange = EnforceInteger(TP);
240 TP.error("Type inference contradiction found, merging '" +
246 bool EEVT::TypeSet::EnforceInteger(TreePattern &TP) {
247 if (TP.hasError())
251 return FillWithPossibleTypes(TP, isInteger, "integer");
263 TP.error("Type inference contradiction found, '" +
271 bool EEVT::TypeSet::EnforceFloatingPoint(TreePattern &TP) {
272 if (TP.hasError())
276 return FillWithPossibleTypes(TP, isFloatingPoint, "floating point");
289 TP.error("Type inference contradiction found, '" +
297 bool EEVT::TypeSet::EnforceScalar(TreePattern &TP) {
298 if (TP.hasError())
303 return FillWithPossibleTypes(TP, isScalar, "scalar");
316 TP.error("Type inference contradiction found, '" +
324 bool EEVT::TypeSet::EnforceVector(TreePattern &TP) {
325 if (TP.hasError())
330 return FillWithPossibleTypes(TP, isVector, "vector");
343 TP.error("Type inference contradiction found, '" +
355 bool EEVT::TypeSet::EnforceSmallerThan(EEVT::TypeSet &Other, TreePattern &TP) {
356 if (TP.hasError())
363 MadeChange = FillWithPossibleTypes(TP);
366 MadeChange = Other.FillWithPossibleTypes(TP);
371 MadeChange |= Other.EnforceInteger(TP);
373 MadeChange |= Other.EnforceFloatingPoint(TP);
375 MadeChange |= EnforceInteger(TP);
377 MadeChange |= EnforceFloatingPoint(TP);
384 MadeChange |= Other.EnforceScalar(TP);
386 MadeChange |= Other.EnforceVector(TP);
388 MadeChange |= EnforceScalar(TP);
390 MadeChange |= EnforceVector(TP);
410 TP.error("Type inference contradiction found, forcing '" +
431 TP.error("Type inference contradiction found, forcing '" +
445 if (TP.hasError())
460 TP.error("Type inference contradiction found, '" + InputSet.getName() +
477 TP.error("Type inference contradiction found, '" + InputSet.getName() +
488 TreePattern &TP) {
489 if (TP.hasError())
494 MadeChange |= EnforceVector(TP);
495 MadeChange |= VTOperand.EnforceScalar(TP);
502 VTOperand.MergeInTypeInfo(IVT.SimpleTy, TP);
524 TP.error("Type inference contradiction found, forcing '" +
534 TreePattern &TP) {
535 if (TP.hasError())
540 MadeChange |= EnforceVector(TP);
541 MadeChange |= VTOperand.EnforceVector(TP);
546 MadeChange |= VTOperand.EnforceInteger(TP);
548 MadeChange |= VTOperand.EnforceFloatingPoint(TP);
550 MadeChange |= EnforceInteger(TP);
552 MadeChange |= EnforceFloatingPoint(TP);
564 EEVT::TypeSet EltTypeSet(IVT.SimpleTy, TP);
565 MadeChange |= VTOperand.EnforceVectorEltTypeIs(EltTypeSet, TP);
578 TP.error("Type inference contradiction found, forcing '" +
588 EEVT::TypeSet EltTypeSet(IVT.SimpleTy, TP);
589 MadeChange |= EnforceVectorEltTypeIs(EltTypeSet, TP);
602 TP.error("Type inference contradiction found, forcing '" +
877 TreePattern &TP) const {
878 if (TP.hasError())
887 return NodeToApply->UpdateNodeType(ResNo, x.SDTCisVT_Info.VT, TP);
890 return NodeToApply->UpdateNodeType(ResNo, MVT::iPTR, TP);
893 return NodeToApply->getExtType(ResNo).EnforceInteger(TP);
896 return NodeToApply->getExtType(ResNo).EnforceFloatingPoint(TP);
899 return NodeToApply->getExtType(ResNo).EnforceVector(TP);
904 return NodeToApply->UpdateNodeType(OResNo, OtherNode->getExtType(ResNo),TP)|
905 OtherNode->UpdateNodeType(ResNo,NodeToApply->getExtType(OResNo),TP);
914 TP.error(N->getOperator()->getName() + " expects a VT operand!");
920 EEVT::TypeSet TypeListTmp(VT, TP);
927 return TypeListTmp.EnforceSmallerThan(OtherNode->getExtType(OResNo), TP);
935 EnforceSmallerThan(BigOperand->getExtType(BResNo), TP);
946 EnforceVectorEltTypeIs(NodeToApply->getExtType(ResNo), TP);
957 EnforceVectorSubVectorTypeIs(NodeToApply->getExtType(ResNo), TP);
968 TreePattern &TP) {
977 TP);
981 return UpdateNodeType(ResNo, MVT::iPTR, TP);
992 CodeGenTarget &Tgt = TP.getDAGPatterns().getTargetInfo();
993 return UpdateNodeType(ResNo, Tgt.getRegisterClass(RC).getValueTypes(), TP);
1266 TreePatternNode *TreePatternNode::InlinePatternFragments(TreePattern &TP) {
1267 if (TP.hasError())
1278 TreePatternNode *NewChild = Child->InlinePatternFragments(TP);
1291 TreePattern *Frag = TP.getDAGPatterns().getPatternFragment(Op);
1295 TP.error("'" + Op->getName() + "' fragment requires " +
1311 ArgMap[Frag->getArgName(i)] = getChild(i)->InlinePatternFragments(TP);
1318 FragTree->UpdateNodeType(i, getExtType(i), TP);
1329 return FragTree->InlinePatternFragments(TP);
1347 TreePattern &TP) {
1354 const CodeGenTarget &T = TP.getDAGPatterns().getTargetInfo();
1364 return EEVT::TypeSet(MVT::i32, TP);
1370 const CodeGenTarget &T = TP.getDAGPatterns().getTargetInfo();
1384 const CodeGenTarget &T = TP.getDAGPatterns().getTargetInfo();
1400 return EEVT::TypeSet(MVT::Other, TP);
1408 return EEVT::TypeSet(getValueType(R), TP);
1414 return EEVT::TypeSet(MVT::Other, TP);
1421 return EEVT::TypeSet(TP.getDAGPatterns().getComplexPattern(R).getValueType(),
1422 TP);
1426 return EEVT::TypeSet(MVT::iPTR, TP);
1438 TP.error("Unknown node flavor used in pattern: " + R->getName());
1439 return EEVT::TypeSet(MVT::Other, TP);
1536 bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) {
1537 if (TP.hasError())
1540 CodeGenDAGPatterns &CDP = TP.getDAGPatterns();
1548 !hasName(), TP), TP);
1556 bool MadeChange = Types[0].EnforceInteger(TP);
1575 TP.error("Integer value '" + itostr(II->getValue()) +
1589 bool MadeChange = SetVal->ApplyTypeConstraints(TP, NotRegisters);
1593 MadeChange |= Child->ApplyTypeConstraints(TP, NotRegisters);
1596 MadeChange |= Child->UpdateNodeType(0, SetVal->getExtType(i), TP);
1597 MadeChange |= SetVal->UpdateNodeType(i, Child->getExtType(0), TP);
1607 MadeChange = getChild(i)->ApplyTypeConstraints(TP, NotRegisters);
1619 MadeChange |= UpdateNodeType(i, Int->IS.RetVTs[i], TP);
1622 TP.error("Intrinsic '" + Int->Name + "' expects " +
1629 MadeChange |= getChild(0)->UpdateNodeType(0, MVT::iPTR, TP);
1632 MadeChange |= getChild(i+1)->ApplyTypeConstraints(TP, NotRegisters);
1636 MadeChange |= getChild(i+1)->UpdateNodeType(0, OpVT, TP);
1647 TP.error(getOperator()->getName() + " node requires exactly " +
1652 bool MadeChange = NI.ApplyTypeConstraints(this, TP);
1654 MadeChange |= getChild(i)->ApplyTypeConstraints(TP, NotRegisters);
1670 MadeChange |= UpdateNodeTypeFromInst(ResNo, Inst.getResult(ResNo), TP);
1683 MadeChange |= UpdateNodeType(ResNo, VT, TP);
1690 MadeChange |= UpdateNodeType(0, getChild(0)->getExtType(0), TP);
1691 MadeChange |= getChild(0)->UpdateNodeType(0, getExtType(0), TP);
1707 TP.error("Instruction '" + getOperator()->getName() +
1727 Child->UpdateNodeTypeFromInst(ChildResNo, SubRec, TP);
1732 TP.error("Instruction '" + getOperator()->getName() +
1740 Child->UpdateNodeTypeFromInst(ChildResNo, SubRec, TP);
1749 MadeChange |= Child->UpdateNodeTypeFromInst(ChildResNo, OperandNode, TP);
1753 TP.error("Instruction '" + getOperator()->getName() +
1759 MadeChange |= getChild(i)->ApplyTypeConstraints(TP, NotRegisters);
1767 MadeChange |= getChild(i)->ApplyTypeConstraints(TP, NotRegisters);
1776 TP.error("Node transform '" + getOperator()->getName() +
1781 bool MadeChange = getChild(0)->ApplyTypeConstraints(TP, NotRegisters);
1789 bool MadeChange = UpdateNodeType(getChild(0)->getExtType(), TP);
1790 MadeChange |= getChild(0)->UpdateNodeType(getExtType(), TP);
3231 static bool ForceArbitraryInstResultType(TreePatternNode *N, TreePattern &TP) {
3237 if (ForceArbitraryInstResultType(N->getChild(i), TP))
3250 if (N->getExtType(i).MergeInTypeInfo(N->getExtType(i).getTypeList()[0], TP))