Lines Matching defs:TP

45 EEVT::TypeSet::TypeSet(MVT::SimpleValueType VT, TreePattern &TP) {
47 EnforceInteger(TP);
49 EnforceFloatingPoint(TP);
51 EnforceVector(TP);
75 bool EEVT::TypeSet::FillWithPossibleTypes(TreePattern &TP,
80 TP.getDAGPatterns().getTargetInfo().getLegalValueTypes();
82 if (TP.hasError())
91 TP.error("Type inference contradiction found, no " +
155 bool EEVT::TypeSet::MergeInTypeInfo(const EEVT::TypeSet &InVT, TreePattern &TP){
156 if (InVT.isCompletelyUnknown() || *this == InVT || TP.hasError())
173 InCopy.EnforceInteger(TP);
174 InCopy.EnforceScalar(TP);
193 bool MadeChange = EnforceInteger(TP);
230 TP.error("Type inference contradiction found, merging '" +
236 bool EEVT::TypeSet::EnforceInteger(TreePattern &TP) {
237 if (TP.hasError())
241 return FillWithPossibleTypes(TP, isInteger, "integer");
253 TP.error("Type inference contradiction found, '" +
261 bool EEVT::TypeSet::EnforceFloatingPoint(TreePattern &TP) {
262 if (TP.hasError())
266 return FillWithPossibleTypes(TP, isFloatingPoint, "floating point");
279 TP.error("Type inference contradiction found, '" +
287 bool EEVT::TypeSet::EnforceScalar(TreePattern &TP) {
288 if (TP.hasError())
293 return FillWithPossibleTypes(TP, isScalar, "scalar");
306 TP.error("Type inference contradiction found, '" +
314 bool EEVT::TypeSet::EnforceVector(TreePattern &TP) {
315 if (TP.hasError())
320 return FillWithPossibleTypes(TP, isVector, "vector");
333 TP.error("Type inference contradiction found, '" +
344 bool EEVT::TypeSet::EnforceSmallerThan(EEVT::TypeSet &Other, TreePattern &TP) {
345 if (TP.hasError())
352 MadeChange = FillWithPossibleTypes(TP);
355 MadeChange = Other.FillWithPossibleTypes(TP);
360 MadeChange |= Other.EnforceInteger(TP);
362 MadeChange |= Other.EnforceFloatingPoint(TP);
364 MadeChange |= EnforceInteger(TP);
366 MadeChange |= EnforceFloatingPoint(TP);
373 MadeChange |= Other.EnforceScalar(TP);
375 MadeChange |= EnforceScalar(TP);
395 TP.error("Type inference contradiction found, '" +
404 TP.error("Type inference contradiction found, '" +
468 TP.error("Type inference contradiction found, '" +
525 TP.error("Type inference contradiction found, '" +
536 TreePattern &TP) {
537 if (TP.hasError())
542 MadeChange |= EnforceVector(TP);
543 MadeChange |= VTOperand.EnforceScalar(TP);
550 VTOperand.MergeInTypeInfo(IVT.SimpleTy, TP);
572 TP.error("Type inference contradiction found, forcing '" +
582 TreePattern &TP) {
585 MadeChange |= EnforceVector(TP);
586 MadeChange |= VTOperand.EnforceVector(TP);
589 MadeChange |= VTOperand.EnforceSmallerThan(*this, TP);
596 EEVT::TypeSet EltTypeSet(IVT.SimpleTy, TP);
597 MadeChange |= VTOperand.EnforceVectorEltTypeIs(EltTypeSet, TP);
602 EEVT::TypeSet EltTypeSet(IVT.SimpleTy, TP);
603 MadeChange |= EnforceVectorEltTypeIs(EltTypeSet, TP);
870 TreePattern &TP) const {
871 if (TP.hasError())
880 return NodeToApply->UpdateNodeType(ResNo, x.SDTCisVT_Info.VT, TP);
883 return NodeToApply->UpdateNodeType(ResNo, MVT::iPTR, TP);
886 return NodeToApply->getExtType(ResNo).EnforceInteger(TP);
889 return NodeToApply->getExtType(ResNo).EnforceFloatingPoint(TP);
892 return NodeToApply->getExtType(ResNo).EnforceVector(TP);
897 return NodeToApply->UpdateNodeType(OResNo, OtherNode->getExtType(ResNo),TP)|
898 OtherNode->UpdateNodeType(ResNo,NodeToApply->getExtType(OResNo),TP);
907 TP.error(N->getOperator()->getName() + " expects a VT operand!");
913 EEVT::TypeSet TypeListTmp(VT, TP);
920 return TypeListTmp.EnforceSmallerThan(OtherNode->getExtType(OResNo), TP);
928 EnforceSmallerThan(BigOperand->getExtType(BResNo), TP);
939 EnforceVectorEltTypeIs(NodeToApply->getExtType(ResNo), TP);
950 EnforceVectorSubVectorTypeIs(NodeToApply->getExtType(ResNo), TP);
961 TreePattern &TP) {
970 TP);
974 return UpdateNodeType(ResNo, MVT::iPTR, TP);
985 CodeGenTarget &Tgt = TP.getDAGPatterns().getTargetInfo();
986 return UpdateNodeType(ResNo, Tgt.getRegisterClass(RC).getValueTypes(), TP);
1251 TreePatternNode *TreePatternNode::InlinePatternFragments(TreePattern &TP) {
1252 if (TP.hasError())
1263 TreePatternNode *NewChild = Child->InlinePatternFragments(TP);
1276 TreePattern *Frag = TP.getDAGPatterns().getPatternFragment(Op);
1280 TP.error("'" + Op->getName() + "' fragment requires " +
1296 ArgMap[Frag->getArgName(i)] = getChild(i)->InlinePatternFragments(TP);
1303 FragTree->UpdateNodeType(i, getExtType(i), TP);
1314 return FragTree->InlinePatternFragments(TP);
1332 TreePattern &TP) {
1339 const CodeGenTarget &T = TP.getDAGPatterns().getTargetInfo();
1349 return EEVT::TypeSet(MVT::i32, TP);
1355 const CodeGenTarget &T = TP.getDAGPatterns().getTargetInfo();
1369 const CodeGenTarget &T = TP.getDAGPatterns().getTargetInfo();
1385 return EEVT::TypeSet(MVT::Other, TP);
1393 return EEVT::TypeSet(getValueType(R), TP);
1399 return EEVT::TypeSet(MVT::Other, TP);
1406 return EEVT::TypeSet(TP.getDAGPatterns().getComplexPattern(R).getValueType(),
1407 TP);
1411 return EEVT::TypeSet(MVT::iPTR, TP);
1420 TP.error("Unknown node flavor used in pattern: " + R->getName());
1421 return EEVT::TypeSet(MVT::Other, TP);
1493 bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) {
1494 if (TP.hasError())
1497 CodeGenDAGPatterns &CDP = TP.getDAGPatterns();
1505 !hasName(), TP), TP);
1513 bool MadeChange = Types[0].EnforceInteger(TP);
1532 TP.error("Integer value '" + itostr(II->getValue()) +
1546 bool MadeChange = SetVal->ApplyTypeConstraints(TP, NotRegisters);
1550 MadeChange |= Child->ApplyTypeConstraints(TP, NotRegisters);
1553 MadeChange |= Child->UpdateNodeType(0, SetVal->getExtType(i), TP);
1554 MadeChange |= SetVal->UpdateNodeType(i, Child->getExtType(0), TP);
1564 MadeChange = getChild(i)->ApplyTypeConstraints(TP, NotRegisters);
1576 MadeChange |= UpdateNodeType(i, Int->IS.RetVTs[i], TP);
1579 TP.error("Intrinsic '" + Int->Name + "' expects " +
1586 MadeChange |= getChild(0)->UpdateNodeType(0, MVT::iPTR, TP);
1589 MadeChange |= getChild(i+1)->ApplyTypeConstraints(TP, NotRegisters);
1593 MadeChange |= getChild(i+1)->UpdateNodeType(0, OpVT, TP);
1604 TP.error(getOperator()->getName() + " node requires exactly " +
1609 bool MadeChange = NI.ApplyTypeConstraints(this, TP);
1611 MadeChange |= getChild(i)->ApplyTypeConstraints(TP, NotRegisters);
1627 MadeChange |= UpdateNodeTypeFromInst(ResNo, Inst.getResult(ResNo), TP);
1640 MadeChange |= UpdateNodeType(ResNo, VT, TP);
1647 MadeChange |= UpdateNodeType(0, getChild(0)->getExtType(0), TP);
1648 MadeChange |= getChild(0)->UpdateNodeType(0, getExtType(0), TP);
1664 TP.error("Instruction '" + getOperator()->getName() +
1684 Child->UpdateNodeTypeFromInst(ChildResNo, SubRec, TP);
1689 TP.error("Instruction '" + getOperator()->getName() +
1697 Child->UpdateNodeTypeFromInst(ChildResNo, SubRec, TP);
1706 MadeChange |= Child->UpdateNodeTypeFromInst(ChildResNo, OperandNode, TP);
1710 TP.error("Instruction '" + getOperator()->getName() +
1716 MadeChange |= getChild(i)->ApplyTypeConstraints(TP, NotRegisters);
1724 TP.error("Node transform '" + getOperator()->getName() +
1729 bool MadeChange = getChild(0)->ApplyTypeConstraints(TP, NotRegisters);
1737 bool MadeChange = UpdateNodeType(getChild(0)->getExtType(), TP);
1738 MadeChange |= getChild(0)->UpdateNodeType(getExtType(), TP);
3145 static bool ForceArbitraryInstResultType(TreePatternNode *N, TreePattern &TP) {
3151 if (ForceArbitraryInstResultType(N->getChild(i), TP))
3164 if (N->getExtType(i).MergeInTypeInfo(N->getExtType(i).getTypeList()[0], TP))