Lines Matching refs:Pat
1711 TreePattern::TreePattern(Record *TheRec, DagInit *Pat, bool isInput, in TreePattern() argument
1714 Trees.push_back(ParseTreePattern(Pat, "")); in TreePattern()
1717 TreePattern::TreePattern(Record *TheRec, TreePatternNode *Pat, bool isInput, in TreePattern() argument
1720 Trees.push_back(Pat); in TreePattern()
2229 static bool HandleUse(TreePattern *I, TreePatternNode *Pat, in HandleUse() argument
2232 if (Pat->getName().empty()) { in HandleUse()
2233 if (Pat->isLeaf()) { in HandleUse()
2234 DefInit *DI = dynamic_cast<DefInit*>(Pat->getLeafValue()); in HandleUse()
2243 if (Pat->isLeaf()) { in HandleUse()
2244 DefInit *DI = dynamic_cast<DefInit*>(Pat->getLeafValue()); in HandleUse()
2245 if (!DI) I->error("Input $" + Pat->getName() + " must be an identifier!"); in HandleUse()
2248 Rec = Pat->getOperator(); in HandleUse()
2255 TreePatternNode *&Slot = InstInputs[Pat->getName()]; in HandleUse()
2257 Slot = Pat; in HandleUse()
2270 I->error("All $" + Pat->getName() + " inputs must agree with each other"); in HandleUse()
2271 if (Slot->getExtTypes() != Pat->getExtTypes()) in HandleUse()
2272 I->error("All $" + Pat->getName() + " inputs must agree with each other"); in HandleUse()
2280 FindPatternInputsAndOutputs(TreePattern *I, TreePatternNode *Pat, in FindPatternInputsAndOutputs() argument
2284 if (Pat->isLeaf()) { in FindPatternInputsAndOutputs()
2285 bool isUse = HandleUse(I, Pat, InstInputs); in FindPatternInputsAndOutputs()
2286 if (!isUse && Pat->getTransformFn()) in FindPatternInputsAndOutputs()
2291 if (Pat->getOperator()->getName() == "implicit") { in FindPatternInputsAndOutputs()
2292 for (unsigned i = 0, e = Pat->getNumChildren(); i != e; ++i) { in FindPatternInputsAndOutputs()
2293 TreePatternNode *Dest = Pat->getChild(i); in FindPatternInputsAndOutputs()
2305 if (Pat->getOperator()->getName() != "set") { in FindPatternInputsAndOutputs()
2308 for (unsigned i = 0, e = Pat->getNumChildren(); i != e; ++i) { in FindPatternInputsAndOutputs()
2309 if (Pat->getChild(i)->getNumTypes() == 0) in FindPatternInputsAndOutputs()
2311 FindPatternInputsAndOutputs(I, Pat->getChild(i), InstInputs, InstResults, in FindPatternInputsAndOutputs()
2317 bool isUse = HandleUse(I, Pat, InstInputs); in FindPatternInputsAndOutputs()
2319 if (!isUse && Pat->getTransformFn()) in FindPatternInputsAndOutputs()
2325 if (Pat->getNumChildren() == 0) in FindPatternInputsAndOutputs()
2328 if (Pat->getTransformFn()) in FindPatternInputsAndOutputs()
2332 unsigned NumDests = Pat->getNumChildren()-1; in FindPatternInputsAndOutputs()
2334 TreePatternNode *Dest = Pat->getChild(i); in FindPatternInputsAndOutputs()
2358 FindPatternInputsAndOutputs(I, Pat->getChild(NumDests), in FindPatternInputsAndOutputs()
2587 TreePatternNode *Pat = I->getTree(j); in ParseInstructions() local
2588 if (Pat->getNumTypes() != 0) in ParseInstructions()
2593 FindPatternInputsAndOutputs(I, Pat, InstInputs, InstResults, in ParseInstructions()