Lines Matching defs:Pat

2845 TreePattern::TreePattern(const Record *TheRec, const DagInit *Pat, bool isInput,
2849 Trees.push_back(ParseTreePattern(Pat, ""));
2852 TreePattern::TreePattern(const Record *TheRec, TreePatternNodePtr Pat,
2856 Trees.push_back(Pat);
3168 // def : Pat<(v1i64 (bitconvert(v2i32 DPR:$src))), (v1i64 DPR:$src)>;
3436 /// HandleUse - Given "Pat" a leaf in the pattern, check to see if it is an
3438 static bool HandleUse(TreePattern &I, TreePatternNodePtr Pat,
3441 if (Pat->getName().empty()) {
3442 if (Pat->isLeaf()) {
3443 const DefInit *DI = dyn_cast<DefInit>(Pat->getLeafValue());
3452 if (Pat->isLeaf()) {
3453 const DefInit *DI = dyn_cast<DefInit>(Pat->getLeafValue());
3455 I.error("Input $" + Pat->getName() + " must be an identifier!");
3458 Rec = Pat->getOperator();
3465 TreePatternNodePtr &Slot = InstInputs[Pat->getName()];
3467 Slot = Pat;
3480 I.error("All $" + Pat->getName() + " inputs must agree with each other");
3482 Slot->UpdateNodeType(0, Pat->getExtType(0), I);
3483 Pat->UpdateNodeType(0, Slot->getExtType(0), I);
3484 if (Slot->getExtTypes() != Pat->getExtTypes())
3485 I.error("All $" + Pat->getName() + " inputs must agree with each other");
3493 TreePattern &I, TreePatternNodePtr Pat,
3501 if (!Pat->getName().empty()) {
3502 TreePattern SrcPattern(I.getRecord(), Pat, true, *this);
3505 Pat = SrcPattern.getOnlyTree();
3508 if (Pat->isLeaf()) {
3509 bool isUse = HandleUse(I, Pat, InstInputs);
3510 if (!isUse && Pat->getTransformFn())
3515 if (Pat->getOperator()->getName() != "set") {
3518 for (unsigned i = 0, e = Pat->getNumChildren(); i != e; ++i) {
3519 if (Pat->getChild(i).getNumTypes() == 0)
3521 FindPatternInputsAndOutputs(I, Pat->getChildShared(i), InstInputs,
3527 bool isUse = HandleUse(I, Pat, InstInputs);
3529 if (!isUse && Pat->getTransformFn())
3535 if (Pat->getNumChildren() == 0)
3538 if (Pat->getTransformFn())
3542 unsigned NumDests = Pat->getNumChildren() - 1;
3544 TreePatternNodePtr Dest = Pat->getChildShared(i);
3576 FindPatternInputsAndOutputs(I, Pat->getChildShared(NumDests), InstInputs,
3599 void Analyze(const PatternToMatch &Pat) {
3600 const TreePatternNode &N = Pat.getSrcPattern();
3804 const ListInit *Pat,
3810 TreePattern I(CGI.TheDef, Pat, true, *this);
3828 TreePatternNodePtr Pat = I.getTree(j);
3829 if (Pat->getNumTypes() != 0) {
3832 for (unsigned k = 0, ke = Pat->getNumTypes(); k != ke; ++k) {
3834 Pat->getExtType(k).writeToStream(OS);
3842 FindPatternInputsAndOutputs(I, Pat, InstInputs, InstResults,