Home | History | Annotate | Download | only in opt

Lines Matching refs:child

42 // child.
71 // add node with each term as a child. For instance a large graph built from, X
91 // which are used to flatten the graph. |child| is the node currenty being
95 void GatherAccumulatorsFromChildNodes(SENode* new_node, SENode* child,
219 for (SENode* child : simplified_polynomial->GetChildren()) {
220 if (child->GetType() == SENode::RecurrentAddExpr) {
221 recurrent_expr = child->AsSERecurrentNode();
244 SENode* child,
248 if (child->GetType() == SENode::Constant) {
251 child->AsSEConstantNode()->FoldToSingleValue() * sign;
253 } else if (child->GetType() == SENode::ValueUnknown ||
254 child->GetType() == SENode::RecurrentAddExpr) {
260 auto iterator = accumulators_.find(child);
263 accumulators_.insert({child, sign});
267 } else if (child->GetType() == SENode::Multiply) {
268 if (!AccumulatorsFromMultiply(child, negation)) {
269 new_node->AddChild(child);
272 } else if (child->GetType() == SENode::Add) {
273 for (SENode* next_child : *child) {
277 } else if (child->GetType() == SENode::Negative) {
278 SENode* negated_node = child->GetChild(0);
283 new_node->AddChild(child);
383 for (SENode* child : *root) {
386 if (child->GetType() == SENode::Negative) {
387 child = child->GetChild(0);
391 if (child->GetType() == SENode::RecurrentAddExpr) {
392 const Loop* loop = child->AsSERecurrentNode()->GetLoop();
394 SERecurrentNode* rec = child->AsSERecurrentNode();
402 new_node->AddChild(child);
451 // If we only have one child in the add just return that.
465 for (SENode* child : *node) {
466 if (child->GetType() == SENode::RecurrentAddExpr) {
467 SENode* coefficient = child->AsSERecurrentNode()->GetCoefficient();
473 new_children.push_back(child->AsSERecurrentNode()->GetOffset());
476 new_children.push_back(child);
479 new_children.push_back(child);
487 for (SENode* child : new_children) {
488 new_add->AddChild(child);
506 for (SENode* child : children) {
507 if (child->GetType() != SENode::RecurrentAddExpr) {
508 new_offset->AddChild(child);
515 // If the child can be simplified, add the simplified form otherwise, add it