From: Kyrylo Tkachov <[email protected]>

As promised elsewhere, I've accumulated a number of cleanups and modernisations
of RTL ifcvt while working on the noce_convert_multiple_sets improvements.
Now that some of the new functionality has landed I'd like to get these
cleanups in.  They are all NFCs: cleaning up comments, factoring out
bookkeeping duplicate code, moving the noce transforms into a bit more
structured table-driven form, using some more modern C++ idioms,
using auto vecs and bitmaps and stuff like that.

They should make it easier to add more transforms in the future.

Bootstrapped and tested on aarch64-none-linux-gnu.
Ok for trunk?
Thanks,
Kyrill

Kyrylo Tkachov (28):
  ifcvt: minor cleanups in noce_try_cond_arith and
    block_jumps_and_fallthru
  ifcvt: make the noce transform dispatch table-driven
  ifcvt: factor the noce CFG-surgery epilogue into a helper
  ifcvt: share the noce_try_* success tail
  ifcvt: consolidate the noce original-cost estimate
  ifcvt: drive the ce1/ce2/ce3 passes from one class and a phase enum
  ifcvt: decode the multiple-sets condition once
  ifcvt: use auto_bitmap for the local hand-managed bitmaps
  ifcvt: comment fixes
  ifcvt: remove the vacuous IFCVT_MULTIPLE_DUMPS macro
  ifcvt: drop a redundant else_bb test in noce_process_if_block
  ifcvt: correct stale comments in ifcvt.h
  ifcvt: describe the cond_exec parameters in the function comment
  ifcvt: small C++ tidy-ups in the noce path
  ifcvt: factor the reversed-condition decode
  ifcvt: factor the representable-difference check
  ifcvt: factor the barrier cleanup before merge_blocks
  ifcvt: factor the sign-bit-splat constant selection
  ifcvt: assorted small cleanups
  ifcvt: count the converted if-block in the noce epilogue
  ifcvt: say what MAX_CONDITIONAL_EXECUTE limits
  ifcvt: drop the dead forward declarations
  ifcvt: drop the dead null-target tests in noce_try_cond_arith
  ifcvt: drop three vacuous tests
  ifcvt: factor the cc_cmp clobber scan
  ifcvt: factor the if-case precondition check
  ifcvt: use auto_vec in cond_move_process_if_block
  ifcvt: drop the elaborated struct specifier on noce_if_info

 gcc/ifcvt.cc | 1383 ++++++++++++++++++++++----------------------------
 gcc/ifcvt.h  |   19 +-
 2 files changed, 605 insertions(+), 797 deletions(-)

-- 
2.50.1 (Apple Git-155)

Reply via email to