Skip to content

Commit

Permalink
speed up to simplification by omitting construction of negated parame…
Browse files Browse the repository at this point in the history
…ters
  • Loading branch information
SimonKlx committed Sep 6, 2023
1 parent 86edd9d commit 1567dc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/netlist/boolean_function/symbolic_execution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ namespace hal
{
auto p1_parameter = p[1].get_parameters();
// X | (Y & !X) => X | Y
if ((~p1_parameter[1]) == p[0])
if (is_x_not_y(p1_parameter[1], p[0]))
{
return BooleanFunction::Or(p[0].clone(), p1_parameter[0].clone(), node.size);
}
Expand Down Expand Up @@ -924,7 +924,7 @@ namespace hal
return OK(BooleanFunction::Const(0, node.size));
}
// X ^ ~X => 1
if (~p[0] == p[1])
if (is_x_not_y(p[0], p[1]))
{
return OK(One(node.size));
}
Expand Down

0 comments on commit 1567dc6

Please sign in to comment.