diff options
author | Steven Bosscher <steven@gcc.gnu.org> | 2012-07-16 11:32:42 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2012-07-16 11:32:42 +0000 |
commit | 7ee2468b9274dd08bac00909fbbe8308f92c68e5 (patch) | |
tree | efc5d943947f757e56cc312a7a5902b26d667498 /gcc/df-problems.c | |
parent | 9e227d605e3adef6f379ab76424e197cc06ec275 (diff) | |
download | gcc-7ee2468b9274dd08bac00909fbbe8308f92c68e5.zip gcc-7ee2468b9274dd08bac00909fbbe8308f92c68e5.tar.gz gcc-7ee2468b9274dd08bac00909fbbe8308f92c68e5.tar.bz2 |
system.h (dump_file): Do not define.
gcc/
* system.h (dump_file): Do not define.
* tree-pass.h: Include dumpfile.h, which is a new file containing...
(enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p,
dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p,
dump_flag_name, dump_file, dump_flags, dump_file_name,
get_dump_file_info, struct dump_file_info): all of this, moved to...
* dumpfile.h: Here, new file.
* tree-dump.h: Include dumpfile.h, but not tree-pass.h.
(dump_stmt): Remove prototype for C++ specific function.
(dump_enumerated_decls): Move prototype from here...
* tree-flow.h (dump_enumerated_decls): ... to here.
(get_ref_base_and_extent) Move prototype from here ...
* tree.h (get_ref_base_and_extent) ... to here.
* tree-ssa-live.c: Do not inclde tree-pretty-print.h, because
gimple-pretty-print.h is enough. Do not include tree-dump.h,
include timevar.h and dumpfile.h instead.
(struct numbered_tree_d, compare_decls_by_uid,
dump_enumerated_decls_push, dump_enumerated_decls): Move from here ...
* tree-dfa.c:(struct numbered_tree_d, compare_decls_by_uid,
dump_enumerated_decls_push, dump_enumerated_decls):... to here.
Do not include timevar.h.
* tree.c: Do not include timevar.h.
* tree-cfg.c: Do not include langhooks.h, tree-pretty-print.h, and
timevar.h.
(dump_cfg_stats): Use current_function_name.
(gimple_cfg2vcg): Likewise.
(dump_function_to_file): Likewise.
* df-scan.c: Do not include tree-pass.h and timevar.h.
Include dumpfile.h.
(df_entry_block_bitmap_verify, df_exit_block_bitmap_verify): Do not
use print_current_pass.
* df-problems.c: Include dumpfile.h.
Always define REG_DEAD_DEBUGGING, avoid #ifdef code, because it
leads to errors in the code not selected.
(df_note_compute): Do not print_rtl_with_bb here. Fix compilation
bug if REG_DEAD_DEBUGGING is not 0, get_insns is not available here.
* lcm.c: Include dumpfile.h.
Remove obsolete include of insn-attr.h.
* dojump.c (do_compare_rtx_and_jump): Remove failure printing for
missing probability notes.
* stmt.c: Include dumpfile.h.
(emit_case_decision_tree): Re-enable printing expand details only
if TDF_DETAILS.
* alias.c, auto-inc-dec.c, bb-reorder.c, caller-save.c, cfg.c,
cfgcleanup.c, cfgexpand.c, cfgloop.c, cfgloopmanip.c, cgraph.c,
cgraphclones.c, cgraphunit.c, combine.c, combine-stack-adj.c,
coverage.c, cprop.c, cse.c, cselib.c, dbgcnt.c, dce.c, df-core.c,
dse.c, dwarf2out.c, emit-rtl.c, except.c, expr.c, final.c,
function.c, fwprop.c, gcse.c, gimple-fold.c,
gimple-pretty-print.c, gimple-ssa-strength-reduction.c,
gimplify.c, graphite-blocking.c, graphite-clast-to-gimple.c,
graphite-dependences.c, graphite-interchange.c,
graphite-optimize-isl.c, graphite-poly.c,
graphite-sese-to-poly.c, haifa-sched.c, hw-doloop.c, ifcvt.c,
ipa.c, ipa-cp.c, ipa-inline-analysis.c, ipa-inline.c,
ipa-inline-transform.c, ipa-prop.c, ipa-pure-const.c,
ipa-reference.c, ipa-split.c, ipa-utils.c, ira.c, ira-emit.c,
jump.c, loop-doloop.c, loop-init.c, loop-invariant.c, loop-iv.c,
loop-unroll.c, loop-unswitch.c, lower-subreg.c,
lto-section-out.c, lto-streamer-in.c, matrix-reorg.c, mcf.c,
mode-switching.c, modulo-sched.c, omega.c, omp-low.c, passes.c,
plugin.c, postreload.c, postreload-gcse.c, predict.c, print-rtl.c,
print-tree.c, profile.c, recog.c, ree.c, regcprop.c, reginfo.c,
regmove.c, regrename.c, reg-stack.c, reload1.c, reorg.c,
sched-rgn.c, sched-vis.c, sel-sched.c, sel-sched-ir.c,
store-motion.c, tracer.c, trans-mem.c, tree-affine.c,
tree-call-cdce.c, tree-cfgcleanup.c, tree-chrec.c,
tree-data-ref.c, tree-diagnostic.c, tree-dump.c,
tree-eh.c, tree-flow-inline.h, tree-if-conv.c, tree-into-ssa.c,
tree-mudflap.c, tree-nrv.c, tree-object-size.c,
tree-optimize.c, tree-outof-ssa.c, tree-predcom.c,
tree-pretty-print.c, tree-profile.c, tree-scalar-evolution.c,
tree-sra.c, tree-ssa-address.c, tree-ssa-alias.c, tree-ssa.c,
tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-copy.c,
tree-ssa-copyrename.c,, tree-ssa-dce.c, tree-ssa-dom.c,
tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c,
tree-ssa-loop.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c,
tree-ssa-loop-ivcanon.c, tree-ssa-loop-ivopts.c,
tree-ssa-loop-manip.c, tree-ssa-loop-niter.c,
tree-ssa-loop-prefetch.c, tree-ssa-loop-unswitch.c,
tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-phiopt.c,
tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-propagate.c,
tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-ssa-sink.c,
tree-ssa-structalias.c, tree-ssa-tail-merge.c, tree-ssa-ter.c,
tree-ssa-threadedge.c, tree-ssa-threadupdate.c,
tree-ssa-uncprop.c, tree-ssa-uninit.c,
tree-switch-conversion.c, tree-tailcall.c,
tree-vect-data-refs.c, tree-vect-loop.c,
tree-vect-loop-manip.c, tree-vectorizer.c,
tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c,
tree-vrp.c, value-prof.c, var-tracking.c, web.c: Include tree-pass.h
only if needed. If tree-pass.h is included, do not include timevar.h
and dumpfile.h. If tree-pass.h is not included but dump_file, or
dump_flags, or the TDF_* flags are used, include dumpfile.h.
If gimple-pretty-print.h is included, don't include tree-pretty-print.h.
Remove assorted unnecessary includes.
* config/mn10300/mn10300.c, config/c6x/c6x.c, config/ia64/ia64.c,
config/arm/arm.c, config/bfin/bfin.c, config/frv/frv.c,
config/spu/spu.c, config/mep/mep.c, config/i386/i386.c:
Include dumpfile.h.
* config/rl78/rl78.c: Include dumpfile.h instead of tree-pass.h.
* arm/t-arm, avr/t-avr, i386/t-i386, ia64/t-ia64, mep/t-mep,
spu/t-spu-elf: Fix dependencies.
c-family/
* c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
* c-ada-spec.c: Likewise.
* c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
c/
* c-decl.c: Include dumpfile.h instead of tree-dump.h.
* Make-lang.in: Fix dependencies.
cp/
* dump.c (dump_stmt): Moved here from c-dump.c.
* optimize.c: Include dumpfile.h instead of tree-dump.h.
* class.c: Likewise.
* decl2.c: Likewise.
* Make-lang.in: Fix dependencies.
fortran/
* f95-lang.c: Include dumpfile.h instead of tree-dump.h.
* Make-lang.in: Fix dependencies.
java/
* java-gimplify.c Include dumpfile.h instead of tree-dump.h
* Make-lang.in: Fix dependencies.
lto/
* lto.c: Do not include timevar.h.
* Make-lang.in: Fix dependencies.
ada/
* gcc-interface/utils.c: Include timevar.h.
* Make-lang.in: Fix dependencies.
From-SVN: r189519
Diffstat (limited to 'gcc/df-problems.c')
-rw-r--r-- | gcc/df-problems.c | 94 |
1 files changed, 33 insertions, 61 deletions
diff --git a/gcc/df-problems.c b/gcc/df-problems.c index d650d0b..d572b0f 100644 --- a/gcc/df-problems.c +++ b/gcc/df-problems.c @@ -44,13 +44,12 @@ along with GCC; see the file COPYING3. If not see #include "except.h" #include "dce.h" #include "vecprim.h" +#include "dumpfile.h" /* Note that turning REG_DEAD_DEBUGGING on will cause gcc.c-torture/unsorted/dump-noaddr.c to fail because it prints addresses in the dumps. */ -#if 0 -#define REG_DEAD_DEBUGGING -#endif +#define REG_DEAD_DEBUGGING 0 #define DF_SPARSE_THRESHOLD 32 @@ -2712,7 +2711,7 @@ df_note_alloc (bitmap all_blocks ATTRIBUTE_UNUSED) df_note->optional_p = true; } -#ifdef REG_DEAD_DEBUGGING +/* This is only used if REG_DEAD_DEBUGGING is in effect. */ static void df_print_note (const char *prefix, rtx insn, rtx note) { @@ -2723,7 +2722,6 @@ df_print_note (const char *prefix, rtx insn, rtx note) fprintf (dump_file, "\n"); } } -#endif /* After reg-stack, the x86 floating point stack regs are difficult to @@ -2772,9 +2770,8 @@ df_kill_notes (rtx insn, bitmap live) else { rtx next = XEXP (link, 1); -#ifdef REG_DEAD_DEBUGGING - df_print_note ("deleting: ", insn, link); -#endif + if (REG_DEAD_DEBUGGING) + df_print_note ("deleting: ", insn, link); free_EXPR_LIST_node (link); *pprev = link = next; } @@ -2791,9 +2788,8 @@ df_kill_notes (rtx insn, bitmap live) else { rtx next = XEXP (link, 1); -#ifdef REG_DEAD_DEBUGGING - df_print_note ("deleting: ", insn, link); -#endif + if (REG_DEAD_DEBUGGING) + df_print_note ("deleting: ", insn, link); free_EXPR_LIST_node (link); *pprev = link = next; } @@ -2825,9 +2821,8 @@ df_kill_notes (rtx insn, bitmap live) if (deleted) { rtx next; -#ifdef REG_DEAD_DEBUGGING - df_print_note ("deleting: ", insn, link); -#endif + if (REG_DEAD_DEBUGGING) + df_print_note ("deleting: ", insn, link); next = XEXP (link, 1); free_EXPR_LIST_node (link); *pprev = link = next; @@ -2900,11 +2895,9 @@ df_set_unused_notes_for_mw (rtx insn, struct df_mw_hardreg *mws, { unsigned int r; -#ifdef REG_DEAD_DEBUGGING - if (dump_file) + if (REG_DEAD_DEBUGGING && dump_file) fprintf (dump_file, "mw_set_unused looking at mws[%d..%d]\n", mws->start_regno, mws->end_regno); -#endif if (df_whole_mw_reg_unused_p (mws, live, artificial_uses)) { @@ -2912,9 +2905,9 @@ df_set_unused_notes_for_mw (rtx insn, struct df_mw_hardreg *mws, df_set_note (REG_UNUSED, insn, mws->mw_reg); dead_debug_insert_temp (debug, regno, insn, DEBUG_TEMP_AFTER_WITH_REG); -#ifdef REG_DEAD_DEBUGGING - df_print_note ("adding 1: ", insn, REG_NOTES (insn)); -#endif + if (REG_DEAD_DEBUGGING) + df_print_note ("adding 1: ", insn, REG_NOTES (insn)); + bitmap_set_bit (do_not_gen, regno); /* Only do this if the value is totally dead. */ } @@ -2926,9 +2919,8 @@ df_set_unused_notes_for_mw (rtx insn, struct df_mw_hardreg *mws, { df_set_note (REG_UNUSED, insn, regno_reg_rtx[r]); dead_debug_insert_temp (debug, r, insn, DEBUG_TEMP_AFTER_WITH_REG); -#ifdef REG_DEAD_DEBUGGING - df_print_note ("adding 2: ", insn, REG_NOTES (insn)); -#endif + if (REG_DEAD_DEBUGGING) + df_print_note ("adding 2: ", insn, REG_NOTES (insn)); } bitmap_set_bit (do_not_gen, r); } @@ -2978,8 +2970,7 @@ df_set_dead_notes_for_mw (rtx insn, struct df_mw_hardreg *mws, *added_notes_p = false; -#ifdef REG_DEAD_DEBUGGING - if (dump_file) + if (REG_DEAD_DEBUGGING && dump_file) { fprintf (dump_file, "mw_set_dead looking at mws[%d..%d]\n do_not_gen =", mws->start_regno, mws->end_regno); @@ -2989,7 +2980,6 @@ df_set_dead_notes_for_mw (rtx insn, struct df_mw_hardreg *mws, fprintf (dump_file, " artificial uses ="); df_print_regset (dump_file, artificial_uses); } -#endif if (df_whole_mw_reg_dead_p (mws, live, artificial_uses, do_not_gen)) { @@ -3000,9 +2990,8 @@ df_set_dead_notes_for_mw (rtx insn, struct df_mw_hardreg *mws, } /* Add a dead note for the entire multi word register. */ df_set_note (REG_DEAD, insn, mws->mw_reg); -#ifdef REG_DEAD_DEBUGGING - df_print_note ("adding 1: ", insn, REG_NOTES (insn)); -#endif + if (REG_DEAD_DEBUGGING) + df_print_note ("adding 1: ", insn, REG_NOTES (insn)); } else { @@ -3017,9 +3006,8 @@ df_set_dead_notes_for_mw (rtx insn, struct df_mw_hardreg *mws, return; } df_set_note (REG_DEAD, insn, regno_reg_rtx[r]); -#ifdef REG_DEAD_DEBUGGING - df_print_note ("adding 2: ", insn, REG_NOTES (insn)); -#endif + if (REG_DEAD_DEBUGGING) + df_print_note ("adding 2: ", insn, REG_NOTES (insn)); } } return; @@ -3036,13 +3024,11 @@ df_create_unused_note (rtx insn, df_ref def, { unsigned int dregno = DF_REF_REGNO (def); -#ifdef REG_DEAD_DEBUGGING - if (dump_file) + if (REG_DEAD_DEBUGGING && dump_file) { fprintf (dump_file, " regular looking at def "); df_ref_debug (def, dump_file); } -#endif if (!((DF_REF_FLAGS (def) & DF_REF_MW_HARDREG) || bitmap_bit_p (live, dregno) @@ -3053,9 +3039,8 @@ df_create_unused_note (rtx insn, df_ref def, ? *DF_REF_REAL_LOC (def): DF_REF_REG (def); df_set_note (REG_UNUSED, insn, reg); dead_debug_insert_temp (debug, dregno, insn, DEBUG_TEMP_AFTER_WITH_REG); -#ifdef REG_DEAD_DEBUGGING - df_print_note ("adding 3: ", insn, REG_NOTES (insn)); -#endif + if (REG_DEAD_DEBUGGING) + df_print_note ("adding 3: ", insn, REG_NOTES (insn)); } return; @@ -3387,23 +3372,20 @@ df_note_bb_compute (unsigned int bb_index, bitmap_copy (live, df_get_live_out (bb)); bitmap_clear (artificial_uses); -#ifdef REG_DEAD_DEBUGGING - if (dump_file) + if (REG_DEAD_DEBUGGING && dump_file) { fprintf (dump_file, "live at bottom "); df_print_regset (dump_file, live); } -#endif /* Process the artificial defs and uses at the bottom of the block to begin processing. */ for (def_rec = df_get_artificial_defs (bb_index); *def_rec; def_rec++) { df_ref def = *def_rec; -#ifdef REG_DEAD_DEBUGGING - if (dump_file) + + if (REG_DEAD_DEBUGGING && dump_file) fprintf (dump_file, "artificial def %d\n", DF_REF_REGNO (def)); -#endif if ((DF_REF_FLAGS (def) & DF_REF_AT_TOP) == 0) bitmap_clear_bit (live, DF_REF_REGNO (def)); @@ -3423,13 +3405,11 @@ df_note_bb_compute (unsigned int bb_index, } } -#ifdef REG_DEAD_DEBUGGING - if (dump_file) + if (REG_DEAD_DEBUGGING && dump_file) { fprintf (dump_file, "live before artificials out "); df_print_regset (dump_file, live); } -#endif FOR_BB_INSNS_REVERSE (bb, insn) { @@ -3448,13 +3428,12 @@ df_note_bb_compute (unsigned int bb_index, /* Process the defs. */ if (CALL_P (insn)) { -#ifdef REG_DEAD_DEBUGGING - if (dump_file) + if (REG_DEAD_DEBUGGING && dump_file) { fprintf (dump_file, "processing call %d\n live =", INSN_UID (insn)); df_print_regset (dump_file, live); } -#endif + /* We only care about real sets for calls. Clobbers cannot be depended on to really die. */ mws_rec = DF_INSN_UID_MWS (uid); @@ -3541,13 +3520,12 @@ df_note_bb_compute (unsigned int bb_index, df_ref use = *use_rec; unsigned int uregno = DF_REF_REGNO (use); -#ifdef REG_DEAD_DEBUGGING - if (dump_file && !debug_insn) + if (REG_DEAD_DEBUGGING && dump_file && !debug_insn) { fprintf (dump_file, " regular looking at use "); df_ref_debug (use, dump_file); } -#endif + if (!bitmap_bit_p (live, uregno)) { if (debug_insn) @@ -3578,9 +3556,8 @@ df_note_bb_compute (unsigned int bb_index, ? *DF_REF_REAL_LOC (use) : DF_REF_REG (use); df_set_note (REG_DEAD, insn, reg); -#ifdef REG_DEAD_DEBUGGING - df_print_note ("adding 4: ", insn, REG_NOTES (insn)); -#endif + if (REG_DEAD_DEBUGGING) + df_print_note ("adding 4: ", insn, REG_NOTES (insn)); } /* This register is now live. */ bitmap_set_bit (live, uregno); @@ -3612,11 +3589,6 @@ df_note_compute (bitmap all_blocks) bitmap_initialize (&do_not_gen, &df_bitmap_obstack); bitmap_initialize (&artificial_uses, &df_bitmap_obstack); -#ifdef REG_DEAD_DEBUGGING - if (dump_file) - print_rtl_with_bb (dump_file, get_insns()); -#endif - EXECUTE_IF_SET_IN_BITMAP (all_blocks, 0, bb_index, bi) { df_note_bb_compute (bb_index, &live, &do_not_gen, &artificial_uses); |