gcc/gcc/timevar.def

313 lines
16 KiB
Modula-2
Raw Normal View History

Makefile.in (OBJS): Add timevar.o. hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496
2000-04-28 02:59:40 +02:00
/* This file contains the definitions for timing variables used to
measure run-time performance of the compiler.
Copyright (C) 2000-2017 Free Software Foundation, Inc.
Makefile.in (OBJS): Add timevar.o. hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496
2000-04-28 02:59:40 +02:00
Contributed by Alex Samuel <samuel@codesourcery.com>
Makefile.in, [...]: replace "GNU CC" with "GCC". * Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". From-SVN: r45105
2001-08-22 16:35:51 +02:00
This file is part of GCC.
Makefile.in (OBJS): Add timevar.o. hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496
2000-04-28 02:59:40 +02:00
Makefile.in, [...]: replace "GNU CC" with "GCC". * Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". From-SVN: r45105
2001-08-22 16:35:51 +02:00
GCC is free software; you can redistribute it and/or modify
Makefile.in (OBJS): Add timevar.o. hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496
2000-04-28 02:59:40 +02:00
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
Makefile.in (OBJS): Add timevar.o. hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496
2000-04-28 02:59:40 +02:00
any later version.
Makefile.in, [...]: replace "GNU CC" with "GCC". * Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". From-SVN: r45105
2001-08-22 16:35:51 +02:00
GCC is distributed in the hope that it will be useful,
Makefile.in (OBJS): Add timevar.o. hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496
2000-04-28 02:59:40 +02:00
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
Makefile.in (OBJS): Add timevar.o. hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496
2000-04-28 02:59:40 +02:00
/* This file contains timing variable definitions, used by timevar.h
and timevar.c.
Syntax:
DEFTIMEVAR (id, name)
where ID is the enumeral value used to identify the timing
variable, and NAME is a character string describing its purpose. */
/* The total execution time. */
DEFTIMEVAR (TV_TOTAL , "total time")
Merge debug-early branch into mainline. * dwarf2out.c: Remove deferred_locations*. (dwarf2_debug_hooks): Add early_finish hook. Remove global_decl hook. Add early_global_decl and late_global_decl hook. New global early_dwarf. New structure set_early_dwarf. (output_die): Indicate whether a DIE was generated early when generating assembly with -dA. (struct limbo_die_struct): Document created_for field. Remove file_table_last_lookup. (remove_AT): Return TRUE if successful. (remove_child_TAG): Clear die_parent. (reparent_child): New function abstracted from... (splice_child_die): ...here. (new_die): ICE if a DIE ends up in limbo too late. (check_die): New. (defer_location): Remove. (add_subscript_info): Reuse DW_TAG_subrange_type if available. (fill_variable_array_bounds): New. (decl_start_label): Call fill_variable_array_bounds. (gen_formal_parameter_die): Rewrite to reuse previously generated DIEs. (gen_subprogram_die): Same. (gen_variable_die): Same. (gen_const_die): Same. (gen_label_die): Same. (gen_lexical_block_die): Same. (decl_will_get_specification_p): New. (local_function_static): New. (gen_struct_or_union_type_die): Fill in variable-length fields. (gen_typedef_die): Fill in variable-length typedefs. (gen_tagged_type_die): Gracefully return on error_mark_node. Handle re-entrancy. (gen_type_die_with_usage): Handle variable-length types. Remove duplicate code for ARRAY_TYPE case. (process_scope_var): Only process imported modules during early dwarf. (dwarf2out_early_global_decl): New. (dwarf2out_late_global_decl): Rename from dwarf2out_global_decl. (dwarf2out_type_decl): Set early_dwarf while calling dwarf2out_decl. (dwarf2out_decl): Verify that we did not recreate a previously generated DIE. Do not return on DECL_EXTERNALs in VAR_DECLs. Abstract some code to local_function_static. (lookup_filename): Remove use of file_table_last_lookup. Gracefully exit on missing file_name. (dwarf2out_finish): Verify limbo list. Remove deferred_locations_list use. Move deferred_asm_name and limbo flushing to... (dwarf2out_early_finish): ...here. New. (dwarf2out_c_finalize): Remove set of deferred_location_list, deferred_asm_name, and file_table_last_lookup. * cgraph.h (referred_to_p): Add default argument. * cgraphunit.c (referred_to_p): Add and handle include_self argument. (analyze_functions): Add first_time argument. Call check_global_declaration for all symbols. Call late_global_decl for nodes for moribund nodes. (finalize_compilation_unit): Add new argument to analyze_functions. Call early_global_decl for functions. Call early_finish debug hook. * dbxout.c (dbxout_early_global_decl): New. (dbxout_late_global_decl): New. Adapted from dbxout_global_decl. (dbx_debug_hooks): Add new hooks. (xcoff_debug_hooks): Same. * debug.c (do_nothing_debug_hooks): Add early_finish field. Add early and late debug hooks. Remove global_decl hook. * debug.h (struct gcc_debug_hooks): Add early_finish, early_global_decl, and late_global_decl fields. Remove global_decl field. Document gcc_debug_hooks. * gengtype.c (output_typename): Remove. * godump.c (go_early_global_decl): New. (go_late_global_decl): New. (go_global_decl): Remove. (dump_go_spec_init): Remove global_decl. Add {early,late}_global_decl. * langhooks-def.h (LANG_HOOKS_WRITE_GLOBALS): Remove. (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New. * langhooks.c (lhd_warn_unused_global_decl): Adjust comment. (write_global_declarations): Remove. (global_decl_processing): New. * langhooks.h (struct lang_hooks_for_decls): Remove final_write_globals field. Add post_compilation_parsing_cleanups field. * passes.c (rest_of_decl_compilation): Call early_global_decl. * sdbout.c: Add early and late_global_decl hooks. Remove sdbout_global_decl hook. Add early_finish field for sdb_debug_hooks. (sdbout_global_decl): Remove. (sdbout_early_global_decl): New. (sdbout_late_global_decl): New. * timevar.def (TV_PHASE_LATE_PARSING_CLEANUPS): New. * toplev.c (check_global_declaration): Rename from check_global_declaration_1. Adapt to use symtab infrastructure. (check_global_declarations): Remove. (emit_debug_global_declarations): Remove. (compile_file): Remove call to final_write_globals langhook. Run the actual compilation process. Perform any post compilation parser cleanups. Generate late debug info. * toplev.h (check_global_declaration): New. (check_global_declaration_1): Remove. (check_global_declarations): Remove. (write_global_declarations): Remove. (emit_debug_global_declarations): Remove. (global_decl_processing): New. * tree-core.h (struct tree_block): Add DIE field. * tree.h (BLOCK_DIE): New. * vmsdbgout.c (vmsdbgout_global_decl): Remove function and its use throughout. (vmsdbgout_early_global_decl): New. (vmsdbgout_late_global_decl): New. Add early_finish debug hook field to vmsdbg_debug_hooks. Remove vmsdbgout_decl to vmsdbgout_function_decl. Add early and late_global_decl debug hooks. From-SVN: r224161
2015-06-05 20:44:53 +02:00
/* The compiler phases.
These must be mutually exclusive, and the NAME field must begin
with "phase".
Also, their sum must be within a millionth of the total time (see
validate_phases). */
Upgrade the utility of timevars. Index: gcc/ChangeLog 2011-04-27 Lawrence Crowl <crowl@google.com> * timevar.h (timevar_cond_start): Remove unused POP_TIMEVAR_AND_RETURN. (timevar_cond_start): New for starting a timer only when it is not already running. (timevar_cond_stop): New for stopping a timer when it was not already running. * timevar.c (timevar_stop): Enable start/stop timers to start again. (timevar_cond_start): New as above. (timevar_cond_stop): New as above. * timevar.def: Add start/stop timers for compiler phases, TV_PHASE_SETUP, TV_PHASE_PARSING, TV_PHASE_DEFERRED, TV_PHASE_CGRAPH, TV_PHASE_DBGINFO (C), TV_PHASE_CHECK_DBGINFO (C++), TV_PHASE_GENERATE, and TV_PHASE_FINALIZE. Change push/pop timer TV_PARSE to TV_PARSE_GLOBAL. Add push/pop timers TV_PARSE_STRUCT, TV_PARSE_ENUM, TV_PARSE_FUNC, TV_PARSE_INLINE, TV_PARSE_INMETH, TV_TEMPLATE_INST. Change push/pop timer TV_NAME_LOOKUP into a start/stop timer. Make unused TV_OVERLOAD into a start/stop timer. Remove unused timers TV_OVERLOAD, TV_TEMPLATE_INSTANTIATION. Mark the strings for TV_NAME_LOOKUP and TV_OVERLOAD with a "|" to indicate that they are start/stop timers. * toplev.c (compile_file): Change TV_PARSE to TV_PARSE_GLOBAL. Add start/stop timers TV_PHASE_PARSING and TV_PHASE_GENERATE. Move initialization to do_compile. (do_compile): Add initialization from above. Add start/stop timers TV_PHASE_SETUP and TV_PHASE_FINALIZE. * c-decl.c (c_write_global_declarations): Add start/stop of TV_PHASE_DEFERRED, TV_PHASE_CGRAPH, TV_PHASE_DBGINFO. * c-parser.c (c_parser_declaration_or_fndef): Push/pop TV_PARSE_FUNC or TV_PARSE_INLINE, as appropriate. (c_parser_enum_specifier): Push/pop TV_PARSE_ENUM. (c_parser_struct_or_union_specifier): Push/pop TV_PARSE_STRUCT. Index: gcc/cp/ChangeLog 2011-04-27 Lawrence Crowl <crowl@google.com> * decl.c: (push_local_name): Change TV_NAME_LOOKUP to start/stop. (poplevel): Refactor POP_TIMEVAR_AND_RETURN to plain code. Change TV_NAME_LOOKUP to start/stop. (define_label): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start/stop. (xref_tag): Likewise. (lookup_label): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start_cond/stop_cond. * pt.c: (instantiate_class_template): Add a wrapper to push/pop new TV_TEMPLATE_INST. (instantiate_template): Add a wrapper to push/pop new TV_TEMPLATE_INST. (lookup_template_class): Refactor timevar calls out to a wrapper function. Change use of TV_NAME_LOOKUP to TV_TEMPLATE_INST. (instantiate_decl): Change TV_PARSE to TV_TEMPLATE_INST. * name-lookup.c: (store_bindings): Change TV_NAME_LOOKUP to start/stop. (poplevel_class): Change TV_NAME_LOOKUP to start_cond/stop_cond. (push_namespace): Likewise. (pop_nested_namespace): Likewise. (pushdecl_namespace_level): Likewise. (store_class_bindings): Likewise. (push_to_top_level): Likewise. (identifier_type_value): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start/stop. (find_binding): Likewise. (push_using_decl): Likewise. (lookup_arg_dependent): Likewise. (push_using_directive): Likewise. (qualified_lookup_using_namespace): Refactor POP_TIMEVAR_AND_RETURN to plain code. Change TV_NAME_LOOKUP to start/stop. (lookup_type_current_level): Likewise. Refactor inner return to break. (pushdecl_class_level): Refactor POP_TIMEVAR_AND_RETURN to plain code. Change TV_NAME_LOOKUP to start_cond/stop_cond. (pushdecl_top_level_1): Likewise. (lookup_using_namespace): Likewise. (pushdecl_with_scope): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start_cond/stop_cond. (push_overloaded_decl): Likewise. (push_class_level_binding): Likewise. (namespace_binding): Likewise. (set_namespace_binding): Likewise. (supplement_binding): Likewise. (unqualified_namespace_lookup): Likewise. (lookup_name_real): Likewise. (lookup_type_scope): Likewise. (namespace_ancestor): Likewise. (lookup_name_innermost_nonclass_level): Likewise. (pushtag): Likewise. (pop_from_top_level): Likewise. (pushdecl_maybe_friend): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start_cond/stop_cond. Wrap long lines. (add_using_namespace): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start_cond/stop_cond. Bypass wrapper on call to self. * decl2.c: (cp_write_global_declarations): Add start/stop of new TV_PHASE_DEFERRED, TV_PHASE_CGRAPH, TV_PHASE_CHECK_DBGINFO. Remove push/pop calls to TV_VARCONST. * parser.c: Add include of "timevar.h". (cp_parser_explicit_instantiation): Add push/pop calls to TV_TEMPLATE_INST. (cp_parser_enum_specifier): Add push/pop calls to new TV_PARSE_ENUM. (cp_parser_class_specifier): Add wrapper to add push/pop calls to TV_PARSE_STRUCT. (cp_parser_function_definition_from_specifiers_and_declarator): Add push/pop calls to new TV_PARSE_FUNC or TV_PARSE_INLINE. (cp_parser_late_parsing_for_member): Add push/pop calls to new TV_PARSE_INMETH. * call.c: Add include of "timevar.h". (convert_class_to_reference): Wrap and add push/pop calls to TV_OVERLOAD. (build_op_call): Likewise. (build_conditional_expr): Likewise. (build_new_op): Likewise. (build_new_method_call): Likewise. (build_user_type_conversion): Reorganize to single return and add push/pop calls to TV_OVERLOAD. (perform_overload_resolution): Likewise. * Make-lang.in: Add dependence of call.o and parser.o on $(TIMEVAR_H). From-SVN: r173277
2011-05-03 00:19:48 +02:00
DEFTIMEVAR (TV_PHASE_SETUP , "phase setup")
DEFTIMEVAR (TV_PHASE_PARSING , "phase parsing")
DEFTIMEVAR (TV_PHASE_DEFERRED , "phase lang. deferred")
Merge debug-early branch into mainline. * dwarf2out.c: Remove deferred_locations*. (dwarf2_debug_hooks): Add early_finish hook. Remove global_decl hook. Add early_global_decl and late_global_decl hook. New global early_dwarf. New structure set_early_dwarf. (output_die): Indicate whether a DIE was generated early when generating assembly with -dA. (struct limbo_die_struct): Document created_for field. Remove file_table_last_lookup. (remove_AT): Return TRUE if successful. (remove_child_TAG): Clear die_parent. (reparent_child): New function abstracted from... (splice_child_die): ...here. (new_die): ICE if a DIE ends up in limbo too late. (check_die): New. (defer_location): Remove. (add_subscript_info): Reuse DW_TAG_subrange_type if available. (fill_variable_array_bounds): New. (decl_start_label): Call fill_variable_array_bounds. (gen_formal_parameter_die): Rewrite to reuse previously generated DIEs. (gen_subprogram_die): Same. (gen_variable_die): Same. (gen_const_die): Same. (gen_label_die): Same. (gen_lexical_block_die): Same. (decl_will_get_specification_p): New. (local_function_static): New. (gen_struct_or_union_type_die): Fill in variable-length fields. (gen_typedef_die): Fill in variable-length typedefs. (gen_tagged_type_die): Gracefully return on error_mark_node. Handle re-entrancy. (gen_type_die_with_usage): Handle variable-length types. Remove duplicate code for ARRAY_TYPE case. (process_scope_var): Only process imported modules during early dwarf. (dwarf2out_early_global_decl): New. (dwarf2out_late_global_decl): Rename from dwarf2out_global_decl. (dwarf2out_type_decl): Set early_dwarf while calling dwarf2out_decl. (dwarf2out_decl): Verify that we did not recreate a previously generated DIE. Do not return on DECL_EXTERNALs in VAR_DECLs. Abstract some code to local_function_static. (lookup_filename): Remove use of file_table_last_lookup. Gracefully exit on missing file_name. (dwarf2out_finish): Verify limbo list. Remove deferred_locations_list use. Move deferred_asm_name and limbo flushing to... (dwarf2out_early_finish): ...here. New. (dwarf2out_c_finalize): Remove set of deferred_location_list, deferred_asm_name, and file_table_last_lookup. * cgraph.h (referred_to_p): Add default argument. * cgraphunit.c (referred_to_p): Add and handle include_self argument. (analyze_functions): Add first_time argument. Call check_global_declaration for all symbols. Call late_global_decl for nodes for moribund nodes. (finalize_compilation_unit): Add new argument to analyze_functions. Call early_global_decl for functions. Call early_finish debug hook. * dbxout.c (dbxout_early_global_decl): New. (dbxout_late_global_decl): New. Adapted from dbxout_global_decl. (dbx_debug_hooks): Add new hooks. (xcoff_debug_hooks): Same. * debug.c (do_nothing_debug_hooks): Add early_finish field. Add early and late debug hooks. Remove global_decl hook. * debug.h (struct gcc_debug_hooks): Add early_finish, early_global_decl, and late_global_decl fields. Remove global_decl field. Document gcc_debug_hooks. * gengtype.c (output_typename): Remove. * godump.c (go_early_global_decl): New. (go_late_global_decl): New. (go_global_decl): Remove. (dump_go_spec_init): Remove global_decl. Add {early,late}_global_decl. * langhooks-def.h (LANG_HOOKS_WRITE_GLOBALS): Remove. (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New. * langhooks.c (lhd_warn_unused_global_decl): Adjust comment. (write_global_declarations): Remove. (global_decl_processing): New. * langhooks.h (struct lang_hooks_for_decls): Remove final_write_globals field. Add post_compilation_parsing_cleanups field. * passes.c (rest_of_decl_compilation): Call early_global_decl. * sdbout.c: Add early and late_global_decl hooks. Remove sdbout_global_decl hook. Add early_finish field for sdb_debug_hooks. (sdbout_global_decl): Remove. (sdbout_early_global_decl): New. (sdbout_late_global_decl): New. * timevar.def (TV_PHASE_LATE_PARSING_CLEANUPS): New. * toplev.c (check_global_declaration): Rename from check_global_declaration_1. Adapt to use symtab infrastructure. (check_global_declarations): Remove. (emit_debug_global_declarations): Remove. (compile_file): Remove call to final_write_globals langhook. Run the actual compilation process. Perform any post compilation parser cleanups. Generate late debug info. * toplev.h (check_global_declaration): New. (check_global_declaration_1): Remove. (check_global_declarations): Remove. (write_global_declarations): Remove. (emit_debug_global_declarations): Remove. (global_decl_processing): New. * tree-core.h (struct tree_block): Add DIE field. * tree.h (BLOCK_DIE): New. * vmsdbgout.c (vmsdbgout_global_decl): Remove function and its use throughout. (vmsdbgout_early_global_decl): New. (vmsdbgout_late_global_decl): New. Add early_finish debug hook field to vmsdbg_debug_hooks. Remove vmsdbgout_decl to vmsdbgout_function_decl. Add early and late_global_decl debug hooks. From-SVN: r224161
2015-06-05 20:44:53 +02:00
DEFTIMEVAR (TV_PHASE_LATE_PARSING_CLEANUPS, "phase late parsing cleanups")
The intent of the phases was to have a high-level but mutually exclusive accounting of compile time. The intent of the phases was to have a high-level but mutually exclusive accounting of compile time. We want to track compile time in a way that tells us which conceptual phases are taking the most time. That intent is not currently satisfied. This patch restores that intent. Add code to verify that the sum of the phase times is less than the total time, to detect when phases are overlapped. A slight amount of leeway is required due to time jitters. This verification is done as the last step in printing timevars so that any timevar information is not lost. Rename the phases to be clearer about what they measure, so that they are less likely to be modified to be overlapping. The primary example is to change TV_PHASE_GENERATE to TV_PHASE_LATE_ASM, meaning late work on the assembly. This name change avoids confusion n moving the timevar start call after the call to lang_hooks.decls.final_write_globals, which prevents overlapping phases. Each implementation of lang_hooks.decls.final_write_globals, is responsible for starting and stopping its own phases. Each implementation currently has a first phase of TV_PHASE_DEFERRED for front-end work deferred until after parsing is complete. The second phase has been renamed from TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN, to better reflect its use as the main optimization and generation phase. This phase accounts for 70%-80% of compilation time during bootstrap. The third phase is TV_PHASE_DBGINFO, except in cp/decl2.c, where it is TV_PHASE_CHECK_DBGINFO because cc1plus mixes checking in with debug info generation. In langhooks.c, write_global_declarations was using TV_PHASE_CHECK_DBGINFO, but it was doing no checking. So, it now uses TV_PHASE_DBGINFO. The changes to LTO are significant. First, initialization now uses TV_PHASE_SETUP. Reading files now uses TV_PHASE_STREAM_IN. Writing files now uses TV_PHASE_STREAM_OUT. The remaining phase is TV_PHASE_OPT_GEN (formerly TV_PHASE_CGRAPH). Finally, because LTO is treated as a front end, TV_PHASE_PARSING and TV_PARSE_GLOBAL active around it. It is not parsing, and so those timers should not be active. Rather than make all front ends manage them, we turn them off as the first thing in LTO and turn them back on as the last thing. Tested on x86_64. Index: gcc/ChangeLog 2012-06-18 Lawrence Crowl <crowl@google.com> * timevar.def (TV_PHASE_GENERATE): Rename to TV_PHASE_LATE_ASM. (TV_PHASE_CGRAPH): Rename to TV_PHASE_OPT_GEN. (TV_PHASE_STREAM_IN): New. (TV_PHASE_STREAM_OUT): New. * timevar.c (validate_phases): New. (timevar_print): Call validate_phases. * c-decl.c (c_write_global_declarations): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. * langhooks.c (write_global_declarations): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Use TV_PHASE_DBGINFO instead of TV_PHASE_CHECK_DBGINFO. * toplev.c (compile_file): Rename use of TV_PHASE_GENERATE to TV_PHASE_LATE_ASM. Move start of TV_PHASE_LATE_ASM to after call to lang_hooks.decls.final_write_globals. Index: gcc/cp/ChangeLog 2012-06-18 Lawrence Crowl <crowl@google.com> * decl2.c (cp_write_global_declarations): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Index: gcc/lto/ChangeLog 2012-06-18 Lawrence Crowl <crowl@google.com> * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call to lto_wpa_write_files. (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use TV_PHASE_SETUP for the call to lto_init. Use new timevar TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols. Turn TV_PHASE_PARSING off then back on again, because LTO is pretending to be a front end, but is not one. From-SVN: r188765
2012-06-19 03:30:31 +02:00
DEFTIMEVAR (TV_PHASE_OPT_GEN , "phase opt and generate")
DEFTIMEVAR (TV_PHASE_LATE_ASM , "phase last asm")
DEFTIMEVAR (TV_PHASE_STREAM_IN , "phase stream in")
DEFTIMEVAR (TV_PHASE_STREAM_OUT , "phase stream out")
Upgrade the utility of timevars. Index: gcc/ChangeLog 2011-04-27 Lawrence Crowl <crowl@google.com> * timevar.h (timevar_cond_start): Remove unused POP_TIMEVAR_AND_RETURN. (timevar_cond_start): New for starting a timer only when it is not already running. (timevar_cond_stop): New for stopping a timer when it was not already running. * timevar.c (timevar_stop): Enable start/stop timers to start again. (timevar_cond_start): New as above. (timevar_cond_stop): New as above. * timevar.def: Add start/stop timers for compiler phases, TV_PHASE_SETUP, TV_PHASE_PARSING, TV_PHASE_DEFERRED, TV_PHASE_CGRAPH, TV_PHASE_DBGINFO (C), TV_PHASE_CHECK_DBGINFO (C++), TV_PHASE_GENERATE, and TV_PHASE_FINALIZE. Change push/pop timer TV_PARSE to TV_PARSE_GLOBAL. Add push/pop timers TV_PARSE_STRUCT, TV_PARSE_ENUM, TV_PARSE_FUNC, TV_PARSE_INLINE, TV_PARSE_INMETH, TV_TEMPLATE_INST. Change push/pop timer TV_NAME_LOOKUP into a start/stop timer. Make unused TV_OVERLOAD into a start/stop timer. Remove unused timers TV_OVERLOAD, TV_TEMPLATE_INSTANTIATION. Mark the strings for TV_NAME_LOOKUP and TV_OVERLOAD with a "|" to indicate that they are start/stop timers. * toplev.c (compile_file): Change TV_PARSE to TV_PARSE_GLOBAL. Add start/stop timers TV_PHASE_PARSING and TV_PHASE_GENERATE. Move initialization to do_compile. (do_compile): Add initialization from above. Add start/stop timers TV_PHASE_SETUP and TV_PHASE_FINALIZE. * c-decl.c (c_write_global_declarations): Add start/stop of TV_PHASE_DEFERRED, TV_PHASE_CGRAPH, TV_PHASE_DBGINFO. * c-parser.c (c_parser_declaration_or_fndef): Push/pop TV_PARSE_FUNC or TV_PARSE_INLINE, as appropriate. (c_parser_enum_specifier): Push/pop TV_PARSE_ENUM. (c_parser_struct_or_union_specifier): Push/pop TV_PARSE_STRUCT. Index: gcc/cp/ChangeLog 2011-04-27 Lawrence Crowl <crowl@google.com> * decl.c: (push_local_name): Change TV_NAME_LOOKUP to start/stop. (poplevel): Refactor POP_TIMEVAR_AND_RETURN to plain code. Change TV_NAME_LOOKUP to start/stop. (define_label): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start/stop. (xref_tag): Likewise. (lookup_label): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start_cond/stop_cond. * pt.c: (instantiate_class_template): Add a wrapper to push/pop new TV_TEMPLATE_INST. (instantiate_template): Add a wrapper to push/pop new TV_TEMPLATE_INST. (lookup_template_class): Refactor timevar calls out to a wrapper function. Change use of TV_NAME_LOOKUP to TV_TEMPLATE_INST. (instantiate_decl): Change TV_PARSE to TV_TEMPLATE_INST. * name-lookup.c: (store_bindings): Change TV_NAME_LOOKUP to start/stop. (poplevel_class): Change TV_NAME_LOOKUP to start_cond/stop_cond. (push_namespace): Likewise. (pop_nested_namespace): Likewise. (pushdecl_namespace_level): Likewise. (store_class_bindings): Likewise. (push_to_top_level): Likewise. (identifier_type_value): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start/stop. (find_binding): Likewise. (push_using_decl): Likewise. (lookup_arg_dependent): Likewise. (push_using_directive): Likewise. (qualified_lookup_using_namespace): Refactor POP_TIMEVAR_AND_RETURN to plain code. Change TV_NAME_LOOKUP to start/stop. (lookup_type_current_level): Likewise. Refactor inner return to break. (pushdecl_class_level): Refactor POP_TIMEVAR_AND_RETURN to plain code. Change TV_NAME_LOOKUP to start_cond/stop_cond. (pushdecl_top_level_1): Likewise. (lookup_using_namespace): Likewise. (pushdecl_with_scope): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start_cond/stop_cond. (push_overloaded_decl): Likewise. (push_class_level_binding): Likewise. (namespace_binding): Likewise. (set_namespace_binding): Likewise. (supplement_binding): Likewise. (unqualified_namespace_lookup): Likewise. (lookup_name_real): Likewise. (lookup_type_scope): Likewise. (namespace_ancestor): Likewise. (lookup_name_innermost_nonclass_level): Likewise. (pushtag): Likewise. (pop_from_top_level): Likewise. (pushdecl_maybe_friend): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start_cond/stop_cond. Wrap long lines. (add_using_namespace): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start_cond/stop_cond. Bypass wrapper on call to self. * decl2.c: (cp_write_global_declarations): Add start/stop of new TV_PHASE_DEFERRED, TV_PHASE_CGRAPH, TV_PHASE_CHECK_DBGINFO. Remove push/pop calls to TV_VARCONST. * parser.c: Add include of "timevar.h". (cp_parser_explicit_instantiation): Add push/pop calls to TV_TEMPLATE_INST. (cp_parser_enum_specifier): Add push/pop calls to new TV_PARSE_ENUM. (cp_parser_class_specifier): Add wrapper to add push/pop calls to TV_PARSE_STRUCT. (cp_parser_function_definition_from_specifiers_and_declarator): Add push/pop calls to new TV_PARSE_FUNC or TV_PARSE_INLINE. (cp_parser_late_parsing_for_member): Add push/pop calls to new TV_PARSE_INMETH. * call.c: Add include of "timevar.h". (convert_class_to_reference): Wrap and add push/pop calls to TV_OVERLOAD. (build_op_call): Likewise. (build_conditional_expr): Likewise. (build_new_op): Likewise. (build_new_method_call): Likewise. (build_user_type_conversion): Reorganize to single return and add push/pop calls to TV_OVERLOAD. (perform_overload_resolution): Likewise. * Make-lang.in: Add dependence of call.o and parser.o on $(TIMEVAR_H). From-SVN: r173277
2011-05-03 00:19:48 +02:00
DEFTIMEVAR (TV_PHASE_FINALIZE , "phase finalize")
/* Concurrent timers, indicated by "|". */
DEFTIMEVAR (TV_NAME_LOOKUP , "|name lookup")
DEFTIMEVAR (TV_OVERLOAD , "|overload resolution")
Makefile.in (OBJS): Add timevar.o. hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496
2000-04-28 02:59:40 +02:00
/* Time spent garbage-collecting. */
DEFTIMEVAR (TV_GC , "garbage collection")
/* Time spent generating dump files. */
DEFTIMEVAR (TV_DUMP , "dump files")
/* Time spent saving/restoring PCH state. */
DEFTIMEVAR (TV_PCH_SAVE , "PCH main state save")
DEFTIMEVAR (TV_PCH_CPP_SAVE , "PCH preprocessor state save")
DEFTIMEVAR (TV_PCH_PTR_REALLOC , "PCH pointer reallocation")
DEFTIMEVAR (TV_PCH_PTR_SORT , "PCH pointer sort")
DEFTIMEVAR (TV_PCH_RESTORE , "PCH main state restore")
DEFTIMEVAR (TV_PCH_CPP_RESTORE , "PCH preprocessor state restore")
DEFTIMEVAR (TV_CGRAPH , "callgraph construction")
DEFTIMEVAR (TV_CGRAPHOPT , "callgraph optimization")
DEFTIMEVAR (TV_IPA_UNREACHABLE , "ipa dead code removal")
DEFTIMEVAR (TV_IPA_INHERITANCE , "ipa inheritance graph")
DEFTIMEVAR (TV_IPA_VIRTUAL_CALL , "ipa virtual call target")
DEFTIMEVAR (TV_IPA_DEVIRT , "ipa devirtualization")
DEFTIMEVAR (TV_IPA_CONSTANT_PROP , "ipa cp")
DEFTIMEVAR (TV_IPA_INLINING , "ipa inlining heuristics")
DEFTIMEVAR (TV_IPA_FNSPLIT , "ipa function splitting")
DEFTIMEVAR (TV_IPA_COMDATS , "ipa comdats")
DEFTIMEVAR (TV_IPA_OPT , "ipa various optimizations")
DEFTIMEVAR (TV_IPA_LTO_DECOMPRESS , "lto stream inflate")
DEFTIMEVAR (TV_IPA_LTO_COMPRESS , "lto stream deflate")
DEFTIMEVAR (TV_IPA_LTO_OUTPUT , "lto stream output")
DEFTIMEVAR (TV_IPA_LTO_GIMPLE_IN , "ipa lto gimple in")
DEFTIMEVAR (TV_IPA_LTO_GIMPLE_OUT , "ipa lto gimple out")
DEFTIMEVAR (TV_IPA_LTO_DECL_IN , "ipa lto decl in")
DEFTIMEVAR (TV_IPA_LTO_DECL_OUT , "ipa lto decl out")
DEFTIMEVAR (TV_IPA_LTO_CTORS_IN , "ipa lto constructors in")
DEFTIMEVAR (TV_IPA_LTO_CTORS_OUT , "ipa lto constructors out")
DEFTIMEVAR (TV_IPA_LTO_CGRAPH_IO , "ipa lto cgraph I/O")
DEFTIMEVAR (TV_IPA_LTO_DECL_MERGE , "ipa lto decl merge")
DEFTIMEVAR (TV_IPA_LTO_CGRAPH_MERGE , "ipa lto cgraph merge")
DEFTIMEVAR (TV_LTO , "lto")
DEFTIMEVAR (TV_WHOPR_WPA , "whopr wpa")
DEFTIMEVAR (TV_WHOPR_WPA_IO , "whopr wpa I/O")
DEFTIMEVAR (TV_WHOPR_PARTITIONING , "whopr partitioning")
DEFTIMEVAR (TV_WHOPR_LTRANS , "whopr ltrans")
Makefile.in: Added rules for ipa-pure-const.c... 2005-07-16 Danny Berlin <dberlin@dberlin.org> Kenneth Zadeck <zadeck@naturalbridge.com> * Makefile.in: Added rules for ipa-pure-const.c, ipa-reference.c, ipa-reference.h, ipa-utils.c, ipa-utils.h, ipa-type-escape.c, ipa-type-escape.h, tree-promote-statics.c * ipa-pure-const.c, ipa-reference.c, ipa-reference.h, ipa-utils.c, ipa-utils.h, ipa-type-escape.c, ipa-type-escape.h, tree-promote-statics.c: new files. * alias.c: (nonlocal_mentioned_p_1, nonlocal_mentioned_p, nonlocal_referenced_p_1, nonlocal_referenced_p, nonlocal_set_p_1, int nonlocal_set_p, mark_constant_function): Deleted. (rest_of_handle_cfg): Removed call to mark_constant_function. (nonoverlapping_component_refs_p): Added calls to support type based aliasing. * tree-ssa-alias.c (may_alias_p, compute_flow_insensitive_aliasing): Ditto. * calls.c (flags_from_decl_or_type): Removed reference to cgraph_rtl_info. (flags_from_decl_or_type): Support ECF_POINTER_NO_CAPTURE attribute. * c-common.c (handle_pointer_no_capture_attribute): New function and added pointer_no_capture attribute. * c-typeck.c (convert_arguments): Make builtins tolerant of having too many arguments. This is necessary for Spec 2000. * cgraph.h (const_function, pure_function): Removed. * common.opt: Added "fipa-pure-const", "fipa-reference", "fipa-type-escape", and "ftree-promote-static". * opts.c: Ditto. * passes.c: Added ipa and tree-promote-statics passes. * timevar.def: Added TV_IPA_PURE_CONST, TV_IPA_REFERENCE, TV_IPA_TYPE_ESCAPE, and TV_PROMOTE_STATICS. * tree.h: Support ECF_POINTER_NO_CAPTURE attribute. * tree-dfa.c (referenced_var_lookup_if_exists): New function. * tree-flow.h: Added exposed sra calls and addition of reference_vars_info field for FUNCTION_DECLS. * tree-pass.h: Added passes. * tree-sra.c: (sra_init_cache): New function. (sra_insert_before, sra_insert_after) Made public. (type_can_be_decomposed_p): Renamed from type_can_be_decomposed_p and made public. * tree-ssa-alias.c (dump_alias_stats): Added stats for type based aliasing. (may_alias_p): Added code to use type escape analysis to improve alias sets. * tree-ssa-operands.c (add_call_clobber_ops): Added parameter and code to prune clobbers of static variables based on information produced in ipa-reference pass. Changed call clobbering so that statics are not marked as clobbered if the call does not clobber them. 2005-07-16 Danny Berlin <dberlin@dberlin.org> Kenneth Zadeck <zadeck@naturalbridge.com> * gcc.dg/tree-ssa/ssa-dce-2.c: Changed dg-options to run at -O2 since pure const detection cannot run at -O1 in c compiler. * gcc.dg/tree-ssa/20030714-1.c Changed scanning patterns because we can now optimize this case properly. * gcc.dg/tree-ssa/sra-2.c: Changed to -O3 and removed xfail because we now pass. * gcc.dg/vect/vect-92.c: Removed out of bounds array access. Co-Authored-By: Kenneth Zadeck <zadeck@naturalbridge.com> From-SVN: r102098
2005-07-16 20:56:53 +02:00
DEFTIMEVAR (TV_IPA_REFERENCE , "ipa reference")
Merge of HSA 2016-01-19 Martin Jambor <mjambor@suse.cz> Martin Liska <mliska@suse.cz> Michael Matz <matz@suse.de> libgomp/ * plugin/Makefrag.am: Add HSA plugin requirements. * plugin/configfrag.ac (HSA_RUNTIME_INCLUDE): New variable. (HSA_RUNTIME_LIB): Likewise. (HSA_RUNTIME_CPPFLAGS): Likewise. (HSA_RUNTIME_INCLUDE): New substitution. (HSA_RUNTIME_LIB): Likewise. (HSA_RUNTIME_LDFLAGS): Likewise. (hsa-runtime): New configure option. (hsa-runtime-include): Likewise. (hsa-runtime-lib): Likewise. (PLUGIN_HSA): New substitution variable. Fill HSA_RUNTIME_INCLUDE and HSA_RUNTIME_LIB according to the new configure options. (PLUGIN_HSA_CPPFLAGS): Likewise. (PLUGIN_HSA_LDFLAGS): Likewise. (PLUGIN_HSA_LIBS): Likewise. Check that we have access to HSA run-time. * libgomp-plugin.h (offload_target_type): New element OFFLOAD_TARGET_TYPE_HSA. * libgomp.h (gomp_target_task): New fields firstprivate_copies and args. (bool gomp_create_target_task): Updated. (gomp_device_descr): Extra parameter of run_func and async_run_func, new field can_run_func. * libgomp_g.h (GOMP_target_ext): Update prototype. * oacc-host.c (host_run): Added a new parameter args. * target.c (calculate_firstprivate_requirements): New function. (copy_firstprivate_data): Likewise. (gomp_target_fallback_firstprivate): Use them. (gomp_target_unshare_firstprivate): New function. (gomp_get_target_fn_addr): Allow returning NULL for shared memory devices. (GOMP_target): Do host fallback for all shared memory devices. Do not pass any args to plugins. (GOMP_target_ext): Introduce device-specific argument parameter args. Allow host fallback if device shares memory. Do not remap data if device has shared memory. (gomp_target_task_fn): Likewise. Also treat shared memory devices like host fallback for mappings. (GOMP_target_data): Treat shared memory devices like host fallback. (GOMP_target_data_ext): Likewise. (GOMP_target_update): Likewise. (GOMP_target_update_ext): Likewise. Also pass NULL as args to gomp_create_target_task. (GOMP_target_enter_exit_data): Likewise. (omp_target_alloc): Treat shared memory devices like host fallback. (omp_target_free): Likewise. (omp_target_is_present): Likewise. (omp_target_memcpy): Likewise. (omp_target_memcpy_rect): Likewise. (omp_target_associate_ptr): Likewise. (gomp_load_plugin_for_device): Also load can_run. * task.c (GOMP_PLUGIN_target_task_completion): Free firstprivate_copies. (gomp_create_target_task): Accept new argument args and store it to ttask. * plugin/plugin-hsa.c: New file. gcc/ * Makefile.in (OBJS): Add new source files. (GTFILES): Add hsa.c. * common.opt (disable_hsa): New variable. (-Whsa): New warning. * config.in (ENABLE_HSA): New. * configure.ac: Treat hsa differently from other accelerators. (OFFLOAD_TARGETS): Define ENABLE_OFFLOADING according to $enable_offloading. (ENABLE_HSA): Define ENABLE_HSA according to $enable_hsa. * doc/install.texi (Configuration): Document --with-hsa-runtime, --with-hsa-runtime-include, --with-hsa-runtime-lib and --with-hsa-kmt-lib. * doc/invoke.texi (-Whsa): Document. (hsa-gen-debug-stores): Likewise. * lto-wrapper.c (compile_images_for_offload_targets): Do not attempt to invoke offload compiler for hsa acclerator. * opts.c (common_handle_option): Determine whether HSA offloading should be performed. * params.def (PARAM_HSA_GEN_DEBUG_STORES): New parameter. * builtin-types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New. (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed. (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New. * gimple-low.c (lower_stmt): Also handle GIMPLE_OMP_GRID_BODY. * gimple-pretty-print.c (dump_gimple_omp_for): Also handle GF_OMP_FOR_KIND_GRID_LOOP. (dump_gimple_omp_block): Also handle GIMPLE_OMP_GRID_BODY. (pp_gimple_stmt_1): Likewise. * gimple-walk.c (walk_gimple_stmt): Likewise. * gimple.c (gimple_build_omp_grid_body): New function. (gimple_copy): Also handle GIMPLE_OMP_GRID_BODY. * gimple.def (GIMPLE_OMP_GRID_BODY): New. * gimple.h (enum gf_mask): Added GF_OMP_PARALLEL_GRID_PHONY, GF_OMP_FOR_KIND_GRID_LOOP, GF_OMP_FOR_GRID_PHONY and GF_OMP_TEAMS_GRID_PHONY. (gimple_statement_omp_single_layout): Updated comments. (gimple_build_omp_grid_body): New function. (gimple_has_substatements): Also handle GIMPLE_OMP_GRID_BODY. (gimple_omp_for_grid_phony): New function. (gimple_omp_for_set_grid_phony): Likewise. (gimple_omp_parallel_grid_phony): Likewise. (gimple_omp_parallel_set_grid_phony): Likewise. (gimple_omp_teams_grid_phony): Likewise. (gimple_omp_teams_set_grid_phony): Likewise. (gimple_return_set_retbnd): Also handle GIMPLE_OMP_GRID_BODY. * omp-builtins.def (BUILT_IN_GOMP_OFFLOAD_REGISTER): New. (BUILT_IN_GOMP_OFFLOAD_UNREGISTER): Likewise. (BUILT_IN_GOMP_TARGET): Updated type. * omp-low.c: Include symbol-summary.h, hsa.h and params.h. (adjust_for_condition): New function. (get_omp_for_step_from_incr): Likewise. (extract_omp_for_data): Moved parts to adjust_for_condition and get_omp_for_step_from_incr. (build_outer_var_ref): Handle GIMPLE_OMP_GRID_BODY. (fixup_child_record_type): Bail out if receiver_decl is NULL. (scan_sharing_clauses): Handle OMP_CLAUSE__GRIDDIM_. (scan_omp_parallel): Do not create child functions for phony constructs. (check_omp_nesting_restrictions): Handle GIMPLE_OMP_GRID_BODY. (scan_omp_1_op): Checking assert we are not remapping to ERROR_MARK. Also also handle GIMPLE_OMP_GRID_BODY. (parallel_needs_hsa_kernel_p): New function. (expand_parallel_call): Register apprpriate parallel child functions as HSA kernels. (grid_launch_attributes_trees): New type. (grid_attr_trees): New variable. (grid_create_kernel_launch_attr_types): New function. (grid_insert_store_range_dim): Likewise. (grid_get_kernel_launch_attributes): Likewise. (get_target_argument_identifier_1): Likewise. (get_target_argument_identifier): Likewise. (get_target_argument_value): Likewise. (push_target_argument_according_to_value): Likewise. (get_target_arguments): Likewise. (expand_omp_target): Call get_target_arguments instead of looking up for teams and thread limit. (grid_expand_omp_for_loop): New function. (grid_arg_decl_map): New type. (grid_remap_kernel_arg_accesses): New function. (grid_expand_target_kernel_body): New function. (expand_omp): Call it. (lower_omp_for): Do not emit phony constructs. (lower_omp_taskreg): Do not emit phony constructs but create for them a temporary variable receiver_decl. (lower_omp_taskreg): Do not emit phony constructs. (lower_omp_teams): Likewise. (lower_omp_grid_body): New function. (lower_omp_1): Call it. (grid_reg_assignment_to_local_var_p): New function. (grid_seq_only_contains_local_assignments): Likewise. (grid_find_single_omp_among_assignments_1): Likewise. (grid_find_single_omp_among_assignments): Likewise. (grid_find_ungridifiable_statement): Likewise. (grid_target_follows_gridifiable_pattern): Likewise. (grid_remap_prebody_decls): Likewise. (grid_copy_leading_local_assignments): Likewise. (grid_process_kernel_body_copy): Likewise. (grid_attempt_target_gridification): Likewise. (grid_gridify_all_targets_stmt): Likewise. (grid_gridify_all_targets): Likewise. (execute_lower_omp): Call grid_gridify_all_targets. (make_gimple_omp_edges): Handle GIMPLE_OMP_GRID_BODY. * tree-core.h (omp_clause_code): Added OMP_CLAUSE__GRIDDIM_. (tree_omp_clause): Added union field dimension. * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE__GRIDDIM_. * tree.c (omp_clause_num_ops): Added number of arguments of OMP_CLAUSE__GRIDDIM_. (omp_clause_code_name): Added name of OMP_CLAUSE__GRIDDIM_. (walk_tree_1): Handle OMP_CLAUSE__GRIDDIM_. * tree.h (OMP_CLAUSE_GRIDDIM_DIMENSION): New. (OMP_CLAUSE_SET_GRIDDIM_DIMENSION): Likewise. (OMP_CLAUSE_GRIDDIM_SIZE): Likewise. (OMP_CLAUSE_GRIDDIM_GROUP): Likewise. * passes.def: Schedule pass_ipa_hsa and pass_gen_hsail. * tree-pass.h (make_pass_gen_hsail): Declare. (make_pass_ipa_hsa): Likewise. * ipa-hsa.c: New file. * lto-section-in.c (lto_section_name): Add hsa section name. * lto-streamer.h (lto_section_type): Add hsa section. * timevar.def (TV_IPA_HSA): New. * hsa-brig-format.h: New file. * hsa-brig.c: New file. * hsa-dump.c: Likewise. * hsa-gen.c: Likewise. * hsa.c: Likewise. * hsa.h: Likewise. * toplev.c (compile_file): Call hsa_output_brig. * hsa-regalloc.c: New file. gcc/fortran/ * types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New. (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed. (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New. gcc/lto/ * lto-partition.c: Include "hsa.h" (add_symbol_to_partition_1): Put hsa implementations into the same partition as host implementations. liboffloadmic/ * plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_async_run): New unused parameter. (GOMP_OFFLOAD_run): Likewise. include/ * gomp-constants.h (GOMP_DEVICE_HSA): New macro. (GOMP_VERSION_HSA): Likewise. (GOMP_TARGET_ARG_DEVICE_MASK): Likewise. (GOMP_TARGET_ARG_DEVICE_ALL): Likewise. (GOMP_TARGET_ARG_SUBSEQUENT_PARAM): Likewise. (GOMP_TARGET_ARG_ID_MASK): Likewise. (GOMP_TARGET_ARG_NUM_TEAMS): Likewise. (GOMP_TARGET_ARG_THREAD_LIMIT): Likewise. (GOMP_TARGET_ARG_VALUE_SHIFT): Likewise. (GOMP_TARGET_ARG_HSA_KERNEL_ATTRIBUTES): Likewise. From-SVN: r232549
2016-01-19 11:35:10 +01:00
DEFTIMEVAR (TV_IPA_HSA , "ipa HSA")
DEFTIMEVAR (TV_IPA_PROFILE , "ipa profile")
Add AutoFDO. gcc/ChangeLog: 2014-10-21 Dehao Chen <dehao@google.com> * auto-profile.c: New file. * auto-profile.h: New file. * basic-block.h (maybe_hot_count_p): New export func. (add_working_set): New export func. * gcov-io.h (GCOV_TAG_AFDO_FILE_NAMES): New tag. (GCOV_TAG_AFDO_FUNCTION): Likewise. (GCOV_TAG_AFDO_WORKING_SET): Likewise. * opts.c (enable_fdo_optimizations): New func. (common_handle_option): Handle -fauto-profile flag. * ipa-inline.c (want_early_inline_function_p): Iterative-einline. (class pass_early_inline): Export early_inliner. (early_inliner): Likewise. (pass_early_inline::execute): Likewise. * ipa-inline.h (early_inliner): Likewise. * predict.c (maybe_hot_count_p): New export func. (counts_to_freqs): AutoFDO logic. (rebuild_frequencies): Likewise. * tree-profile.c (pass_ipa_tree_profile::gate): Likewise. * profile.c (add_working_set): New func. * Makefile.in (auto-profile.o): New object file. * passes.def (pass_ipa_auto_profile): New pass. * tree-ssa-live.c (remove_unused_scope_block_p): AutoFDO logic. * tree-pass.h (make_pass_ipa_auto_profile): New pass. * toplev.c (compile_file): AutoFDO logic. * doc/invoke.texi (-fauto-profile): New doc. * coverage.c (coverage_init): AutoFDO logic. * common.opt (-fauto-profile): New flag. * timevar.def (TV_IPA_AUTOFDO): New tag. * value-prof.c (gimple_alloc_histogram_value): New export func. (check_ic_target): Likewise. * value-prof.h (gimple_alloc_histogram_value): Likewise. (check_ic_target): Likewise. From-SVN: r216523
2014-10-21 19:59:30 +02:00
DEFTIMEVAR (TV_IPA_AUTOFDO , "auto profile")
Makefile.in: Added rules for ipa-pure-const.c... 2005-07-16 Danny Berlin <dberlin@dberlin.org> Kenneth Zadeck <zadeck@naturalbridge.com> * Makefile.in: Added rules for ipa-pure-const.c, ipa-reference.c, ipa-reference.h, ipa-utils.c, ipa-utils.h, ipa-type-escape.c, ipa-type-escape.h, tree-promote-statics.c * ipa-pure-const.c, ipa-reference.c, ipa-reference.h, ipa-utils.c, ipa-utils.h, ipa-type-escape.c, ipa-type-escape.h, tree-promote-statics.c: new files. * alias.c: (nonlocal_mentioned_p_1, nonlocal_mentioned_p, nonlocal_referenced_p_1, nonlocal_referenced_p, nonlocal_set_p_1, int nonlocal_set_p, mark_constant_function): Deleted. (rest_of_handle_cfg): Removed call to mark_constant_function. (nonoverlapping_component_refs_p): Added calls to support type based aliasing. * tree-ssa-alias.c (may_alias_p, compute_flow_insensitive_aliasing): Ditto. * calls.c (flags_from_decl_or_type): Removed reference to cgraph_rtl_info. (flags_from_decl_or_type): Support ECF_POINTER_NO_CAPTURE attribute. * c-common.c (handle_pointer_no_capture_attribute): New function and added pointer_no_capture attribute. * c-typeck.c (convert_arguments): Make builtins tolerant of having too many arguments. This is necessary for Spec 2000. * cgraph.h (const_function, pure_function): Removed. * common.opt: Added "fipa-pure-const", "fipa-reference", "fipa-type-escape", and "ftree-promote-static". * opts.c: Ditto. * passes.c: Added ipa and tree-promote-statics passes. * timevar.def: Added TV_IPA_PURE_CONST, TV_IPA_REFERENCE, TV_IPA_TYPE_ESCAPE, and TV_PROMOTE_STATICS. * tree.h: Support ECF_POINTER_NO_CAPTURE attribute. * tree-dfa.c (referenced_var_lookup_if_exists): New function. * tree-flow.h: Added exposed sra calls and addition of reference_vars_info field for FUNCTION_DECLS. * tree-pass.h: Added passes. * tree-sra.c: (sra_init_cache): New function. (sra_insert_before, sra_insert_after) Made public. (type_can_be_decomposed_p): Renamed from type_can_be_decomposed_p and made public. * tree-ssa-alias.c (dump_alias_stats): Added stats for type based aliasing. (may_alias_p): Added code to use type escape analysis to improve alias sets. * tree-ssa-operands.c (add_call_clobber_ops): Added parameter and code to prune clobbers of static variables based on information produced in ipa-reference pass. Changed call clobbering so that statics are not marked as clobbered if the call does not clobber them. 2005-07-16 Danny Berlin <dberlin@dberlin.org> Kenneth Zadeck <zadeck@naturalbridge.com> * gcc.dg/tree-ssa/ssa-dce-2.c: Changed dg-options to run at -O2 since pure const detection cannot run at -O1 in c compiler. * gcc.dg/tree-ssa/20030714-1.c Changed scanning patterns because we can now optimize this case properly. * gcc.dg/tree-ssa/sra-2.c: Changed to -O3 and removed xfail because we now pass. * gcc.dg/vect/vect-92.c: Removed out of bounds array access. Co-Authored-By: Kenneth Zadeck <zadeck@naturalbridge.com> From-SVN: r102098
2005-07-16 20:56:53 +02:00
DEFTIMEVAR (TV_IPA_PURE_CONST , "ipa pure const")
DEFTIMEVAR (TV_IPA_ICF , "ipa icf")
tree-ssa-structalias.c (process_constraint): Remove code to transform addressofs into scalar. 2005-12-11 Daniel Berlin <dberlin@dberlin.org> * tree-ssa-structalias.c (process_constraint): Remove code to transform addressofs into scalar. (create_variable_info_for): In whole-program IPA, globals don't point to ANYTHING by default. 2005-12-11 Daniel Berlin <dberlin@dberlin.org> * timevar.def (TV_IPA_PTA): New. * tree-pass.h (pass_ipa_pta): New * tree-ssa-structalias.c: Include cgraph.h (in_ipa_mode): New. (predbitmap_obstack): New. (EXECUTE_IF_IN_NONNULL_BITMAP): New. (struct constraint_stats): Add num_edges. (new_var_info): Don't call bitmap_clear. (struct constraint_edge): Update docs. (new_constraint_edge): Remove src param. (struct constraint_graph): Add zero_weight_succs, zero_weight_preds. Update docs. (constraint_expr_equal): Reformat. (constraint_edge_equal): Update for removal of src. (constraint_edge_less): Ditto. (constraint_edge_vec_find): Ditto. (erase_graph_self_edge): Update for removal of src and and zero weight bitmap. (clear_edges_for_node): Ditto. (add_graph_edge): Ditto. (get_graph_weights): Ditto. (allocate_graph_weights): Ditto. (merge_graph_nodes): Ditto. (int_add_graph_edge): Ditto. (valid_graph_edge): Ditto. (valid_weighted_graph_edge): Ditto. (build_constraint_graph): Ditto. (scc_visit): Ditto. (collapse_nodes): Ditto. (process_unification_queue): Ditto. (topo_visit): Ditto. (solve_graph): Ditto. (do_structure_copy): Ditto. (perform_var_substitution): Ditto. Init and release obstack. (handle_ptr_arith): Try to resolve directly. (find_func_aliases): Don't call update_alias_info here Handle RETURN_EXPR, and CALL_EXPR's in IPA mode. (do_sd_constraint): Add code for propagating faster. Update. (do_ds_constraint): Ditto. (count_num_arguments): New function. (create_function_info_for): Ditto. (create_variable_info_for): Handle FUNCTION_DECL. (intra_create_variable_infos): Use make_constraint_to_anything. (init_alias_vars): Init obstacks here. (need_to_solve): Handle zero weight graph changes. (compute_points_to_sets): Call update_alias_info here. (delete_points_to_sets): Free zero weight preds/succs here. (gate_ipa_pta): New. (ipa_pta_execute): New 2005-12-11 Daniel Berlin <dberlin@dberlin.org> * tree-ssa-structalias.c (var_anyoffset): Removed. (anyoffset_tree): Ditto. (anyoffset_id): Ditto. (do_deref): Take vector of constraints, no return value. Update to work on vector. (get_constraint_for): Ditto. (get_constraint_for_component_ref): Ditto. (do_structure_copy): Ditto. (handle_ptr_arith): Ditto. (find_func_aliases): Ditto. (set_uids_in_ptset): Remove anyoffset handling. (init_base_vars): Ditto. From-SVN: r108384
2005-12-11 23:44:19 +01:00
DEFTIMEVAR (TV_IPA_PTA , "ipa points-to")
common.opt (fipa-sra): New switch. 2009-09-17 Martin Jambor <mjambor@suse.cz> * common.opt (fipa-sra): New switch. * opts.c (decode_options): Turn flag_ipa_sra on for opt2. * timevar.def (TV_IPA_SRA): New timevar. * params.def (ipa-sra-ptr-growth-factor): New parameter. * doc/invoke.texi: Document -fipa-sra and ipa-sra-ptr-growth-factor. * tree-sra.c: Include cgraph.c. (enum sra_mode): Added SRA_MODE_EARLY_IPA. (struct access): Added fields stmt, grp_maybe_modified, grp_scalar_ptr and grp_not_necessarilly_dereferenced. (func_param_count): New variable. (encountered_apply_args): New variable. (bb_dereferences): New variable. (final_bbs): New variable. (no_accesses_representant): New variable. (no_accesses_p): New function. (dump_access): Dump the new fields. (sra_initialize): Set encountered_apply_args to false. (get_ssa_base_param): New function. (mark_parm_dereference): New function. (create_access): Caring for INIDRECT_REFs and different handling of varialble length accesses in early IPA SRA. Store the stmt - a new parameter - to the new access. (build_access_from_expr_1): New parameter stmt, passed to create_access. Handle INDIRECT_REFs. (build_access_from_expr): Pass the current statement to build_access_from_expr_1. (disqualify_ops_if_throwing_stmt): Trigger only in intraprocedural passes. (build_accesses_from_assign): Pass the current statement to build_access_from_expr_1. Do not create assign links in IPA-SRA. (scan_function): Call handle_ssa_defs on phi nodes. Set bits in final_bbs when necessary. Check for calls to __builtin_apply_args. Fixup EH info if anythng was changed. (is_unused_scalar_param): New function. (ptr_parm_has_direct_uses): New function. (find_param_candidates): New function. (mark_maybe_modified): New function. (analyze_modified_params): New function. (propagate_dereference_distances): New function. (dump_dereferences_table): New function. (analyze_caller_dereference_legality): New function. (unmodified_by_ref_scalar_representative): New function. (splice_param_accesses): New function. (decide_one_param_reduction): New function. (enum ipa_splicing_result): New type. (splice_all_param_accesses): New function. (get_param_index): New function. (turn_representatives_into_adjustments): New function. (analyze_all_param_acesses): New function. (get_replaced_param_substitute): New function. (get_adjustment_for_base): New function. (replace_removed_params_ssa_names): New function. (sra_ipa_reset_debug_stmts): New function. (sra_ipa_modify_expr): New function. (sra_ipa_modify_assign): New function. (convert_callers): New function. (modify_function): New function. (ipa_sra_preliminary_function_checks): New function. (ipa_early_sra): New function. (ipa_early_sra_gate): New function. (pass_early_ipa_sra): New variable. * Makefile.in (tree-sra.o): Add cgraph.h to dependencies. Testsuite: * gcc.dg/struct/wo_prof_escape_arg_to_local.c: Do not run IPA-SRA. * gcc.dg/ipa/ipa-sra-1.c: New test. * gcc.dg/ipa/ipa-sra-2.c: New test. * gcc.dg/ipa/ipa-sra-3.c: New test. * gcc.dg/ipa/ipa-sra-4.c: New test. * gcc.dg/ipa/ipa-sra-5.c: New test. * gcc.c-torture/execute/ipa-sra-1.c: New test. * gcc.c-torture/execute/ipa-sra-2.c: New test. From-SVN: r151800
2009-09-17 13:35:38 +02:00
DEFTIMEVAR (TV_IPA_SRA , "ipa SRA")
[multiple changes] 2009-09-01 Diego Novillo <dnovillo@google.com> * c-lang.c (lang_hooks): Remove const qualifier. java/ChangeLog * lang.c (lang_hooks): Remove const qualifier. objc/ChangeLog * objc-lang.c (lang_hooks): Remove const qualifier. objcp/ChangeLog * objcp-lang.c (lang_hooks): Remove const qualifier. ada/ChangeLog * gcc-interface/misc.c (lang_hooks): Remove const qualifier. fortran/ChangeLog * f95-lang.c (lang_hooks): Remove const qualifier. cp/ChangeLog * cp-lang.c (lang_hooks): Remove const qualifier. 2009-09-01 Diego Novillo <dnovillo@google.com> * cgraph.c (cgraph_node_for_decl): New. * cgraph.h (cgraph_node_for_decl): Declare. * tree.c (host_integerp): Return 0 if T is NULL. 2009-09-01 Diego Novillo <dnovillo@google.com> * tree.h (struct alias_pair): Move from varasm.c. (alias_pairs): Likewise. (TYPE_MAXVAL): Define. (TYPE_MINVAL): Define. (iterative_hash_host_wide_int): Declare. (remove_unreachable_alias_pairs): Declare. * tree-pass.h (pass_ipa_free_lang_data): Declare. * diagnostic.c (default_diagnostic_starter): Make extern. (default_diagnostic_finalizer): Make extern. * diagnostic.h (default_diagnostic_starter): Declare. (default_diagnostic_finalizer): Declare. (default_tree_printer): Declare. * toplev.c (default_tree_printer): Make extern. 2009-09-01 Richard Guenther <rguenther@suse.de> Diego Novillo <dnovillo@google.com> * cgraph.c (cgraph_add_new_function): Remove gimplification. * cgraphunit.c (cgraph_expand_function): Do not emit associated thunks from here. (cgraph_emit_thunks): New. (cgraph_optimize): Call it. Return if any IPA pass finds an error. * varasm.c (finish_aliases_1): Ignore errorneous aliases used by thunks. 2009-09-01 Simon Baldwin <simonb@google.com> Rafael Espindola <espindola@google.com> Richard Guenther <rguenther@suse.de> Doug Kwan <dougkwan@google.com> Diego Novillo <dnovillo@google.com> * tree.c: Include tree-pass.h, langhooks-def.h, diagnostic.h, cgraph.h, timevar.h, except.h and debug.h. (free_lang_data_in_type): New. (need_assembler_name_p): New. (free_lang_data_in_block): New. (free_lang_data_in_decl): New. (struct free_lang_data_d): New. (add_tree_to_fld_list): New. (find_decls_types_r): New. (get_eh_types_for_runtime): New. (find_decls_types_in_eh_region): New. (find_decls_types_in_node): New. (find_decls_types_in_var): New. (free_lang_data_in_cgraph): New. (free_lang_data): New. (gate_free_lang_data): New. (pass_ipa_free_lang_data): New. 2009-09-01 Diego Novillo <dnovillo@google.com> * timevar.def (TV_IPA_FREE_LANG_DATA): Define. * langhooks.h (struct lang_hooks): Add field free_lang_data. (lang_hooks): Remove const qualifier. * ipa.c (cgraph_remove_unreachable_nodes): Call remove_unreachable_alias_pairs. * except.c (add_type_for_runtime): Check if TYPE has already been converted. (lookup_type_for_runtime): Likewise. (check_handled): Handle converted types. * varasm.c (remove_unreachable_alias_pairs): New. * gimple.c: Include demangle.h. (gimple_decl_printable_name): New. (gimple_fold_obj_type_ref): New. * gimple.h (gimple_decl_printable_name): Declare. (gimple_fold_obj_type_ref): Declare. * passes.c (init_optimization_passes): Add pass pass_ipa_free_lang_data. * langhooks-def.h (LANG_HOOKS_FREE_LANG_DATA): Define. (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_FREE_LANG_DATA. testsuite/ChangeLog 2009-09-01 Diego Novillo <dnovillo@google.com> * gcc.dg/gomp/combined-1.c: Adjust expected pattern. * g++.dg/tree-prof/inline_mismatch_args.C: Likewise. * g++.dg/warn/unit-1.C: Likewise. * g++.dg/ipa/iinline-1.C: Likewise. * g++.dg/template/cond2.C: Adjust expected line location for the error. * g++.dg/template/pr35240.C: Likewise. cp/ChangeLog 2009-09-01 Doug Kwan <dougkwan@google.com> * tree.c (cp_fix_function_decl_p): New. (cp_free_lang_data): New. 2009-09-01 Diego Novillo <dnovillo@google.com> * Make-lang.in (decl2.o): Add dependency on $(POINTER_SET_H). * decl2.c: Include pointer-set.h. (collect_candidates_for_java_method_aliases): New. (cp_write_global_declarations): Call it. Add local variable CANDIDATES. If set, call build_java_method_aliases. (build_java_method_aliases): Add argument CANDIDATES. Use it to determine if FNDECL should get a hidden alias. * cp-objcp-common.h (LANG_HOOKS_FREE_LANG_DATA): Define. * cp-tree.h (cp_free_lang_data): Declare. 2009-09-03 Richard Guenther <rguenther@suse.de> * method.c (use_thunk): Use cgraph_finalize_function to hand off thunks to the cgraph. * semantics.c (emit_associated_thunks): Do not emit thunks for really extern functions. From-SVN: r151360
2009-09-03 06:07:12 +02:00
DEFTIMEVAR (TV_IPA_FREE_LANG_DATA , "ipa free lang data")
DEFTIMEVAR (TV_IPA_FREE_INLINE_SUMMARY, "ipa free inline summary")
/* Time spent by constructing CFG. */
DEFTIMEVAR (TV_CFG , "cfg construction")
/* Time spent by cleaning up CFG. */
DEFTIMEVAR (TV_CLEANUP_CFG , "cfg cleanup")
Makefile.in (cfghooks.o): Add TIMEVAR_H and toplev.h dependency. * Makefile.in (cfghooks.o): Add TIMEVAR_H and toplev.h dependency. * basic-block.h (tidy_fallthru_edge, tidy_fallthru_edges, dump_bb, verify_flow_info): Declaration removed. * cfg.c (verify_flow_info, dump_bb): Moved to cfghooks.c. (debug_bb, debug_bb_n): Add argument to dump_bb call. * cfgcleanup.c (try_simplify_condjump, try_crossjump_to_edge, try_optimize_cfg, delete_unreachable_blocks): Use delete_basic_block instead of delete_block. * cfghooks.c: Include timevar.h and toplev.h. (cfg_hooks): Define here. (verify_flow_info, dump_bb): Moved from cfg.c. (redirect_edge_and_branch, redirect_edge_and_branch_force, split_block, split_block_after_labels, move_block_after, delete_basic_block, split_edge, create_basic_block, create_empty_bb, can_merge_blocks_p, merge_blocks, make_forwarder_block, tidy_fallthru_edge, tidy_fallthru_edges): New functions. * cfghooks.h (struct cfg_hooks): Added fields name, make_forwarder_block, tidy_fallthru_edge and move_block_after. Changed type of verify_flow_info, dump_bb, split_block fields. Renamed cfgh_split_edge and delete_block fields. (redirect_edge_and_branch, redirect_edge_and_branch_force, split_block, delete_block, split_edge, create_basic_block, can_merge_blocks_p, merge_blocks): Macros removed. (cfg_hooks): Do not export. (verify_flow_info, dump_bb, redirect_edge_and_branch, redirect_edge_and_branch_force, split_block, split_block_after_labels, move_block_after, delete_basic_block, split_edge, create_basic_block, create_empty_bb, can_merge_blocks_p, merge_blocks, make_forwarder_block, tidy_fallthru_edge, tidy_fallthru_edges): Declare. (cfg_layout_rtl_cfg_hooks): Declare. * cfgloop.c (update_latch_info, mfb_keep_just, mfb_keep_nonlatch): New functions. (canonicalize_loop_headers): Use new semantics of make_forwarder_block. (redirect_edge_with_latch_update): Removed. (make_forwarder_block): Moved to cfghooks.c, semantics changed. * cfgloopmanip.c (remove_bbs): Do not update dominators here. * cfgrtl.c (cfg_layout_split_block, rtl_split_block, rtl_dump_bb, rtl_delete_block, rtl_split_block, rtl_merge_blocks, tidy_fallthru_edge, rtl_split_edge, cfg_layout_delete_block, cfg_layout_merge_blocks, cfg_layout_split_edge): Partly moved to cfghooks.c. (rtl_create_basic_block): Coding style fix. (rtl_tidy_fallthru_edge, rtl_move_block_after, rtl_make_forwarder_block): New functions. (update_cfg_after_block_merging): Removed. (rtl_cfg_hooks, cfg_layout_rtl_cfg_hooks): Fill in new entries. * flow.c (verify_wide_reg, verify_local_live_at_start): Add argument to dump_bb. * ifcvt.c (merge_if_block, find_cond_trap, find_if_case_1, find_if_case_2): Don't update dominators. * timevar.def (TV_CFG_VERIFY): New. * loop-unswitch.c (unswitch_loop): Don't call add_to_dominance_info. * cfglayout.c (copy_bbs): Don't call add_to_dominance_info. * cfgloopmanip.c (split_loop_bb): Don't update dominators. (remove_bbs): Don't call remove_bbs. (create_preheader): Use make_forwarder_block. (mfb_keep_just, mfb_update_loops): New static functions. From-SVN: r76851
2004-01-29 08:47:56 +01:00
DEFTIMEVAR (TV_CFG_VERIFY , "CFG verifier")
DEFTIMEVAR (TV_DELETE_TRIVIALLY_DEAD , "trivially dead code")
/* Time spent in dataflow problems. */
DEFTIMEVAR (TV_DF_SCAN , "df scan insns")
DEFTIMEVAR (TV_DF_MD , "df multiple defs")
DEFTIMEVAR (TV_DF_RD , "df reaching defs")
DEFTIMEVAR (TV_DF_LR , "df live regs")
DEFTIMEVAR (TV_DF_LIVE , "df live&initialized regs")
DEFTIMEVAR (TV_DF_MIR , "df must-initialized regs")
DEFTIMEVAR (TV_DF_CHAIN , "df use-def / def-use chains")
re PR rtl-optimization/42575 (arm-eabi-gcc 64-bit multiply weirdness) PR rtl-optimization/42575 * dce.c (word_dce_process_block): Renamed from byte_dce_process_block. Argument AU removed. All callers changed. Ignore artificial refs. Use return value of df_word_lr_simulate_defs to decide whether an insn is necessary. (fast_dce): Rename arg to WORD_LEVEL. (run_word_dce): Renamed from rest_of_handle_fast_byte_dce. No longer static. (pass_fast_rtl_byte_dce): Delete. * dce.h (run_word_dce): Declare. * df-core.c (df_print_word_regset): Renamed from df_print_byteregset. All callers changed. Simplify code to only deal with two-word regs. * df.h (DF_WORD_LR): Renamed from DF_BYTE_LR. (DF_WORD_LR_BB_INFO): Renamed from DF_BYTE_LR_BB_INFO. (DF_WORD_LR_IN): Renamed from DF_BYTE_LR_IN. (DF_WORD_LR_OUT): Renamed from DF_BYTE_LR_OUT. (struct df_word_lr_bb_info): Renamed from df_byte_lr_bb_info. (df_word_lr_mark_ref): Declare. (df_word_lr_add_problem, df_word_lr_mark_ref, df_word_lr_simulate_defs, df_word_lr_simulate_uses): Declare or rename from byte variants. (df_byte_lr_simulate_artificial_refs_at_top, df_byte_lr_simulate_artificial_refs_at_end, df_byte_lr_get_regno_start, df_byte_lr_get_regno_len, df_compute_accessed_bytes): Delete declarations. (df_word_lr_get_bb_info): Rename from df_byte_lr_get_bb_info. (enum df_mm): Delete. * df-byte-scan.c: Delete file. * df-problems.c (df_word_lr_problem_data): Renamed from df_byte_lr_problem_data, all members deleted except for WORD_LR_BITMAPS, which is renamed from BYTE_LR_BITMAPS. Uses changed. (df_word_lr_expand_bitmap, df_byte_lr_simulate_artificial_refs_at_top, df_byte_lr_simulate_artificial_refs_at_end, df_byte_lr_get_regno_start, df_byte_lr_get_regno_len, df_byte_lr_check_regs, df_byte_lr_confluence_0): Delete functions. (df_word_lr_free_bb_info): Renamed from df_byte_lr_free_bb_info; all callers changed. (df_word_lr_alloc): Renamed from df_byte_lr_alloc; all callers changed. Don't initialize members that were deleted, don't try to discover data about registers. Ignore hard regs. (df_word_lr_reset): Renamed from df_byte_lr_reset; all callers changed. (df_word_lr_mark_ref): New function. (df_word_lr_bb_local_compute): Renamed from df_byte_bb_lr_local_compute; all callers changed. Use df_word_lr_mark_ref. Assert that artificial refs don't include pseudos. Ignore hard registers. (df_word_lr_local_compute): Renamed from df_byte_lr_local_compute. Assert that exit block uses don't contain pseudos. (df_word_lr_init): Renamed from df_byte_lr_init; all callers changed. (df_word_lr_confluence_n): Renamed from df_byte_lr_confluence_n; all callers changed. Ignore hard regs. (df_word_lr_transfer_function): Renamed from df_byte_lr_transfer_function; all callers changed. (df_word_lr_free): Renamed from df_byte_lr_free; all callers changed. (df_word_lr_top_dump): Renamed from df_byte_lr_top_dump; all callers changed. (df_word_lr_bottom_dump): Renamed from df_byte_lr_bottom_dump; all callers changed. (problem_WORD_LR): Renamed from problem_BYTE_LR; uses changed; confluence operator 0 set to NULL. (df_word_lr_add_problem): Renamed from df_byte_lr_add_problem; all callers changed. (df_word_lr_simulate_defs): Renamed from df_byte_lr_simulate_defs. Return bool, true if bitmap changed or insn otherwise necessary. All callers changed. Simplify using df_word_lr_mark_ref. (df_word_lr_simulate_uses): Renamed from df_byte_lr_simulate_uses; all callers changed. Simplify using df_word_lr_mark_ref. * lower-subreg.c: Include "dce.h" (decompose_multiword_subregs): Call run_word_dce if df available. * Makefile.in (lower-subreg.o): Adjust dependencies. (df-byte-scan.o): Delete. * timevar.def (TV_DF_WORD_LR): Renamed from TV_DF_BYTE_LR. From-SVN: r162678
2010-07-29 14:39:57 +02:00
DEFTIMEVAR (TV_DF_WORD_LR , "df live reg subwords")
DEFTIMEVAR (TV_DF_NOTE , "df reg dead/unused notes")
DEFTIMEVAR (TV_REG_STATS , "register information")
DEFTIMEVAR (TV_ALIAS_ANALYSIS , "alias analysis")
re PR middle-end/13146 (inheritance for nonoverlapping_component_refs_p) 2009-04-03 Richard Guenther <rguenther@suse.de> PR middle-end/13146 PR tree-optimization/23940 PR tree-optimization/33237 PR middle-end/33974 PR middle-end/34093 PR tree-optimization/36201 PR tree-optimization/36230 PR tree-optimization/38049 PR tree-optimization/38207 PR tree-optimization/38230 PR tree-optimization/38301 PR tree-optimization/38585 PR middle-end/38895 PR tree-optimization/38985 PR tree-optimization/39299 * tree-ssa-structalias.h: Remove. * tree-ssa-operands.h (NULL_USE_OPERAND_P): Make of type use_operand_p. (NULL_DEF_OPERAND_P): Make of type def_operand_p. (struct vuse_element_d): Remove. (struct vuse_vec_d): Likewise. (VUSE_VECT_NUM_ELEM, VUSE_VECT_ELEMENT_NC, VUSE_ELEMENT_PTR_NC, VUSE_ELEMENT_VAR_NC, VUSE_VECT_ELEMENT, VUSE_ELEMENT_PTR, SET_VUSE_VECT_ELEMENT, SET_VUSE_ELEMENT_VAR, SET_VUSE_ELEMENT_PTR, VUSE_ELEMENT_VAR): Likewise. (struct voptype_d): Likewise. (NUM_VOP_FREE_BUCKETS): Likewise. (struct ssa_operands): Remove vop_free_buckets and mpt_table fields. (struct stmt_operands_d): Remove. (VUSE_OP_PTR, VUSE_OP, SET_VUSE_OP, VUSE_NUM, VUSE_VECT, VDEF_RESULT_PTR, VDEF_RESULT, VDEF_OP_PTR, VDEF_OP, SET_VDEF_OP, VDEF_NUM, VDEF_VECT): Likewise. (copy_virtual_operands): Remove. (operand_build_cmp): Likewise. (create_ssa_artificial_load_stmt): Likewise. (enum ssa_op_iter_type): Remove ssa_op_iter_vdef. (struct ssa_operand_iterator_d): Remove vuses, vdefs, mayusesm vuse_index and mayuse_index members. Pack and move done and iter_type members to the front. (SSA_OP_VMAYUSE): Remove. (SSA_OP_VIRTUAL_USES): Adjust. (FOR_EACH_SSA_VDEF_OPERAND): Remove. (unlink_stmt_vdef): Declare. (add_to_addressable_set): Remove. * tree-vrp.c (stmt_interesting_for_vrp): Adjust. (vrp_visit_stmt): Likewise. * doc/tree-ssa.texi (Alias analysis): Update. * doc/invoke.texi (max-aliased-vops): Remove docs. (avg-aliased-vops): Likewise. * tree-into-ssa.c (syms_to_rename): Remove. (need_to_update_vops_p): Likewise. (need_to_initialize_update_ssa_p): Rename to ... (update_ssa_initialized_fn): ... this. Track function we are initialized for. (symbol_marked_for_renaming): Simplify. (add_new_name_mapping): Do not set need_to_update_vops_p. (dump_currdefs): Use SYMS_TO_RENAME. (rewrite_update_stmt): Always walk all uses/defs. (dump_update_ssa): Adjust. (init_update_ssa): Take function argument. Track what we are initialized for. (delete_update_ssa): Reset SYMS_TO_RENAME and update_ssa_initialized_fn. (create_new_def_for): Initialize for cfun, assert we are initialized for cfun. (mark_sym_for_renaming): Simplify. (mark_set_for_renaming): Do not initialize update-ssa. (need_ssa_update_p): Simplify. Take function argument. (name_mappings_registered_p): Assert we ask for the correct function. (name_registered_for_update_p): Likewise. (ssa_names_to_replace): Likewise. (release_ssa_name_after_update_ssa): Likewise. (update_ssa): Likewise. Use SYMS_TO_RENAME. (dump_decl_set): Do not print a newline. (debug_decl_set): Do it here. (dump_update_ssa): And here. * tree-ssa-loop-im.c (move_computations): Adjust. (movement_possibility): Likewise. (determine_max_movement): Likewise. (gather_mem_refs_stmt): Likewise. * tree-dump.c (dequeue_and_dump): Do not handle SYMBOL_MEMORY_TAG or NAME_MEMORY_TAG. * tree-complex.c (update_all_vops): Remove. (expand_complex_move): Adjust. * tree-ssa-loop-niter.c (chain_of_csts_start): Use NULL_TREE. Simplify test for memory referencing statement. Exclude non-invariant ADDR_EXPRs. * tree-pretty-print.c (dump_generic_node): Do not handle memory tags. * tree-loop-distribution.c (generate_memset_zero): Adjust. (rdg_flag_uses): Likewise. * tree-tailcall.c (suitable_for_tail_opt_p): Remove memory-tag related code. (tree_optimize_tail_calls_1): Also split the edge from the entry block if we have degenerate PHI nodes in the first basic block. * tree.c (init_ttree): Remove memory-tag related code. (tree_code_size): Likewise. (tree_node_structure): Likewise. (build7_stat): Re-write to be build6_stat. * tree.h (MTAG_P, TREE_MEMORY_TAG_CHECK, TMR_TAG): Remove. (SSA_VAR_P): Adjust. (struct tree_memory_tag): Remove. (struct tree_memory_partition_tag): Likewise. (union tree_node): Adjust. (build7): Re-write to be build6. * tree-pass.h (pass_reset_cc_flags): Remove. (TODO_update_address_taken): New flag. (pass_simple_dse): Remove. * ipa-cp.c (ipcp_update_callgraph): Update SSA form. * params.h (MAX_ALIASED_VOPS): Remove. (AVG_ALIASED_VOPS): Likewise. * omp-low.c (expand_omp_taskreg): Update SSA form. * tree-ssa-dse.c (dse_optimize_stmt): Properly query if the rhs aliases the lhs in a copy stmt. * tree-ssa-dse.c (struct address_walk_data): Remove. (memory_ssa_name_same): Likewise. (memory_address_same): Likewise. (get_kill_of_stmt_lhs): Likewise. (dse_possible_dead_store_p): Simplify, use the oracle. Handle unused stores. Look through PHI nodes into post-dominated regions. (dse_optimize_stmt): Simplify. Properly remove stores. (tree_ssa_dse): Compute dominators. (execute_simple_dse): Remove. (pass_simple_dse): Likewise. * ipa-reference.c (scan_stmt_for_static_refs): Open-code gimple_loaded_syms and gimple_stored_syms computation. * toplev.c (dump_memory_report): Dump alias and pta stats. * tree-ssa-sccvn.c (vn_reference_compute_hash): Simplify. (vn_reference_eq): Likewise. (vuses_to_vec, copy_vuses_from_stmt, vdefs_to_vec, copy_vdefs_from_stmt, shared_lookup_vops, shared_vuses_from_stmt, valueize_vuses): Remove. (get_def_ref_stmt_vuses): Simplify. Rename to ... (get_def_ref_stmt_vuse): ... this. (vn_reference_lookup_2): New function. (vn_reference_lookup_pieces): Use walk_non_aliased_vuses for walking equivalent vuses. Simplify. (vn_reference_lookup): Likewise. (vn_reference_insert): Likewise. (vn_reference_insert_pieces): Likewise. (visit_reference_op_call): Simplify. (visit_reference_op_load): Likewise. (visit_reference_op_store): Likewise. (init_scc_vn): Remove shared_lookup_vuses initialization. (free_scc_vn): Remove shared_lookup_vuses freeing. (sort_vuses, sort_vuses_heap): Remove. (get_ref_from_reference_ops): Export. * tree-ssa-sccvn.h (struct vn_reference_s): Replace vuses vector with single vuse pointer. (vn_reference_lookup_pieces, vn_reference_lookup, vn_reference_insert, vn_reference_insert_pieces): Adjust prototypes. (shared_vuses_from_stmt): Remove. (get_ref_from_reference_ops): Declare. * tree-ssa-loop-manip.c (slpeel_can_duplicate_loop_p): Adjust. * tree-ssa-copyrename.c (copy_rename_partition_coalesce): Remove memory-tag related code. * tree-ssa-ccp.c (get_symbol_constant_value): Remove memory-tag code. (likely_value): Add comment, skip static-chain of call statements. (surely_varying_stmt_p): Adjust. (gimplify_and_update_call_from_tree): Likewise. (execute_fold_all_builtins): Do not rebuild alias info. (gimplify_and_update_call_from_tree): Properly update VOPs. * tree-ssa-loop-ivopts.c (get_ref_tag): Remove. (copy_ref_info): Remove memory-tag related code. * tree-call-cdce.c (tree_call_cdce): Rename the VOP. * ipa-pure-const.c (check_decl): Remove memory-tag related code. (check_stmt): Open-code gimple_loaded_syms and gimple_stored_syms computation. * tree-ssa-dom.c (gimple_p): Remove typedef. (eliminate_redundant_computations): Adjust. (record_equivalences_from_stmt): Likewise. (avail_expr_hash): Likewise. (avail_expr_eq): Likewise. * tree-ssa-propagate.c (update_call_from_tree): Properly update VOPs. (stmt_makes_single_load): Likewise. (stmt_makes_single_store): Likewise. * tree-ssa-alias.c: Rewrite completely. (debug_memory_partitions, dump_mem_ref_stats, debug_mem_ref_stats, debug_mem_sym_stats, dump_mem_sym_stats_for_var, debug_all_mem_sym_stats, debug_mp_info, update_mem_sym_stats_from_stmt, delete_mem_ref_stats, create_tag_raw, dump_points_to_info, dump_may_aliases_for, debug_may_aliases_for, new_type_alias): Remove public functions. (pass_reset_cc_flags): Remove. (pass_build_alias): Move ... * tree-ssa-structalias.c (pass_build_alias): ... here. * tree-ssa-alias.c (may_be_aliased): Move ... * tree-flow-inline.h (may_be_aliased): ... here. tree-ssa-alias.c (struct count_ptr_d, count_ptr_derefs, count_uses_and_derefs): Move ... * gimple.c: ... here. * gimple.h (count_uses_and_derefs): Declare. * tree-ssa-alias.c (dump_alias_stats, ptr_deref_may_alias_global_p, ptr_deref_may_alias_decl_p, ptr_derefs_may_alias_p, same_type_for_tbaa, nonaliasing_component_refs_p, decl_refs_may_alias_p, indirect_ref_may_alias_decl_p, indirect_refs_may_alias_p, ref_maybe_used_by_call_p, ref_maybe_used_by_stmt_p, call_may_clobber_ref_p, stmt_may_clobber_ref_p, maybe_skip_until, get_continuation_for_phi, walk_non_aliased_vuses, walk_aliased_vdefs): New functions. * tree-dfa.c (refs_may_alias_p): Move ... * tree-ssa-alias.c (refs_may_alias_p): ... here. Extend. * tree-ssa-alias.h: New file. * tree-ssa-sink.c (is_hidden_global_store): Adjust. (statement_sink_location): Likewise. * opts.c (decode_options): Do not adjust max-aliased-vops or avg-aliased-vops values. * timevar.def (TV_TREE_MAY_ALIAS): Remove. (TV_CALL_CLOBBER): Likewise. (TV_FLOW_SENSITIVE): Likewise. (TV_FLOW_INSENSITIVE): Likewise. (TV_MEMORY_PARTITIONING): Likewise. (TV_ALIAS_STMT_WALK): New timevar. * tree-ssa-loop-ivcanon.c (empty_loop_p): Adjust. * tree-ssa-address.c (create_mem_ref_raw): Use build6. (get_address_description): Remove memory-tag related code. * tree-ssa-ifcombine.c (bb_no_side_effects_p): Adjust. * treestruct.def (TS_MEMORY_TAG, TS_MEMORY_PARTITION_TAG): Remove. * tree-eh.c (cleanup_empty_eh): Do not leave stale SSA_NAMEs and immediate uses in statements. Document. * gimple-pretty-print.c (dump_gimple_mem_ops): Adjust. (dump_symbols): Remove. (dump_gimple_mem_ops): Do not dump loaded or stored syms. * alias.c (get_deref_alias_set): New function split out from ... (get_alias_set): ... here. * alias.h (get_deref_alias_set): Declare. * tree-vect-data-refs.c (vect_create_data_ref_ptr): Remove unused type parameter. Remove restrict pointer handling. Create a ref-all pointer in case type-based alias sets do not conflict. (vect_analyze_data_refs): Remove SMT related code. * tree-vect-stmts.c (vectorizable_store): Re-instantiate TBAA assert. (vectorizable_load): Likewise. * tree-data-ref.h (struct dr_alias): Remove symbol_tag field. (DR_SYMBOL_TAG, DR_VOPS): Remove. * tree-data-ref.c (dr_may_alias_p): Use the alias-oracle. Ignore vops and SMTs. (dr_analyze_alias): Likewise.. (free_data_ref): Likewise. (create_data_ref): Likewise. (analyze_all_data_dependences): Likewise. (get_references_in_stmt): Adjust. * tree-flow-inline.h (gimple_aliases_computed_p, gimple_addressable_vars, gimple_call_clobbered_vars, gimple_call_used_vars, gimple_global_var, may_aliases, memory_partition, factoring_name_p, mark_call_clobbered, clear_call_clobbered, compare_ssa_operands_equal, symbol_mem_tag, set_symbol_mem_tag, gimple_mem_ref_stats): Remove. (gimple_vop): New function. (op_iter_next_use): Remove vuses and mayuses cases. (op_iter_next_def): Remove vdefs case. (op_iter_next_tree): Remove vuses, mayuses and vdefs cases. (clear_and_done_ssa_iter): Do not set removed fields. (op_iter_init): Likewise. Skip vuse and/or vdef if requested. Assert we are not iterating over vuses or vdefs if not also iterating over uses or defs. (op_iter_init_use): Likewise. (op_iter_init_def): Likewise. (op_iter_next_vdef): Remove. (op_iter_next_mustdef): Likewise. (op_iter_init_vdef): Likewise. (compare_ssa_operands_equal): Likewise. (link_use_stmts_after): Handle vuse operand. (is_call_used): Use is_call_clobbered. (is_call_clobbered): Global variables are always call clobbered, query the call-clobbers bitmap. (mark_call_clobbered): Ignore global variables. (clear_call_clobbered): Likewise. * tree-ssa-coalesce.c (create_outofssa_var_map): Adjust virtual operands sanity check. * tree.def (NAME_MEMORY_TAG, SYMBOL_MEMORY_TAG, MEMORY_PARTITION_TAG): Remove. (TARGET_MEM_REF): Remove TMR_TAG operand. * tree-dfa.c (add_referenced_var): Initialize call-clobber state. Remove call-clobber related code. (remove_referenced_var): Likewise. Do not clear mpt or symbol_mem_tag. (dump_variable): Do not dump SMTs, memory stats, may-aliases or partitions or escape reason. (get_single_def_stmt, get_single_def_stmt_from_phi, get_single_def_stmt_with_phi): Remove. (dump_referenced_vars): Tidy. (get_ref_base_and_extent): Allow bare decls. (collect_dfa_stats): Adjust. * graphite.c (rename_variables_in_stmt): Adjust. (graphite_copy_stmts_from_block): Likewise. (translate_clast): Likewise. * tree-ssa-pre.c (struct bb_bitmap_sets): Add expr_dies bitmap. (EXPR_DIES): New. (translate_vuse_through_block): Use the oracle. (phi_translate_1): Adjust. (value_dies_in_block_x): Use the oracle. Cache the outcome in EXPR_DIES. (valid_in_sets): Check if the VUSE for a REFERENCE is available. (eliminate): Do not remove stmts during elimination, instead queue and remove them afterwards. (do_pre): Do not rebuild alias info. (pass_pre): Run TODO_rebuild_alias before PRE. * tree-ssa-live.c (remove_unused_locals): Remove memory-tag code. * tree-sra.c (sra_walk_function): Use gimple_references_memory_p. (mark_all_v_defs_stmt): Remove. (mark_all_v_defs_seq): Adjust. (sra_replace): Likewise. (scalarize_use): Likewise. (scalarize_copy): Likewise. (scalarize_init): Likewise. (scalarize_ldst): Likewise. (todoflags): Remove. (tree_sra): Do not rebuild alias info. (tree_sra_early): Adjust. (pass_sra): Run TODO_update_address_taken before SRA. * tree-predcom.c (set_alias_info): Remove. (prepare_initializers_chain): Do not call it. (mark_virtual_ops_for_renaming): Adjust. (mark_virtual_ops_for_renaming_list): Remove. (initialize_root_vars): Adjust. (initialize_root_vars_lm): Likewise. (prepare_initializers_chain): Likewise. * tree-ssa-copy.c (may_propagate_copy): Remove memory-tag related code. (may_propagate_copy_into_stmt): Likewise. (merge_alias_info): Do nothing for now. (propagate_tree_value_into_stmt): Adjust. (stmt_may_generate_copy): Likewise. * tree-ssa-forwprop.c (tidy_after_forward_propagate_addr): Do not mark symbols for renaming. (forward_propagate_addr_expr): Match up push/pop_stmt_changes with the same statement, make sure to update the new pointed-to one. * tree-ssa-dce.c (eliminate_unnecessary_stmts): Do not copy call statements, do not mark symbols for renaming. (mark_operand_necessary): Dump something. (ref_may_be_aliased): New function. (mark_aliased_reaching_defs_necessary_1): New helper function. (mark_aliased_reaching_defs_necessary): Likewise. (mark_all_reaching_defs_necessary_1): Likewise. (mark_all_reaching_defs_necessary): Likewise. (propagate_necessity): Do not process virtual PHIs. For non-aliased loads mark all reaching definitions as necessary. For aliased loads and stores mark the immediate dominating aliased clobbers as necessary. (visited): New global static. (perform_tree_ssa_dce): Free visited bitmap after propagating necessity. (remove_dead_phis): Perform simple dead virtual PHI removal. (remove_dead_stmt): Properly unlink virtual operands when removing stores. (eliminate_unnecessary_stmts): Schedule PHI removal after stmt removal. * tree-ssa-ter.c (is_replaceable_p): Adjust. (process_replaceable): Likewise. (find_replaceable_in_bb): Likewise. * tree-ssa.c (verify_ssa_name): Verify all VOPs are based on the single gimple vop. (verify_flow_insensitive_alias_info): Remove. (verify_flow_sensitive_alias_info): Likewise. (verify_call_clobbering): Likewise. (verify_memory_partitions): Likewise. (verify_alias_info): Likewise. (verify_ssa): Adjust.. (execute_update_addresses_taken): Export. Update SSA manually. Optimize only when optimizing. Use a local bitmap. (pass_update_address_taken): Remove TODO_update_ssa, add TODO_dump_func. (pass_update_address_taken): Just use TODO_update_address_taken. (init_tree_ssa): Do not initialize addressable_vars. (verify_ssa): Verify new VUSE / VDEF properties. Verify that all stmts definitions have the stmt as SSA_NAME_DEF_STMT. Do not call verify_alias_info. (delete_tree_ssa): Clear the VUSE, VDEF operands. Do not free the loaded and stored syms bitmaps. Reset the escaped and callused solutions. Do not free addressable_vars. Remove memory-tag related code. (warn_uninitialized_var): Aliases are always available. * tree-ssa-loop-prefetch.c (gather_memory_references): Adjust. * lambda-code.c (can_put_in_inner_loop): Adjust. (can_put_after_inner_loop): Likewise. (perfect_nestify): Likewise. * tree-vect-stmts.c (vect_stmt_relevant_p): Adjust. (vect_gen_widened_results_half): Remove CALL_EXPR handling. (vectorizable_conversion): Do not mark symbols for renaming. * tree-inline.c (remap_gimple_stmt): Clear VUSE/VDEF. (expand_call_inline): Unlink the calls virtual operands before replacing it. (tree_function_versioning): Do not call update_ssa if we are not updating clones. Simplify. * tree-ssa-phiprop.c (phivn_valid_p): Adjust. (propagate_with_phi): Likewise.. * tree-outof-ssa.c (create_temp): Remove memory tag and call clobber code. Assert we are not aliased or global. * tree-flow.h: Include tree-ssa-alias.h (enum escape_type): Remove. (struct mem_sym_stats_d): Likewise. (struct mem_ref_stats_d): Likewise. (struct gimple_df): Add vop member. Remove global_var, call_clobbered_vars, call_used_vars, addressable_vars, aliases_compted_p and mem_ref_stats members. Add syms_to_rename, escaped and callused members. (struct ptr_info_def): Remove all members, add points-to solution member pt. (struct var_ann_d): Remove in_vuse_list, in_vdef_list, call_clobbered, escape_mask, mpt and symbol_mem_tag members. * Makefile.in (TREE_FLOW_H): Add tree-ssa-alias.h. (tree-ssa-structalias.o): Remove tree-ssa-structalias.h. (tree-ssa-alias.o): Likewise. (toplev.o): Add tree-ssa-alias.h (GTFILES): Remove tree-ssa-structalias.h, add tree-ssa-alias.h. * gimple.c (gimple_set_bb): Fix off-by-one error. (is_gimple_reg): Do not handle memory tags. (gimple_copy): Also copy virtual operands. Delay updating the statement. Do not reset loaded and stored syms. (gimple_set_stored_syms): Remove. (gimple_set_loaded_syms): Likewise. (gimple_call_copy_skip_args): Copy the virtual operands and mark the new statement modified. * tree-ssa-structalias.c (may_alias_p): Remove. (set_uids_in_ptset): Take the alias set to prune with as parameter. Fold in the alias test of may_alias_p. (compute_points_to_sets): Compute whether a ptr is dereferenced in a local sbitmap. (process_constraint): Deal with &ANYTHING on the lhs, reject all other ADDRESSOF constraints on the lhs. (get_constraint_for_component_ref): Assert that we don't get ADDRESSOF constraints from the base of the reference. Properly generate UNKNOWN_OFFSET for DEREF if needed. (struct variable_info): Remove collapsed_to member. (get_varinfo_fc): Remove. (new_var_info): Do not set collapsed_to. (dump_constraint): Do not follow cycles. (dump_constraint_graph): Likewise. (build_pred_graph): Likewise. (build_succ_graph): Likewise. (rewrite_constraints): Likewise. (do_simple_structure_copy): Remove. (do_rhs_deref_structure_copy): Remove. (do_lhs_deref_structure_copy): Remove. (collapse_rest_of_var): Remove. (do_structure_copy): Re-implement. (pta_stats): New global variable. (dump_pta_stats): New function. (struct constraint_expr): Make offset signed. (UNKNOWN_OFFSET): Define special value. (dump_constraint): Dump UNKNOWN_OFFSET as UNKNOWN. (solution_set_expand): New helper function split out from ... (do_sd_constraint): ... here. (solution_set_add): Handle UNKNOWN_OFFSET. Handle negative offsets. (do_ds_constraint): Likewise. (do_sd_constraint): Likewise. Do not special-case ESCAPED = *ESCAPED and CALLUSED = *CALLUSED. (set_union_with_increment): Make inc argument signed. (type_safe): Remove. (get_constraint_for_ptr_offset): Handle unknown and negative constant offsets. (first_vi_for_offset): Handle offsets before start. Bail out early for offsets beyond the variable extent. (first_or_preceding_vi_for_offset): New function. (init_base_vars): Add ESCAPED = ESCAPED + UNKNOWN_OFFSET constraint. Together with ESCAPED = *ESCAPED this properly computes reachability. (find_what_var_points_to): New function. (find_what_p_points_to): Implement in terms of find_what_var_points_to. (pt_solution_reset, pt_solution_empty_p, pt_solution_includes_global, pt_solution_includes_1, pt_solution_includes, pt_solutions_intersect_1, pt_solutions_intersect): New functions. (compute_call_used_vars): Remove. (compute_may_aliases): New main entry into PTA computation. * gimple.h (gimple_p): New typedef. (struct gimple_statement_base): Remove references_memory_p. (struct gimple_statement_with_memory_ops_base): Remove vdef_ops, vuse_ops, stores and loads members. Add vdef and vuse members. (gimple_vuse_ops, gimple_set_vuse_ops, gimple_vdef_ops, gimple_set_vdef_ops, gimple_loaded_syms, gimple_stored_syms, gimple_set_references_memory): Remove. (gimple_vuse_op, gimple_vdef_op, gimple_vuse, gimple_vdef, gimple_vuse_ptr, gimple_vdef_ptri, gimple_set_vuse, gimple_set_vdef): New functions. * tree-cfg.c (move_block_to_fn): Fix off-by-one error. (verify_expr): Allow RESULT_DECL. (gimple_duplicate_bb): Do not copy virtual operands. (gimple_duplicate_sese_region): Adjust. (gimple_duplicate_sese_tail): Likewise. (mark_virtual_ops_in_region): Remove. (move_sese_region_to_fn): Do not call it. * passes.c (init_optimization_passes): Remove pass_reset_cc_flags and pass_simple_dse. (execute_function_todo): Handle TODO_update_address_taken, call execute_update_addresses_taken for TODO_rebuild_alias. (execute_todo): Adjust. (execute_one_pass): Init dump files early. * ipa-struct-reorg.c (finalize_var_creation): Do not mark vars call-clobbered. (create_general_new_stmt): Clear vops. * tree-ssa-reassoc.c (get_rank): Adjust. * tree-vect-slp.c (vect_create_mask_and_perm): Do not mark symbols for renaming. * params.def (PARAM_MAX_ALIASED_VOPS): Remove. (PARAM_AVG_ALIASED_VOPS): Likewise. * tree-ssanames.c (init_ssanames): Allocate SYMS_TO_RENAME. (duplicate_ssa_name_ptr_info): No need to copy the shared bitmaps. * tree-ssa-operands.c: Simplify for new virtual operand representation. (operand_build_cmp, copy_virtual_operands, create_ssa_artificial_load_stmt, add_to_addressable_set, gimple_add_to_addresses_taken): Remove public functions. (unlink_stmt_vdef): New function. * gcc.dg/pr19633-1.c: Adjust. * gcc.dg/torture/pta-callused-1.c: Likewise. * gcc.dg/torture/pr39074-2.c: Likewise. * gcc.dg/torture/pr39074.c: Likewise. * gcc.dg/torture/pta-ptrarith-3.c: New testcase. * gcc.dg/torture/pr30375.c: Adjust. * gcc.dg/torture/pr33563.c: Likewise. * gcc.dg/torture/pr33870.c: Likewise. * gcc.dg/torture/pr33560.c: Likewise. * gcc.dg/torture/pta-structcopy-1.c: New testcase. * gcc.dg/torture/ssa-pta-fn-1.c: Likewise. * gcc.dg/tree-ssa/alias-15.c: Remove. * gcc.dg/tree-ssa/ssa-dce-4.c: New testcase. * gcc.dg/tree-ssa/pr26421.c: Adjust. * gcc.dg/tree-ssa/ssa-fre-10.c: XFAIL. * gcc.dg/tree-ssa/ssa-dce-5.c: New testcase. * gcc.dg/tree-ssa/pr23382.c: Adjust. * gcc.dg/tree-ssa/ssa-fre-20.c: New testcase. * gcc.dg/tree-ssa/alias-16.c: Adjust. * gcc.dg/tree-ssa/ssa-fre-13.c: Likewise. * gcc.dg/tree-ssa/ssa-fre-14.c: Likewise. * gcc.dg/tree-ssa/alias-18.c: Likewise. * gcc.dg/tree-ssa/ssa-fre-15.c: Likewise. * gcc.dg/tree-ssa/ssa-lim-3.c: Likewise. * gcc.dg/tree-ssa/alias-19.c: Likewise. * gcc.dg/tree-ssa/pta-ptrarith-1.c: New testcase. * gcc.dg/tree-ssa/pr13146.c: Likewise. * gcc.dg/tree-ssa/ssa-pre-23.c: Likewise. * gcc.dg/tree-ssa/pta-ptrarith-2.c: Likewise. * gcc.dg/tree-ssa/ssa-fre-18.c: Likewise. * gcc.dg/tree-ssa/ssa-pre-24.c: New XFAILed testcase. * gcc.dg/tree-ssa/ssa-fre-19.c: New testcase. * gcc.dg/tree-ssa/alias-20.c: Likewise. * gcc.dg/tree-ssa/ssa-dse-12.c: Likewise. * gcc.dg/tree-ssa/pr38895.c: Likewise. * gcc.dg/uninit-B.c: XFAIL. * gcc.dg/vect/no-vfa-vect-43.c: Adjust. * gcc.dg/uninit-pr19430.c: XFAIL. * g++.dg/tree-ssa/pr13146.C: New testcase. * g++.dg/opt/pr36187.C: Adjust. * g++.dg/torture/20090329-1.C: New testcase. From-SVN: r145494
2009-04-03 12:24:28 +02:00
DEFTIMEVAR (TV_ALIAS_STMT_WALK , "alias stmt walking")
DEFTIMEVAR (TV_REG_SCAN , "register scan")
DEFTIMEVAR (TV_REBUILD_JUMP , "rebuild jump labels")
Makefile.in (OBJS): Add timevar.o. hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496
2000-04-28 02:59:40 +02:00
/* Timing in various stages of the compiler. */
Integrated preprocessor. top level: * Makefile.in: Remove all references to c-parse.gperf, c-gperf.h, and c-parse.h. Remove -d from yacc command line generating c-parse.c. Update dependencies. * c-parse.gperf, c-gperf.h: Delete. * c-common.c: Don't define parse_options, cpp_token, yy_cur, yy_lim, or yy_get_token. Don't define get_directive_line if USE_CPPLIB. * c-common.h: Add multiple include guard. Define RID values for every keyword in C, C++, and Objective C. Put all the modifiers first. (struct c_fileinfo, get_fileinfo, dump_time_statistics): New. * c-decl.c (c_decode_option): Handle -lang-objc here. (print_lang_identifier): Handle C_IS_RESERVED_WORD case. (grokdeclarator): Adjust for new RID scheme. (extract_interface_info): New stub. * c-lang.c: Don't declare yy_cur or parse_options. (lang_init_options): Call cpp_init. Don't call cpp_options_init. (lang_init): Don't call check_newline if USE_CPPLIB. * c-lex.c: Don't include c-parse.h. Do include timevar.h. Elide lots of unnecessary code if USE_CPPLIB. Delete code rendered unnecessary by new architecture. Move routines not shared with C++ to c-parse.in. Maintain a local idea of the line number. Handle C++ as well as C. [USE_CPPLIB]: Declare and register callbacks for #ident and for entering/leaving files. (init_c_lex, c_lex): Are now the entry points to this file. (check_newline): Break out directive handling to process_directive. (read_ucs, is_extended_char, utf8_extend_token): Moved here from C++ front end. (readescape, parse_float): Overhaul. (lex_number, lex_string, lex_charconst): Break out of c_lex (n'ee yylex). (get_fileinfo, update_header_times, dump_one_header, dump_time_statistics): New and/or moved here from C++. Support per-file data needed by C++ and per-header timing statistics (C++ only, at the moment). * c-lex.h: Update prototypes. Add multiple include guard. * c-tree.h (struct lang_identifier): Add rid_code field. (C_IS_RESERVED_WORD, C_RID_CODE): New. * c-parse.in: Include c-pragma.h. Remove unnecesary calls to reinit_parse_for_function and/or position_after_white_space. (save_filename, save_lineno): Look ahead before saving. (label -> identifier ':'): Save file and line before shifting ':'. (reservedwords): No need to call get_identifier. (init_parse, finish_parse, yyerror, yylex, yyprint, make_pointer_declarator): Are now here for C/ObjC. (rid_to_yy): Conversion table from RID constants to Yacc codes. * c-pragma.c: Rewrite parsing logic to fit with cpplib's #pragma registry. Provide dummy implementation of that interface if !USE_CPPLIB. * c-pragma.h: Update to match. * flags.h: Add multiple include guard. (flag_detailed_statistics): Moved here from C++. * toplev.c: Define flag_detailed_statistics. * gcc.c (C specs): Use %(trad_capable_cpp) for -E|-M|-MM case #if USE_CPPLIB. * timevar.def (TV_CPP, TV_LEX): New. * timevar.h: Add multiple include guard. * objc/lang-specs.h: Use %(trad_capable_cpp) for -E|-M|-MM case #if USE_CPPLIB. * objc/objc-act.c: Don't mention yy_cur or parse_options. Initialize cpplib properly. Force lineno to 0 after first call to check_newline. Don't handle -lang-objc here. Move forget_protocol_qualifiers and remember_protocol_qualifiers here. cp: * Make-lang.in, Makefile.in: Remove all references to input.c, gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS. * gxx.gperf, hash.h, input.c: Delete. * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is initialized properly. * class.c (fixup_pending_inline): Take a tree, not a struct pending_inline *. All callers changed. (init_class_processing): Set RID_PUBLIC, RID_PRIVATE, RID_PROTECTED entries in ridpointers[] array here. * decl.c (duplicate_decls): Do not refer to struct pending_inline. (record_builtin_type, init_decl_processing): Use RID_MAX not CP_RID_MAX. (grokdeclarator): Use C_IS_RESERVED_WORD. * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of cpplib. (grok_x_components): Do not inspect pending_inlines chain. * cp-tree.h (struct lang_identifier): Add rid_code entry. (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New. (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare. (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME, TIME_IDENTIFIER_FILEINFO): Kill. Update prototypes. * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a single 32-bit word. * parse.y: Call do_pending_inlines unconditionally. reinit_parse_for_method is now snarf_method. fn.defpen is no longer necessary. Remove unnecessary <itype> annotation on SCOPE. Do not refer to end_of_file or struct pending_inline. * semantics.c (begin_inline_definitions): Call do_pending_inlines unconditionally. * lex.c: Remove all code now shared with C front end. Initialize cpplib properly if USE_CPPLIB. Put reserved words into the get_identifier table. Rewrite pragma handling to work with the registry. Move code to save tokens for later processing to spew.c. * spew.c: Rewrite everything in terms of token streams instead of text. Move routines here from lex.c / input.c as appropriate. GC-mark trees hanging off the pending inlines chain. testsuite: * g++.old-deja/g++.benjamin/13478.C: Put meaningful tags on ERROR markers. * g++.old-deja/g++.brendan/crash8.C: Move ERROR marker up one line. * gcc.dg/c99-array-nonobj-1.c: Don't expect func[] cases to fail. * gcc.dg/wtr-label-1.c: Don't use unconstrained .* in error regexps. * gcc.dg/wtr-suffix-1.c: Correct error regexps. * gcc.dg/cpp/unc1.c, gcc.dg/cpp/unc2.c, gcc.dg/cpp/unc3.c: Preprocess only. * gcc.dg/cpp/unc4.c: Adjust line number in dg-error line. * gcc.dg/noncompile/const-ll-1.c: Generalize error regexp. From-SVN: r36216
2000-09-07 02:37:14 +02:00
DEFTIMEVAR (TV_CPP , "preprocessing")
DEFTIMEVAR (TV_LEX , "lexical analysis")
Upgrade the utility of timevars. Index: gcc/ChangeLog 2011-04-27 Lawrence Crowl <crowl@google.com> * timevar.h (timevar_cond_start): Remove unused POP_TIMEVAR_AND_RETURN. (timevar_cond_start): New for starting a timer only when it is not already running. (timevar_cond_stop): New for stopping a timer when it was not already running. * timevar.c (timevar_stop): Enable start/stop timers to start again. (timevar_cond_start): New as above. (timevar_cond_stop): New as above. * timevar.def: Add start/stop timers for compiler phases, TV_PHASE_SETUP, TV_PHASE_PARSING, TV_PHASE_DEFERRED, TV_PHASE_CGRAPH, TV_PHASE_DBGINFO (C), TV_PHASE_CHECK_DBGINFO (C++), TV_PHASE_GENERATE, and TV_PHASE_FINALIZE. Change push/pop timer TV_PARSE to TV_PARSE_GLOBAL. Add push/pop timers TV_PARSE_STRUCT, TV_PARSE_ENUM, TV_PARSE_FUNC, TV_PARSE_INLINE, TV_PARSE_INMETH, TV_TEMPLATE_INST. Change push/pop timer TV_NAME_LOOKUP into a start/stop timer. Make unused TV_OVERLOAD into a start/stop timer. Remove unused timers TV_OVERLOAD, TV_TEMPLATE_INSTANTIATION. Mark the strings for TV_NAME_LOOKUP and TV_OVERLOAD with a "|" to indicate that they are start/stop timers. * toplev.c (compile_file): Change TV_PARSE to TV_PARSE_GLOBAL. Add start/stop timers TV_PHASE_PARSING and TV_PHASE_GENERATE. Move initialization to do_compile. (do_compile): Add initialization from above. Add start/stop timers TV_PHASE_SETUP and TV_PHASE_FINALIZE. * c-decl.c (c_write_global_declarations): Add start/stop of TV_PHASE_DEFERRED, TV_PHASE_CGRAPH, TV_PHASE_DBGINFO. * c-parser.c (c_parser_declaration_or_fndef): Push/pop TV_PARSE_FUNC or TV_PARSE_INLINE, as appropriate. (c_parser_enum_specifier): Push/pop TV_PARSE_ENUM. (c_parser_struct_or_union_specifier): Push/pop TV_PARSE_STRUCT. Index: gcc/cp/ChangeLog 2011-04-27 Lawrence Crowl <crowl@google.com> * decl.c: (push_local_name): Change TV_NAME_LOOKUP to start/stop. (poplevel): Refactor POP_TIMEVAR_AND_RETURN to plain code. Change TV_NAME_LOOKUP to start/stop. (define_label): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start/stop. (xref_tag): Likewise. (lookup_label): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start_cond/stop_cond. * pt.c: (instantiate_class_template): Add a wrapper to push/pop new TV_TEMPLATE_INST. (instantiate_template): Add a wrapper to push/pop new TV_TEMPLATE_INST. (lookup_template_class): Refactor timevar calls out to a wrapper function. Change use of TV_NAME_LOOKUP to TV_TEMPLATE_INST. (instantiate_decl): Change TV_PARSE to TV_TEMPLATE_INST. * name-lookup.c: (store_bindings): Change TV_NAME_LOOKUP to start/stop. (poplevel_class): Change TV_NAME_LOOKUP to start_cond/stop_cond. (push_namespace): Likewise. (pop_nested_namespace): Likewise. (pushdecl_namespace_level): Likewise. (store_class_bindings): Likewise. (push_to_top_level): Likewise. (identifier_type_value): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start/stop. (find_binding): Likewise. (push_using_decl): Likewise. (lookup_arg_dependent): Likewise. (push_using_directive): Likewise. (qualified_lookup_using_namespace): Refactor POP_TIMEVAR_AND_RETURN to plain code. Change TV_NAME_LOOKUP to start/stop. (lookup_type_current_level): Likewise. Refactor inner return to break. (pushdecl_class_level): Refactor POP_TIMEVAR_AND_RETURN to plain code. Change TV_NAME_LOOKUP to start_cond/stop_cond. (pushdecl_top_level_1): Likewise. (lookup_using_namespace): Likewise. (pushdecl_with_scope): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start_cond/stop_cond. (push_overloaded_decl): Likewise. (push_class_level_binding): Likewise. (namespace_binding): Likewise. (set_namespace_binding): Likewise. (supplement_binding): Likewise. (unqualified_namespace_lookup): Likewise. (lookup_name_real): Likewise. (lookup_type_scope): Likewise. (namespace_ancestor): Likewise. (lookup_name_innermost_nonclass_level): Likewise. (pushtag): Likewise. (pop_from_top_level): Likewise. (pushdecl_maybe_friend): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start_cond/stop_cond. Wrap long lines. (add_using_namespace): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start_cond/stop_cond. Bypass wrapper on call to self. * decl2.c: (cp_write_global_declarations): Add start/stop of new TV_PHASE_DEFERRED, TV_PHASE_CGRAPH, TV_PHASE_CHECK_DBGINFO. Remove push/pop calls to TV_VARCONST. * parser.c: Add include of "timevar.h". (cp_parser_explicit_instantiation): Add push/pop calls to TV_TEMPLATE_INST. (cp_parser_enum_specifier): Add push/pop calls to new TV_PARSE_ENUM. (cp_parser_class_specifier): Add wrapper to add push/pop calls to TV_PARSE_STRUCT. (cp_parser_function_definition_from_specifiers_and_declarator): Add push/pop calls to new TV_PARSE_FUNC or TV_PARSE_INLINE. (cp_parser_late_parsing_for_member): Add push/pop calls to new TV_PARSE_INMETH. * call.c: Add include of "timevar.h". (convert_class_to_reference): Wrap and add push/pop calls to TV_OVERLOAD. (build_op_call): Likewise. (build_conditional_expr): Likewise. (build_new_op): Likewise. (build_new_method_call): Likewise. (build_user_type_conversion): Reorganize to single return and add push/pop calls to TV_OVERLOAD. (perform_overload_resolution): Likewise. * Make-lang.in: Add dependence of call.o and parser.o on $(TIMEVAR_H). From-SVN: r173277
2011-05-03 00:19:48 +02:00
DEFTIMEVAR (TV_PARSE_GLOBAL , "parser (global)")
DEFTIMEVAR (TV_PARSE_STRUCT , "parser struct body")
DEFTIMEVAR (TV_PARSE_ENUM , "parser enumerator list")
DEFTIMEVAR (TV_PARSE_FUNC , "parser function body")
DEFTIMEVAR (TV_PARSE_INLINE , "parser inl. func. body")
DEFTIMEVAR (TV_PARSE_INMETH , "parser inl. meth. body")
DEFTIMEVAR (TV_TEMPLATE_INST , "template instantiation")
Improving concepts performance and diagnostics. PR c++/67565 PR c++/67579 PR c++/71843 gcc/ * timevar.def (TV_CONSTRAINT_SAT, TV_CONSTRAINT_SUB): New time vars for constraint satisfaction and subsumption. * timevar.h (auto_timevar): New constructor that matches the push/pop pattern of usage in pt.c. gcc/cp/ * cp-tree.def (CHECK_CONSTR): New. * cp-tree.h (CHECK_CONSTR_CONCEPT): New. (CHECK_CONSTR_ARGS): New. * constraint.cc (make_predicate_constraint): Remove in favor of normalize_expression. (resolve_constraint_check): Actually return error_mark_node when resolution fails. (resolve_variable_concept_check): Perform coercion as if processing a template. Also return errors on resolution failure. (lift_*): Remove all of these functions. Don't unnecessarily inline concepts. (learn_*): Add facilities to memoize implications for subsumption during normalization. (expanding_concept): New. (expand_concept): New. Return the inlined and normalized definition of a concept when needed. (transform_*, xform_*): Rename to normalize_* to better reflect the responsibility of those functions. (normalize_template_id_expression): Check for non-boolean operands when possible. Generate check constraints instead of normal variable references. (normalize_call_expression): Report errors when resolution fails. (check_for_logical_overloads): Rewrite this check to more accurately report the error. (normalize_atom): Check for overloaded calls and invalid types before determining if the expression refers to a concept. (build_constraints): Don't cache normalized constraints or decmposed assumptions. (finish_shorthand_constraint): Return a normalized expression instead of a predicate constraint. (finish_template_introduction): Same. (placeholder_extract_concept_and_args): Rewrite this since we only ever get check constraints here. (equivalent_placeholder_constraints): Rewrite in terms of check constraints, and handle error_mark_nodes correctly. (tsubst_check_constraint, tsubst_expr_constr, tsubst_type_constr) (tsubst_implicit_conversion_constr) (tsubst_argument_deduction_constr, tsubst_exception_constr) (tsubst_parameterized_constraint, tsubst_constraint): New. (tsbust_conjunection): Replace with tsubst_logical_operator and actually generate the right kind of constraint. (tsubst_requirement_body): Reverse the order of substituted arguments so that they appear in the order written (helps diagnostics). (satisfy_check_constraint): New. (satisfy_conjunction): Simplify. (satisfy_disjunction): Same. (satisfy_constraint_1): Handle check constraints. (eval_constr): New (private) global state. (evaluating_constraints_sentinel): New. Manages eval_constr. (satisfy_constraint): Add timing variables. (satisfy_associated_constraints): Add hooks for memoization. (evaluate_function_concept): Build a check constraint instead of normalizing its definition. (evaluate_variable_concept): Same. (evaluate_constraint_expression): Normalize, but in the current declaration processing context. (evaluating_constraints_p): New. (elide_constraint_failure_p): Actually emit constraint_thresh errors. (diagnose_*): Remove artificial indentation. Add a new parameter to each that tracks the current (complete) constraint prior to any substitutions. (diagnose_expression): Removed. (diagnose_call_expression): Same. (diagnose_template_id): Same. (diagnose_template_id): New. (diagnose_logical_constraint): New. (diagnose_expression_constraint): Show the original expression. (diagnose_type_constraint): Show the original type. (diagnose_implicit_conversion_constraint): Be specific about failures, don't re-diagnose a known-to-be-failed substitutions, and manage elisions properly. (diagnose_argument_deduction_constraint): Same. (diagnose_exception_constraint): Same. (diagnose_parameterized_constraint): Same. (constraint_p): Allow EXPR_PACK_EXPANSION. * logic.cc (next_by_distance): Removed. No longer used. (any_p): Renamed from any_of. (term_entry, term_hasher): New. (term_list): Rewrite to include a hash table for quick lookup. Also, make less stateful. (proof_state): Extend to allow goals to be discharged once satisfied. (non_atomic_constraint_p): New. (any_non_atomic_constraints_p): New. (...rest...): Previous implementation completely replaced with an iterative algorithm that opportunistically prunes the search space before committing to using more memory. * parser.c: (cp_parser_type_parameter): Normalize constraints. (cp_parser_explicit_template_declaration): Same. * pt.c: (finish_template_variable): Be less redundant with this error message. (template_args_equal): No longer static. (tsubst_decl): Don't try to find specializations of variables that have already been instantiated. (build_non_dependent_expr): Avoid infinite recursion during concept expansion. (make_constrained_auto): Normalize constraints. (do_auto_deduction): When doing auto deduction from a partial-concept-id, be sure to include the explicit args checking the constraints. (constraint_sat_*): New. Memoize satisfied constraints. (concept_spec_*): New. Memoize expressions associated with a concept specialization. (constraint_memos, concept_memos): New. (lookup_constraint_satisfaction, memoize_constraint_satisfaction): New. (lookup_concept_satisfaction, memoize_concept_satisfaction): New. (get_concept_expansion, save_concept_expansion): New. (hash_subsumption_args): New. (comp_subsumption_args): New. (subsumption_*): New. Memoize parts of the subsumption relation. (lookup_subsumption_result, save_subsumption_result): New. (init_constraint_processing): Initialize memo tables. (get_constraints): Shortcut if !flag_concepts. * decl.c (grokfndecl): Normalize constraints. * error.c (dump_simple_decl): Print "concept" when appropriate. (dump_function_decl): Same. (dump_template_decl): Don't write requirements when we're not printing the header. (dump_expr): Handle fold expressions. * cxx-pretty-print.c (cxx_pretty_printer::expression): Handle fold expressions. (get_fold_operator): New. (pp_cxx_unary_left_fold_expression): New. (pp_cxx_unary_right_fold_expression): New. (pp_cxx_binary_fold_expression): New. (pp_cxx_check_constraint): New. (pp_cxx_*_constraint): Rewrite the grammar of internal constraints to make them easier to read when debugging. * search.c (accessible_p): Don't shortcut when evaluating constraints. * tree.c (cp_tree_equal): Handle CHECK_CONSTR. Co-Authored-By: Jason Merrill <jason@redhat.com> From-SVN: r238558
2016-07-21 08:05:24 +02:00
DEFTIMEVAR (TV_CONSTRAINT_SAT , "constraint satisfaction")
DEFTIMEVAR (TV_CONSTRAINT_SUB , "constraint subsumption")
DEFTIMEVAR (TV_FLATTEN_INLINING , "flatten inlining")
DEFTIMEVAR (TV_EARLY_INLINING , "early inlining heuristics")
DEFTIMEVAR (TV_INLINE_PARAMETERS , "inline parameters")
DEFTIMEVAR (TV_INTEGRATION , "integration")
DEFTIMEVAR (TV_TREE_GIMPLIFY , "tree gimplify")
DEFTIMEVAR (TV_TREE_EH , "tree eh")
DEFTIMEVAR (TV_TREE_CFG , "tree CFG construction")
DEFTIMEVAR (TV_TREE_CLEANUP_CFG , "tree CFG cleanup")
re PR middle-end/43864 (Same basic blocks should be merged) 2011-09-27 Tom de Vries <tom@codesourcery.com> PR middle-end/43864 * tree-ssa-tail-merge.c: New file. (struct same_succ_def): Define. (same_succ, const_same_succ): New typedef. (struct bb_cluster_def): Define. (bb_cluster, const_bb_cluster): New typedef. (struct aux_bb_info): Define. (BB_SIZE, BB_SAME_SUCC, BB_CLUSTER, BB_VOP_AT_EXIT): Define. (gvn_uses_equal): New function. (same_succ_print, same_succ_print_traverse, update_dep_bb) (stmt_update_dep_bb, local_def, same_succ_hash) (inverse_flags, same_succ_equal, same_succ_alloc, same_succ_delete) (same_succ_reset): New function. (same_succ_htab, same_succ_edge_flags) (deleted_bbs, deleted_bb_preds): New var. (debug_same_succ): New function. (worklist): New var. (print_worklist, add_to_worklist, find_same_succ_bb, find_same_succ) (init_worklist, delete_worklist, delete_basic_block_same_succ) (same_succ_flush_bbs, purge_bbs, update_worklist): New function. (print_cluster, debug_cluster, update_rep_bb) (add_bb_to_cluster, new_cluster, delete_cluster): New function. (all_clusters): New var. (alloc_cluster_vectors, reset_cluster_vectors, delete_cluster_vectors) (merge_clusters, set_cluster): New function. (gimple_equal_p, gsi_advance_bw_nondebug_nonlocal, find_duplicate) (same_phi_alternatives_1, same_phi_alternatives, bb_has_non_vop_phi) (deps_ok_for_redirect_from_bb_to_bb, deps_ok_for_redirect) (find_clusters_1, find_clusters): New function. (update_vuses, vop_phi, vop_at_entry, replace_block_by): New function. (update_bbs): New var. (apply_clusters): New function. (update_debug_stmt, update_debug_stmts): New function. (tail_merge_optimize): New function. tree-pass.h (tail_merge_optimize): Declare. * tree-ssa-pre.c (execute_pre): Use tail_merge_optimize. * Makefile.in (OBJS-common): Add tree-ssa-tail-merge.o. (tree-ssa-tail-merge.o): New rule. * opts.c (default_options_table): Set OPT_ftree_tail_merge by default at OPT_LEVELS_2_PLUS. * tree-ssa-sccvn.c (vn_valueize): Move to ... * tree-ssa-sccvn.h (vn_valueize): Here. * timevar.def (TV_TREE_TAIL_MERGE): New timevar. * common.opt (ftree-tail-merge): New switch. * params.def (PARAM_MAX_TAIL_MERGE_COMPARISONS) (PARAM_MAX_TAIL_MERGE_ITERATIONS): New parameter. * doc/invoke.texi (Optimization Options, -O2): Add -ftree-tail-merge. (-ftree-tail-merge, max-tail-merge-comparisons) (max-tail-merge-iterations): New item. From-SVN: r179275
2011-09-27 18:10:42 +02:00
DEFTIMEVAR (TV_TREE_TAIL_MERGE , "tree tail merge")
backport: copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. Merge from tree-cleanup-branch: VRP, store CCP, store copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. * Makefile.in (tree-ssa-copy.o): Depend on tree-ssa-propagate.h. (OBJS-common): Add tree-vrp.o. (tree-vrp.o): New rule. * basic-block.h (nearest_common_dominator_for_set): Declare. * common.opt (ftree-store-ccp): New flag. (ftree-copy-prop): New flag. (ftree-vrp): New flag. (ftree-store-copy-prop): New flag. * dominance.c (nearest_common_dominator_for_set): New. * domwalk.c (walk_dominator_tree): Only traverse statements in blocks marked in walk_data->interesting_blocks. * domwalk.h (struct dom_walk_data): Add field interesting_blocks. * fold-const.c (fold): Handle ASSERT_EXPR. * opts.c (decode_options): Set flag_tree_copy_prop at -O1. Set flag_tree_store_ccp, flag_tree_store_copy_prop and flag_tree_vrp at -O2. * timevar.def (TV_TREE_VRP): Define. (TV_TREE_COPY_PROP): Define. (TV_TREE_STORE_COPY_PROP): Define. (TV_TREE_SSA_INCREMENTAL): Define. (TV_TREE_STORE_CCP): Define. * tree-cfg.c (tree_can_merge_blocks_p): Remove reference to kill_redundant_phi_nodes from comment. (verify_expr): Handle ASSERT_EXPR. * tree-dfa.c (mark_new_vars_to_rename): Remove second argument. Update all users. (mark_call_clobbered_vars_to_rename): Remove. Update all users. * tree-flow-inline.h (unmodifiable_var_p): New. * tree-flow.h (enum value_range_type): Declare. (struct value_range_def): Declare. (value_range): Declare. (remove_all_phi_nodes_for): Remove. Update all users. (find_phi_node_for): Declare. (add_type_alias): Declare. (count_uses_and_derefs): Declare. (kill_redundant_phi_nodes): Remove. (rewrite_into_ssa): Remove. (rewrite_def_def_chains): Remove. (update_ssa, register_new_name_mapping, create_new_def_for, need_ssa_update_p, name_registered_for_update_p, release_ssa_name_after_update_ssa, dump_repl_tbl, debug_repl_tbl, dump_names_replaced_by, debug_names_replaced_by, mark_sym_for_renaming, mark_set_for_renaming, get_current_def, set_current_def, get_value_range, dump_value_range, debug_value_range, dump_all_value_ranges, debug_all_value_ranges, expr_computes_nonzero, loop_depth_of_name, unmodifiable_var_p): Declare. * tree-gimple.c (is_gimple_formal_tmp_rhs): Handle ASSERT_EXPR. * tree-into-ssa.c (block_defs_stack): Update comment. (old_ssa_names, new_ssa_names, old_virtual_ssa_names, syms_to_rename, names_to_release, repl_tbl, need_to_initialize_update_ssa_p, need_to_update_vops_p, need_to_replace_names_p): New locals. (NAME_SETS_GROWTH_FACTOR): Define. (struct repl_map_d): Declare. (struct mark_def_sites_global_data): Add field interesting_blocks. (enum rewrite_mode): Declare. (REGISTER_DEFS_IN_THIS_STMT): Define. (compute_global_livein): Use last_basic_block instead of n_basic_blocks. (set_def_block): Remove last argument. Update all callers. (prepare_use_operand_for_rename): Remove. Update all callers. (prepare_def_operand_for_rename): Remove. Update all callers. (symbol_marked_for_renaming): New. (is_old_name): New. (is_new_name): New. (repl_map_hash): New. (repl_map_eq): New. (repl_map_free): New. (names_replaced_by): New. (add_to_repl_tbl): New. (add_new_name_mapping): New. (mark_def_sites): Assume that all the operands in the statement are in normal form. (find_idf): Assert that the block in the stack is valid. (get_default_def_for): New. (insert_phi_nodes_for): Add new argument 'update_p'. Add documentation. If update_p is true, add a new mapping between the LHS of each new PHI and the name that it replaces. (insert_phi_nodes_1): Only call find_idf if needed. (get_reaching_def): Call get_default_def_for. (rewrite_operand): Remove. (rewrite_stmt): Do nothing if REGISTER_DEFS_IN_THIS_STMT and REWRITE_THIS_STMT are false. Assume that all the operands in the statement are in normal form. (rewrite_add_phi_arguments): Don't use PHI_REWRITTEN. (rewrite_virtual_phi_arguments): Remove. (invalidate_name_tags): Remove. (register_new_update_single, register_new_update_set, rewrite_update_init_block, replace_use, rewrite_update_fini_block, rewrite_update_stmt, rewrite_update_phi_arguments): New. rewrite_blocks): Remove argument 'fix_virtual_phis'. Add arguments 'entry', 'what' and 'blocks'. Initialize the dominator walker according to 'what' and 'blocks'. Start the dominator walk at 'entry'. (mark_def_site_blocks): Add argument 'interesting_blocks'. Use it to configure the dominator walker. (rewrite_into_ssa): Remove argument 'all'. Make internal. (rewrite_all_into_ssa): Remove. (rewrite_def_def_chains): Remove. (mark_def_interesting, mark_use_interesting, prepare_phi_args_for_update, prepare_block_for_update, prepare_def_site_for, prepare_def_sites, dump_names_replaced_by, debug_names_replaced_by, dump_repl_tbl, debug_repl_tbl, init_update_ssa, delete_update_ssa, create_new_def_for, register_new_name_mapping, mark_sym_for_renaming, mark_set_for_renaming, need_ssa_update_p, name_registered_for_update_p, ssa_names_to_replace, release_ssa_name_after_update_ssa, insert_updated_phi_nodes_for, update_ssa): New. * tree-loop-linear.c (linear_transform_loops): Call update_ssa instead of rewrite_into_ssa. * tree-optimize.c (vars_to_rename): Remove. Update all users. (init_tree_optimization_passes): Replace pass_redundant_phi with pass_copy_prop. Add pass_vrp. Replace pass_ccp with pass_store_ccp. Add pass_store_copy_prop after pass_store_ccp. (execute_todo): If the TODO_ flags don't include updating the SSA form, assert that it does not need to be updated. Call update_ssa instead of rewrite_into_ssa and rewrite_def_def_chains. If TODO_verify_loops is set, call verify_loop_closed_ssa. (tree_rest_of_compilation): * tree-pass.h (TODO_dump_func, TODO_ggc_collect, TODO_verify_ssa, TODO_verify_flow, TODO_verify_stmts, TODO_cleanup_cfg): Renumber. (TODO_verify_loops, TODO_update_ssa, TODO_update_ssa_no_phi, TODO_update_ssa_full_phi, TODO_update_ssa_only_virtuals): Define. (pass_copy_prop, pass_store_ccp, pass_store_copy_prop, pass_vrp): Declare. * tree-phinodes.c (make_phi_node): Update documentation. (remove_all_phi_nodes_for): Remove. (find_phi_node_for): New. * tree-pretty-print.c (dump_generic_node): Handle ASSERT_EXPR. * tree-scalar-evolution.c (follow_ssa_edge_in_rhs): Likewise. (interpret_rhs_modify_expr): Likewise. * tree-sra.c (decide_instantiations): Mark all symbols in SRA_CANDIDATES for renaming. (mark_all_v_defs_1): Rename from mark_all_v_defs. (mark_all_v_defs): New function. Update all users to call it with the whole list of scalarized statements, not just the first one. * tree-ssa-alias.c (count_ptr_derefs): Make extern. (compute_flow_insensitive_aliasing): If the tag is unmodifiable and the variable isn't or vice-versa, don't make them alias of each other. (setup_pointers_and_addressables): If the type tag for VAR is about to change, mark the old one for renaming. (add_type_alias): New. * tree-ssa-ccp.c: Document SSA-CCP and STORE-CCP. (ccp_lattice_t): Rename from latticevalue. (value): Remove. Update all users. (const_val): New local variable. (do_store_ccp): New local variable. (dump_lattice_value): Handle UNINITIALIZED. (debug_lattice_value): New. (get_default_value): Re-write. (set_lattice_value): Re-write. (def_to_varying): Remove. Update all users. (likely_value): Return VARYING for statements that make stores when STORE_CCP is false. Return VARYING for any statement other than MODIFY_EXPR, COND_EXPR and SWITCH_EXPR. (ccp_initialize): Re-write. (replace_uses_in, replace_vuse_in, substitute_and_fold): Move to tree-ssa-propagate.c. (ccp_lattice_meet): Handle memory stores when DO_STORE_CCP is true. (ccp_visit_phi_node): Likewise. (ccp_fold): Likewise. (evaluate_stmt): Likewise. (visit_assignment): Likewise. (ccp_visit_stmt): Likewise. (execute_ssa_ccp): Add argument 'store_ccp'. Copy it into DO_STORE_CCP. (do_ssa_ccp): New. (pass_ccp): Use it. (do_ssa_store_ccp): New. (gate_store_ccp): New. (pass_store_ccp): Declare. * tree-ssa-copy.c: Include tree-ssa-propagate.h. (may_propagate_copy): Reformat. Don't abort if ORIG is a virtual and DEST isn't. If NEW does not have alias information but DEST does, copy it. (copy_of, cached_last_copy_of, do_store_copy_prop, enum copy_prop_kind, which_copy_prop): Declare. (stmt_may_generate_copy, get_copy_of_val, get_last_copy_of, set_copy_of_val, dump_copy_of, copy_prop_visit_assignment, copy_prop_visit_cond_stmt, copy_prop_visit_stmt, copy_prop_visit_phi_node, init_copy_prop, fini_copy_prop, execute_copy_prop, gate_copy_prop, do_copy_prop, gate_store_copy_prop, store_copy_prop): New. (pass_copy_prop, pass_store_copy_prop): Declare. * tree-ssa-dom.c (struct opt_stats_d): Add fields 'num_const_prop' and 'num_copy_prop'. (cprop_operand): Update them. (dump_dominator_optimization_stats): Dump them. (tree_ssa_dominator_optimize): Call update_ssa instead of rewrite_into_ssa. (loop_depth_of_name): Declare extern. (simplify_cond_and_lookup_avail_expr): Guard against NULL values for LOW or HIGH. (cprop_into_successor_phis): Only propagate if NEW != ORIG. (record_equivalences_from_stmt): Call expr_computes_nonzero. (cprop_operand): Only propagate if VAL != OP. * tree-ssa-dse.c (dse_optimize_stmt): Mark symbols in removed statement for renaming. * tree-ssa-loop-im.c (move_computations): Call update_ssa. * tree-ssa-loop-ivopts.c (rewrite_address_base): Call add_type_alias if necessary. Call mark_new_vars_to_rename. (tree_ssa_iv_optimize): If new symbols need to be renamed, mark every statement updated, call update_ssa and rewrite_into_loop_closed_ssa. * tree-ssa-loop-manip.c (add_exit_phis): Do not remove DEF_BB from LIVEIN if VAR is a virtual. * tree-ssa-loop.c (tree_loop_optimizer_init): Call update_ssa. * tree-ssa-operands.c (get_expr_operands): Handle ASSERT_EXPR. (get_call_expr_operands): Reformat statement. (add_stmt_operand): Don't create V_MAY_DEFs for read-only symbols. * tree-ssa-propagate.c (ssa_prop_init): Initialize SSA_NAME_VALUE for every name. (first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by): New. (replace_uses_in, replace_vuses_in, replace_phi_args_in, substitute_and_fold): Move from tree-ssa-ccp.c. * tree-ssa-propagate.h (struct prop_value_d, prop_value_t, first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by, replace_uses_in, substitute_and_fold): Declare. * tree-ssa.c (verify_use): Fix error message. (propagate_into_addr, replace_immediate_uses, get_eq_name, check_phi_redundancy, kill_redundant_phi_nodes, pass_redundant_phi): Remove. Update all users. * tree-vect-transform.c (vect_create_data_ref_ptr): Call add_type_alias, if necessary. * tree-vectorizer.h (struct _stmt_vect_info): Update documentation for field 'memtag'. * tree-vrp.c: New file. * tree.def (ASSERT_EXPR): Define. * tree.h (ASSERT_EXPR_VAR): Define. (ASSERT_EXPR_COND): Define. (SSA_NAME_VALUE_RANGE): Define. (struct tree_ssa_name): Add field 'value_range'. (PHI_REWRITTEN): Remove. (struct tree_phi_node): Remove field 'rewritten'. * doc/invoke.texi (-fdump-tree-storeccp, -ftree-copy-prop, -ftree-store-copy-prop): Document. * doc/tree-ssa.texi: Remove broken link to McCAT's compiler. Document usage of update_ssa. testsuite/ChangeLog * g++.dg/tree-ssa/pr18178.C: New test. * gcc.c-torture/execute/20030216-1.x: Ignore at -O1. * gcc.c-torture/execute/20041019-1.c: New test. * gcc.dg/tree-ssa/20041008-1.c: New test. * gcc.dg/tree-ssa/ssa-ccp-12.c: New test. * gcc.dg/tree-ssa/20030731-2.c: Update to use -fdump-tree-store_ccp. * gcc.dg/tree-ssa/20030917-1.c: Likewise. * gcc.dg/tree-ssa/20030917-3.c: Likewise. * gcc.dg/tree-ssa/20040721-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-2.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-3.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-7.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-9.c: Likewise. From-SVN: r97884
2005-04-09 03:37:54 +02:00
DEFTIMEVAR (TV_TREE_VRP , "tree VRP")
Add Early VRP gcc/ChangeLog: 2016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org> * doc/invoke.texi: Document -fdump-tree-evrp. * passes.def: Define new pass_early_vrp. * timevar.def: Define new TV_TREE_EARLY_VRP. * tree-pass.h (make_pass_early_vrp): New. * tree-ssa-propagate.c: Make replace_uses_in non static. * tree-ssa-propagate.h: Export replace_uses_in. * tree-vrp.c (extract_range_for_var_from_comparison_expr): New. (extract_range_from_assert): Factor out extract_range_for_var_from_comparison_expr. (vrp_initialize_lattice): New. (vrp_initialize): Factor out vrp_initialize_lattice. (vrp_valueize): Fix it to reject complex value ranges. (vrp_free_lattice): New. (evrp_dom_walker::before_dom_children): Likewise. (evrp_dom_walker::after_dom_children): Likewise. (evrp_dom_walker::push_value_range): Likewise. (evrp_dom_walker::pop_value_range): Likewise. (execute_early_vrp): Likewise. (execute_vrp): Call vrp_initialize_lattice and vrp_free_lattice. (make_pass_early_vrp): New. gcc/testsuite/ChangeLog: 2016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org> * g++.dg/tree-ssa/pr31146-2.C: Run with -fno-tree-evrp as evrp also does the same transformation. * g++.dg/warn/pr33738.C: XFAIL as optimization now happens in ccp. * gcc.dg/tree-ssa/evrp1.c: New test. * gcc.dg/tree-ssa/evrp2.c: New test. * gcc.dg/tree-ssa/evrp3.c: New test. * gcc.dg/tree-ssa/pr20657.c: Check for the pattern in evrp dump. * gcc.dg/tree-ssa/pr22117.c: Likewise. * gcc.dg/tree-ssa/pr61839_2.c: Likewise. * gcc.dg/tree-ssa/pr64130.c: Likewise. * gcc.dg/tree-ssa/pr37508.c: Change the pattern to be checked as foling now happens early. * gcc.dg/tree-ssa/vrp04.c: Likewise. * gcc.dg/tree-ssa/vrp06.c: Likewise. * gcc.dg/tree-ssa/vrp16.c: Likewise. * gcc.dg/tree-ssa/vrp25.c: Likewise. * gcc.dg/tree-ssa/vrp67.c: Likewise. From-SVN: r240291
2016-09-21 01:23:55 +02:00
DEFTIMEVAR (TV_TREE_EARLY_VRP , "tree Early VRP")
backport: copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. Merge from tree-cleanup-branch: VRP, store CCP, store copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. * Makefile.in (tree-ssa-copy.o): Depend on tree-ssa-propagate.h. (OBJS-common): Add tree-vrp.o. (tree-vrp.o): New rule. * basic-block.h (nearest_common_dominator_for_set): Declare. * common.opt (ftree-store-ccp): New flag. (ftree-copy-prop): New flag. (ftree-vrp): New flag. (ftree-store-copy-prop): New flag. * dominance.c (nearest_common_dominator_for_set): New. * domwalk.c (walk_dominator_tree): Only traverse statements in blocks marked in walk_data->interesting_blocks. * domwalk.h (struct dom_walk_data): Add field interesting_blocks. * fold-const.c (fold): Handle ASSERT_EXPR. * opts.c (decode_options): Set flag_tree_copy_prop at -O1. Set flag_tree_store_ccp, flag_tree_store_copy_prop and flag_tree_vrp at -O2. * timevar.def (TV_TREE_VRP): Define. (TV_TREE_COPY_PROP): Define. (TV_TREE_STORE_COPY_PROP): Define. (TV_TREE_SSA_INCREMENTAL): Define. (TV_TREE_STORE_CCP): Define. * tree-cfg.c (tree_can_merge_blocks_p): Remove reference to kill_redundant_phi_nodes from comment. (verify_expr): Handle ASSERT_EXPR. * tree-dfa.c (mark_new_vars_to_rename): Remove second argument. Update all users. (mark_call_clobbered_vars_to_rename): Remove. Update all users. * tree-flow-inline.h (unmodifiable_var_p): New. * tree-flow.h (enum value_range_type): Declare. (struct value_range_def): Declare. (value_range): Declare. (remove_all_phi_nodes_for): Remove. Update all users. (find_phi_node_for): Declare. (add_type_alias): Declare. (count_uses_and_derefs): Declare. (kill_redundant_phi_nodes): Remove. (rewrite_into_ssa): Remove. (rewrite_def_def_chains): Remove. (update_ssa, register_new_name_mapping, create_new_def_for, need_ssa_update_p, name_registered_for_update_p, release_ssa_name_after_update_ssa, dump_repl_tbl, debug_repl_tbl, dump_names_replaced_by, debug_names_replaced_by, mark_sym_for_renaming, mark_set_for_renaming, get_current_def, set_current_def, get_value_range, dump_value_range, debug_value_range, dump_all_value_ranges, debug_all_value_ranges, expr_computes_nonzero, loop_depth_of_name, unmodifiable_var_p): Declare. * tree-gimple.c (is_gimple_formal_tmp_rhs): Handle ASSERT_EXPR. * tree-into-ssa.c (block_defs_stack): Update comment. (old_ssa_names, new_ssa_names, old_virtual_ssa_names, syms_to_rename, names_to_release, repl_tbl, need_to_initialize_update_ssa_p, need_to_update_vops_p, need_to_replace_names_p): New locals. (NAME_SETS_GROWTH_FACTOR): Define. (struct repl_map_d): Declare. (struct mark_def_sites_global_data): Add field interesting_blocks. (enum rewrite_mode): Declare. (REGISTER_DEFS_IN_THIS_STMT): Define. (compute_global_livein): Use last_basic_block instead of n_basic_blocks. (set_def_block): Remove last argument. Update all callers. (prepare_use_operand_for_rename): Remove. Update all callers. (prepare_def_operand_for_rename): Remove. Update all callers. (symbol_marked_for_renaming): New. (is_old_name): New. (is_new_name): New. (repl_map_hash): New. (repl_map_eq): New. (repl_map_free): New. (names_replaced_by): New. (add_to_repl_tbl): New. (add_new_name_mapping): New. (mark_def_sites): Assume that all the operands in the statement are in normal form. (find_idf): Assert that the block in the stack is valid. (get_default_def_for): New. (insert_phi_nodes_for): Add new argument 'update_p'. Add documentation. If update_p is true, add a new mapping between the LHS of each new PHI and the name that it replaces. (insert_phi_nodes_1): Only call find_idf if needed. (get_reaching_def): Call get_default_def_for. (rewrite_operand): Remove. (rewrite_stmt): Do nothing if REGISTER_DEFS_IN_THIS_STMT and REWRITE_THIS_STMT are false. Assume that all the operands in the statement are in normal form. (rewrite_add_phi_arguments): Don't use PHI_REWRITTEN. (rewrite_virtual_phi_arguments): Remove. (invalidate_name_tags): Remove. (register_new_update_single, register_new_update_set, rewrite_update_init_block, replace_use, rewrite_update_fini_block, rewrite_update_stmt, rewrite_update_phi_arguments): New. rewrite_blocks): Remove argument 'fix_virtual_phis'. Add arguments 'entry', 'what' and 'blocks'. Initialize the dominator walker according to 'what' and 'blocks'. Start the dominator walk at 'entry'. (mark_def_site_blocks): Add argument 'interesting_blocks'. Use it to configure the dominator walker. (rewrite_into_ssa): Remove argument 'all'. Make internal. (rewrite_all_into_ssa): Remove. (rewrite_def_def_chains): Remove. (mark_def_interesting, mark_use_interesting, prepare_phi_args_for_update, prepare_block_for_update, prepare_def_site_for, prepare_def_sites, dump_names_replaced_by, debug_names_replaced_by, dump_repl_tbl, debug_repl_tbl, init_update_ssa, delete_update_ssa, create_new_def_for, register_new_name_mapping, mark_sym_for_renaming, mark_set_for_renaming, need_ssa_update_p, name_registered_for_update_p, ssa_names_to_replace, release_ssa_name_after_update_ssa, insert_updated_phi_nodes_for, update_ssa): New. * tree-loop-linear.c (linear_transform_loops): Call update_ssa instead of rewrite_into_ssa. * tree-optimize.c (vars_to_rename): Remove. Update all users. (init_tree_optimization_passes): Replace pass_redundant_phi with pass_copy_prop. Add pass_vrp. Replace pass_ccp with pass_store_ccp. Add pass_store_copy_prop after pass_store_ccp. (execute_todo): If the TODO_ flags don't include updating the SSA form, assert that it does not need to be updated. Call update_ssa instead of rewrite_into_ssa and rewrite_def_def_chains. If TODO_verify_loops is set, call verify_loop_closed_ssa. (tree_rest_of_compilation): * tree-pass.h (TODO_dump_func, TODO_ggc_collect, TODO_verify_ssa, TODO_verify_flow, TODO_verify_stmts, TODO_cleanup_cfg): Renumber. (TODO_verify_loops, TODO_update_ssa, TODO_update_ssa_no_phi, TODO_update_ssa_full_phi, TODO_update_ssa_only_virtuals): Define. (pass_copy_prop, pass_store_ccp, pass_store_copy_prop, pass_vrp): Declare. * tree-phinodes.c (make_phi_node): Update documentation. (remove_all_phi_nodes_for): Remove. (find_phi_node_for): New. * tree-pretty-print.c (dump_generic_node): Handle ASSERT_EXPR. * tree-scalar-evolution.c (follow_ssa_edge_in_rhs): Likewise. (interpret_rhs_modify_expr): Likewise. * tree-sra.c (decide_instantiations): Mark all symbols in SRA_CANDIDATES for renaming. (mark_all_v_defs_1): Rename from mark_all_v_defs. (mark_all_v_defs): New function. Update all users to call it with the whole list of scalarized statements, not just the first one. * tree-ssa-alias.c (count_ptr_derefs): Make extern. (compute_flow_insensitive_aliasing): If the tag is unmodifiable and the variable isn't or vice-versa, don't make them alias of each other. (setup_pointers_and_addressables): If the type tag for VAR is about to change, mark the old one for renaming. (add_type_alias): New. * tree-ssa-ccp.c: Document SSA-CCP and STORE-CCP. (ccp_lattice_t): Rename from latticevalue. (value): Remove. Update all users. (const_val): New local variable. (do_store_ccp): New local variable. (dump_lattice_value): Handle UNINITIALIZED. (debug_lattice_value): New. (get_default_value): Re-write. (set_lattice_value): Re-write. (def_to_varying): Remove. Update all users. (likely_value): Return VARYING for statements that make stores when STORE_CCP is false. Return VARYING for any statement other than MODIFY_EXPR, COND_EXPR and SWITCH_EXPR. (ccp_initialize): Re-write. (replace_uses_in, replace_vuse_in, substitute_and_fold): Move to tree-ssa-propagate.c. (ccp_lattice_meet): Handle memory stores when DO_STORE_CCP is true. (ccp_visit_phi_node): Likewise. (ccp_fold): Likewise. (evaluate_stmt): Likewise. (visit_assignment): Likewise. (ccp_visit_stmt): Likewise. (execute_ssa_ccp): Add argument 'store_ccp'. Copy it into DO_STORE_CCP. (do_ssa_ccp): New. (pass_ccp): Use it. (do_ssa_store_ccp): New. (gate_store_ccp): New. (pass_store_ccp): Declare. * tree-ssa-copy.c: Include tree-ssa-propagate.h. (may_propagate_copy): Reformat. Don't abort if ORIG is a virtual and DEST isn't. If NEW does not have alias information but DEST does, copy it. (copy_of, cached_last_copy_of, do_store_copy_prop, enum copy_prop_kind, which_copy_prop): Declare. (stmt_may_generate_copy, get_copy_of_val, get_last_copy_of, set_copy_of_val, dump_copy_of, copy_prop_visit_assignment, copy_prop_visit_cond_stmt, copy_prop_visit_stmt, copy_prop_visit_phi_node, init_copy_prop, fini_copy_prop, execute_copy_prop, gate_copy_prop, do_copy_prop, gate_store_copy_prop, store_copy_prop): New. (pass_copy_prop, pass_store_copy_prop): Declare. * tree-ssa-dom.c (struct opt_stats_d): Add fields 'num_const_prop' and 'num_copy_prop'. (cprop_operand): Update them. (dump_dominator_optimization_stats): Dump them. (tree_ssa_dominator_optimize): Call update_ssa instead of rewrite_into_ssa. (loop_depth_of_name): Declare extern. (simplify_cond_and_lookup_avail_expr): Guard against NULL values for LOW or HIGH. (cprop_into_successor_phis): Only propagate if NEW != ORIG. (record_equivalences_from_stmt): Call expr_computes_nonzero. (cprop_operand): Only propagate if VAL != OP. * tree-ssa-dse.c (dse_optimize_stmt): Mark symbols in removed statement for renaming. * tree-ssa-loop-im.c (move_computations): Call update_ssa. * tree-ssa-loop-ivopts.c (rewrite_address_base): Call add_type_alias if necessary. Call mark_new_vars_to_rename. (tree_ssa_iv_optimize): If new symbols need to be renamed, mark every statement updated, call update_ssa and rewrite_into_loop_closed_ssa. * tree-ssa-loop-manip.c (add_exit_phis): Do not remove DEF_BB from LIVEIN if VAR is a virtual. * tree-ssa-loop.c (tree_loop_optimizer_init): Call update_ssa. * tree-ssa-operands.c (get_expr_operands): Handle ASSERT_EXPR. (get_call_expr_operands): Reformat statement. (add_stmt_operand): Don't create V_MAY_DEFs for read-only symbols. * tree-ssa-propagate.c (ssa_prop_init): Initialize SSA_NAME_VALUE for every name. (first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by): New. (replace_uses_in, replace_vuses_in, replace_phi_args_in, substitute_and_fold): Move from tree-ssa-ccp.c. * tree-ssa-propagate.h (struct prop_value_d, prop_value_t, first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by, replace_uses_in, substitute_and_fold): Declare. * tree-ssa.c (verify_use): Fix error message. (propagate_into_addr, replace_immediate_uses, get_eq_name, check_phi_redundancy, kill_redundant_phi_nodes, pass_redundant_phi): Remove. Update all users. * tree-vect-transform.c (vect_create_data_ref_ptr): Call add_type_alias, if necessary. * tree-vectorizer.h (struct _stmt_vect_info): Update documentation for field 'memtag'. * tree-vrp.c: New file. * tree.def (ASSERT_EXPR): Define. * tree.h (ASSERT_EXPR_VAR): Define. (ASSERT_EXPR_COND): Define. (SSA_NAME_VALUE_RANGE): Define. (struct tree_ssa_name): Add field 'value_range'. (PHI_REWRITTEN): Remove. (struct tree_phi_node): Remove field 'rewritten'. * doc/invoke.texi (-fdump-tree-storeccp, -ftree-copy-prop, -ftree-store-copy-prop): Document. * doc/tree-ssa.texi: Remove broken link to McCAT's compiler. Document usage of update_ssa. testsuite/ChangeLog * g++.dg/tree-ssa/pr18178.C: New test. * gcc.c-torture/execute/20030216-1.x: Ignore at -O1. * gcc.c-torture/execute/20041019-1.c: New test. * gcc.dg/tree-ssa/20041008-1.c: New test. * gcc.dg/tree-ssa/ssa-ccp-12.c: New test. * gcc.dg/tree-ssa/20030731-2.c: Update to use -fdump-tree-store_ccp. * gcc.dg/tree-ssa/20030917-1.c: Likewise. * gcc.dg/tree-ssa/20030917-3.c: Likewise. * gcc.dg/tree-ssa/20040721-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-2.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-3.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-7.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-9.c: Likewise. From-SVN: r97884
2005-04-09 03:37:54 +02:00
DEFTIMEVAR (TV_TREE_COPY_PROP , "tree copy propagation")
DEFTIMEVAR (TV_FIND_REFERENCED_VARS , "tree find ref. vars")
DEFTIMEVAR (TV_TREE_PTA , "tree PTA")
DEFTIMEVAR (TV_TREE_INSERT_PHI_NODES , "tree PHI insertion")
DEFTIMEVAR (TV_TREE_SSA_REWRITE_BLOCKS, "tree SSA rewrite")
DEFTIMEVAR (TV_TREE_SSA_OTHER , "tree SSA other")
backport: copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. Merge from tree-cleanup-branch: VRP, store CCP, store copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. * Makefile.in (tree-ssa-copy.o): Depend on tree-ssa-propagate.h. (OBJS-common): Add tree-vrp.o. (tree-vrp.o): New rule. * basic-block.h (nearest_common_dominator_for_set): Declare. * common.opt (ftree-store-ccp): New flag. (ftree-copy-prop): New flag. (ftree-vrp): New flag. (ftree-store-copy-prop): New flag. * dominance.c (nearest_common_dominator_for_set): New. * domwalk.c (walk_dominator_tree): Only traverse statements in blocks marked in walk_data->interesting_blocks. * domwalk.h (struct dom_walk_data): Add field interesting_blocks. * fold-const.c (fold): Handle ASSERT_EXPR. * opts.c (decode_options): Set flag_tree_copy_prop at -O1. Set flag_tree_store_ccp, flag_tree_store_copy_prop and flag_tree_vrp at -O2. * timevar.def (TV_TREE_VRP): Define. (TV_TREE_COPY_PROP): Define. (TV_TREE_STORE_COPY_PROP): Define. (TV_TREE_SSA_INCREMENTAL): Define. (TV_TREE_STORE_CCP): Define. * tree-cfg.c (tree_can_merge_blocks_p): Remove reference to kill_redundant_phi_nodes from comment. (verify_expr): Handle ASSERT_EXPR. * tree-dfa.c (mark_new_vars_to_rename): Remove second argument. Update all users. (mark_call_clobbered_vars_to_rename): Remove. Update all users. * tree-flow-inline.h (unmodifiable_var_p): New. * tree-flow.h (enum value_range_type): Declare. (struct value_range_def): Declare. (value_range): Declare. (remove_all_phi_nodes_for): Remove. Update all users. (find_phi_node_for): Declare. (add_type_alias): Declare. (count_uses_and_derefs): Declare. (kill_redundant_phi_nodes): Remove. (rewrite_into_ssa): Remove. (rewrite_def_def_chains): Remove. (update_ssa, register_new_name_mapping, create_new_def_for, need_ssa_update_p, name_registered_for_update_p, release_ssa_name_after_update_ssa, dump_repl_tbl, debug_repl_tbl, dump_names_replaced_by, debug_names_replaced_by, mark_sym_for_renaming, mark_set_for_renaming, get_current_def, set_current_def, get_value_range, dump_value_range, debug_value_range, dump_all_value_ranges, debug_all_value_ranges, expr_computes_nonzero, loop_depth_of_name, unmodifiable_var_p): Declare. * tree-gimple.c (is_gimple_formal_tmp_rhs): Handle ASSERT_EXPR. * tree-into-ssa.c (block_defs_stack): Update comment. (old_ssa_names, new_ssa_names, old_virtual_ssa_names, syms_to_rename, names_to_release, repl_tbl, need_to_initialize_update_ssa_p, need_to_update_vops_p, need_to_replace_names_p): New locals. (NAME_SETS_GROWTH_FACTOR): Define. (struct repl_map_d): Declare. (struct mark_def_sites_global_data): Add field interesting_blocks. (enum rewrite_mode): Declare. (REGISTER_DEFS_IN_THIS_STMT): Define. (compute_global_livein): Use last_basic_block instead of n_basic_blocks. (set_def_block): Remove last argument. Update all callers. (prepare_use_operand_for_rename): Remove. Update all callers. (prepare_def_operand_for_rename): Remove. Update all callers. (symbol_marked_for_renaming): New. (is_old_name): New. (is_new_name): New. (repl_map_hash): New. (repl_map_eq): New. (repl_map_free): New. (names_replaced_by): New. (add_to_repl_tbl): New. (add_new_name_mapping): New. (mark_def_sites): Assume that all the operands in the statement are in normal form. (find_idf): Assert that the block in the stack is valid. (get_default_def_for): New. (insert_phi_nodes_for): Add new argument 'update_p'. Add documentation. If update_p is true, add a new mapping between the LHS of each new PHI and the name that it replaces. (insert_phi_nodes_1): Only call find_idf if needed. (get_reaching_def): Call get_default_def_for. (rewrite_operand): Remove. (rewrite_stmt): Do nothing if REGISTER_DEFS_IN_THIS_STMT and REWRITE_THIS_STMT are false. Assume that all the operands in the statement are in normal form. (rewrite_add_phi_arguments): Don't use PHI_REWRITTEN. (rewrite_virtual_phi_arguments): Remove. (invalidate_name_tags): Remove. (register_new_update_single, register_new_update_set, rewrite_update_init_block, replace_use, rewrite_update_fini_block, rewrite_update_stmt, rewrite_update_phi_arguments): New. rewrite_blocks): Remove argument 'fix_virtual_phis'. Add arguments 'entry', 'what' and 'blocks'. Initialize the dominator walker according to 'what' and 'blocks'. Start the dominator walk at 'entry'. (mark_def_site_blocks): Add argument 'interesting_blocks'. Use it to configure the dominator walker. (rewrite_into_ssa): Remove argument 'all'. Make internal. (rewrite_all_into_ssa): Remove. (rewrite_def_def_chains): Remove. (mark_def_interesting, mark_use_interesting, prepare_phi_args_for_update, prepare_block_for_update, prepare_def_site_for, prepare_def_sites, dump_names_replaced_by, debug_names_replaced_by, dump_repl_tbl, debug_repl_tbl, init_update_ssa, delete_update_ssa, create_new_def_for, register_new_name_mapping, mark_sym_for_renaming, mark_set_for_renaming, need_ssa_update_p, name_registered_for_update_p, ssa_names_to_replace, release_ssa_name_after_update_ssa, insert_updated_phi_nodes_for, update_ssa): New. * tree-loop-linear.c (linear_transform_loops): Call update_ssa instead of rewrite_into_ssa. * tree-optimize.c (vars_to_rename): Remove. Update all users. (init_tree_optimization_passes): Replace pass_redundant_phi with pass_copy_prop. Add pass_vrp. Replace pass_ccp with pass_store_ccp. Add pass_store_copy_prop after pass_store_ccp. (execute_todo): If the TODO_ flags don't include updating the SSA form, assert that it does not need to be updated. Call update_ssa instead of rewrite_into_ssa and rewrite_def_def_chains. If TODO_verify_loops is set, call verify_loop_closed_ssa. (tree_rest_of_compilation): * tree-pass.h (TODO_dump_func, TODO_ggc_collect, TODO_verify_ssa, TODO_verify_flow, TODO_verify_stmts, TODO_cleanup_cfg): Renumber. (TODO_verify_loops, TODO_update_ssa, TODO_update_ssa_no_phi, TODO_update_ssa_full_phi, TODO_update_ssa_only_virtuals): Define. (pass_copy_prop, pass_store_ccp, pass_store_copy_prop, pass_vrp): Declare. * tree-phinodes.c (make_phi_node): Update documentation. (remove_all_phi_nodes_for): Remove. (find_phi_node_for): New. * tree-pretty-print.c (dump_generic_node): Handle ASSERT_EXPR. * tree-scalar-evolution.c (follow_ssa_edge_in_rhs): Likewise. (interpret_rhs_modify_expr): Likewise. * tree-sra.c (decide_instantiations): Mark all symbols in SRA_CANDIDATES for renaming. (mark_all_v_defs_1): Rename from mark_all_v_defs. (mark_all_v_defs): New function. Update all users to call it with the whole list of scalarized statements, not just the first one. * tree-ssa-alias.c (count_ptr_derefs): Make extern. (compute_flow_insensitive_aliasing): If the tag is unmodifiable and the variable isn't or vice-versa, don't make them alias of each other. (setup_pointers_and_addressables): If the type tag for VAR is about to change, mark the old one for renaming. (add_type_alias): New. * tree-ssa-ccp.c: Document SSA-CCP and STORE-CCP. (ccp_lattice_t): Rename from latticevalue. (value): Remove. Update all users. (const_val): New local variable. (do_store_ccp): New local variable. (dump_lattice_value): Handle UNINITIALIZED. (debug_lattice_value): New. (get_default_value): Re-write. (set_lattice_value): Re-write. (def_to_varying): Remove. Update all users. (likely_value): Return VARYING for statements that make stores when STORE_CCP is false. Return VARYING for any statement other than MODIFY_EXPR, COND_EXPR and SWITCH_EXPR. (ccp_initialize): Re-write. (replace_uses_in, replace_vuse_in, substitute_and_fold): Move to tree-ssa-propagate.c. (ccp_lattice_meet): Handle memory stores when DO_STORE_CCP is true. (ccp_visit_phi_node): Likewise. (ccp_fold): Likewise. (evaluate_stmt): Likewise. (visit_assignment): Likewise. (ccp_visit_stmt): Likewise. (execute_ssa_ccp): Add argument 'store_ccp'. Copy it into DO_STORE_CCP. (do_ssa_ccp): New. (pass_ccp): Use it. (do_ssa_store_ccp): New. (gate_store_ccp): New. (pass_store_ccp): Declare. * tree-ssa-copy.c: Include tree-ssa-propagate.h. (may_propagate_copy): Reformat. Don't abort if ORIG is a virtual and DEST isn't. If NEW does not have alias information but DEST does, copy it. (copy_of, cached_last_copy_of, do_store_copy_prop, enum copy_prop_kind, which_copy_prop): Declare. (stmt_may_generate_copy, get_copy_of_val, get_last_copy_of, set_copy_of_val, dump_copy_of, copy_prop_visit_assignment, copy_prop_visit_cond_stmt, copy_prop_visit_stmt, copy_prop_visit_phi_node, init_copy_prop, fini_copy_prop, execute_copy_prop, gate_copy_prop, do_copy_prop, gate_store_copy_prop, store_copy_prop): New. (pass_copy_prop, pass_store_copy_prop): Declare. * tree-ssa-dom.c (struct opt_stats_d): Add fields 'num_const_prop' and 'num_copy_prop'. (cprop_operand): Update them. (dump_dominator_optimization_stats): Dump them. (tree_ssa_dominator_optimize): Call update_ssa instead of rewrite_into_ssa. (loop_depth_of_name): Declare extern. (simplify_cond_and_lookup_avail_expr): Guard against NULL values for LOW or HIGH. (cprop_into_successor_phis): Only propagate if NEW != ORIG. (record_equivalences_from_stmt): Call expr_computes_nonzero. (cprop_operand): Only propagate if VAL != OP. * tree-ssa-dse.c (dse_optimize_stmt): Mark symbols in removed statement for renaming. * tree-ssa-loop-im.c (move_computations): Call update_ssa. * tree-ssa-loop-ivopts.c (rewrite_address_base): Call add_type_alias if necessary. Call mark_new_vars_to_rename. (tree_ssa_iv_optimize): If new symbols need to be renamed, mark every statement updated, call update_ssa and rewrite_into_loop_closed_ssa. * tree-ssa-loop-manip.c (add_exit_phis): Do not remove DEF_BB from LIVEIN if VAR is a virtual. * tree-ssa-loop.c (tree_loop_optimizer_init): Call update_ssa. * tree-ssa-operands.c (get_expr_operands): Handle ASSERT_EXPR. (get_call_expr_operands): Reformat statement. (add_stmt_operand): Don't create V_MAY_DEFs for read-only symbols. * tree-ssa-propagate.c (ssa_prop_init): Initialize SSA_NAME_VALUE for every name. (first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by): New. (replace_uses_in, replace_vuses_in, replace_phi_args_in, substitute_and_fold): Move from tree-ssa-ccp.c. * tree-ssa-propagate.h (struct prop_value_d, prop_value_t, first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by, replace_uses_in, substitute_and_fold): Declare. * tree-ssa.c (verify_use): Fix error message. (propagate_into_addr, replace_immediate_uses, get_eq_name, check_phi_redundancy, kill_redundant_phi_nodes, pass_redundant_phi): Remove. Update all users. * tree-vect-transform.c (vect_create_data_ref_ptr): Call add_type_alias, if necessary. * tree-vectorizer.h (struct _stmt_vect_info): Update documentation for field 'memtag'. * tree-vrp.c: New file. * tree.def (ASSERT_EXPR): Define. * tree.h (ASSERT_EXPR_VAR): Define. (ASSERT_EXPR_COND): Define. (SSA_NAME_VALUE_RANGE): Define. (struct tree_ssa_name): Add field 'value_range'. (PHI_REWRITTEN): Remove. (struct tree_phi_node): Remove field 'rewritten'. * doc/invoke.texi (-fdump-tree-storeccp, -ftree-copy-prop, -ftree-store-copy-prop): Document. * doc/tree-ssa.texi: Remove broken link to McCAT's compiler. Document usage of update_ssa. testsuite/ChangeLog * g++.dg/tree-ssa/pr18178.C: New test. * gcc.c-torture/execute/20030216-1.x: Ignore at -O1. * gcc.c-torture/execute/20041019-1.c: New test. * gcc.dg/tree-ssa/20041008-1.c: New test. * gcc.dg/tree-ssa/ssa-ccp-12.c: New test. * gcc.dg/tree-ssa/20030731-2.c: Update to use -fdump-tree-store_ccp. * gcc.dg/tree-ssa/20030917-1.c: Likewise. * gcc.dg/tree-ssa/20030917-3.c: Likewise. * gcc.dg/tree-ssa/20040721-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-2.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-3.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-7.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-9.c: Likewise. From-SVN: r97884
2005-04-09 03:37:54 +02:00
DEFTIMEVAR (TV_TREE_SSA_INCREMENTAL , "tree SSA incremental")
DEFTIMEVAR (TV_TREE_OPS , "tree operand scan")
DEFTIMEVAR (TV_TREE_SSA_DOMINATOR_OPTS , "dominator optimization")
DEFTIMEVAR (TV_TREE_SSA_THREAD_JUMPS , "backwards jump threading")
DEFTIMEVAR (TV_TREE_SRA , "tree SRA")
DEFTIMEVAR (TV_ISOLATE_ERRONEOUS_PATHS , "isolate eroneous paths")
DEFTIMEVAR (TV_TREE_CCP , "tree CCP")
DEFTIMEVAR (TV_TREE_PHI_CPROP , "tree PHI const/copy prop")
DEFTIMEVAR (TV_TREE_SPLIT_EDGES , "tree split crit edges")
DEFTIMEVAR (TV_TREE_REASSOC , "tree reassociation")
DEFTIMEVAR (TV_TREE_PRE , "tree PRE")
common.opt (ftree-fre): New flag. * common.opt (ftree-fre): New flag. * flags.h (flag_tree_fre): Declare. * opts.c (decode_options): Set. * timevar.def (TV_TREE_FRE): Define. * tree-flow-inline.h (may_propagate_copy): Re-arrange for readability. Handle destinations that are not SSA_NAMEs. * tree-flow.h (struct ptr_info_def): Move from tree.h (cprop_into_stmt, cprop_into_successor_phis): Remove. (vn_compute, vn_lookup_or_add, vn_add, vn_lookup): Add vuse_optype parameter. * tree-pass.h (pass_fre): Declare. * tree-ssa-copy.c (cprop_operand): Move to tree-ssa-dom.c (cprop_into_stmt): Likewise. (cprop_into_successor_phis): Likewise. * tree-ssa-dom.c (eliminate_redundant_computations): Fix argument ordering in call to may_propagate_copy. * tree-ssa-pre.c (is_undefined_value): Assume hard registers to be always defined. (add_to_sets): New local function. (create_value_expr_from): New local function. (compute_avail): Call them. (eliminate): Don't ignore statements with virtual operands. (init_pre): New local function. (fini_pre): New local function. (execute_pre): Call them. Add argument DO_FRE. Don't do insertion if DO_FRE is true. (do_pre): New function. (do_fre): New function. (gate_fre): New function. (pass_fre): Declare. * tree-ssa.c (init_tree_ssa): Don't call vn_init. (delete_tree_ssa): Don't call vn_delete. * tree-vn.c (val_expr_pair_d): Add documentation. (vn_compute): Add VUSES argument to incorporate in computing hash values. Update all callers. (expressions_equal_p): Call operand_equal_p with OEP_PURE_SAME. (vn_add): Add VUSES argument. Update all callers. (vn_lookup): Likewise. (vn_lookup_or_add): Likewise. * doc/invoke.texi: Document -ftree-fre and -fdump-tree-fre. From-SVN: r83837
2004-06-29 03:53:04 +02:00
DEFTIMEVAR (TV_TREE_FRE , "tree FRE")
DEFTIMEVAR (TV_TREE_SINK , "tree code sinking")
DEFTIMEVAR (TV_TREE_PHIOPT , "tree linearize phis")
DEFTIMEVAR (TV_TREE_BACKPROP , "tree backward propagate")
DEFTIMEVAR (TV_TREE_FORWPROP , "tree forward propagate")
DEFTIMEVAR (TV_TREE_PHIPROP , "tree phiprop")
DEFTIMEVAR (TV_TREE_DCE , "tree conservative DCE")
DEFTIMEVAR (TV_TREE_CD_DCE , "tree aggressive DCE")
DEFTIMEVAR (TV_TREE_CALL_CDCE , "tree buildin call DCE")
DEFTIMEVAR (TV_TREE_DSE , "tree DSE")
DEFTIMEVAR (TV_TREE_MERGE_PHI , "PHI merge")
DEFTIMEVAR (TV_TREE_LOOP , "tree loop optimization")
tree-ssa-loop.c (gate_loop): New function. 2014-06-23 Richard Biener <rguenther@suse.de> * tree-ssa-loop.c (gate_loop): New function. (pass_tree_loop::gate): Call it. (pass_data_tree_no_loop, pass_tree_no_loop, make_pass_tree_no_loop): New. * tree-vectorizer.c: Include tree-scalar-evolution.c (pass_slp_vectorize::execute): Initialize loops and SCEV if required. (pass_slp_vectorize::clone): New method. * timevar.def (TV_TREE_NOLOOP): New. * tree-pass.h (make_pass_tree_no_loop): Declare. * passes.def (pass_tree_no_loop): New pass group with SLP vectorizer. * g++.dg/vect/slp-pr50413.cc: Scan and cleanup appropriate SLP dumps. * g++.dg/vect/slp-pr50819.cc: Likewise. * g++.dg/vect/slp-pr56812.cc: Likewise. * gcc.dg/vect/bb-slp-1.c: Likewise. * gcc.dg/vect/bb-slp-10.c: Likewise. * gcc.dg/vect/bb-slp-11.c: Likewise. * gcc.dg/vect/bb-slp-13.c: Likewise. * gcc.dg/vect/bb-slp-14.c: Likewise. * gcc.dg/vect/bb-slp-15.c: Likewise. * gcc.dg/vect/bb-slp-16.c: Likewise. * gcc.dg/vect/bb-slp-17.c: Likewise. * gcc.dg/vect/bb-slp-18.c: Likewise. * gcc.dg/vect/bb-slp-19.c: Likewise. * gcc.dg/vect/bb-slp-2.c: Likewise. * gcc.dg/vect/bb-slp-20.c: Likewise. * gcc.dg/vect/bb-slp-21.c: Likewise. * gcc.dg/vect/bb-slp-22.c: Likewise. * gcc.dg/vect/bb-slp-23.c: Likewise. * gcc.dg/vect/bb-slp-24.c: Likewise. * gcc.dg/vect/bb-slp-25.c: Likewise. * gcc.dg/vect/bb-slp-26.c: Likewise. * gcc.dg/vect/bb-slp-27.c: Likewise. * gcc.dg/vect/bb-slp-28.c: Likewise. * gcc.dg/vect/bb-slp-29.c: Likewise. * gcc.dg/vect/bb-slp-3.c: Likewise. * gcc.dg/vect/bb-slp-30.c: Likewise. * gcc.dg/vect/bb-slp-31.c: Likewise. * gcc.dg/vect/bb-slp-32.c: Likewise. * gcc.dg/vect/bb-slp-4.c: Likewise. * gcc.dg/vect/bb-slp-5.c: Likewise. * gcc.dg/vect/bb-slp-6.c: Likewise. * gcc.dg/vect/bb-slp-7.c: Likewise. * gcc.dg/vect/bb-slp-8.c: Likewise. * gcc.dg/vect/bb-slp-8a.c: Likewise. * gcc.dg/vect/bb-slp-8b.c: Likewise. * gcc.dg/vect/bb-slp-9.c: Likewise. * gcc.dg/vect/bb-slp-cond-1.c: Likewise. * gcc.dg/vect/bb-slp-pattern-1.c: Likewise. * gcc.dg/vect/bb-slp-pattern-2.c: Likewise. * gcc.dg/vect/fast-math-bb-slp-call-1.c: Likewise. * gcc.dg/vect/fast-math-bb-slp-call-2.c: Likewise. * gcc.dg/vect/fast-math-bb-slp-call-3.c: Likewise. * gcc.dg/vect/no-tree-reassoc-bb-slp-12.c: Likewise. * gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c: Likewise. * gcc.dg/vect/pr26359.c: Likewise. * gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c: Likewise. From-SVN: r211904
2014-06-23 18:51:10 +02:00
DEFTIMEVAR (TV_TREE_NOLOOP , "loopless fn")
DEFTIMEVAR (TV_TREE_LOOP_BOUNDS , "tree loop bounds")
DEFTIMEVAR (TV_LIM , "tree loop invariant motion")
DEFTIMEVAR (TV_TREE_LOOP_IVCANON , "tree canonical iv")
DEFTIMEVAR (TV_SCEV_CONST , "scev constant prop")
DEFTIMEVAR (TV_TREE_LOOP_UNSWITCH , "tree loop unswitching")
DEFTIMEVAR (TV_LOOP_SPLIT , "loop splitting")
tree-ssa-loop-ivcanon.c: New file. * tree-ssa-loop-ivcanon.c: New file. * tree-ssa-loop-manip.c (create_iv): New function. * Makefile.in (tree-ssa-loop-ivcanon.o): Add. (tree-ssa-loop.o, tree-ssa-loop-manip.o): Add SCEV_H dependency. * cfgloop.c (mark_single_exit_loops): New function. (verify_loop_structure): Verify single-exit loops. * cfgloop.h (struct loop): Add single_exit field. (LOOPS_HAVE_MARKED_SINGLE_EXITS): New constant. (mark_single_exit_loops): Declare. (tree_num_loop_insns): Declare. * cfgloopmanip.c (update_single_exits_after_duplication): New function. (duplicate_loop_to_header_edge): Use it. * common.opt (fivcanon): New flag. * timevar.def (TV_TREE_LOOP_IVCANON, TV_COMPLETE_UNROLL): New timevars. * tree-cfg.c (tree_find_edge_insert_loc): Return newly created block. (bsi_commit_edge_inserts_1): Pass null to tree_find_edge_insert_loc. (bsi_insert_on_edge_immediate): New function. * tree-flow.h (bsi_insert_on_edge_immediate, canonicalize_induction_variables, tree_unroll_loops_completely, create_iv): Declare. * tree-optimize.c (init_tree_optimization_passes): Add pass_iv_canon and pass_complete_unroll. * tree-pass.h (pass_iv_canon, pass_complete_unroll): Declare. * tree-scalar-evolution.c (get_loop_exit_condition, get_exit_conditions_rec, number_of_iterations_in_loop, scev_initialize): Use single_exit information. * tree-ssa-loop-niter.c (number_of_iterations_cond): Record missing assumptions. (loop_niter_by_eval): Return number of iterations as unsigned int. * tree-ssa-loop.c (tree_ssa_loop_init): Mark single exit loops. (tree_ssa_loop_ivcanon, gate_tree_ssa_loop_ivcanon, pass_iv_canon, tree_complete_unroll, gate_tree_complete_unroll, pass_complete_unroll): New passes. (tree_ssa_loop_done): Call free_numbers_of_iterations_estimates. * tree-ssanames.c (make_ssa_name): Allow creating ssa name before the defining statement is ready. * tree-vectorizer.c (vect_create_iv_simple): Removed. (vect_create_index_for_array_ref, vect_transform_loop_bound): Use create_iv. (vect_transform_loop_bound): Use single_exit information. (vect_analyze_loop_form): Cleanup bogus tests. (vectorize_loops): Do not call flow_loop_scan. * tree.h (may_negate_without_overflow_p): Declare. * fold-const.c (may_negate_without_overflow_p): Split out from ... (negate_expr_p): ... this function. (tree_expr_nonzero_p): Handle overflowed constants correctly. * doc/invoke.texi (-fivcanon): Document. * doc/passes.texi: Document canonical induction variable creation. * gcc.dg/tree-ssa/loop-1.c: New test. From-SVN: r86516
2004-08-24 22:48:23 +02:00
DEFTIMEVAR (TV_COMPLETE_UNROLL , "complete unrolling")
tree-parloops.c: New file. * tree-parloops.c: New file. * tree-ssa-operands.h (free_stmt_operands): Declare. * tree-ssa-loop-manip.c (split_loop_exit_edge): Return the new basic block. * tree-pass.h (pass_parallelize_loops): Declare. * omp-low.c (expand_omp_parallel, expand_omp_for): Update SSA form for virtual operands. (build_omp_regions_1): Allow analysing just a single OMP region and its subregions. ( build_omp_regions_root, omp_expand_local): New functions. (build_omp_regions): Add argument to build_omp_regions_1 call. * builtins.def (DEF_GOMP_BUILTIN): Initialize OMP builtins when autoparallelization is run. * timevar.def (TV_TREE_PARALLELIZE_LOOPS): New. * tree-ssa-loop.c (gate_tree_parallelize_loops, tree_parallelize_loops, pass_parallelize_loops): New. * common.opt (ftree-parallelize-loops): New. * tree-flow.h (omp_expand_local, tree_duplicate_sese_tail, parallelize_loops): Declare. (add_phi_args_after_copy, split_loop_exit_edge): Declaration changed. * Makefile.in (tree-parloops.o): Added. * tree-cfg.c (add_phi_args_after_copy_edge, tree_duplicate_sese_tail): New functions. (add_phi_args_after_copy_bb): Use add_phi_args_after_copy_edge. (add_phi_args_after_copy): Call add_phi_args_after_copy_edge for one extra edge as well. (tree_duplicate_sese_region): Add argument to add_phi_args_after_copy. Use VEC_free to free doms vector. (move_block_to_fn): Update loop info. Remove phi nodes for virtual operands. Recompute operand caches in the new function. (move_sese_region_to_fn): Update loop info. * passes.c (init_optimization_passes): Add pass_parallelize_loops. * tree-ssa-operands.c (free_stmt_operands): New function. * doc/passes.texi: Document autoparallelization. * doc/invoke.texi (-ftree-parallelize-loops): New option. * gcc.dg/tree-ssa/parallelization-1.c: New test. From-SVN: r128517
2007-09-15 23:53:45 +02:00
DEFTIMEVAR (TV_TREE_PARALLELIZE_LOOPS, "tree parallelize loops")
DEFTIMEVAR (TV_TREE_VECTORIZATION , "tree vectorization")
passes.texi (Tree-SSA passes): Document SLP pass. * doc/passes.texi (Tree-SSA passes): Document SLP pass. * tree-pass.h (pass_slp_vectorize): New pass. * params.h (SLP_MAX_INSNS_IN_BB): Define. * timevar.def (TV_TREE_SLP_VECTORIZATION): Define. * tree-vectorizer.c (timevar.h): Include. (user_vect_verbosity_level): Declare. (vect_location): Fix comment. (vect_set_verbosity_level): Update user_vect_verbosity_level instead of vect_verbosity_level. (vect_set_dump_settings): Add an argument. Ignore user defined verbosity if dump flags require higher level of verbosity. Print to stderr only for loop vectorization. (vectorize_loops): Update call to vect_set_dump_settings. (execute_vect_slp): New function. (gate_vect_slp): Likewise. (struct gimple_opt_pass pass_slp_vectorize): New. * tree-vectorizer.h (struct _bb_vec_info): Define along macros to access its members. (vec_info_for_bb): New function. (struct _stmt_vec_info): Add bb_vinfo and a macro for its access. (VECTORIZATION_ENABLED): New macro. (SLP_ENABLED, SLP_DISABLED): Likewise. (vect_is_simple_use): Add bb_vec_info argument. (new_stmt_vec_info, vect_analyze_data_ref_dependences, vect_analyze_data_refs_alignment, vect_verify_datarefs_alignment, vect_analyze_data_ref_accesses, vect_analyze_data_refs, vect_schedule_slp, vect_analyze_slp): Likewise. (vect_analyze_stmt): Add slp_tree argument. (find_bb_location): Declare. (vect_slp_analyze_bb, vect_slp_transform_bb): Likewise. * tree-vect-loop.c (new_loop_vec_info): Adjust function calls. (vect_analyze_loop_operations, vect_analyze_loop, get_initial_def_for_induction, vect_create_epilog_for_reduction, vect_finalize_reduction, vectorizable_reduction, vectorizable_live_operation, vect_transform_loop): Likewise. * tree-data-ref.c (dr_analyze_innermost): Update comment, skip evolution analysis if analyzing a basic block. (dr_analyze_indices): Likewise. (initialize_data_dependence_relation): Skip the test whether the object is invariant for basic blocks. (compute_all_dependences): Skip dependence analysis for data references in basic blocks. (find_data_references_in_stmt): Don't fail in case of invariant access in basic block. (find_data_references_in_bb): New function. (find_data_references_in_loop): Move code to find_data_references_in_bb and add a call to it. (compute_data_dependences_for_bb): New function. * tree-data-ref.h (compute_data_dependences_for_bb): Declare. * tree-vect-data-refs.c (vect_check_interleaving): Adjust to the case that STEP is 0. (vect_analyze_data_ref_dependence): Check for interleaving in case of unknown dependence in basic block and fail in case of dependence in basic block. (vect_analyze_data_ref_dependences): Add bb_vinfo argument, get data dependence instances from either loop or basic block vectorization info. (vect_compute_data_ref_alignment): Check if it is loop vectorization before calling nested_in_vect_loop_p. (vect_compute_data_refs_alignment): Add bb_vinfo argument, get data dependence instances from either loop or basic block vectorization info. (vect_verify_datarefs_alignment): Likewise. (vect_enhance_data_refs_alignment): Adjust function calls. (vect_analyze_data_refs_alignment): Likewise. (vect_analyze_group_access): Fix printing. Skip different checks if DR_STEP is 0. Keep strided stores either in loop or basic block vectorization data structure. Fix indentation. (vect_analyze_data_ref_access): Fix comments, allow zero step in basic blocks. (vect_analyze_data_ref_accesses): Add bb_vinfo argument, get data dependence instances from either loop or basic block vectorization info. (vect_analyze_data_refs): Update comment. Call compute_data_dependences_for_bb to analyze basic blocks. (vect_create_addr_base_for_vector_ref): Check for outer loop only in case of loop vectorization. In case of basic block vectorization use data-ref itself as a base. (vect_create_data_ref_ptr): In case of basic block vectorization: don't advance the pointer, add new statements before the current statement. Adjust function calls. (vect_supportable_dr_alignment): Support only aligned accesses in basic block vectorization. * common.opt (ftree-slp-vectorize): New flag. * tree-vect-patterns.c (widened_name_p): Adjust function calls. (vect_pattern_recog_1): Likewise. * tree-vect-stmts.c (process_use): Likewise. (vect_init_vector): Add new statements in the beginning of the basic block in case of basic block SLP. (vect_get_vec_def_for_operand): Adjust function calls. (vect_finish_stmt_generation): Likewise. (vectorizable_call): Add assert that it is loop vectorization, adjust function calls. (vectorizable_conversion, vectorizable_assignment): Likewise. (vectorizable_operation): In case of basic block SLP, take vectorization factor from statement's type and skip the relevance check. Adjust function calls. (vectorizable_type_demotion): Add assert that it is loop vectorization, adjust function calls. (vectorizable_type_promotion): Likewise. (vectorizable_store): Check for outer loop only in case of loop vectorization. Adjust function calls. For basic blocks, skip the relevance check and don't advance pointers. (vectorizable_load): Likewise. (vectorizable_condition): Add assert that it is loop vectorization, adjust function calls. (vect_analyze_stmt): Add argument. In case of basic block SLP, check that it is not reduction, get vector type, call only supported functions, skip loop specific parts. (vect_transform_stmt): Check for outer loop only in case of loop vectorization. (new_stmt_vec_info): Add new argument and initialize bb_vinfo. (vect_is_simple_use): Fix comment, add new argument, fix conditions for external definition. * passes.c (pass_slp_vectorize): New pass. * tree-vect-slp.c (find_bb_location): New function. (vect_get_and_check_slp_defs): Add argument, adjust function calls, check for patterns only in loops. (vect_build_slp_tree): Add argument, adjust function calls, fail in case of multiple types in basic block SLP. (vect_mark_slp_stmts_relevant): New function. (vect_supported_load_permutation_p): Fix comment. (vect_analyze_slp_instance): Add argument. In case of basic block SLP, take vectorization factor from statement's type, check that unrolling factor is 1. Adjust function call. Save SLP instance in either loop or basic block vectorization structure. Return FALSE, if SLP failed. (vect_analyze_slp): Add argument. Get strided stores groups from either loop or basic block vectorization structure. Return FALSE if basic block SLP failed. (new_bb_vec_info): New function. (destroy_bb_vec_info, vect_slp_analyze_node_operations, vect_slp_analyze_operations, vect_slp_analyze_bb): Likewise. (vect_schedule_slp): Add argument. Get SLP instances from either loop or basic block vectorization structure. Set vectorization factor to be 1 for basic block SLP. (vect_slp_transform_bb): New function. * params.def (PARAM_SLP_MAX_INSNS_IN_BB): Define. From-SVN: r147829
2009-05-24 10:44:56 +02:00
DEFTIMEVAR (TV_TREE_SLP_VECTORIZATION, "tree slp vectorization")
DEFTIMEVAR (TV_GRAPHITE , "Graphite")
DEFTIMEVAR (TV_GRAPHITE_TRANSFORMS , "Graphite loop transforms")
DEFTIMEVAR (TV_GRAPHITE_DATA_DEPS , "Graphite data dep analysis")
DEFTIMEVAR (TV_GRAPHITE_CODE_GEN , "Graphite code generation")
invoke.texi: Document -ftree-loop-distribution. * doc/invoke.texi: Document -ftree-loop-distribution. * tree-loop-distribution.c: New. * tree-pass.h (pass_loop_distribution): New. * graphds.h (struct graph): Add htab_t indices. * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New. * tree-vectorizer.c (rename_variables_in_loop): Extern. (slpeel_tree_duplicate_loop_to_edge_cfg): Init PENDING_STMT to NULL. * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared. * tree-data-ref.c (debug_data_dependence_relations): New. (dump_data_dependence_relation): Also print data references. (free_data_ref): Extern. (same_access_functions): Moved... (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt. (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component, debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg, struct rdg_vertex_info, rdg_vertex_for_stmt): New. (create_rdg_edge_for_ddr, create_rdg_vertices): Cleaned up. (stmts_from_loop): Skip LABEL_EXPR. (hash_stmt_vertex_info, eq_stmt_vertex_info, hash_stmt_vertex_del): New. (build_rdg): Initialize rdg->indices htab. (free_rdg, stores_from_loop, ref_base_address, rdg_defs_used_in_other_loops_p, have_similar_memory_accesses, have_similar_memory_accesses_1, ref_base_address_1, remove_similar_memory_refs): New. * tree-data-ref.h: Depend on tree-chrec.h. (debug_data_dependence_relations, free_data_ref): Declared. (same_access_functions): ... here. (ddr_is_anti_dependent, ddrs_have_anti_deps, ddr_dependence_level): New. (struct rdg_vertex): Add has_mem_write and has_mem_reads. (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT, RDG_MEM_READS_STMT): New. (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component, debug_rdg_component, dump_rdg, debug_rdg, dot_rdg, rdg_vertex_for_stmt): Declared. (struct rdg_edge): Add level. (RDGE_LEVEL): New. (free_rdg, stores_from_loop, remove_similar_memory_refs, rdg_defs_used_in_other_loops_p, have_similar_memory_accesses): Declared. (rdg_has_similar_memory_accesses): New. * tree-vect-analyze.c: Remove unused static decls. * lambda.h (dependence_level): New. * common.opt (ftree-loop-distribution): New. * tree-flow.h (mark_virtual_ops_in_bb, slpeel_tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared. * Makefile.in (TREE_DATA_REF_H): Depend on tree-chrec.h. (OBJS-common): Add tree-loop-distribution.o. (tree-loop-distribution.o): New rule. * tree-cfg.c (mark_virtual_ops_in_bb): New. (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb. * passes.c (init_optimization_passes): Schedule pass_loop_distribution. * testsuite/gcc.dg/tree-ssa/ldist-{1..12}.c: New. From-SVN: r132745
2008-02-28 13:37:24 +01:00
DEFTIMEVAR (TV_TREE_LOOP_DISTRIBUTION, "tree loop distribution")
loop.texi: Document the Omega linear constraints solver. * doc/loop.texi: Document the Omega linear constraints solver. * doc/invoke.texi: Document -fcheck-data-deps, omega-max-vars, omega-max-geqs, omega-max-eqs, omega-max-wild-cards, omega-hash-table-size, omega-max-keys, and omega-eliminate-redundant-constraints. * tree-pass.h (pass_check_data_deps): Declared. * omega.c: New. * omega.h: New. * timevar.def (TV_CHECK_DATA_DEPS): Declared. * tree-ssa-loop.c (check_data_deps, gate_check_data_deps, pass_check_data_deps): New. * tree-data-ref.c (init_data_ref): Remove declaration. (dump_data_dependence_relation): Dump DDR_INNER_LOOP. (analyze_array): Renamed init_array_ref, move up initializations. (init_data_ref): Renamed init_pointer_ref. Moved before its call. Removed arguments that are set to NULL. (analyze_indirect_ref): Correct indentation, correct call to init_pointer_ref. (object_analysis): Call init_array_ref instead of analyze_array. (initialize_data_dependence_relation): Initialize DDR_INNER_LOOP. (access_functions_are_affine_or_constant_p): Use DR_ACCESS_FNS instead of DR_ACCESS_FNS_ADDR. (init_omega_eq_with_af, omega_extract_distance_vectors, omega_setup_subscript, init_omega_for_ddr_1, init_omega_for_ddr, ddr_consistent_p): New. (compute_affine_dependence): Check consistency of ddrs when flag_check_data_deps is passed. (analyze_all_data_dependences): Uncomment. (tree_check_data_deps): New. * tree-data-ref.h: Include omega.h. (DR_ACCESS_FNS_ADDR): Removed. (data_dependence_relation): Add inner_loop. (DDR_INNER_LOOP): New. * common.opt (fcheck-data-deps): New. * tree-flow.h (tree_check_data_deps): Declare. * Makefile.in (TREE_DATA_REF_H): Depend on omega.h. (OBJS-common): Depend on omega.o. (omega.o): Define. * passes.c (pass_check_data_deps): Scheduled. * params.def (PARAM_OMEGA_MAX_VARS, PARAM_OMEGA_MAX_GEQS, PARAM_OMEGA_MAX_EQS, PARAM_OMEGA_MAX_WILD_CARDS, PARAM_OMEGA_HASH_TABLE_SIZE, PARAM_OMEGA_MAX_KEYS, PARAM_VECT_MAX_VERSION_CHECKS, PARAM_OMEGA_ELIMINATE_REDUNDANT_CONSTRAINTS): New. From-SVN: r122749
2007-03-09 13:39:49 +01:00
DEFTIMEVAR (TV_CHECK_DATA_DEPS , "tree check data dependences")
invoke.texi (-fprefetch-loop-arrays, [...]): Document. * doc/invoke.texi (-fprefetch-loop-arrays, -fprefetch-loop-arrays-rtl): Document. * tree-ssa-loop-niter.c (number_of_iterations_ne, number_of_iterations_lt, number_of_iterations_cond): Remember the shape of the ending condition. * tree-ssa-loop-manip.c: Include params.h. (build_if_stmt, can_unroll_loop_p, determine_exit_conditions, tree_unroll_loop): New functions. * tree-pass.h (pass_loop_prefetch): Declare. * loop.c (rest_of_handle_loop_optimize): Test for -fprefetch-loop-arrays-rtl. * tree-scalar-evolution.h (affine_iv): Moved to tree-flow.h. * timevar.def (TV_TREE_PREFETCH): New timevar. * tree-ssa-loop.c (tree_ssa_loop_prefetch, gate_tree_ssa_loop_prefetch, pass_loop_prefetch): New. * tree-cfgcleanup.c: Include tree-scalar-evolution.h. (cleanup_tree_cfg_loop): Call scev_reset. * common.opt (fprefetch-loop-arrays-rtl): Add. * tree-ssa-loop-prefetch.c: New file. * tree-outof-ssa.c (struct value_expr_d): Add expr_vars field. (new_temp_expr_table): Initialize expr_vars. (free_temp_expr_table): Cleanup expr_vars. (check_replaceable, find_replaceable_in_bb): Prevent accumulating expressions from being merged into one. * tree-flow.h (affine_iv): Moved from tree-scalar-evolution.h. (struct tree_niter_desc): Add control, bound and cmp fields. (tree_ssa_prefetch_arrays, can_unroll_loop_p, tree_unroll_loop): Declare. * Makefile.in (tree-ssa-loop-prefetch.o): Add. (tree-cfgcleanup.o): Add SCEV_H dependency. (tree-ssa-loop-manip.o): Add PARAMS_H dependency. * passes.c (init_optimization_passes): Add pass_loop_prefetch. From-SVN: r110964
2006-02-14 13:22:11 +01:00
DEFTIMEVAR (TV_TREE_PREFETCH , "tree prefetching")
tree-ssa-loop-ivopts.c: New file. * tree-ssa-loop-ivopts.c: New file. * Makefile.in (tree-ssa-loop-ivopts.c): Add. * cfgloop.h (target_avail_regs, target_res_regs, target_small_cost, target_pres_cost, target_spill_cost): Declare. * cfgloopanal.c (avail_regs, res_regs, small_cost, pres_cost, spill_cost): Renamed to ... (target_avail_regs, target_res_regs, target_small_cost, target_pres_cost, target_spill_cost): ... and exported. (init_set_costs, global_cost_for_size): Work with renamed variables. * common.opt (flag_ivopts): New flag. * expr.c (expand_expr_real_1): Handle SSA_NAME case. Handle REF_ORIGINAL. * gimplify.c (struct gimplify_ctx): Add into_ssa field. (internal_get_tmp_var, gimplify_modify_expr, gimplify_expr): Support generating SSA form. (force_gimple_operand): New function. * timevar.def (TV_TREE_LOOP_IVOPTS): New timevar. * tree-cfg.c (stmt_bsi): New function. * params.def (PARAM_IV_CONSIDER_ALL_CANDIDATES_BOUND, PARAM_IV_MAX_CONSIDERED_USES): New. * tree-flow.h (stmt_bsi, tree_ssa_iv_optimize, split_loop_exit_edge, bsi_insert_on_edge_immediate_loop. standard_iv_increment_position, ip_end_pos, ip_normal_pos, force_gimple_operand): Declare. * tree-gimple.c (is_gimple_formal_tmp_var): Accept ssa names. * tree-nested.c (build_addr): Export. * tree-optimize.c (init_tree_optimization_passes): Add pass_iv_optimize. * tree-pass.h (pass_iv_optimize): Declare. * tree-ssa-loop-im.c (for_each_index): Handle REALPART_EXPR and IMAGPART_EXPR. * tree-ssa-loop-manip.c (create_iv): Force the base to be acceptable as a phi node argument. (split_loop_exit_edge, bsi_insert_on_edge_immediate_loop, ip_end_pos, ip_normal_pos, standard_iv_increment_position): New functions. * tree-ssa-loop-niter.c (zero_p, unsigned_type_for): Export. * tree-ssa-loop.c (tree_ssa_loop_ivopts, gate_tree_ssa_loop_ivopts, pass_iv_optimize): New pass. * tree-ssa-operands.c (get_indirect_ref_operands): Handle REF_ORIGINAL. * tree-ssanames.c (release_ssa_name): Allow calling with var = NULL. * tree.c (build_int_cst_type, cst_and_fits_in_hwi): New functions. * tree.h (REF_ORIGINAL): New macro. (build_int_cst_type, unsigned_type_for, zero_p, cst_and_fits_in_hwi, build_addr): Declare. * doc/invoke.texi (-fivopts): Document. (PARAM_IV_CONSIDER_ALL_CANDIDATES_BOUND, PARAM_IV_MAX_CONSIDERED_USES): Document. * doc/passes.texi: Document induction variable optimizations pass. * gcc.dg/tree-ssa/loop-2.c: New test. * gcc.dg/tree-ssa/loop-3.c: New test. * gcc.dg/tree-ssa/loop-4.c: New test. * gcc.dg/tree-ssa/loop-5.c: New test. From-SVN: r87100
2004-09-05 11:25:37 +02:00
DEFTIMEVAR (TV_TREE_LOOP_IVOPTS , "tree iv optimization")
passes.texi: Document predictive commoning. * doc/passes.texi: Document predictive commoning. * doc/invoke.texi (-fpredictive-commoning): Document. * opts.c (decode_options): Enable flag_predictive_commoning on -O3. * tree-ssa-loop-im.c (get_lsm_tmp_name): Export. Allow adding indices to the generated name. (schedule_sm): Pass 0 to get_lsm_tmp_name. * tree-ssa-loop-niter.c (stmt_dominates_stmt_p): Export. * tree-pretty-print.c (op_symbol_1): Renamed to ... (op_symbol_code): ... and exported. (dump_omp_clause, op_symbol): Use op_symbol_code instead of op_symbol_1. * tree-pass.h (pass_predcom): Declare. * timevar.def (TV_PREDCOM): New timevar. * tree-ssa-loop.c (run_tree_predictive_commoning, gate_tree_predictive_commoning, pass_predcom): New. * tree-data-ref.c (find_data_references_in_loop): Find the references in dominance order. (canonicalize_base_object_address): Ensure that the result has pointer type. (dr_analyze_innermost): Export. (create_data_ref): Code to fail for references with invariant address moved ... (find_data_references_in_stmt): ... here. * tree-data-ref.h (dr_analyze_innermost): Declare. * tree-affine.c: Include tree-gimple.h and hashtab.h. (aff_combination_find_elt, name_expansion_hash, name_expansion_eq, tree_to_aff_combination_expand, double_int_constant_multiple_p, aff_combination_constant_multiple_p): New functions. * tree-affine.h (aff_combination_constant_multiple_p, tree_to_aff_combination_expand): Declare. * tree-predcom.c: New file. * common.opt (fpredictive-commoning): New option. * tree-flow.h (op_symbol_code, tree_predictive_commoning, stmt_dominates_stmt_p, get_lsm_tmp_name): Declare. * Makefile.in (tree-predcom.o): Add. (tree-affine.o): Add TREE_GIMPLE_H dependency. * passes.c (init_optimization_passes): Add dceloop after copy propagation in loop optimizer. Add predictive commoning to loop optimizer passes. * gcc.dg/tree-ssa/predcom-1.c: New test. * gcc.dg/tree-ssa/predcom-2.c: New test. * gcc.dg/tree-ssa/predcom-3.c: New test. * gcc.dg/tree-ssa/predcom-4.c: New test. * gcc.dg/tree-ssa/predcom-5.c: New test. * gcc.dg/vect/dump-tree-dceloop-pr26359.c: Test dceloop2 dumps. From-SVN: r125030
2007-05-24 18:09:26 +02:00
DEFTIMEVAR (TV_PREDCOM , "predictive commoning")
DEFTIMEVAR (TV_TREE_CH , "tree copy headers")
DEFTIMEVAR (TV_TREE_SSA_UNCPROP , "tree SSA uncprop")
DEFTIMEVAR (TV_TREE_NRV , "tree NRV optimization")
DEFTIMEVAR (TV_TREE_COPY_RENAME , "tree rename SSA copies")
DEFTIMEVAR (TV_TREE_SSA_VERIFY , "tree SSA verifier")
DEFTIMEVAR (TV_TREE_STMT_VERIFY , "tree STMT verifier")
DEFTIMEVAR (TV_TREE_SWITCH_CONVERSION, "tree switch conversion")
DEFTIMEVAR (TV_TRANS_MEM , "transactional memory")
common.opt: Add -foptimize-strlen option. * common.opt: Add -foptimize-strlen option. * Makefile.in (OBJS): Add tree-ssa-strlen.o. (tree-sssa-strlen.o): Add dependencies. * opts.c (default_options_table): Enable -foptimize-strlen by default at -O2 if not -Os. * passes.c (init_optimization_passes): Add pass_strlen after pass_object_sizes. * timevar.def (TV_TREE_STRLEN): New timevar. * params.def (PARAM_MAX_TRACKED_STRLENS): New parameter. * tree-pass.h (pass_strlen): Declare. * tree-ssa-strlen.c: New file. * c-decl.c (merge_decls): If compatible stpcpy prototype is seen, set implicit_built_in_decls[BUILT_IN_STPCPY]. cp/ * decl.c (duplicate_decls): If compatible stpcpy prototype is seen, set implicit_built_in_decls[BUILT_IN_STPCPY]. testsuite/ * gcc.dg/strlenopt-1.c: New test. * gcc.dg/strlenopt-1f.c: New test. * gcc.dg/strlenopt-2.c: New test. * gcc.dg/strlenopt-2f.c: New test. * gcc.dg/strlenopt-3.c: New test. * gcc.dg/strlenopt-4.c: New test. * gcc.dg/strlenopt-4g.c: New test. * gcc.dg/strlenopt-4gf.c: New test. * gcc.dg/strlenopt-5.c: New test. * gcc.dg/strlenopt-6.c: New test. * gcc.dg/strlenopt-7.c: New test. * gcc.dg/strlenopt-8.c: New test. * gcc.dg/strlenopt-9.c: New test. * gcc.dg/strlenopt-10.c: New test. * gcc.dg/strlenopt-11.c: New test. * gcc.dg/strlenopt-12.c: New test. * gcc.dg/strlenopt-12g.c: New test. * gcc.dg/strlenopt-13.c: New test. * gcc.dg/strlenopt-14g.c: New test. * gcc.dg/strlenopt-14gf.c: New test. * gcc.dg/strlenopt-15.c: New test. * gcc.dg/strlenopt-16g.c: New test. * gcc.dg/strlenopt-17g.c: New test. * gcc.dg/strlenopt-18g.c: New test. * gcc.dg/strlenopt.h: New file. From-SVN: r179277
2011-09-27 18:15:46 +02:00
DEFTIMEVAR (TV_TREE_STRLEN , "tree strlen optimization")
DEFTIMEVAR (TV_CGRAPH_VERIFY , "callgraph verifier")
DEFTIMEVAR (TV_DOM_FRONTIERS , "dominance frontiers")
DEFTIMEVAR (TV_DOMINANCE , "dominance computation")
DEFTIMEVAR (TV_CONTROL_DEPENDENCES , "control dependences")
DEFTIMEVAR (TV_OUT_OF_SSA , "out of ssa")
DEFTIMEVAR (TV_VAR_EXPAND , "expand vars")
DEFTIMEVAR (TV_EXPAND , "expand")
DEFTIMEVAR (TV_POST_EXPAND , "post expand cleanups")
Makefile.in (OBJS): Add timevar.o. hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496
2000-04-28 02:59:40 +02:00
DEFTIMEVAR (TV_VARCONST , "varconst")
DEFTIMEVAR (TV_LOWER_SUBREG , "lower subreg")
Makefile.in (OBJS): Add timevar.o. hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496
2000-04-28 02:59:40 +02:00
DEFTIMEVAR (TV_JUMP , "jump")
DEFTIMEVAR (TV_FWPROP , "forward prop")
Makefile.in (OBJS): Add timevar.o. hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496
2000-04-28 02:59:40 +02:00
DEFTIMEVAR (TV_CSE , "CSE")
DEFTIMEVAR (TV_DCE , "dead code elimination")
DEFTIMEVAR (TV_DSE1 , "dead store elim1")
DEFTIMEVAR (TV_DSE2 , "dead store elim2")
Makefile.in (OBJS): Add timevar.o. hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496
2000-04-28 02:59:40 +02:00
DEFTIMEVAR (TV_LOOP , "loop analysis")
DEFTIMEVAR (TV_LOOP_INIT , "loop init")
DEFTIMEVAR (TV_LOOP_MOVE_INVARIANTS , "loop invariant motion")
DEFTIMEVAR (TV_LOOP_UNROLL , "loop unrolling")
DEFTIMEVAR (TV_LOOP_DOLOOP , "loop doloop")
DEFTIMEVAR (TV_LOOP_FINI , "loop fini")
dbgcnt.def (cprop1, [...]): Remove * dbgcnt.def (cprop1, cprop2, gcse, jump_bypass): Remove (cprop, hoist, pre, store_motion): New debug counters. * tree-pass.h (pass_tracer): Move to list of gimple passes, it is not an RTL pass anymore. (pass_profiling): Remove extern decl for pass removed in 2005. (pass_gcse, pass_jump_bypass): Remove. * final.c (rest_of_clean_state): Set flag_rerun_cse_after_global_opts to 0 for clean state. * toplev.h (flag_rerun_cse_after_global_opts): Add extern declaration. * cse.c (gate_handle_cse_after_global_opts, rest_of_handle_cse_after_global_opts): New functions. (pass_cse_after_global_opts): New pass, does local CSE. * timevar.def (TV_GCSE, TV_CPROP1, TV_CPROP2, TV_BYPASS): Remove. (TV_CPROP): New timevar. * gcse.c (flag_rerun_cse_after_global_opts): New global variable. (run_jump_opt_after_gcse, max_gcse_regno): Remove global vars. (gcse_main, recompute_all_luids): Remove. (compute_hash_table_work): Call max_reg_num instead of reading max_gcse_regno. (cprop_jump): Don't set run_jump_opt_after_gcse. (constprop_register): Always allow to alter jumps. (cprop_insn): Likewise. (do_local_cprop): Likewise. (local_cprop_pass): Likewise. Return non-zero if something changed. (cprop): Remove function, fold interesting bits into one_cprop_pass. (find_implicit_sets): Add note about missed optimization opportunity. (one_cprop_pass): Rewrite to be "the" CPROP pass, called from the pass_rtl_cprop execute function. Don't bother tracking the pass number, each pass gets its own dumpfile now anyway. Always allow to alter jumpsand bypass jumps. (bypass_block): Don't ignore regno >= max_gcse_regno, find_bypass_set will just find no suitable set. (pre_edge_insert): Fix dumping, this function is for PRE only. (one_pre_gcse_pass): Rewrite to be "the" PRE pass, called from the pass_rtl_pre execute function. (hoist_code): Return non-zero if something changed. Keep track of substitutions and insertions for statistics gathering similar to PRE. (one_code_hoisting_pass): Rewrite to be "the" code hoisting pass, called from the pass_rtl_hoist execute function. Show pass statistics. (compute_store_table): Use max_reg_num directly instead of using the formerly global max_gcse_regno. (build_store_vectors): Likewise. (replace_store_insn): Fix dumping. (store_motion): Rename to ... (one_store_motion_pass): ... this. Rewrite to be "the" STORE_MOTION pass, called from the pass_rtl_store_motion execute function. Keep track of substitutions and insertions for statistics gathering similar to PRE. (bypass_jumps): Remove, fold interesting bits into ... (one_cprop_pass): ... this. Rewrite to be "the" CPROP pass, called from the pass_rtl_cprop execute function. (gate_handle_jump_bypass, rest_of_handle_jump_bypass, pass_jump_bypass): Remove. (gate_handle_gcse, rest_of_handle_gcse): Remove. (gate_rtl_cprop, execute_rtl_cprop, pass_rtl_cprop): New. (gate_rtl_pre, execute_rtl_pre, pass_rtl_pre): New. (gate_rtl_hoist, execute_rtl_hoist, pass_rtl_hoist): New. (gate_rtl_store_motion, execute_rtl_store_motion, pass_rtl_store_motion): New. * common.opt: Remove flag_cse_skip_blocks, adjust documentation to make it clear that -fcse-skip-blocks is a no-op for backward compat. * passes.c (init_optimization_passes): Remove pass_gcse and pass_jump_bypass. Schedule cprop, pre, hoist, cprop, store_motion, and cse_after_global_opts in place of pass_gcse. Schedule cprop instead of pass_jump_bypass. From-SVN: r146848
2009-04-27 19:21:27 +02:00
DEFTIMEVAR (TV_CPROP , "CPROP")
DEFTIMEVAR (TV_PRE , "PRE")
DEFTIMEVAR (TV_HOIST , "code hoisting")
DEFTIMEVAR (TV_LSM , "LSM")
DEFTIMEVAR (TV_TRACER , "tracer")
DEFTIMEVAR (TV_WEB , "web")
DEFTIMEVAR (TV_AUTO_INC_DEC , "auto inc dec")
Makefile.in (OBJS): Add timevar.o. hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496
2000-04-28 02:59:40 +02:00
DEFTIMEVAR (TV_CSE2 , "CSE 2")
DEFTIMEVAR (TV_BRANCH_PROB , "branch prediction")
DEFTIMEVAR (TV_COMBINE , "combiner")
DEFTIMEVAR (TV_IFCVT , "if-conversion")
basic-block.h (find_sub_basic_blocks): Use sbitmap parameter. * basic-block.h (find_sub_basic_blocks): Use sbitmap parameter. * cfgbuild.c (find_bb_boundaries, compute_outgoing_frequencies): Break out from ... (find_sub_basic_blocks): ... here; (find_many_sub_basic_blocks): New. * recog.c (split_all_insns): Update find_sub_basic_blocks call. * i386.h (ASM_PREFERRED_EH_DATA_FORMAT): Define sdata4. * i386.c (ix86_va_arg): Kill indirect_p handling; fix aliasing issues.: * i386.c (split_di, split_ti): Revamp to use simplify_subreg. * timevar.def (TV_LIFE, TV_LIFE_UPDATE, TV_MODE_SWITCH): new. * flow.c (update_life_info): Measure time. * c-decl.c: Include timevar.h (c_expand_body): Measure time. * toplev.c (rest_of_compilation): Measure time of mode switching separately. * Makefile.in (c-decl.o, cfgcleanup.o): Add dependancy. * toplev.c (flag_asynchronous_unwind_tables): New global variable. (lang_independent_options): Add asynchronous-unwind-tables (toplev_main): flag_asynchronous_unwind_tables implies flag_unwind_tables. * flags.h (flag_asynchronous_unwind_tables): Declare. * dwarf2out.c (dwarf2out_stack_adjust): Take into account flag_asynchronous_unwind_tables. (output_call_frame_info): Likewise. * invoke.texi (-fasynchronous-unwind-tables): Document. * i386.c (optimization_options): Enable flag_asynchronous_unwind_tables. * i386.c (ix86_expand_setcc): Always expect target to be QImode. * i386.md (s* expanders): Destination is QImode. * toplev.c (rest_of_compilation): Do not call clear_log_links. * rtl.h (clear_log_links): Kill. * flow.c (clear_log_links): Make static; accept blocks parameter; do no clear life info. (update_life_info): Call clear_log_links. * cfganal.c (forwarder_block_p): Avoid active_insn_p calls. From-SVN: r46374
2001-10-20 12:04:00 +02:00
DEFTIMEVAR (TV_MODE_SWITCH , "mode switching")
DEFTIMEVAR (TV_SMS , "sms modulo scheduling")
DEFTIMEVAR (TV_LIVE_RANGE_SHRINKAGE , "live range shrinkage")
Makefile.in (OBJS): Add timevar.o. hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496
2000-04-28 02:59:40 +02:00
DEFTIMEVAR (TV_SCHED , "scheduling")
dbxout.c (dbxout_symbol_location): Pass new argument to alter_subreg. 2012-10-23 Vladimir Makarov <vmakarov@redhat.com> * dbxout.c (dbxout_symbol_location): Pass new argument to alter_subreg. * dwarf2out.c: Include ira.h and lra.h. (based_loc_descr, compute_frame_pointer_to_fb_displacement): Use lra_eliminate_regs for LRA instead of eliminate_regs. * expr.c (emit_move_insn_1): Pass an additional argument to emit_move_via_integer. Use emit_move_via_integer for LRA only if the insn is recognized. * emit-rtl.c (gen_rtx_REG): Add lra_in_progress. (validate_subreg): Don't check offset for LRA and floating point modes. * final.c (final_scan_insn, cleanup_subreg_operands): Pass new argument to alter_subreg. (walk_alter_subreg, output_operand): Ditto. (alter_subreg): Add new argument. * gcse.c (calculate_bb_reg_pressure): Add parameter to ira_setup_eliminable_regset call. * ira.c: Include lra.h. (ira_init_once, ira_init, ira_finish_once): Call lra_start_once, lra_init, lra_finish_once in anyway. (ira_setup_eliminable_regset): Add parameter. Remove need_fp. Call lra_init_elimination and mark HARD_FRAME_POINTER_REGNUM as living forever if frame_pointer_needed. (setup_reg_class_relations): Set up ira_reg_class_subset. (ira_reg_equiv_invariant_p, ira_reg_equiv_const): Remove. (find_reg_equiv_invariant_const): Ditto. (setup_reg_renumber): Use ira_equiv_no_lvalue_p instead of ira_reg_equiv_invariant_p. Skip caps for LRA. (setup_reg_equiv_init, ira_update_equiv_info_by_shuffle_insn): New functions. (ira_reg_equiv_len, ira_reg_equiv): New externals. (ira_reg_equiv): New. (ira_expand_reg_equiv, init_reg_equiv, finish_reg_equiv): New functions. (no_equiv, update_equiv_regs): Use ira_reg_equiv instead of reg_equiv_init. (setup_reg_equiv): New function. (ira_use_lra_p): New global. (ira): Set up lra_simple_p and ira_conflicts_p. Set up and restore flag_caller_saves and flag_ira_region. Move initialization of ira_obstack and ira_bitmap_obstack upper. Call init_reg_equiv, setup_reg_equiv, and setup_reg_equiv_init instead of initialization of ira_reg_equiv_len, ira_reg_equiv_invariant_p, and ira_reg_equiv_const. Call ira_setup_eliminable_regset with a new argument. Don't flatten IRA IRA for LRA. Don't reassign conflict allocnos for LRA. Call finish_reg_equiv. (do_reload): Prepare code for LRA call. Call LRA. * ira.h (ira_use_lra_p): New external. (struct target_ira): Add members x_ira_class_subset_p x_ira_reg_class_subset, and x_ira_reg_classes_intersect_p. (ira_class_subset_p, ira_reg_class_subset): New macros. (ira_reg_classes_intersect_p): New macro. (struct ira_reg_equiv): New. (ira_setup_eliminable_regset): Add an argument. (ira_expand_reg_equiv, ira_update_equiv_info_by_shuffle_insn): New prototypes. * ira-color.c (color_pass, move_spill_restore, coalesce_allocnos): Use ira_equiv_no_lvalue_p. (coalesce_spill_slots, ira_sort_regnos_for_alter_reg): Ditto. * ira-emit.c (ira_create_new_reg): Call ira_expand_reg_equiv. (generate_edge_moves, change_loop) Use ira_equiv_no_lvalue_p. (emit_move_list): Simplify code. Call ira_update_equiv_info_by_shuffle_insn. Use ira_reg_equiv instead of ira_reg_equiv_invariant_p and ira_reg_equiv_const. Change assert. * ira-int.h (struct target_ira_int): Remove x_ira_class_subset_p and x_ira_reg_classes_intersect_p. (ira_class_subset_p, ira_reg_classes_intersect_p): Remove. (ira_reg_equiv_len, ira_reg_equiv_invariant_p): Ditto. (ira_reg_equiv_const): Ditto. (ira_equiv_no_lvalue_p): New function. * jump.c (true_regnum): Always use hard_regno for subreg_get_info when lra is in progress. * haifa-sched.c (sched_init): Pass new argument to ira_setup_eliminable_regset. * loop-invariant.c (calculate_loop_reg_pressure): Pass new argument to ira_setup_eliminable_regset. * lra.h: New. * lra-int.h: Ditto. * lra.c: Ditto. * lra-assigns.c: Ditto. * lra-constraints.c: Ditto. * lra-coalesce.c: Ditto. * lra-eliminations.c: Ditto. * lra-lives.c: Ditto. * lra-spills.c: Ditto. * Makefile.in (LRA_INT_H): New. (OBJS): Add lra.o, lra-assigns.o, lra-coalesce.o, lra-constraints.o, lra-eliminations.o, lra-lives.o, and lra-spills.o. (dwarf2out.o): Add dependence on ira.h and lra.h. (ira.o): Add dependence on lra.h. (lra.o, lra-assigns.o, lra-coalesce.o, lra-constraints.o): New entries. (lra-eliminations.o, lra-lives.o, lra-spills.o): Ditto. * output.h (alter_subreg): Add new argument. * rtlanal.c (simplify_subreg_regno): Permit mode changes for LRA. Permit ARG_POINTER_REGNUM and STACK_POINTER_REGNUM for LRA. * recog.c (general_operand, register_operand): Accept paradoxical FLOAT_MODE subregs for LRA. (scratch_operand): Accept pseudos for LRA. * rtl.h (lra_in_progress): New external. (debug_bb_n_slim, debug_bb_slim, print_value_slim): New prototypes. (debug_rtl_slim, debug_insn_slim): Ditto. * sdbout.c (sdbout_symbol): Pass new argument to alter_subreg. * sched-vis.c (print_value_slim): New. * target.def (lra_p): New hook. (register_priority): Ditto. (different_addr_displacement_p): Ditto. (spill_class): Ditto. * target-globals.h (this_target_lra_int): New external. (target_globals): New member lra_int. (restore_target_globals): Restore this_target_lra_int. * target-globals.c: Include lra-int.h. (default_target_globals): Add &default_target_lra_int. * targhooks.c (default_lra_p): New function. (default_register_priority): Ditto. (default_different_addr_displacement_p): Ditto. * targhooks.h (default_lra_p): Declare. (default_register_priority): Ditto. (default_different_addr_displacement_p): Ditto. * timevar.def (TV_LRA, TV_LRA_ELIMINATE, TV_LRA_INHERITANCE): New. (TV_LRA_CREATE_LIVE_RANGES, TV_LRA_ASSIGN, TV_LRA_COALESCE): New. * config/arm/arm.c (load_multiple_sequence): Pass new argument toOB alter_subreg. (store_multiple_sequence): Ditto. * config/i386/i386.h (enum ix86_tune_indices): Add X86_TUNE_GENERAL_REGS_SSE_SPILL. (TARGET_GENERAL_REGS_SSE_SPILL): New macro. * config/i386/i386.c (initial_ix86_tune_features): Set up X86_TUNE_GENERAL_REGS_SSE_SPILL for m_COREI7 and m_CORE2I7. (ix86_lra_p, ix86_register_priority): New functions. (ix86_secondary_reload): Add NON_Q_REGS, SIREG, DIREG. (inline_secondary_memory_needed): Change assert. (ix86_spill_class): New function. (TARGET_LRA_P, TARGET_REGISTER_BANK, TARGET_SPILL_CLASS): New macros. * config/m68k/m68k.c (emit_move_sequence): Pass new argument to alter_subreg. * config/m32r/m32r.c (gen_split_move_double): Ditto. * config/pa/pa.c (pa_emit_move_sequence): Ditto. * config/sh/sh.md: Ditto. * config/v850/v850.c (v850_reorg): Ditto. * config/xtensa/xtensa.c (fixup_subreg_mem): Ditto. * doc/md.texi: Add new interpretation of hint * for LRA. * doc/passes.texi: Describe LRA pass. * doc/tm.texi.in: Add TARGET_LRA_P, TARGET_REGISTER_PRIORITY, TARGET_DIFFERENT_ADDR_DISPLACEMENT_P, and TARGET_SPILL_CLASS. * doc/tm.texi: Update. From-SVN: r192719
2012-10-23 17:51:41 +02:00
DEFTIMEVAR (TV_IRA , "integrated RA")
DEFTIMEVAR (TV_LRA , "LRA non-specific")
DEFTIMEVAR (TV_LRA_ELIMINATE , "LRA virtuals elimination")
DEFTIMEVAR (TV_LRA_INHERITANCE , "LRA reload inheritance")
DEFTIMEVAR (TV_LRA_CREATE_LIVE_RANGES, "LRA create live ranges")
DEFTIMEVAR (TV_LRA_ASSIGN , "LRA hard reg assignment")
DEFTIMEVAR (TV_LRA_COALESCE , "LRA coalesce pseudo regs")
common.opt (flra-remat): New. 2014-11-12 Vladimir Makarov <vmakarov@redhat.com> * common.opt (flra-remat): New. * opts.c (default_options_table): Add entry for flra_remat. * timevar_def (TV_LRA_REMAT): New. * doc/invoke.texi (-flra-remat): Add description of the new option. * doc/passes.texi (-flra-remat): Remove lra-equivs.c and lra-saves.c. Add lra-remat.c. * Makefile.in (OBJS): Add lra-remat.o. * lra-remat.c: New file. * lra.c: Add info about the rematerialization pass in the top comment. (collect_non_operand_hard_regs, add_regs_to_insn_regno_info): Process unallocatable regs too. (lra_constraint_new_insn_uid_start): Remove. (lra): Add code for calling rematerialization sub-pass. * lra-int.h (lra_constraint_new_insn_uid_start): Remove. (lra_constrain_insn, lra_remat): New prototypes. (lra_eliminate_regs_1): Add parameter. * lra-lives.c (make_hard_regno_born, make_hard_regno_dead): Process unallocatable hard regs too. (process_bb_lives): Ditto. * lra-spills.c (remove_pseudos): Add argument to lra_eliminate_regs_1 call. * lra-eliminations.c (lra_eliminate_regs_1): Add parameter. Use it for sp offset calculation. (lra_eliminate_regs): Add argument for lra_eliminate_regs_1 call. (eliminate_regs_in_insn): Add parameter. Use it for sp offset calculation. (process_insn_for_elimination): Add argument for eliminate_regs_in_insn call. * lra-constraints.c (get_equiv_with_elimination): Add argument for lra_eliminate_regs_1 call. (process_addr_reg): Add parameter. Use it. (process_address_1): Ditto. Add argument for process_addr_reg call. (process_address): Ditto. (curr_insn_transform): Add parameter. Use it. Add argument for process_address calls. (lra_constrain_insn): New function. (lra_constraints): Add argument for curr_insn_transform call. From-SVN: r217458
2014-11-13 04:02:49 +01:00
DEFTIMEVAR (TV_LRA_REMAT , "LRA rematerialization")
dbxout.c (dbxout_symbol_location): Pass new argument to alter_subreg. 2012-10-23 Vladimir Makarov <vmakarov@redhat.com> * dbxout.c (dbxout_symbol_location): Pass new argument to alter_subreg. * dwarf2out.c: Include ira.h and lra.h. (based_loc_descr, compute_frame_pointer_to_fb_displacement): Use lra_eliminate_regs for LRA instead of eliminate_regs. * expr.c (emit_move_insn_1): Pass an additional argument to emit_move_via_integer. Use emit_move_via_integer for LRA only if the insn is recognized. * emit-rtl.c (gen_rtx_REG): Add lra_in_progress. (validate_subreg): Don't check offset for LRA and floating point modes. * final.c (final_scan_insn, cleanup_subreg_operands): Pass new argument to alter_subreg. (walk_alter_subreg, output_operand): Ditto. (alter_subreg): Add new argument. * gcse.c (calculate_bb_reg_pressure): Add parameter to ira_setup_eliminable_regset call. * ira.c: Include lra.h. (ira_init_once, ira_init, ira_finish_once): Call lra_start_once, lra_init, lra_finish_once in anyway. (ira_setup_eliminable_regset): Add parameter. Remove need_fp. Call lra_init_elimination and mark HARD_FRAME_POINTER_REGNUM as living forever if frame_pointer_needed. (setup_reg_class_relations): Set up ira_reg_class_subset. (ira_reg_equiv_invariant_p, ira_reg_equiv_const): Remove. (find_reg_equiv_invariant_const): Ditto. (setup_reg_renumber): Use ira_equiv_no_lvalue_p instead of ira_reg_equiv_invariant_p. Skip caps for LRA. (setup_reg_equiv_init, ira_update_equiv_info_by_shuffle_insn): New functions. (ira_reg_equiv_len, ira_reg_equiv): New externals. (ira_reg_equiv): New. (ira_expand_reg_equiv, init_reg_equiv, finish_reg_equiv): New functions. (no_equiv, update_equiv_regs): Use ira_reg_equiv instead of reg_equiv_init. (setup_reg_equiv): New function. (ira_use_lra_p): New global. (ira): Set up lra_simple_p and ira_conflicts_p. Set up and restore flag_caller_saves and flag_ira_region. Move initialization of ira_obstack and ira_bitmap_obstack upper. Call init_reg_equiv, setup_reg_equiv, and setup_reg_equiv_init instead of initialization of ira_reg_equiv_len, ira_reg_equiv_invariant_p, and ira_reg_equiv_const. Call ira_setup_eliminable_regset with a new argument. Don't flatten IRA IRA for LRA. Don't reassign conflict allocnos for LRA. Call finish_reg_equiv. (do_reload): Prepare code for LRA call. Call LRA. * ira.h (ira_use_lra_p): New external. (struct target_ira): Add members x_ira_class_subset_p x_ira_reg_class_subset, and x_ira_reg_classes_intersect_p. (ira_class_subset_p, ira_reg_class_subset): New macros. (ira_reg_classes_intersect_p): New macro. (struct ira_reg_equiv): New. (ira_setup_eliminable_regset): Add an argument. (ira_expand_reg_equiv, ira_update_equiv_info_by_shuffle_insn): New prototypes. * ira-color.c (color_pass, move_spill_restore, coalesce_allocnos): Use ira_equiv_no_lvalue_p. (coalesce_spill_slots, ira_sort_regnos_for_alter_reg): Ditto. * ira-emit.c (ira_create_new_reg): Call ira_expand_reg_equiv. (generate_edge_moves, change_loop) Use ira_equiv_no_lvalue_p. (emit_move_list): Simplify code. Call ira_update_equiv_info_by_shuffle_insn. Use ira_reg_equiv instead of ira_reg_equiv_invariant_p and ira_reg_equiv_const. Change assert. * ira-int.h (struct target_ira_int): Remove x_ira_class_subset_p and x_ira_reg_classes_intersect_p. (ira_class_subset_p, ira_reg_classes_intersect_p): Remove. (ira_reg_equiv_len, ira_reg_equiv_invariant_p): Ditto. (ira_reg_equiv_const): Ditto. (ira_equiv_no_lvalue_p): New function. * jump.c (true_regnum): Always use hard_regno for subreg_get_info when lra is in progress. * haifa-sched.c (sched_init): Pass new argument to ira_setup_eliminable_regset. * loop-invariant.c (calculate_loop_reg_pressure): Pass new argument to ira_setup_eliminable_regset. * lra.h: New. * lra-int.h: Ditto. * lra.c: Ditto. * lra-assigns.c: Ditto. * lra-constraints.c: Ditto. * lra-coalesce.c: Ditto. * lra-eliminations.c: Ditto. * lra-lives.c: Ditto. * lra-spills.c: Ditto. * Makefile.in (LRA_INT_H): New. (OBJS): Add lra.o, lra-assigns.o, lra-coalesce.o, lra-constraints.o, lra-eliminations.o, lra-lives.o, and lra-spills.o. (dwarf2out.o): Add dependence on ira.h and lra.h. (ira.o): Add dependence on lra.h. (lra.o, lra-assigns.o, lra-coalesce.o, lra-constraints.o): New entries. (lra-eliminations.o, lra-lives.o, lra-spills.o): Ditto. * output.h (alter_subreg): Add new argument. * rtlanal.c (simplify_subreg_regno): Permit mode changes for LRA. Permit ARG_POINTER_REGNUM and STACK_POINTER_REGNUM for LRA. * recog.c (general_operand, register_operand): Accept paradoxical FLOAT_MODE subregs for LRA. (scratch_operand): Accept pseudos for LRA. * rtl.h (lra_in_progress): New external. (debug_bb_n_slim, debug_bb_slim, print_value_slim): New prototypes. (debug_rtl_slim, debug_insn_slim): Ditto. * sdbout.c (sdbout_symbol): Pass new argument to alter_subreg. * sched-vis.c (print_value_slim): New. * target.def (lra_p): New hook. (register_priority): Ditto. (different_addr_displacement_p): Ditto. (spill_class): Ditto. * target-globals.h (this_target_lra_int): New external. (target_globals): New member lra_int. (restore_target_globals): Restore this_target_lra_int. * target-globals.c: Include lra-int.h. (default_target_globals): Add &default_target_lra_int. * targhooks.c (default_lra_p): New function. (default_register_priority): Ditto. (default_different_addr_displacement_p): Ditto. * targhooks.h (default_lra_p): Declare. (default_register_priority): Ditto. (default_different_addr_displacement_p): Ditto. * timevar.def (TV_LRA, TV_LRA_ELIMINATE, TV_LRA_INHERITANCE): New. (TV_LRA_CREATE_LIVE_RANGES, TV_LRA_ASSIGN, TV_LRA_COALESCE): New. * config/arm/arm.c (load_multiple_sequence): Pass new argument toOB alter_subreg. (store_multiple_sequence): Ditto. * config/i386/i386.h (enum ix86_tune_indices): Add X86_TUNE_GENERAL_REGS_SSE_SPILL. (TARGET_GENERAL_REGS_SSE_SPILL): New macro. * config/i386/i386.c (initial_ix86_tune_features): Set up X86_TUNE_GENERAL_REGS_SSE_SPILL for m_COREI7 and m_CORE2I7. (ix86_lra_p, ix86_register_priority): New functions. (ix86_secondary_reload): Add NON_Q_REGS, SIREG, DIREG. (inline_secondary_memory_needed): Change assert. (ix86_spill_class): New function. (TARGET_LRA_P, TARGET_REGISTER_BANK, TARGET_SPILL_CLASS): New macros. * config/m68k/m68k.c (emit_move_sequence): Pass new argument to alter_subreg. * config/m32r/m32r.c (gen_split_move_double): Ditto. * config/pa/pa.c (pa_emit_move_sequence): Ditto. * config/sh/sh.md: Ditto. * config/v850/v850.c (v850_reorg): Ditto. * config/xtensa/xtensa.c (fixup_subreg_mem): Ditto. * doc/md.texi: Add new interpretation of hint * for LRA. * doc/passes.texi: Describe LRA pass. * doc/tm.texi.in: Add TARGET_LRA_P, TARGET_REGISTER_PRIORITY, TARGET_DIFFERENT_ADDR_DISPLACEMENT_P, and TARGET_SPILL_CLASS. * doc/tm.texi: Update. From-SVN: r192719
2012-10-23 17:51:41 +02:00
DEFTIMEVAR (TV_RELOAD , "reload")
Makefile.in (OBJS): Add timevar.o. hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496
2000-04-28 02:59:40 +02:00
DEFTIMEVAR (TV_RELOAD_CSE_REGS , "reload CSE regs")
dbxout.c (dbxout_symbol_location): Pass new argument to alter_subreg. 2012-10-23 Vladimir Makarov <vmakarov@redhat.com> * dbxout.c (dbxout_symbol_location): Pass new argument to alter_subreg. * dwarf2out.c: Include ira.h and lra.h. (based_loc_descr, compute_frame_pointer_to_fb_displacement): Use lra_eliminate_regs for LRA instead of eliminate_regs. * expr.c (emit_move_insn_1): Pass an additional argument to emit_move_via_integer. Use emit_move_via_integer for LRA only if the insn is recognized. * emit-rtl.c (gen_rtx_REG): Add lra_in_progress. (validate_subreg): Don't check offset for LRA and floating point modes. * final.c (final_scan_insn, cleanup_subreg_operands): Pass new argument to alter_subreg. (walk_alter_subreg, output_operand): Ditto. (alter_subreg): Add new argument. * gcse.c (calculate_bb_reg_pressure): Add parameter to ira_setup_eliminable_regset call. * ira.c: Include lra.h. (ira_init_once, ira_init, ira_finish_once): Call lra_start_once, lra_init, lra_finish_once in anyway. (ira_setup_eliminable_regset): Add parameter. Remove need_fp. Call lra_init_elimination and mark HARD_FRAME_POINTER_REGNUM as living forever if frame_pointer_needed. (setup_reg_class_relations): Set up ira_reg_class_subset. (ira_reg_equiv_invariant_p, ira_reg_equiv_const): Remove. (find_reg_equiv_invariant_const): Ditto. (setup_reg_renumber): Use ira_equiv_no_lvalue_p instead of ira_reg_equiv_invariant_p. Skip caps for LRA. (setup_reg_equiv_init, ira_update_equiv_info_by_shuffle_insn): New functions. (ira_reg_equiv_len, ira_reg_equiv): New externals. (ira_reg_equiv): New. (ira_expand_reg_equiv, init_reg_equiv, finish_reg_equiv): New functions. (no_equiv, update_equiv_regs): Use ira_reg_equiv instead of reg_equiv_init. (setup_reg_equiv): New function. (ira_use_lra_p): New global. (ira): Set up lra_simple_p and ira_conflicts_p. Set up and restore flag_caller_saves and flag_ira_region. Move initialization of ira_obstack and ira_bitmap_obstack upper. Call init_reg_equiv, setup_reg_equiv, and setup_reg_equiv_init instead of initialization of ira_reg_equiv_len, ira_reg_equiv_invariant_p, and ira_reg_equiv_const. Call ira_setup_eliminable_regset with a new argument. Don't flatten IRA IRA for LRA. Don't reassign conflict allocnos for LRA. Call finish_reg_equiv. (do_reload): Prepare code for LRA call. Call LRA. * ira.h (ira_use_lra_p): New external. (struct target_ira): Add members x_ira_class_subset_p x_ira_reg_class_subset, and x_ira_reg_classes_intersect_p. (ira_class_subset_p, ira_reg_class_subset): New macros. (ira_reg_classes_intersect_p): New macro. (struct ira_reg_equiv): New. (ira_setup_eliminable_regset): Add an argument. (ira_expand_reg_equiv, ira_update_equiv_info_by_shuffle_insn): New prototypes. * ira-color.c (color_pass, move_spill_restore, coalesce_allocnos): Use ira_equiv_no_lvalue_p. (coalesce_spill_slots, ira_sort_regnos_for_alter_reg): Ditto. * ira-emit.c (ira_create_new_reg): Call ira_expand_reg_equiv. (generate_edge_moves, change_loop) Use ira_equiv_no_lvalue_p. (emit_move_list): Simplify code. Call ira_update_equiv_info_by_shuffle_insn. Use ira_reg_equiv instead of ira_reg_equiv_invariant_p and ira_reg_equiv_const. Change assert. * ira-int.h (struct target_ira_int): Remove x_ira_class_subset_p and x_ira_reg_classes_intersect_p. (ira_class_subset_p, ira_reg_classes_intersect_p): Remove. (ira_reg_equiv_len, ira_reg_equiv_invariant_p): Ditto. (ira_reg_equiv_const): Ditto. (ira_equiv_no_lvalue_p): New function. * jump.c (true_regnum): Always use hard_regno for subreg_get_info when lra is in progress. * haifa-sched.c (sched_init): Pass new argument to ira_setup_eliminable_regset. * loop-invariant.c (calculate_loop_reg_pressure): Pass new argument to ira_setup_eliminable_regset. * lra.h: New. * lra-int.h: Ditto. * lra.c: Ditto. * lra-assigns.c: Ditto. * lra-constraints.c: Ditto. * lra-coalesce.c: Ditto. * lra-eliminations.c: Ditto. * lra-lives.c: Ditto. * lra-spills.c: Ditto. * Makefile.in (LRA_INT_H): New. (OBJS): Add lra.o, lra-assigns.o, lra-coalesce.o, lra-constraints.o, lra-eliminations.o, lra-lives.o, and lra-spills.o. (dwarf2out.o): Add dependence on ira.h and lra.h. (ira.o): Add dependence on lra.h. (lra.o, lra-assigns.o, lra-coalesce.o, lra-constraints.o): New entries. (lra-eliminations.o, lra-lives.o, lra-spills.o): Ditto. * output.h (alter_subreg): Add new argument. * rtlanal.c (simplify_subreg_regno): Permit mode changes for LRA. Permit ARG_POINTER_REGNUM and STACK_POINTER_REGNUM for LRA. * recog.c (general_operand, register_operand): Accept paradoxical FLOAT_MODE subregs for LRA. (scratch_operand): Accept pseudos for LRA. * rtl.h (lra_in_progress): New external. (debug_bb_n_slim, debug_bb_slim, print_value_slim): New prototypes. (debug_rtl_slim, debug_insn_slim): Ditto. * sdbout.c (sdbout_symbol): Pass new argument to alter_subreg. * sched-vis.c (print_value_slim): New. * target.def (lra_p): New hook. (register_priority): Ditto. (different_addr_displacement_p): Ditto. (spill_class): Ditto. * target-globals.h (this_target_lra_int): New external. (target_globals): New member lra_int. (restore_target_globals): Restore this_target_lra_int. * target-globals.c: Include lra-int.h. (default_target_globals): Add &default_target_lra_int. * targhooks.c (default_lra_p): New function. (default_register_priority): Ditto. (default_different_addr_displacement_p): Ditto. * targhooks.h (default_lra_p): Declare. (default_register_priority): Ditto. (default_different_addr_displacement_p): Ditto. * timevar.def (TV_LRA, TV_LRA_ELIMINATE, TV_LRA_INHERITANCE): New. (TV_LRA_CREATE_LIVE_RANGES, TV_LRA_ASSIGN, TV_LRA_COALESCE): New. * config/arm/arm.c (load_multiple_sequence): Pass new argument toOB alter_subreg. (store_multiple_sequence): Ditto. * config/i386/i386.h (enum ix86_tune_indices): Add X86_TUNE_GENERAL_REGS_SSE_SPILL. (TARGET_GENERAL_REGS_SSE_SPILL): New macro. * config/i386/i386.c (initial_ix86_tune_features): Set up X86_TUNE_GENERAL_REGS_SSE_SPILL for m_COREI7 and m_CORE2I7. (ix86_lra_p, ix86_register_priority): New functions. (ix86_secondary_reload): Add NON_Q_REGS, SIREG, DIREG. (inline_secondary_memory_needed): Change assert. (ix86_spill_class): New function. (TARGET_LRA_P, TARGET_REGISTER_BANK, TARGET_SPILL_CLASS): New macros. * config/m68k/m68k.c (emit_move_sequence): Pass new argument to alter_subreg. * config/m32r/m32r.c (gen_split_move_double): Ditto. * config/pa/pa.c (pa_emit_move_sequence): Ditto. * config/sh/sh.md: Ditto. * config/v850/v850.c (v850_reorg): Ditto. * config/xtensa/xtensa.c (fixup_subreg_mem): Ditto. * doc/md.texi: Add new interpretation of hint * for LRA. * doc/passes.texi: Describe LRA pass. * doc/tm.texi.in: Add TARGET_LRA_P, TARGET_REGISTER_PRIORITY, TARGET_DIFFERENT_ADDR_DISPLACEMENT_P, and TARGET_SPILL_CLASS. * doc/tm.texi: Update. From-SVN: r192719
2012-10-23 17:51:41 +02:00
DEFTIMEVAR (TV_GCSE_AFTER_RELOAD , "load CSE after reload")
DEFTIMEVAR (TV_REE , "ree")
DEFTIMEVAR (TV_THREAD_PROLOGUE_AND_EPILOGUE, "thread pro- & epilogue")
DEFTIMEVAR (TV_IFCVT2 , "if-conversion 2")
DEFTIMEVAR (TV_SPLIT_PATHS , "split paths")
DEFTIMEVAR (TV_COMBINE_STACK_ADJUST , "combine stack adjustments")
Makefile.in (OBJS): Add timevar.o. hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496
2000-04-28 02:59:40 +02:00
DEFTIMEVAR (TV_PEEPHOLE2 , "peephole 2")
DEFTIMEVAR (TV_RENAME_REGISTERS , "rename registers")
DEFTIMEVAR (TV_SCHED_FUSION , "scheduling fusion")
DEFTIMEVAR (TV_CPROP_REGISTERS , "hard reg cprop")
DEFTIMEVAR (TV_SCHED2 , "scheduling 2")
DEFTIMEVAR (TV_MACH_DEP , "machine dep reorg")
Makefile.in (OBJS): Add timevar.o. hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496
2000-04-28 02:59:40 +02:00
DEFTIMEVAR (TV_DBR_SCHED , "delay branch sched")
DEFTIMEVAR (TV_REORDER_BLOCKS , "reorder blocks")
DEFTIMEVAR (TV_SHORTEN_BRANCH , "shorten branches")
DEFTIMEVAR (TV_REG_STACK , "reg stack")
DEFTIMEVAR (TV_FINAL , "final")
DEFTIMEVAR (TV_VAROUT , "variable output")
Makefile.in (OBJS): Add timevar.o. hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496
2000-04-28 02:59:40 +02:00
DEFTIMEVAR (TV_SYMOUT , "symout")
Josef Zlomek <zlomekj@suse.cz> Josef Zlomek <zlomekj@suse.cz> * Makefile.in (var-tracking.o): New. * common.opt (fvar-tracking): New. * flags.h (flag_var_tracking): New. * gengtype.c (adjust_field_rtx_def): NOTE_INSN_VAR_LOCATION was added. * opts.c (common_handle_option): Add OPT_fvar_tracking. * print-rtl.c (print_rtx): NOTE_INSN_VAR_LOCATION was added. * rtl.c (note_insn_name): Likewise. * rtl.def (VAR_LOCATION): New. * rtl.h (NOTE_VAR_LOCATION): New. (NOTE_VAR_LOCATION_DECL): New. (NOTE_VAR_LOCATION_LOC): New. (enum insn_note): NOTE_INSN_VAR_LOCATION was added. (variable_tracking_main): New exported function. * timevar.def (TV_VAR_TRACKING): New. * toplev.c (enum dump_file_index): Added DFI_vartrack. (dump_file): "vartrack" was added (-dV). (flag_var_tracking): New. (f_options): "var-tracking" was added. (rest_of_handle_variable_tracking): New function. (rest_of_compilation): Run variable tracking. (process_options): If user has not specified flag_var_tracking set it according to optimize, debug_info_level and debug_hooks. * tree.h (frame_base_decl): New. * var-tracking.c: New file. * config/ia64/ia64.c (ia64_flag_var_tracking): New variable. (ia64_override_options): Set flags to run variable tracking in machine dependent reorg instead of toplev.c. (ia64_reorg): Run variable tracking if wanted. * doc/invoke.texi: Mention variable tracking in -dV, add and -fvar-tracking. * doc/passes.texi: Added variable tracking pass. Daniel Berlin <dberlin@dberlin.org> * debug.h (struct gcc_debug_hooks): Added var_location debug hook. * dbxout.c (dbx_debug_hooks): Likewise. (xcoff_debug): Likewise. * debug.c (do_nothing_debug_hooks): Likewise. * dwarf2out.c (dwarf2_debug_hooks): Likewise. * dwarfout.c (dwarf_debug_hooks): Likewise. * sdbout.c (sdb_debug_hooks): Likewise. * vmsdbgout.c (vmsdbg_debug_hooks): Likewise. * final.c (final_scan_insn): Call var_location debug hook for each NOTE_INSN_VAR_LOCATION. Co-Authored-By: Daniel Berlin <dberlin@dberlin.org> From-SVN: r77418
2004-02-06 21:03:45 +01:00
DEFTIMEVAR (TV_VAR_TRACKING , "variable tracking")
DEFTIMEVAR (TV_VAR_TRACKING_DATAFLOW , "var-tracking dataflow")
DEFTIMEVAR (TV_VAR_TRACKING_EMIT , "var-tracking emit")
DEFTIMEVAR (TV_TREE_IFCOMBINE , "tree if-combine")
DEFTIMEVAR (TV_TREE_UNINIT , "uninit var analysis")
[multiple changes] 2009-04-14 Diego Novillo <dnovillo@google.com> Le-Chun Wu <lcwu@google.com> * configure.ac: Add --enable-plugin support. Define ENABLE_PLUGIN and PLUGINLIBS when specified. * Makefile.in (PLUGIN_H): Define. Export ENABLE_PLUGIN and GMPINC to site.exp. Add PLUGINLIBS to link command. Add/modify dependencies for plugin.o and files including plugin.h. (plugin.o): New. * config.in: Regenerate. * opts.c (common_handle_option): Handle OPT_fplugin_ and OPT_fplugin_arg_. 2009-04-14 Le-Chun Wu <lcwu@google.com> * tree-pass.h (register_one_dump_file): Add a prototype for register_one_dump_file. * toplev.c (compile_file): Call initialize_plugins. (do_compile): Call invoke_plugin_callbacks. (toplev_main): Call invoke_plugin_callbacks. * common.opt: Add -fplugin= and -fplugin-arg-. * gcc-plugin.h: New public header file for plugins to include. * plugin.c: New source file. * plugin.h: New internal header file. * passes.c (register_one_dump_file): Make it external. * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks. 2009-04-14 Diego Novillo <dnovillo@google.com> * doc/plugins.texi: New. * doc/gccint.texi: Add reference to Plugins chapter. * doc/invoke.texi: Document -fplugin and -fplugin-arg * diagnostic.c (diagnostic_report_diagnostic): Warn about loaded plugins, if any. * timevar.def (TV_PLUGIN_INIT): Define. (TV_PLUGIN_RUN): Define. * plugin.c: Include timevar.h (plugins_active_p): New. (dump_active_plugins): New. (debug_active_plugins): New. cp/ChangeLog 2009-04-14 Le-Chun Wu <lcwu@google.com> * Make-lang.in: Modify dependencies of files including plugin.h. * decl.c (finish_function): Call invoke_plugin_callbacks. * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks. From-SVN: r146059
2009-04-14 22:18:49 +02:00
DEFTIMEVAR (TV_PLUGIN_INIT , "plugin initialization")
DEFTIMEVAR (TV_PLUGIN_RUN , "plugin execution")
DEFTIMEVAR (TV_GIMPLE_SLSR , "straight-line strength reduction")
GIMPLE store merging pass 2016-10-28 Kyrylo Tkachov <kyrylo.tkachov@arm.com> PR middle-end/22141 * Makefile.in (OBJS): Add gimple-ssa-store-merging.o. * common.opt (fstore-merging): New Optimization option. * opts.c (default_options_table): Add entry for OPT_ftree_store_merging. * fold-const.h (can_native_encode_type_p): Declare prototype. * fold-const.c (can_native_encode_type_p): Define. * params.def (PARAM_STORE_MERGING_ALLOW_UNALIGNED): Define. (PARAM_MAX_STORES_TO_MERGE): Likewise. * timevar.def (TV_GIMPLE_STORE_MERGING): New timevar. * passes.def: Insert pass_tree_store_merging. * tree-pass.h (make_pass_store_merging): Declare extern prototype. * gimple-ssa-store-merging.c: New file. * doc/invoke.texi (Optimization Options): Document -fstore-merging. (--param documentation): Document store-merging-allow-unaligned and max-stores-to-merge. 2016-10-28 Kyrylo Tkachov <kyrylo.tkachov@arm.com> Jakub Jelinek <jakub@redhat.com> Andrew Pinski <pinskia@gmail.com> PR middle-end/22141 PR rtl-optimization/23684 * gcc.c-torture/execute/pr22141-1.c: New test. * gcc.c-torture/execute/pr22141-2.c: Likewise. * gcc.target/aarch64/ldp_stp_1.c: Adjust for -fstore-merging. * gcc.target/aarch64/ldp_stp_4.c: Likewise. * gcc.dg/store_merging_1.c: New test. * gcc.dg/store_merging_2.c: Likewise. * gcc.dg/store_merging_3.c: Likewise. * gcc.dg/store_merging_4.c: Likewise. * gcc.dg/store_merging_5.c: Likewise. * gcc.dg/store_merging_6.c: Likewise. * gcc.dg/store_merging_7.c: Likewise. * gcc.target/i386/pr22141.c: Likewise. * gcc.target/i386/pr34012.c: Add -fno-store-merging to dg-options. * g++.dg/init/new17.C: Likewise. Co-Authored-By: Andrew Pinski <pinskia@gmail.com> Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r241649
2016-10-28 16:18:50 +02:00
DEFTIMEVAR (TV_GIMPLE_STORE_MERGING , "store merging")
Commit the vtable verification feature. Commit the vtable verification feature. This feature is designed to detect, at run time, if/when the vtable pointer in a C++ object has been corrupted, before allowing virtual calls through that pointer. If pointer corruption is detected, execution of the program is halted. libstdc++-v3 ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * fragment.am: Add XTEMPLATE_FLAGS. * configure.ac: Add definitions for --enable-vtable-verify. * acinclude.m4: Add --enable-vtable-verify and --disable-vtable-verify; define --enable-vtable-verify; define VTV_CXXFLAGS, VTV_PCH_CXXFLAGS and VTV_CXXLINKFLAGS. * config/abi/pre/gnu.ver: Export symbols for vtable verification. * libsupc++/Makefile.am: Define vtv_sources and add it to libsupc___la_SOURCES and libsupc__convenience_la_SOURCES. * libsupc++/vtv_stubs.cc: New file. * include/Makefile.am: Add VTV_PCH_CXXFLAGS to PCHFLAGS. * src/Makefile.am: Add VTV_CXXFLAGS to AM_CXXFLAGS; add VTV_CXXLINKFLAGS to CXXLINK. * src/c++98/Makefile.am: Comment out XTEMPLATE_FLAGS; add VTV_CXXFLAGS to AM_CXXFLAGS; add VTV_CXXXLINKFLAGS to CXXLINK. * src/C++11/Makefile.am: Ditto. * doc/xml/manual/configure.xml: Add entry for --enable-vtable-verify. * scripts/testsuite_flags.in: Add cxxvtvflags to Usage; cause cxxvtvflags to use VTV_CXXFLAGS and VTV_CXXLINKFLAGS. * testsuite/lib/libstdc++.exp: Add cxxvtvflags; add code to locate libvtv if --enable-vtable-verify was used; set cxxvtvflags; add cxxvtvflags to cxx_final. * testsuite/18_support/bad_exception/23591_thread-1.c: Add -fvtable-verify=none to compiler flags. * testsuite/17_intro/freestanding.cc: Add -fvtable-verify=none to compiler flags. * configure: Regenerated. * Makefile.in: Regenerated. * python/Makefile.in: Regenerated. * include/Makefile.in: Regenerated. * libsupc++/Makefile.in: Regenerated. * config.h.in: Regenerated. * po/Makefile.in: Regenerated. * src/Makefile.in: Regenerated. * src/c++98/Makefile.in: Regenerated. * src/c++11/Makefile.in: Regenerated. * doc/Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. top level ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * configure.ac: Add target-libvtv to target_libraries; disable libvtv on non-linux systems; add target-libvtv to noconfigdirs; add libsupc++/.libs to C++ library search paths. * configure: Regenerated. * Makefile.def: Add libvtv to target_modules; make libvtv depend on libstdc++ and libgcc. * Makefile.in: Regenerated. include/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * vtv-change-permission.h: New file. contrib/ChangeLog: 2013-08-06 Caroline Tice4 <cmtice@google.com> * gcc_update: Add libvtv files. libgcc/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> config.host (extra_parts): Add vtv_start.o, vtv_end.o vtv_start_preinit.o and vtv_end_preinit.o. configure.ac: Add code to check/set enable_vtable_verify. Makefile.in: Add rules to build vtv_*.o, if enable_vtable_verify is true. vtv_start_preinit.c: New file. vtv_end_preinit.c: New file. vtv_start.c: New file. vtv_end.c: New file. configure: Regenerated. gcc/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * gcc.c (VTABLE_VERIFICATION_SPEC): New definition. (LINK_COMMAND_SPEC): Add VTABLE_VERIFICATION_SPEC. * tree-pass.h: Add pass_vtable_verify. * varasm.c (assemble_variable): Add code to properly set the comdat section and name for the .vtable_map_vars section. (assemble_vtyv_preinit_initializer): New function. (default_sectin_type_flags): Make sure .vtable_map_vars section has LINK_ONCE flag. * output.h: Add function decl for assemble_vtv_preinit_initializer. * vtable-verify.c: New file. * vtable-verify.h: New file. * flag-types.h (enum vtv_priority): Defintions for flag_vtable_verify initialiation levels. * timevar.def (TV_VTABLE_VERIFICATION): New definition. * passes.def: Insert pass_vtable_verify. * aclocal.m4: Reorder includes. * doc/invoke.texi: Add documentation for the flags -fvtable-verify=, -fvtv-debug and -fvtv-counts. * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Add vtv_start*.o, as appropriate, if -fvtable-verify=... is used. (GNU_USER_TARGET_ENDFILE_SPEC): Add vtv_end*.o as appropriate, if -fvtable-verify=... is used. * Makefile.in (OBJS): Add vtable-verify.o to list. (vtable-verify.o): Add new build rule. (GTFILES): Add vtable-verify.c to list. * common.opt (fvtable-verify=): New flag. (vtv_priority): Values for fvtable-verify= flag. (fvtv-counts): New flag. (fvtv-debug): New flag. * tree.h (save_vtable_map_decl): New extern function decl. gcc/cp/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * Make-lang.in (*CXX_AND_OBJCXX_OBJS): Add vtable-class-hierarchy.o to list. (vtable-class-hierarchy.o): Add build rule. * cp-tree.h (vtv_start_verification_constructor_init_function): New extern function decl. (vtv_finish_verification_constructor_init_function): New extern function decl. (build_vtbl_address): New extern function decl. (get_mangled_vtable_map_var_name): New extern function decl. (vtv_compute_class_hierarchy_transitive_closure): New extern function decl. (vtv_generate_init_routine): New extern function decl. (vtv_save_class_info): New extern function decl. (vtv_recover_class_info): New extern function decl. (vtv_build_vtable_verify_fndecl): New extern function decl. * class.c (finish_struct_1): Add call to vtv_save_class_info if flag_vtable_verify is true. * config-lang.in: Add vtable-class-hierarchy.c to gtfiles list. * vtable-class-hierarchy.c: New file. * mangle.c (get_mangled_vtable_map_var_name): New function. * decl2.c (start_objects): Update function comment. (cp_write_global_declarations): Call vtv_recover_class_info, vtv_compute_class_hierarchy_transitive_closure and vtv_build_vtable_verify_fndecl, before calling finalize_compilation_unit, and call vtv_generate_init_rount after, IFF flag_vtable_verify is true. (vtv_start_verification_constructor_init_function): New function. (vtv_finish_verification_constructor_init_function): New function. * init.c (build_vtbl_address): Remove static qualifier from function. libvtv/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> Initial check-in of new vtable verification feature. * configure.ac : New file. * acinclude.m4 : New file. * Makefile.am : New file. * aclocal.m4 : New file. * configure.tgt : New file. * configure: New file (generated). * Makefile.in: New file (generated). * vtv_set.h : New file. * vtv_utils.cc : New file. * vtv_utils.h : New file. * vtv_malloc.cc : New file. * vtv_rts.cc : New file. * vtv_malloc.h : New file. * vtv_rts.h : New file. * vtv_fail.cc : New file. * vtv_fail.h : New file. * vtv_map.h : New file. * scripts/run-testsuite.sh : New file. * scripts/sum-vtv-counts.c : New file. * testsuite/parts-test-main.h : New file. * testusite/dataentry.cc : New file. * testsuite/temp_deriv.cc : New file. * testsuite/register_pair.cc : New file. * testsuite/virtual_inheritance.cc : New file. * testsuite/field-test.cc : New file. * testsuite/nested_vcall_test.cc : New file. * testsuite/template-list-iostream.cc : New file. * testsuite/register_pair_inserts.cc : New file. * testsuite/register_pair_inserts_mt.cc : New file. * testsuite/event.list : New file. * testsuite/parts-test-extra-parts-views.cc : New file. * testsuite/parts-test-extra-parts-views.h : New file. * testsuite/environment-fail-32.s : New file. * testsuite/parts-test-extra-parts.h : New file. * testsuite/temp_deriv2.cc : New file. * testsuite/dlopen_mt.cc : New file. * testsuite/event.h : New file. * testsuite/template-list.cc : New file. * testsuite/replace-fail.cc : New file. * testsuite/Makefile.am : New file. * testsuite/Makefile.in: New file (generated). * testsuite/mempool_negative.c : New file. * testsuite/parts-test-main.cc : New file. * testsuite/event-private.cc : New file. * testsuite/thunk.cc : New file. * testsuite/event-defintiions.cc : New file. * testsuite/event-private.h : New file. * testsuite/parts-test.list : New file. * testusite/register_pair_mt.cc : New file. * testsuite/povray-derived.cc : New file. * testsuite/event-main.cc : New file. * testsuite/environment.cc : New file. * testsuite/template-list2.cc : New file. * testsuite/thunk_vtable_map_attack.cc : New file. * testsuite/parts-test-extra-parts.cc : New file. * testsuite/environment-fail-64.s : New file. * testsuite/dlopen.cc : New file. * testsuite/so.cc : New file. * testsuite/temp_deriv3.cc : New file. * testsuite/const_vtable.cc : New file. * testsuite/mempool_positive.c : New file. * testsuite/dup_name.cc : New file. From-SVN: r201555
2013-08-07 05:38:59 +02:00
DEFTIMEVAR (TV_VTABLE_VERIFICATION , "vtable verification")
bootstrap-ubsan.mk (POSTSTAGE1_LDFLAGS): Add -ldl. config/ * bootstrap-ubsan.mk (POSTSTAGE1_LDFLAGS): Add -ldl. gcc/c-family/ * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data call. (ubsan_instrument_shift): Likewise. (ubsan_instrument_vla): Likewise. gcc/ * opts.c (common_handle_option): Add -fsanitize=null option. Turn off -fdelete-null-pointer-checks option when doing the NULL pointer checking. * sanitizer.def (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH): Add. * tree-pass.h (make_pass_ubsan): Declare. (make_pass_sanopt): Declare. * timevar.def (TV_TREE_UBSAN): New timevar. * passes.def: Add pass_sanopt and pass_ubsan. * ubsan.h (ubsan_null_ckind): New enum. (ubsan_mismatch_data): New struct. (ubsan_expand_null_ifn): Declare. (ubsan_create_data): Adjust declaration. (ubsan_type_descriptor): Likewise. * asan.c: Include "ubsan.h". (pass_data_sanopt): New pass. (execute_sanopt): New function. (gate_sanopt): Likewise. (make_pass_sanopt): Likewise. (class pass_sanopt): New class. * ubsan.c: Include tree-pass.h, gimple-ssa.h, gimple-walk.h, gimple-iterator.h and cfgloop.h. (PROB_VERY_UNLIKELY): Define. (tree_type_map_hash): New function. (ubsan_type_descriptor): Add new parameter. Improve type name generation. (ubsan_create_data): Add new parameter. Add pointer data into ubsan structure. (ubsan_expand_null_ifn): New function. (instrument_member_call): Likewise. (instrument_mem_ref): Likewise. (instrument_null): Likewise. (ubsan_pass): Likewise. (gate_ubsan): Likewise. (make_pass_ubsan): Likewise. (ubsan_instrument_unreachable): Adjust ubsan_create_data call. (class pass_ubsan): New class. (pass_data_ubsan): New pass. * flag-types.h (enum sanitize_code): Add SANITIZE_NULL. * internal-fn.c (expand_UBSAN_NULL): New function. * cgraphunit.c (varpool_finalize_decl): Call varpool_assemble_decl even when !flag_toplevel_reorder. * internal-fn.def (UBSAN_NULL): New. gcc/testsuite/ * c-c++-common/ubsan/null-1.c: New test. * c-c++-common/ubsan/null-2.c: New test. * c-c++-common/ubsan/null-3.c: New test. * c-c++-common/ubsan/null-4.c: New test. * c-c++-common/ubsan/null-5.c: New test. * c-c++-common/ubsan/null-6.c: New test. * c-c++-common/ubsan/null-7.c: New test. * c-c++-common/ubsan/null-8.c: New test. * c-c++-common/ubsan/null-9.c: New test. * c-c++-common/ubsan/null-10.c: New test. * c-c++-common/ubsan/null-11.c: New test. * gcc.dg/ubsan/c99-shift-2.c: Adjust dg-output. * c-c++-common/ubsan/shift-1.c: Likewise. * c-c++-common/ubsan/div-by-zero-3.c: Likewise. From-SVN: r205021
2013-11-19 12:45:15 +01:00
DEFTIMEVAR (TV_TREE_UBSAN , "tree ubsan")
DEFTIMEVAR (TV_INITIALIZE_RTL , "initialize rtl")
DEFTIMEVAR (TV_GIMPLE_LADDRESS , "address lowering")
DEFTIMEVAR (TV_TREE_LOOP_IFCVT , "tree loop if-conversion")
Makefile.in (OBJS): Add timevar.o. hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496
2000-04-28 02:59:40 +02:00
/* Everything else in rest_of_compilation not included above. */
DEFTIMEVAR (TV_EARLY_LOCAL , "early local passes")
DEFTIMEVAR (TV_OPTIMIZE , "unaccounted optimizations")
Makefile.in (OBJS): Add timevar.o. hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496
2000-04-28 02:59:40 +02:00
DEFTIMEVAR (TV_REST_OF_COMPILATION , "rest of compilation")
DEFTIMEVAR (TV_POSTRELOAD , "unaccounted post reload")
DEFTIMEVAR (TV_LATE_COMPILATION , "unaccounted late compilation")
DEFTIMEVAR (TV_REMOVE_UNUSED , "remove unused locals")
DEFTIMEVAR (TV_ADDRESS_TAKEN , "address taken")
DEFTIMEVAR (TV_TODO , "unaccounted todo")
DEFTIMEVAR (TV_VERIFY_LOOP_CLOSED , "verify loop closed")
DEFTIMEVAR (TV_VERIFY_RTL_SHARING , "verify RTL sharing")
DEFTIMEVAR (TV_REBUILD_FREQUENCIES , "rebuild frequencies")
DEFTIMEVAR (TV_REPAIR_LOOPS , "repair loop structures")
Merger of dmalcolm/jit branch from git ChangeLog: * ChangeLog.jit: New. * MAINTAINERS (Various Maintainers): Add myself as jit maintainer. contrib/ChangeLog: * ChangeLog.jit: New. * jit-coverage-report.py: New file: a script to print crude code-coverage information for the libgccjit API. gcc/ChangeLog: * ChangeLog.jit: New. * Makefile.in (doc_build_sys): New variable, set to "sphinx" if sphinx is installed, falling back to "texinfo" otherwise. (FULL_DRIVER_NAME): New variable, adapted from the install-driver target. New target, a symlink within the builddir, linked to "xgcc", for use when running the JIT library from the builddir. (MOSTLYCLEANFILES): Add FULL_DRIVER_NAME. (install-driver): Use $(FULL_DRIVER_NAME) rather than spelling it out. * configure.ac (doc_build_sys): New variable, set to "sphinx" if sphinx is installed, falling back to "texinfo" otherwise. (GCC_DRIVER_NAME): Generate a gcc-driver-name.h file containing GCC_DRIVER_NAME for the benefit of jit/internal-api.c. * configure: Regenerate. * doc/install.texi (--enable-host-shared): Specify that this is required when building libgccjit. (Tools/packages necessary for modifying GCC): Add Sphinx. * timevar.def (TV_JIT_REPLAY): New. (TV_ASSEMBLE): New. (TV_LINK): New. (TV_LOAD): New. gcc/java/ChangeLog: * gcc/ChangeLog.jit: New. gcc/jit/ChangeLog: * ChangeLog.jit: New. * ChangeLog: New. * Make-lang.in: New. * TODO.rst: New. * config-lang.in: New. * docs/Makefile: New. * docs/_build/texinfo/Makefile: New. * docs/_build/texinfo/factorial.png: New. * docs/_build/texinfo/libgccjit.texi: New. * docs/_build/texinfo/sum-of-squares.png: New. * docs/conf.py: New. * docs/examples/tut01-hello-world.c: New. * docs/examples/tut02-square.c: New. * docs/examples/tut03-sum-of-squares.c: New. * docs/examples/tut04-toyvm/Makefile: New. * docs/examples/tut04-toyvm/factorial.toy: New. * docs/examples/tut04-toyvm/fibonacci.toy: New. * docs/examples/tut04-toyvm/toyvm.c: New. * docs/index.rst: New. * docs/internals/index.rst: New. * docs/intro/factorial.png: New. * docs/intro/index.rst: New. * docs/intro/sum-of-squares.png: New. * docs/intro/tutorial01.rst: New. * docs/intro/tutorial02.rst: New. * docs/intro/tutorial03.rst: New. * docs/intro/tutorial04.rst: New. * docs/topics/contexts.rst: New. * docs/topics/expressions.rst: New. * docs/topics/functions.rst: New. * docs/topics/index.rst: New. * docs/topics/locations.rst: New. * docs/topics/objects.rst: New. * docs/topics/results.rst: New. * docs/topics/types.rst: New. * dummy-frontend.c: New. * jit-builtins.c: New. * jit-builtins.h: New. * jit-common.h: New. * jit-playback.c: New. * jit-playback.h: New. * jit-recording.c: New. * jit-recording.h: New. * libgccjit++.h: New. * libgccjit.c: New. * libgccjit.h: New. * libgccjit.map: New. * notes.txt: New. gcc/testsuite/ChangeLog: * ChangeLog.jit: New. * jit.dg/all-non-failing-tests.h: New. * jit.dg/harness.h: New. * jit.dg/jit.exp: New. * jit.dg/test-accessing-struct.c: New. * jit.dg/test-accessing-union.c: New. * jit.dg/test-array-as-pointer.c: New. * jit.dg/test-arrays.c: New. * jit.dg/test-calling-external-function.c: New. * jit.dg/test-calling-function-ptr.c: New. * jit.dg/test-combination.c: New. * jit.dg/test-dot-product.c: New. * jit.dg/test-empty.c: New. * jit.dg/test-error-accessing-field-in-other-struct.c: New. * jit.dg/test-error-adding-to-terminated-block.c: New. * jit.dg/test-error-array-as-pointer.c: New. * jit.dg/test-error-bad-cast.c: New. * jit.dg/test-error-block-in-wrong-function.c: New. * jit.dg/test-error-call-through-ptr-with-mismatching-args.c: New. * jit.dg/test-error-call-through-ptr-with-non-function.c: New. * jit.dg/test-error-call-through-ptr-with-non-pointer.c: New. * jit.dg/test-error-call-through-ptr-with-not-enough-args.c: New. * jit.dg/test-error-call-through-ptr-with-too-many-args.c: New. * jit.dg/test-error-call-with-mismatching-args.c: New. * jit.dg/test-error-call-with-not-enough-args.c: New. * jit.dg/test-error-call-with-too-many-args.c: New. * jit.dg/test-error-dereference-field-of-non-pointer.c: New. * jit.dg/test-error-dereference-read-of-non-pointer.c: New. * jit.dg/test-error-get-type-bad-enum.c: New. * jit.dg/test-error-index-not-a-numeric-type.c: New. * jit.dg/test-error-mismatching-types-in-assignment.c: New. * jit.dg/test-error-mismatching-types-in-call.c: New. * jit.dg/test-error-missing-return.c: New. * jit.dg/test-error-new-binary-op-bad-op.c: New. * jit.dg/test-error-new-function-bad-kind.c: New. * jit.dg/test-error-new-unary-op-bad-op.c: New. * jit.dg/test-error-null-passed-to-api.c: New. * jit.dg/test-error-return-within-void-function.c: New. * jit.dg/test-error-unreachable-block.c: New. * jit.dg/test-error-unterminated-block.c: New. * jit.dg/test-error-value-not-a-numeric-type.c: New. * jit.dg/test-expressions.c: New. * jit.dg/test-factorial.c: New. * jit.dg/test-fibonacci.c: New. * jit.dg/test-functions.c: New. * jit.dg/test-fuzzer.c: New. * jit.dg/test-hello-world.c: New. * jit.dg/test-linked-list.c: New. * jit.dg/test-long-names.c: New. * jit.dg/test-nested-contexts.c: New. * jit.dg/test-nested-loops.c: New. * jit.dg/test-operator-overloading.cc: New. * jit.dg/test-quadratic.c: New. * jit.dg/test-quadratic.cc: New. * jit.dg/test-reading-struct.c: New. * jit.dg/test-string-literal.c: New. * jit.dg/test-sum-of-squares.c: New. * jit.dg/test-threads.c: New. * jit.dg/test-types.c: New. * jit.dg/test-using-global.c: New. * jit.dg/test-volatile.c: New. include/ChangeLog: * ChangeLog.jit: New. libbacktrace/ChangeLog: * ChangeLog.jit: New. libcpp/ChangeLog: * ChangeLog.jit: New. libdecnumber/ChangeLog: * ChangeLog.jit: New. libiberty/ChangeLog: * ChangeLog.jit: New. zlib/ChangeLog: * ChangeLog.jit: New. From-SVN: r217374
2014-11-11 22:55:52 +01:00
/* Stuff used by libgccjit.so. */
DEFTIMEVAR (TV_JIT_REPLAY , "replay of JIT client activity")
DEFTIMEVAR (TV_ASSEMBLE , "assemble JIT code")
DEFTIMEVAR (TV_LINK , "link JIT code")
DEFTIMEVAR (TV_LOAD , "load JIT result")
Refactoring of timevar API gcc/ChangeLog: * main.c (main): Pass in NULL for toplev's external_timer. * timevar.c: Include coretypes.h. (class timer::named_items): New. (timer::named_items::named_items): New. (timer::named_items::~named_items): New. (timer::named_items::push): New. (timer::named_items::pop): New. (timer::named_items::print): New. (timer::timer): Initialize field "m_jit_client_items". (timer::~timer): New. (timer::push): Move bulk of implementation to... (timer::push_internal): ...here. New function. (timer::pop): Move bulk of implementation to... (timer::pop_internal): ...here. New function. (timer::push_client_item): New. (timer::pop_client_item): New. (timer::print_row): New function, taken from timer::print. (timer::print): Print "GCC items" header if we also have client items. Move row-printing to timer::print_row. Print any client items. (timer::get_topmost_item_name): New method. * timevar.def (TV_JIT_ACQUIRING_MUTEX): New. (TV_JIT_CLIENT_CODE): New. * timevar.h (timer::push_client_item): New declaration. (timer::pop_client_item): New declaration. (timer::get_topmost_item_name): New method. (timer::push_internal): New declaration. (timer::pop_internal): New declaration. (timer::print_row): New declaration. (timer::named_items): New declaration. (timer::m_jit_client_items): New field. (timer): Add friend class named_items. (auto_timevar::auto_timevar): Add timer param. (auto_timevar::~auto_timevar): Use field "m_timer". (auto_timevar::m_timer): New field. * toplev.c (initialize_rtl): Add g_timer as param when constructing auto_timevar instance. (toplev::toplev): Add "external_timer" param, and use it to initialize the "g_timer" global if non-NULL. (toplev::~toplev): If this created "g_timer", delete it. * toplev.h (toplev::toplev): Replace "use_TV_TOTAL" bool param with "external_timer" timer *. gcc/jit/ChangeLog: * docs/topics/compatibility.rst (LIBGCCJIT_ABI_4): New. * docs/topics/contexts.rst (GCC_JIT_BOOL_OPTION_DUMP_SUMMARY): We no longer show a profile. * docs/topics/index.rst (Topic Reference): Add performance.rst. * docs/topics/performance.rst: New file. * docs/_build/texinfo/libgccjit.texi: Regenerate. * jit-playback.c (gcc::jit::playback::context::compile): Add timer param when constructing the "toplev" instance. (gcc::jit::playback::context::acquire_mutex): Add timer param when constructing auto_timevar instance. (gcc::jit::playback::context::make_fake_args): If we have a timer, add "-ftime-report". (gcc::jit::playback::context::invoke_driver): Add timer param when constructing auto_timevar instance. (gcc::jit::playback::context::dlopen_built_dso): Likewise. * jit-playback.h (gcc::jit::playback::context::get_timer): New accessor. * jit-recording.c: Include timevar.h. (gcc::jit::recording::context::context): Initialize field "m_timer". * jit-recording.h: Add forward declaration of class timer. (gcc::jit::recording::context::set_timer): New method. (gcc::jit::recording::context::get_timer): New method. (gcc::jit::recording::context::m_timer): New field. * libgccjit++.h (gccjit::timer): New class. (gccjit::auto_time): New class. (gccjit::context::set_timer): New method. (gccjit::context::get_timer): New. (gccjit::timer::timer): New. (gccjit::timer::push): New. (gccjit::timer::pop): New. (timer::print): New. (timer::get_inner_timer): New. (timer::release): New. (auto_time::auto_time): New. (auto_time::~auto_time): New. * libgccjit.c: Include timevar.h. (struct gcc_jit_timer): New. (gcc_jit_timer_new): New function. (gcc_jit_timer_release): New function. (gcc_jit_context_set_timer): New function. (gcc_jit_context_get_timer): New function. (gcc_jit_timer_push): New function. (gcc_jit_timer_pop): New function. (gcc_jit_timer_print): New function. * libgccjit.h (LIBGCCJIT_HAVE_TIMING_API): New macro. (gcc_jit_timer): New typedef. (gcc_jit_timer_new): New function. (gcc_jit_timer_release): New function. (gcc_jit_context_set_timer): New function. (gcc_jit_context_get_timer): New function. (gcc_jit_timer_push): New function. (gcc_jit_timer_pop): New function. (gcc_jit_timer_print): New function. * libgccjit.map (LIBGCCJIT_ABI_4): New. (gcc_jit_timer_new): New function. (gcc_jit_timer_release): New function. (gcc_jit_context_set_timer): New function. (gcc_jit_context_get_timer): New function. (gcc_jit_timer_push): New function. (gcc_jit_timer_pop): New function. (gcc_jit_timer_print): New function. gcc/testsuite/ChangeLog: * jit.dg/test-benchmark.c (test_jit): Add param "timer" and use it to push/pop timing items. (main): For each optimization level, create a gcc_jit_timer, and time all of the iteration within that level cumulatively. * jit.dg/test-error-gcc_jit_timer_pop-mismatch.c: New test case. * jit.dg/test-error-gcc_jit_timer_pop-too-many.c: New test case. From-SVN: r226530
2015-08-03 22:14:21 +02:00
DEFTIMEVAR (TV_JIT_ACQUIRING_MUTEX , "acquiring JIT mutex")
DEFTIMEVAR (TV_JIT_CLIENT_CODE , "JIT client code")