diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-21 20:11:33 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-21 20:11:33 +0000 |
commit | 7fc2f61331a340fe6d948d69b8f8c1be8a3ae401 (patch) | |
tree | 468c0e4a1b28417766a235b583ad1633ef8b346f /gcc/Makefile.in | |
parent | dda98ae93a1eea9e0d99c86317fb088914ec3ac9 (diff) | |
download | gcc-7fc2f61331a340fe6d948d69b8f8c1be8a3ae401.tar.gz |
Add a pass to back-propagate use information
This patch adds a pass that collects information that is common to
all uses of an SSA name X and back-propagates that information up
the statements that generate X. The general idea is to use the
information to simplify instructions (rather than a pure DCE) so
I've simply called it gimple-ssa-backprop.c, to go with
tree-ssa-forwprop.c.
At the moment the only use of the pass is to remove unnecessary
sign operations, so that it's effectively a global version of
fold_strip_sign_ops. I'm hoping it could be extended in future
to record which bits of an integer are significant. There are
probably other potential uses too.
A later patch gets rid of fold_strip_sign_ops.
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
gcc/
* doc/invoke.texi (-fdump-tree-backprop, -fssa-backprop): Document.
* Makefile.in (OBJS): Add gimple-ssa-backprop.o.
* common.opt (fssa-backprop): New option.
* fold-const.h (negate_mathfn_p): Declare.
* fold-const.c (negate_mathfn_p): Make public.
* timevar.def (TV_TREE_BACKPROP): New.
* tree-pass.h (make_pass_backprop): Declare.
* passes.def (pass_backprop): Add.
* gimple-ssa-backprop.c: New file.
gcc/testsuite/
* gcc.dg/tree-ssa/backprop-1.c, gcc.dg/tree-ssa/backprop-2.c,
gcc.dg/tree-ssa/backprop-3.c, gcc.dg/tree-ssa/backprop-4.c,
gcc.dg/tree-ssa/backprop-5.c, gcc.dg/tree-ssa/backprop-6.c: New tests.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229139 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/Makefile.in')
-rw-r--r-- | gcc/Makefile.in | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in index f7137ee7552..b91b8dcffea 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1266,6 +1266,7 @@ OBJS = \ gimple-laddress.o \ gimple-low.o \ gimple-pretty-print.o \ + gimple-ssa-backprop.o \ gimple-ssa-isolate-paths.o \ gimple-ssa-strength-reduction.o \ gimple-streamer-in.o \ |