This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 0/3] Compile-time gimple checking v4
- From: David Malcolm <dmalcolm at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: David Malcolm <dmalcolm at redhat dot com>
- Date: Mon, 12 May 2014 17:35:59 -0400
- Subject: [PATCH 0/3] Compile-time gimple checking v4
- Authentication-results: sourceware.org; auth=none
This is v4 of the patch series.
Revision history of the patch series:
v1: http://gcc.gnu.org/ml/gcc-patches/2014-04/msg01148.html
(this was the full 89-patch patch series I originally posted)
v2: http://gcc.gnu.org/ml/gcc-patches/2014-04/msg01549.html
* eliminated the as_a_gimple_foo methods in favor of
as_a <gimple_foo>, using is-a.h changes here:
http://gcc.gnu.org/ml/gcc-patches/2014-04/msg01439.html
(this merely does it for the GIMPLE_SWITCH initial patch,
as a proof-of-concept of how the rest of the series would
be reworked).
v3: http://gcc.gnu.org/ml/gcc-patches/2014-05/msg00128.html
* eliminated "gimple" and "const_gimple" typedefs in favor
of "gimple_stmt *" and "const gimple_stmt *".
(likewise, just for the GIMPLE_SWITCH initial patch)
v4 (this one):
* eliminate "gimple" and "const_gimple" typedefs in favor
of "gimple *" and "const gimple *".
* rename "gimple_statement_with_foo" to "gimple_with_foo"
* rename "gimple_statement_bar" to "gbar"
as per:
http://gcc.gnu.org/ml/gcc-patches/2014-05/msg00349.html
(see http://gcc.gnu.org/ml/gcc-patches/2014-05/msg00346.html
for a diagram of the resulting class hierarchy).
As per v2 onwards, this patch series only covers the initial
GIMPLE_SWITCH part of the original patch series.
As before, this has a prerequisite on a gengtype fix:
"[PATCH] gengtype: Support explicit pointers in template arguments":
http://gcc.gnu.org/ml/gcc-patches/2014-05/msg00003.html
(which I've reworking to merge in the changes from the wide-int
branch, and have bootstrapped that underneath the following
patches; solo bootstrap is in progress)
The "gfoo" type names are pleasantly terse, though I'm a little unhappy
about how they no longer match the prefix of the accessor functions e.g.
gimple_switch_num_labels (const gswitch *gs)
vs
gimple_switch_num_labels (const gimple_switch *gs)
But it works.
The patches are similar to those in v3:
Patch 1:
This is the handwritten conversion of "gimple" to "gimple *"
Jeff approved an envisaged update to the v3 version of this:
http://gcc.gnu.org/ml/gcc-patches/2014-05/msg00563.html
> That's going to mean a ton of trivial fixups to this patch.
> With those fixes, this patch is approved.
and this patch does indeed have a ton of such trivial fixups.
Patch 2:
This is the autogenerated part of the above.
As per patch 1, Jeff approved an earlier version of this:
http://gcc.gnu.org/ml/gcc-patches/2014-05/msg00564.html
(It's likely to bit-rot before 4.9.1 of course)
Patch 3: is the example of porting "Patch 02/89" from the original
series: introducing a class for GIMPLE_SWITCH, now called
"gswitch".
Jeff approved an earlier version of this:
http://gcc.gnu.org/ml/gcc-patches/2014-05/msg00565.html
with:
> OK after the "gimple_stmt" to "gimple" change referenced in
> prior messages related to this patchkit.
The additional change here relative to that patch is the renaming
of the new class from "gimple_switch" to "gswitch".
Successfully bootstrapped®rtested on x86_64-unknown-linux-gnu
(Fedora 20) (on top of the reworked dependent patch mentioned above; equal
results compared to a control build of r210222 (in particular, this is
after the wide-int merge).
I believe that the approvals from the earlier reviews cover this
iteration of the patches; I'm posting them here for reference (and in
case of hard drive failure...).
My plan is, assuming no-one complains loudly,
(A) to update the rest of the patch series to this new approach (and to
post the results for reference; Jeff has reviewed them).
(B) to commit the patches to trunk after 4.9.1 is released (re-testing
each patch appropriately, of course).
Dave
David Malcolm (3):
Handwritten part of conversion of "gimple" to "gimple *"
Autogenerated part of conversion of "gimple" to "gimple *"
Introduce gswitch and use it in various places
gcc/asan.c | 36 +-
gcc/builtins.c | 10 +-
gcc/builtins.h | 2 +-
gcc/c-family/c-gimplify.c | 4 +-
gcc/calls.c | 2 +-
gcc/calls.h | 2 +-
gcc/cfgexpand.c | 48 +-
gcc/cfgexpand.h | 2 +-
gcc/cfgloop.c | 2 +-
gcc/cfgloop.h | 2 +-
gcc/cfgloopmanip.c | 4 +-
gcc/cgraph.c | 32 +-
gcc/cgraph.h | 24 +-
gcc/cgraphbuild.c | 12 +-
gcc/cgraphclones.c | 8 +-
gcc/cgraphunit.c | 12 +-
gcc/config/aarch64/aarch64-builtins.c | 4 +-
gcc/config/alpha/alpha.c | 14 +-
gcc/config/i386/i386.c | 14 +-
gcc/config/rs6000/rs6000.c | 4 +-
gcc/coretypes.h | 10 +-
gcc/cp/cp-gimplify.c | 2 +-
gcc/doc/gimple.texi | 824 +++++++++------
gcc/dumpfile.c | 4 +-
gcc/dumpfile.h | 4 +-
gcc/except.h | 2 +-
gcc/expr.c | 28 +-
gcc/expr.h | 2 +-
gcc/fold-const.c | 2 +-
gcc/fold-const.h | 2 +-
gcc/gdbhooks.py | 4 +-
gcc/ggc.h | 6 +-
gcc/gimple-builder.c | 26 +-
gcc/gimple-builder.h | 16 +-
gcc/gimple-fold.c | 58 +-
gcc/gimple-fold.h | 8 +-
gcc/gimple-iterator.c | 36 +-
gcc/gimple-iterator.h | 22 +-
gcc/gimple-low.c | 30 +-
gcc/gimple-low.h | 2 +-
gcc/gimple-pretty-print.c | 110 +-
gcc/gimple-pretty-print.h | 12 +-
gcc/gimple-ssa-isolate-paths.c | 14 +-
gcc/gimple-ssa-strength-reduction.c | 92 +-
gcc/gimple-ssa.h | 22 +-
gcc/gimple-streamer-in.c | 12 +-
gcc/gimple-streamer-out.c | 8 +-
gcc/gimple-walk.c | 18 +-
gcc/gimple-walk.h | 12 +-
gcc/gimple.c | 313 +++---
gcc/gimple.h | 1655 ++++++++++++++----------------
gcc/gimplify-me.c | 4 +-
gcc/gimplify-me.h | 2 +-
gcc/gimplify.c | 102 +-
gcc/gimplify.h | 12 +-
gcc/graphite-poly.c | 8 +-
gcc/graphite-scop-detection.c | 20 +-
gcc/graphite-sese-to-poly.c | 168 +--
gcc/gsstruct.def | 52 +-
gcc/internal-fn.c | 40 +-
gcc/internal-fn.h | 2 +-
gcc/ipa-inline-analysis.c | 45 +-
gcc/ipa-inline.c | 4 +-
gcc/ipa-profile.c | 2 +-
gcc/ipa-prop.c | 80 +-
gcc/ipa-prop.h | 6 +-
gcc/ipa-pure-const.c | 12 +-
gcc/ipa-ref.c | 10 +-
gcc/ipa-ref.h | 12 +-
gcc/ipa-split.c | 40 +-
gcc/java/java-gimplify.c | 2 +-
gcc/lto-streamer-in.c | 16 +-
gcc/lto-streamer-out.c | 6 +-
gcc/omp-low.c | 253 ++---
gcc/passes.c | 4 +-
gcc/predict.c | 32 +-
gcc/profile.c | 8 +-
gcc/sese.c | 18 +-
gcc/sese.h | 8 +-
gcc/ssa-iterators.h | 42 +-
gcc/stmt.c | 4 +-
gcc/system.h | 2 +-
gcc/target.def | 2 +-
gcc/testsuite/g++.dg/plugin/selfassign.c | 8 +-
gcc/testsuite/gcc.dg/plugin/selfassign.c | 8 +-
gcc/tracer.c | 4 +-
gcc/trans-mem.c | 114 +-
gcc/trans-mem.h | 2 +-
gcc/tree-affine.c | 2 +-
gcc/tree-call-cdce.c | 50 +-
gcc/tree-cfg.c | 277 ++---
gcc/tree-cfg.h | 22 +-
gcc/tree-cfgcleanup.c | 28 +-
gcc/tree-cfgcleanup.h | 2 +-
gcc/tree-chrec.c | 10 +-
gcc/tree-chrec.h | 6 +-
gcc/tree-complex.c | 34 +-
gcc/tree-core.h | 4 +-
gcc/tree-data-ref.c | 14 +-
gcc/tree-data-ref.h | 8 +-
gcc/tree-dfa.c | 16 +-
gcc/tree-dfa.h | 2 +-
gcc/tree-eh.c | 198 ++--
gcc/tree-eh.h | 38 +-
gcc/tree-emutls.c | 8 +-
gcc/tree-if-conv.c | 46 +-
gcc/tree-inline.c | 105 +-
gcc/tree-inline.h | 6 +-
gcc/tree-into-ssa.c | 62 +-
gcc/tree-into-ssa.h | 4 +-
gcc/tree-loop-distribution.c | 66 +-
gcc/tree-nested.c | 32 +-
gcc/tree-nrv.c | 8 +-
gcc/tree-object-size.c | 28 +-
gcc/tree-outof-ssa.c | 26 +-
gcc/tree-outof-ssa.h | 4 +-
gcc/tree-parloops.c | 52 +-
gcc/tree-pass.h | 6 +-
gcc/tree-phinodes.c | 53 +-
gcc/tree-phinodes.h | 14 +-
gcc/tree-predcom.c | 62 +-
gcc/tree-profile.c | 32 +-
gcc/tree-scalar-evolution.c | 72 +-
gcc/tree-scalar-evolution.h | 2 +-
gcc/tree-sra.c | 62 +-
gcc/tree-ssa-alias.c | 38 +-
gcc/tree-ssa-alias.h | 16 +-
gcc/tree-ssa-ccp.c | 48 +-
gcc/tree-ssa-coalesce.c | 10 +-
gcc/tree-ssa-copy.c | 14 +-
gcc/tree-ssa-copyrename.c | 2 +-
gcc/tree-ssa-dce.c | 40 +-
gcc/tree-ssa-dom.c | 90 +-
gcc/tree-ssa-dom.h | 2 +-
gcc/tree-ssa-dse.c | 10 +-
gcc/tree-ssa-forwprop.c | 154 +--
gcc/tree-ssa-ifcombine.c | 20 +-
gcc/tree-ssa-live.c | 18 +-
gcc/tree-ssa-loop-ch.c | 6 +-
gcc/tree-ssa-loop-im.c | 70 +-
gcc/tree-ssa-loop-ivcanon.c | 20 +-
gcc/tree-ssa-loop-ivopts.c | 68 +-
gcc/tree-ssa-loop-manip.c | 32 +-
gcc/tree-ssa-loop-niter.c | 56 +-
gcc/tree-ssa-loop-niter.h | 4 +-
gcc/tree-ssa-loop-prefetch.c | 16 +-
gcc/tree-ssa-loop-unswitch.c | 8 +-
gcc/tree-ssa-loop.h | 2 +-
gcc/tree-ssa-math-opts.c | 90 +-
gcc/tree-ssa-operands.c | 42 +-
gcc/tree-ssa-operands.h | 10 +-
gcc/tree-ssa-phiopt.c | 88 +-
gcc/tree-ssa-phiprop.c | 18 +-
gcc/tree-ssa-pre.c | 52 +-
gcc/tree-ssa-propagate.c | 46 +-
gcc/tree-ssa-propagate.h | 14 +-
gcc/tree-ssa-reassoc.c | 176 ++--
gcc/tree-ssa-sccvn.c | 58 +-
gcc/tree-ssa-sccvn.h | 8 +-
gcc/tree-ssa-sink.c | 22 +-
gcc/tree-ssa-strlen.c | 42 +-
gcc/tree-ssa-structalias.c | 44 +-
gcc/tree-ssa-tail-merge.c | 40 +-
gcc/tree-ssa-ter.c | 12 +-
gcc/tree-ssa-threadedge.c | 46 +-
gcc/tree-ssa-threadedge.h | 4 +-
gcc/tree-ssa-threadupdate.c | 12 +-
gcc/tree-ssa-uncprop.c | 12 +-
gcc/tree-ssa-uninit.c | 78 +-
gcc/tree-ssa.c | 42 +-
gcc/tree-ssa.h | 4 +-
gcc/tree-ssanames.c | 8 +-
gcc/tree-ssanames.h | 16 +-
gcc/tree-stdarg.c | 12 +-
gcc/tree-switch-conversion.c | 50 +-
gcc/tree-tailcall.c | 30 +-
gcc/tree-vect-data-refs.c | 100 +-
gcc/tree-vect-generic.c | 22 +-
gcc/tree-vect-loop-manip.c | 62 +-
gcc/tree-vect-loop.c | 174 ++--
gcc/tree-vect-patterns.c | 194 ++--
gcc/tree-vect-slp.c | 124 +--
gcc/tree-vect-stmts.c | 244 ++---
gcc/tree-vectorizer.c | 22 +-
gcc/tree-vectorizer.h | 116 +--
gcc/tree-vrp.c | 152 +--
gcc/tree.c | 4 +-
gcc/tree.h | 4 +-
gcc/tsan.c | 12 +-
gcc/ubsan.c | 20 +-
gcc/value-prof.c | 96 +-
gcc/value-prof.h | 26 +-
gcc/vtable-verify.c | 10 +-
193 files changed, 4729 insertions(+), 4682 deletions(-)
--
1.8.5.3