Skip to content

Commit

Permalink
peepopt: Describe rules in help message
Browse files Browse the repository at this point in the history
  • Loading branch information
povik committed Oct 16, 2023
1 parent 5c0c825 commit 660be4a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions passes/pmgen/peepopt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ struct PeepoptPass : public Pass {
log("\n");
log("This pass applies a collection of peephole optimizers to the current design.\n");
log("\n");
log("This pass employs the following rules:\n");
log("\n");
log(" * muldiv - Replace (A*B)/B with A\n");
log("\n");
log(" * shiftmul - Replace A>>(B*C) with A'>>(B<<K) where C and K are constants\n");
log(" and A' is derived from A by appropriately inserting padding\n");
log(" into the signal. (right variant)\n");
log("\n");
log(" Analogously, replace A<<(B*C) with appropriate selection of\n");
log(" output bits from A<<(B<<K). (left variant)\n");
log("\n");
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
Expand Down

0 comments on commit 660be4a

Please sign in to comment.