mbox series

[0/8] factorization of distributive operations

Message ID 20201127164950.41517-1-luc.vanoostenryck@gmail.com (mailing list archive)
Headers show
Series factorization of distributive operations | expand

Message

Luc Van Oostenryck Nov. 27, 2020, 4:49 p.m. UTC
This series ad the factorization of distributive operations
involving bitwise operators as well as the more classical
	(x * z) + (y * z) --> (x + y) * z

Luc Van Oostenryck (8):
  add testscases for some factorization of distributive operations
  reassoc: add helper can_move_to()
  add helper make_insn_pair() & swap_insn()
  add helper replace_binop()
  refactor simplify_add() to avoid code duplication (preparation)
  refactor simplify_add() to avoid code duplication
  factorize (x OP1 z) OP2 (y OP1 z) into (x OP2 y) OP1 z
  factorize SHIFT(x, s) OP SHIFT(y, s) into SHIFT((x OP y), s)

 simplify.c                        | 217 +++++++++++++++++++++++++++---
 validation/optim/fact-add-mul.c   |  27 ++++
 validation/optim/fact-and-ior.c   |  27 ++++
 validation/optim/fact-and-shift.c |  26 ++++
 validation/optim/fact-ior-and.c   |  27 ++++
 validation/optim/fact-ior-shift.c |  26 ++++
 validation/optim/fact-xor-and.c   |  27 ++++
 validation/optim/fact-xor-shift.c |  26 ++++
 8 files changed, 386 insertions(+), 17 deletions(-)
 create mode 100644 validation/optim/fact-add-mul.c
 create mode 100644 validation/optim/fact-and-ior.c
 create mode 100644 validation/optim/fact-and-shift.c
 create mode 100644 validation/optim/fact-ior-and.c
 create mode 100644 validation/optim/fact-ior-shift.c
 create mode 100644 validation/optim/fact-xor-and.c
 create mode 100644 validation/optim/fact-xor-shift.c