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