David Malcolm <dmalc...@redhat.com> wrote:
>I have a series of 13 follow-up patches which remove the remaining
>"cfun"-using macros from basic-block.h
>
>Successfully bootstrapped&regtested on x86_64-unknown-linux-gnu.
>
>These were pre-approved in stage1, and are mechanical in nature [1]
>
>I'd like to apply these to trunk now, but given that we're now in
>stage3, do I need to wait until the next stage1?

No, its ok now.

>The first 4 patches rename various "_for_function|_FOR_FUNCTION"
>macros to "_for_fn|_FOR_FN" for consistency with the earlier
>patches in this thread.
>
>The remaining patches eliminate cfun-using macros in favor of
>the "_for_fn|_FOR_FN" variant, making uses of cfun explicit.
>There are still some macros in function.h that implicitly use
>cfun, but it's less clear what to replace them with.
>
>Note to self: here's a grep invocation for ensuring that no new
>uses sneak into the sources:
>for m in \
>  basic_block_info_for_function BASIC_BLOCK_FOR_FUNCTION \
>  SET_BASIC_BLOCK_FOR_FUNCTION last_basic_block_for_function \
>  label_to_block_map_for_function profile_status_for_function \
>  SET_BASIC_BLOCK BASIC_BLOCK basic_block_info label_to_block_map \
>  profile_status last_basic_block FOR_EACH_BB FOR_EACH_BB_REVERSE \
>  FOR_ALL_BB ; 
>do
>  grep -nH -E -w $m \
>     gcc/*.[ch] gcc/config/*.[ch] gcc/config/*/*.{c,h,md} ; 
>done
>
>(this currently has 11 false-positives)

After the patches the macros should be removed so that no new uses appear.

Thanks, Richard.

>[1] with one exception, in patch 10 in gcc/ira-emit.c (ira_emit) where
>I introduced a new local to avoid overlong lines.
>
>David Malcolm (13):
>  Rename macros (basic_block_info_for_function,
>    BASIC_BLOCK_FOR_FUNCTION, SET_BASIC_BLOCK_FOR_FUNCTION)
>  Rename last_basic_block_for_function to last_basic_block_for_fn.
>  Rename label_to_block_map_for_function to label_to_block_map_for_fn.
>  Rename profile_status_for_function to profile_status_for_fn.
>  Eliminate SET_BASIC_BLOCK macro.
>  Eliminate BASIC_BLOCK macro.
>  Eliminate basic_block_info macro.
>  Eliminate label_to_block_map macro.
>  Eliminate profile_status macro.
>  Eliminate last_basic_block macro.
>  Eliminate FOR_EACH_BB macro.
>  Eliminate FOR_EACH_BB_REVERSE macro.
>  Eliminate FOR_ALL_BB macro.
>
> gcc/alias.c                              |   2 +-
> gcc/asan.c                               |   6 +-
> gcc/auto-inc-dec.c                       |   2 +-
> gcc/basic-block.h                        |  32 +++------
> gcc/bb-reorder.c                         |  29 ++++----
> gcc/bt-load.c                            |  45 ++++++------
> gcc/caller-save.c                        |   8 +--
> gcc/cfg.c                                |  32 ++++-----
> gcc/cfganal.c                            |  35 +++++-----
> gcc/cfgbuild.c                           |  12 ++--
> gcc/cfgcleanup.c                         |   6 +-
> gcc/cfgexpand.c                          |  14 ++--
> gcc/cfghooks.c                           |  16 ++---
> gcc/cfgloop.c                            |  20 +++---
> gcc/cfgloopanal.c                        |   8 +--
> gcc/cfgloopmanip.c                       |   6 +-
> gcc/cfgrtl.c                             |  61 ++++++++--------
> gcc/cgraphbuild.c                        |   8 +--
> gcc/combine-stack-adj.c                  |   2 +-
> gcc/combine.c                            |   8 +--
> gcc/config/arm/arm.c                     |   4 +-
> gcc/config/bfin/bfin.c                   |   4 +-
> gcc/config/c6x/c6x.c                     |   6 +-
> gcc/config/epiphany/resolve-sw-modes.c   |   6 +-
> gcc/config/frv/frv.c                     |   8 +--
> gcc/config/i386/i386.c                   |   2 +-
> gcc/config/ia64/ia64.c                   |   6 +-
> gcc/config/mips/mips.c                   |   8 +--
> gcc/config/picochip/picochip.c           |   2 +-
> gcc/config/rs6000/rs6000.c               |   2 +-
> gcc/config/s390/s390.c                   |   4 +-
> gcc/config/sh/sh.c                       |   2 +-
> gcc/config/spu/spu.c                     |   6 +-
> gcc/config/tilegx/tilegx.c               |   4 +-
> gcc/config/tilepro/tilepro.c             |   4 +-
> gcc/coverage.c                           |   2 +-
> gcc/cprop.c                              |  23 ++++---
> gcc/cse.c                                |   8 +--
> gcc/dce.c                                |  10 +--
> gcc/df-core.c                            |  68 +++++++++---------
> gcc/df-problems.c                        |  54 +++++++--------
> gcc/df-scan.c                            |  42 ++++++-----
> gcc/df.h                                 |   2 +-
> gcc/dominance.c                          |  37 +++++-----
> gcc/domwalk.c                            |   2 +-
> gcc/dse.c                                |  14 ++--
> gcc/except.c                             |   2 +-
> gcc/final.c                              |   6 +-
> gcc/function.c                           |  16 ++---
> gcc/gcse.c                               |  54 ++++++++-------
> gcc/gimple-iterator.c                    |   2 +-
> gcc/gimple-ssa-isolate-paths.c           |   4 +-
> gcc/gimple-streamer-in.c                 |   4 +-
> gcc/gimple.c                             |   8 ++-
> gcc/graph.c                              |   6 +-
> gcc/graphite-scop-detection.c            |   6 +-
> gcc/graphite-sese-to-poly.c              |   6 +-
> gcc/graphite.c                           |   6 +-
> gcc/haifa-sched.c                        |   4 +-
> gcc/hw-doloop.c                          |   6 +-
> gcc/ifcvt.c                              |   2 +-
> gcc/init-regs.c                          |   2 +-
> gcc/internal-fn.c                        |   6 +-
> gcc/ipa-inline-analysis.c                |   4 +-
> gcc/ipa-prop.c                           |   2 +-
> gcc/ipa-pure-const.c                     |   2 +-
> gcc/ipa-split.c                          |  13 ++--
> gcc/ipa-utils.c                          |   8 +--
> gcc/ira-build.c                          |  15 ++--
> gcc/ira-costs.c                          |   2 +-
> gcc/ira-emit.c                           |  24 ++++---
> gcc/ira.c                                |  42 ++++++-----
> gcc/jump.c                               |   2 +-
>gcc/lcm.c                                | 115
>++++++++++++++++++-------------
> gcc/loop-init.c                          |   6 +-
> gcc/loop-invariant.c                     |   2 +-
> gcc/loop-unroll.c                        |  16 +++--
> gcc/lower-subreg.c                       |   8 +--
> gcc/lra-assigns.c                        |   2 +-
> gcc/lra-coalesce.c                       |   4 +-
> gcc/lra-constraints.c                    |   4 +-
> gcc/lra-eliminations.c                   |   2 +-
> gcc/lra-lives.c                          |   4 +-
> gcc/lra-spills.c                         |   6 +-
> gcc/lra.c                                |  10 +--
> gcc/lto-streamer-in.c                    |  28 ++++----
> gcc/lto-streamer-out.c                   |   8 +--
> gcc/mcf.c                                |   4 +-
> gcc/mode-switching.c                     |  27 ++++----
> gcc/modulo-sched.c                       |   2 +-
> gcc/omp-low.c                            |   6 +-
> gcc/optabs.c                             |   2 +-
> gcc/postreload-gcse.c                    |   4 +-
> gcc/postreload.c                         |   4 +-
> gcc/predict.c                            |  54 +++++++--------
> gcc/profile.c                            |  12 ++--
> gcc/recog.c                              |   6 +-
> gcc/ree.c                                |   2 +-
> gcc/reg-stack.c                          |   6 +-
> gcc/regcprop.c                           |   8 +--
> gcc/reginfo.c                            |   2 +-
> gcc/regrename.c                          |  12 ++--
> gcc/regstat.c                            |   8 +--
> gcc/reload1.c                            |  10 +--
> gcc/resource.c                           |  13 ++--
> gcc/sched-ebb.c                          |   4 +-
> gcc/sched-int.h                          |   5 +-
>gcc/sched-rgn.c                          | 103
>+++++++++++++++------------
> gcc/sched-vis.c                          |   2 +-
> gcc/sel-sched-dump.c                     |   2 +-
> gcc/sel-sched-ir.c                       |  35 +++++-----
> gcc/sel-sched.c                          |  22 +++---
> gcc/sese.c                               |   6 +-
> gcc/stack-ptr-mod.c                      |   2 +-
> gcc/store-motion.c                       |  38 +++++-----
> gcc/testsuite/g++.dg/plugin/selfassign.c |   2 +-
> gcc/testsuite/gcc.dg/plugin/selfassign.c |   2 +-
> gcc/tracer.c                             |   8 +--
> gcc/trans-mem.c                          |  15 ++--
> gcc/tree-call-cdce.c                     |   2 +-
>gcc/tree-cfg.c                           | 108
>+++++++++++++++--------------
> gcc/tree-cfgcleanup.c                    |  16 ++---
> gcc/tree-complex.c                       |   6 +-
> gcc/tree-dfa.c                           |   6 +-
> gcc/tree-eh.c                            |   6 +-
> gcc/tree-emutls.c                        |   2 +-
> gcc/tree-if-conv.c                       |   2 +-
> gcc/tree-inline.c                        |  32 +++++----
> gcc/tree-into-ssa.c                      |  45 ++++++------
> gcc/tree-loop-distribution.c             |   2 +-
> gcc/tree-nrv.c                           |   6 +-
> gcc/tree-object-size.c                   |   2 +-
> gcc/tree-outof-ssa.c                     |   6 +-
> gcc/tree-profile.c                       |   2 +-
> gcc/tree-scalar-evolution.c              |   2 +-
> gcc/tree-sra.c                           |  14 ++--
> gcc/tree-ssa-ccp.c                       |   6 +-
> gcc/tree-ssa-coalesce.c                  |   6 +-
> gcc/tree-ssa-copy.c                      |   2 +-
> gcc/tree-ssa-copyrename.c                |   4 +-
> gcc/tree-ssa-dce.c                       |  13 ++--
> gcc/tree-ssa-dom.c                       |   8 +--
> gcc/tree-ssa-forwprop.c                  |   2 +-
> gcc/tree-ssa-live.c                      |  32 ++++-----
> gcc/tree-ssa-loop-im.c                   |   8 +--
> gcc/tree-ssa-loop-manip.c                |  24 +++----
> gcc/tree-ssa-math-opts.c                 |  10 +--
> gcc/tree-ssa-pre.c                       |  16 ++---
> gcc/tree-ssa-propagate.c                 |   8 +--
> gcc/tree-ssa-reassoc.c                   |   8 ++-
> gcc/tree-ssa-sccvn.c                     |   2 +-
> gcc/tree-ssa-sink.c                      |   4 +-
> gcc/tree-ssa-structalias.c               |   4 +-
> gcc/tree-ssa-tail-merge.c                |  32 ++++-----
> gcc/tree-ssa-ter.c                       |   2 +-
> gcc/tree-ssa-threadupdate.c              |  10 +--
> gcc/tree-ssa-uncprop.c                   |   9 +--
> gcc/tree-ssa-uninit.c                    |   4 +-
> gcc/tree-ssa.c                           |   6 +-
> gcc/tree-stdarg.c                        |   8 +--
> gcc/tree-switch-conversion.c             |   2 +-
> gcc/tree-vect-generic.c                  |   2 +-
> gcc/tree-vectorizer.c                    |   6 +-
> gcc/tree-vrp.c                           |  20 +++---
> gcc/tsan.c                               |   2 +-
> gcc/ubsan.c                              |   2 +-
> gcc/value-prof.c                         |   6 +-
> gcc/var-tracking.c                       |  28 ++++----
> gcc/vtable-verify.c                      |   2 +-
> gcc/web.c                                |   6 +-
> 170 files changed, 1112 insertions(+), 1030 deletions(-)


Reply via email to