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