• Home
  • Raw
  • Download

Lines Matching full:branch

5 #include "src/compiler/branch-elimination.h"
63 void BranchElimination::SimplifyBranchCondition(Node* branch) { in SimplifyBranchCondition() argument
64 // Try to use a phi as a branch condition if the control flow from the branch in SimplifyBranchCondition()
67 // use the same branch condition. In such case, create a new phi with constant in SimplifyBranchCondition()
68 // inputs and let the second branch use the phi as its branch condition. From in SimplifyBranchCondition()
69 // this transformation, more branch folding opportunities would be exposed to in SimplifyBranchCondition()
70 // later passes through branch cloning in effect-control-linearizer. in SimplifyBranchCondition()
92 DCHECK_EQ(IrOpcode::kBranch, branch->opcode()); in SimplifyBranchCondition()
93 Node* merge = NodeProperties::GetControlInput(branch); in SimplifyBranchCondition()
96 Node* branch_condition = branch->InputAt(0); in SimplifyBranchCondition()
129 // Replace the branch condition with the new phi. in SimplifyBranchCondition()
130 NodeProperties::ReplaceValueInput(branch, new_phi, 0); in SimplifyBranchCondition()
138 Node* branch; in ReduceBranch() local
140 // If we know the condition we can discard the branch. in ReduceBranch()
141 if (from_input.LookupCondition(condition, &branch, &condition_value)) { in ReduceBranch()
158 // the branch condition. in ReduceBranch()
256 // Special case: Trap directly inside a branch without sibling nodes. in ReduceTrapConditional()
257 // Replace the branch with the trap. in ReduceTrapConditional()
260 // | Branch TrapIf in ReduceTrapConditional()
273 Node* branch = NodeProperties::GetControlInput(control_input); in ReduceTrapConditional() local
274 DCHECK_EQ(branch->opcode(), IrOpcode::kBranch); in ReduceTrapConditional()
275 if (condition == NodeProperties::GetValueInput(branch, 0)) { in ReduceTrapConditional()
277 for (Node* use : branch->uses()) { in ReduceTrapConditional()
283 NodeProperties::GetControlInput(branch)); in ReduceTrapConditional()
288 branch->Kill(); in ReduceTrapConditional()
328 Node* branch; in ReduceDeoptimizeConditional() local
329 // If we know the condition we can discard the branch. in ReduceDeoptimizeConditional()
330 if (conditions.LookupCondition(condition, &branch, &condition_value)) { in ReduceDeoptimizeConditional()
349 // Add the condition to the list arriving from the input branch. in ReduceIf()
350 Node* branch = NodeProperties::GetControlInput(node, 0); in ReduceIf() local
351 ControlPathConditions from_branch = node_conditions_.Get(branch); in ReduceIf()
355 if (!reduced_.Get(branch)) { in ReduceIf()
358 Node* condition = branch->InputAt(0); in ReduceIf()
359 return UpdateConditions(node, from_branch, condition, branch, is_true_branch, in ReduceIf()
445 Zone* zone, Node* condition, Node* branch, bool is_true, in AddCondition() argument
448 BranchCondition branch_condition(condition, branch, is_true); in AddCondition()
463 Zone* zone, Node* condition, Node* branch, bool is_true) { in AddConditionInNewBlock() argument
466 BranchCondition branch_condition(condition, branch, is_true); in AddConditionInNewBlock()
480 Node* condition, Node** branch, bool* is_true) const { in LookupCondition() argument
484 *branch = element.branch; in LookupCondition()