gcc/gcc/reginfo.c

1385 lines
40 KiB
C
Raw Permalink Normal View History

tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. 2008-01-29 Vladimir Makarov <vmakarov@redhat.com> * doc/tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. * doc/passes.texi: Remove entries about regclass, local-alloc, and global. Modify entries about regmove and IRA. * ra-conflict.c: Remove the file. * reload.c (push_reload, find_dummy_reload): Remove flag_ira. * tree-pass.h (pass_local_alloc, pass_global_alloc): Remove. (pass_regclass_init): Rename to pass_reginfo_init. * cfgloopanal.c (estimate_reg_pressure_cost): Remove flag_ira. * toplev.h (flag_ira): Remove. * caller-save.c (setup_save_areas): Remove flag_ira. * ira-color.c (ira_reuse_stack_slot, ira_mark_new_stack_slot): Ditto. * global.c: Remove the file. * opts.c: (decode_options): Remove flag_ira. * hard-reg-set.h (losing_caller_save_reg_set): Remove. * regmove.c: Modify file description. (find_use_as_address, try_auto_increment): Define them only if AUTO_INC_DEC is defined. (replacement_quality, replace_in_call_usage, fixup_match_1, stable_and_no_regs_but_for_p): Remove. (reg_set_in_bb): Make it static. (regmove_optimize): Remove flag_ira and code which worked for !flag_ira. * local-alloc.c: Remove the file. * common.opt (fira): Remove. * ira.c: Include except.h. (eliminable_regset): Move from global.c. (mark_elimination): Ditto. Remove flag_ira. (reg_renumber, struct equivalence, reg_equiv, equiv_mem, equiv_mem_modified, validate_equiv_mem_from_store, validate_equiv_mem, equiv_init_varies_p, equiv_init_movable_p, contains_replace_regs, memref_referenced_p, memref_used_between_p, no_equiv, recorded_label_ref): Move from local-alloc.c. (update_equiv_regs): Ditto. Make it static. (print_insn_chain, print_insn_chains): Move it from global.c. pseudo_for_reload_consideration_p): Ditto. Remove flag_ira. (build_insn_chain): Ditto. Make it static. (ra_init_live_subregs): Move from ra-conflict.c. Make it static. Rename to init_live_subregs. (gate_ira): Remove flag_ira. * regclass.c: Rename reginfo.c. Change file description. (FORBIDDEN_INC_DEC_CLASSES): Remove. (reg_class_superclasses, forbidden_inc_dec_class, in_inc_dec): Remove. (init_reg_sets_1): Remove code for evaluation of reg_class_superclasses and losing_caller_save_reg_set. (init_regs): Remove init_reg_autoinc. (struct costs, costs, init_cost, ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): Remove. (regclass_init): Rename to reginfo_init. Don't initialize init_cost. (pass_regclass_init): Rename to pass_reginfo_init. Modify corresponding entries. (dump_regclass, record_operand_costs, scan_one_insn, init_reg_autoinc, regclass, record_reg_classes, copy_cost, record_address_regs, auto_inc_dec_reg_p): Remove. (gt-regclass.h): Rename to gt-reginfo.h. * rtl.h (dump_global_regs, retry_global_alloc, build_insn_chain, dump_local_alloc, update_equiv_regs): Remove. * Makefile.in (RA_H): Remove. (OBJS-common): Remove global.o, local-alloc.o, and ra-conflict.o. Rename regclass.o to reginfo.o. (regclass.o): Rename to reginfo.o. Rename gt-regclass.h to gt-reginfo.h. (global.o, local-alloc.o, ra-conflict.o): Remove entries. (GTFILES): Rename regclass.c to reginfo.c. * passes.c (init_optimization_passes): Remove pass_local_alloc and pass_global_alloc. Rename pass_regclass_init to pass_reginfo_init. * reload1.c (compute_use_by_pseudos, reload, count_pseudo, count_spilled_pseudo, find_reg, alter_reg, delete_output_reload): Remove flag_ira. (finish_spills): Ditto. Remove code for !flga_ira. From-SVN: r143757
2009-01-29 15:51:46 +01:00
/* Compute different info about registers.
Copyright (C) 1987-2017 Free Software Foundation, Inc.
1991-11-06 00:39:50 +01: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
This file is part of GCC.
1991-11-06 00:39:50 +01: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 it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
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
version.
1991-11-06 00:39:50 +01: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 distributed in the hope that it will be useful, 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.
1991-11-06 00:39:50 +01:00
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/>. */
1991-11-06 00:39:50 +01:00
tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. 2008-01-29 Vladimir Makarov <vmakarov@redhat.com> * doc/tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. * doc/passes.texi: Remove entries about regclass, local-alloc, and global. Modify entries about regmove and IRA. * ra-conflict.c: Remove the file. * reload.c (push_reload, find_dummy_reload): Remove flag_ira. * tree-pass.h (pass_local_alloc, pass_global_alloc): Remove. (pass_regclass_init): Rename to pass_reginfo_init. * cfgloopanal.c (estimate_reg_pressure_cost): Remove flag_ira. * toplev.h (flag_ira): Remove. * caller-save.c (setup_save_areas): Remove flag_ira. * ira-color.c (ira_reuse_stack_slot, ira_mark_new_stack_slot): Ditto. * global.c: Remove the file. * opts.c: (decode_options): Remove flag_ira. * hard-reg-set.h (losing_caller_save_reg_set): Remove. * regmove.c: Modify file description. (find_use_as_address, try_auto_increment): Define them only if AUTO_INC_DEC is defined. (replacement_quality, replace_in_call_usage, fixup_match_1, stable_and_no_regs_but_for_p): Remove. (reg_set_in_bb): Make it static. (regmove_optimize): Remove flag_ira and code which worked for !flag_ira. * local-alloc.c: Remove the file. * common.opt (fira): Remove. * ira.c: Include except.h. (eliminable_regset): Move from global.c. (mark_elimination): Ditto. Remove flag_ira. (reg_renumber, struct equivalence, reg_equiv, equiv_mem, equiv_mem_modified, validate_equiv_mem_from_store, validate_equiv_mem, equiv_init_varies_p, equiv_init_movable_p, contains_replace_regs, memref_referenced_p, memref_used_between_p, no_equiv, recorded_label_ref): Move from local-alloc.c. (update_equiv_regs): Ditto. Make it static. (print_insn_chain, print_insn_chains): Move it from global.c. pseudo_for_reload_consideration_p): Ditto. Remove flag_ira. (build_insn_chain): Ditto. Make it static. (ra_init_live_subregs): Move from ra-conflict.c. Make it static. Rename to init_live_subregs. (gate_ira): Remove flag_ira. * regclass.c: Rename reginfo.c. Change file description. (FORBIDDEN_INC_DEC_CLASSES): Remove. (reg_class_superclasses, forbidden_inc_dec_class, in_inc_dec): Remove. (init_reg_sets_1): Remove code for evaluation of reg_class_superclasses and losing_caller_save_reg_set. (init_regs): Remove init_reg_autoinc. (struct costs, costs, init_cost, ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): Remove. (regclass_init): Rename to reginfo_init. Don't initialize init_cost. (pass_regclass_init): Rename to pass_reginfo_init. Modify corresponding entries. (dump_regclass, record_operand_costs, scan_one_insn, init_reg_autoinc, regclass, record_reg_classes, copy_cost, record_address_regs, auto_inc_dec_reg_p): Remove. (gt-regclass.h): Rename to gt-reginfo.h. * rtl.h (dump_global_regs, retry_global_alloc, build_insn_chain, dump_local_alloc, update_equiv_regs): Remove. * Makefile.in (RA_H): Remove. (OBJS-common): Remove global.o, local-alloc.o, and ra-conflict.o. Rename regclass.o to reginfo.o. (regclass.o): Rename to reginfo.o. Rename gt-regclass.h to gt-reginfo.h. (global.o, local-alloc.o, ra-conflict.o): Remove entries. (GTFILES): Rename regclass.c to reginfo.c. * passes.c (init_optimization_passes): Remove pass_local_alloc and pass_global_alloc. Rename pass_regclass_init to pass_reginfo_init. * reload1.c (compute_use_by_pseudos, reload, count_pseudo, count_spilled_pseudo, find_reg, alter_reg, delete_output_reload): Remove flag_ira. (finish_spills): Ditto. Remove code for !flga_ira. From-SVN: r143757
2009-01-29 15:51:46 +01:00
/* This file contains regscan pass of the compiler and passes for
dealing with info about modes of pseudo-registers inside
subregisters. It also defines some tables of information about the
hardware registers, function init_reg_sets to initialize the
tables, and other auxiliary functions to deal with info about
registers and their classes. */
1991-11-06 00:39:50 +01:00
#include "config.h"
Major cutover to using system.h: * Makefile.in (alias.o, bitmap.o, c-aux-info.o, c-common.o, c-decl.o, c-iterate.o, c-lang.o, c-lex.o, c-pragma.o, c-typeck.o, caller-save.o, calls.o, collect2.o, combine.o, cse.o, dbxout.o, dwarf2out.o, dwarfout.o, emit-rtl.o, except.o, explow.o, expmed.o, expr.o, final.o, flow.o, function.o, getpwd.o, global.o, integrate.o, jump.o, local-alloc.o, loop.o, optabs.o, pexecute.o, prefix.o, print-rtl.o, print-tree.o, profile.o, real.o, recog.o, reg-stack.o, regclass.o, regmove.o, reload.o, reload1.o, reorg.o, rtl.o, rtlanal.o, sdbout.o, stmt.o, stor-layout.o, stupid.o, tlink.o, toplev.o, tree.o, unroll.o, varasm.o, xcoffout.o): Depend on system.h. * alias.c, bitmap.c, c-aux-info.c, c-common.c, c-decl.c, c-iterate.c, c-lang.c, c-lex.c, c-pragma.c, c-typeck.c, caller-save.c, calls.c, collect2.c, combine.c, cse.c, dbxout.c, dwarf2out.c, dwarfout.c, emit-rtl.c, except.c, explow.c, expmed.c, expr.c, final.c, flow.c, function.c, gcc.c, getpwd.c, global.c, integrate.c, jump.c, local-alloc.c, loop.c, optabs.c, pexecute.c, prefix.c, print-rtl.c, print-tree.c, profile.c, real.c, recog.c, reg-stack.c, regclass.c, regmove.c, reload.c, reload1.c, reorg.c, rtl.c, rtlanal.c, sched.c, sdbout.c, stmt.c, stor-layout.c, stupid.c, tlink.c, toplev.c, tree.c, unroll.c, varasm.c, xcoffout.c: Include system.h. Organize include ordering so that stdarg/varargs comes before other system headers. Remove spurious casts of functions assured of a prototype in system.h. From-SVN: r18726
1998-03-20 15:58:42 +01:00
#include "system.h"
#include "coretypes.h"
tree-core.h: Include symtab.h. 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * tree-core.h: Include symtab.h. * rtl.h: Include hard-reg-set.h but not flags.h. (HARD_CONST): Remove condition compilation involving HARD_CONST since hard-reg-set.h is always included. * regs.h: Don't include hard-reg-set.h or rtl.h. * cfg.h: Include dominance.h. * gimple.h: Include tree-ssa-alias.h and gimple-expr.h. * backend.h: New. Aggregate commonly used backend header files. * gimple-ssa.h: Don't include tree-hasher.h. * ssa.h: New. Aggregate commonly used SSA header files. * regset.h: Remove bitmap.h and hard-reg-set.h #includes. * sel-sched-ir.h: Flatten includes. * lra-int.h: Flatten completely. * sel-sched-dump.h: Flatten includes. * ira-int.h: Flatten includes. * gimple-streamer.h: Remove all includes. * cfgloop.h: Remove all #includes except cfgloopmanip.h. * resource.h: Flatten hard-reg-set.h and df.h. * sched-int.h: Flatten insn-arrt.h and df.h. * valtrack.h: flatten bitmap.h, df.h, and rtl.h * df.h: Flatten includes, leaving regset.h, alloc-pool.h and timevar.h. * genattrtab.c (write_header): Adjust generated includes. * genautomata.c (main): Likewise. * genconditions.c (write-header): Likewise. * genemit.c (main): Likewise. * gengtype.c (open_base_files): Likewise. * genopinit.c (main): Likewise. * genoutput.c (output_prologue): Likewise. * genpeep.c (main): Likewise. * genpreds.c (write_insn_preds_c): Likewise. * genrecog.c (write_header): Likewise. * alias.c: Adjust includes. * asan.c: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * auto-profile.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * ccmp.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * compare-elim.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * cppbuiltin.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * data-streamer-in.c: Likewise. * data-streamer-out.c: Likewise. * data-streamer.c: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * debug.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dojump.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * dse.c: Likewise. * dumpfile.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * fwprop.c: Likewise. * gcc-plugin.h: Likewise. * gcse-common.c: Likewise. * gcse.c: Likewise. * generic-match-head.c: Likewise. * ggc-page.c: Likewise. * gimple-builder.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-match-head.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple-walk.c: Likewise. * gimple.c: Likewise. * gimplify-me.c: Likewise. * gimplify.c: Likewise. * godump.c: Likewise. * graph.c: Likewise. * graphite-blocking.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-isl-ast-to-gimple.c: Likewise. * graphite-optimize-isl.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * haifa-sched.c: Likewise. * hw-doloop.c: Likewise. * ifcvt.c: Likewise. * init-regs.c: Likewise. * internal-fn.c: Likewise. * ipa-chkp.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-icf-gimple.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-ref.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * realmpfr.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regrename.c: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl-chkp.c: Likewise. * rtlanal.c: Likewise. * rtlhooks.c: Likewise. * sanopt.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched.c: Likewise. * sese.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * symtab.c: Likewise. * target-globals.c: Likewise. * targhooks.c: Likewise. * toplev.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-browser.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chkp-opt.c: Likewise. * tree-chkp.c: Likewise. * tree-chrec.c: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.c: Likewise. * tree-diagnostic.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-scopedtables.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-stdarg.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-streamer.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * valtrack.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vmsdbgout.c: Likewise. * vtable-verify.c: Likewise. * web.c: Likewise. * wide-int.cc: Likewise. * xcoffout.c: Likewise. * config/aarch64/aarch64-builtins.c: Likewise. * config/aarch64/aarch64.c: Likewise. * config/aarch64/cortex-a57-fma-steering.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/aarch-common.c: Likewise. * config/arm/arm-builtins.c: Likewise. * config/arm/arm-c.c: Likewise. * config/arm/arm.c: Likewise. * config/avr/avr-c.c: Likewise. * config/avr/avr-log.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/c6x/c6x.c: Likewise. * config/cr16/cr16.c: Likewise. * config/cris/cris.c: Likewise. * config/darwin-c.c: Likewise. * config/darwin.c: Likewise. * config/epiphany/epiphany.c: Likewise. * config/epiphany/mode-switch-use.c: Likewise. * config/epiphany/resolve-sw-modes.c: Likewise. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * config/ft32/ft32.c: Likewise. * config/h8300/h8300.c: Likewise. * config/i386/i386-c.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/msformat-c.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/i386/winnt-stubs.c: Likewise. * config/i386/winnt.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.c: Likewise. * config/m32c/m32c-pragma.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep-pragma.c: Likewise. * config/mep/mep.c: Likewise. * config/microblaze/microblaze-c.c: Likewise. * config/microblaze/microblaze.c: Likewise. * config/mips/mips.c: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/msp430/msp430-c.c: Likewise. * config/msp430/msp430.c: Likewise. * config/nds32/nds32-cost.c: Likewise. * config/nds32/nds32-fp-as-gp.c: Likewise. * config/nds32/nds32-intrinsic.c: Likewise. * config/nds32/nds32-isr.c: Likewise. * config/nds32/nds32-md-auxiliary.c: Likewise. * config/nds32/nds32-memory-manipulation.c: Likewise. * config/nds32/nds32-pipelines-auxiliary.c: Likewise. * config/nds32/nds32-predicates.c: Likewise. * config/nds32/nds32.c: Likewise. * config/nios2/nios2.c: Likewise. * config/nvptx/nvptx.c: Likewise. * config/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/rl78/rl78-c.c: Likewise. * config/rl78/rl78.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390-c.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh-c.c: Likewise. * config/sh/sh-mem.cc: Likewise. * config/sh/sh.c: Likewise. * config/sh/sh_optimize_sett_clrt.cc: Likewise. * config/sh/sh_treg_combine.cc: Likewise. * config/sol2-c.c: Likewise. * config/sol2-cxx.c: Likewise. * config/sol2-stubs.c: Likewise. * config/sol2.c: Likewise. * config/sparc/sparc-c.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu-c.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/tilegx/mul-tables.c: Likewise. * config/tilegx/tilegx-c.c: Likewise. * config/tilegx/tilegx.c: Likewise. * config/tilepro/mul-tables.c: Likewise. * config/tilepro/tilepro-c.c: Likewise. * config/tilepro/tilepro.c: Likewise. * config/v850/v850-c.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/visium/visium.c: Likewise. * config/vms/vms-c.c: Likewise. * config/vms/vms.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. ada 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * gcc-interface/cuintp.c: Adjust includes. * gcc-interface/decl.c: Likewise. * gcc-interface/misc.c: Likewise. * gcc-interface/targtyps.c: Likewise. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. * gcc-interface/utils2.c: Likewise. c 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * c-array-notation.c: Adjust includes. * c-aux-info.c: Likewise. * c-convert.c: Likewise. * c-decl.c: Likewise. * c-errors.c: Likewise. * c-lang.c: Likewise. * c-objc-common.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. c-family 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * array-notation-common.c: Adjust includes. * c-ada-spec.c: Likewise. * c-cilkplus.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-dump.c: Likewise. * c-format.c: Likewise. * c-gimplify.c: Likewise. * c-indentation.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-pch.c: Likewise. * c-ppoutput.c: Likewise. * c-pragma.c: Likewise. * c-pretty-print.c: Likewise. * c-semantics.c: Likewise. * c-ubsan.c: Likewise. * cilk.c: Likewise. * stub-objc.c: Likewise. cp 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * call.c: Adjust includes. * class.c: Likewise. * constexpr.c: Likewise. * cp-array-notation.c: Likewise. * cp-gimplify.c: Likewise. * cp-lang.c: Likewise. * cp-objcp-common.c: Likewise. * cp-ubsan.c: Likewise. * cvt.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * dump.c: Likewise. * error.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * friend.c: Likewise. * init.c: Likewise. * lambda.c: Likewise. * lex.c: Likewise. * mangle.c: Likewise. * method.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * ptree.c: Likewise. * repo.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * tree.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. fortran 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * convert.c: Adjust includes. * cpp.c: Likewise. * decl.c: Likewise. * f95-lang.c: Likewise. * iresolve.c: Likewise. * match.c: Likewise. * module.c: Likewise. * options.c: Likewise. * target-memory.c: Likewise. * trans-array.c: Likewise. * trans-common.c: Likewise. * trans-const.c: Likewise. * trans-decl.c: Likewise. * trans-expr.c: Likewise. * trans-intrinsic.c: Likewise. * trans-io.c: Likewise. * trans-openmp.c: Likewise. * trans-stmt.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. go 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * go-backend.c: Adjust includes. * go-gcc.cc: Likewise. * go-lang.c: Likewise. java 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * boehm.c: Adjust includes. * builtins.c: Likewise. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * java-gimplify.c: Likewise. * jcf-dump.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jvgenmain.c: Likewise. * lang.c: Likewise. * mangle.c: Likewise. * mangle_name.c: Likewise. * resource.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. jit 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * dummy-frontend.c: Adjust includes. * jit-common.h: Likewise. * jit-playback.c: Likewise. lto 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * lto-lang.c: Adjust includes. * lto-object.c: Likewise. * lto-partition.c: Likewise. * lto-symtab.c: Likewise. * lto.c: Likewise. objc 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * objc-act.c: Adjust includes. * objc-encoding.c: Likewise. * objc-gnu-runtime-abi-01.c: Likewise. * objc-lang.c: Likewise. * objc-map.c: Likewise. * objc-next-runtime-abi-01.c: Likewise. * objc-next-runtime-abi-02.c: Likewise. * objc-runtime-shared-support.c: Likewise. objcp 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * objcp-decl.c: Adjust includes. * objcp-lang.c: Likewise. From-SVN: r225531
2015-07-08 02:53:03 +02:00
#include "backend.h"
alias.c: Reorder #include statements and remove duplicates. 2015-10-29 Andrew MacLeod <amacleod@redhat.com> * alias.c: Reorder #include statements and remove duplicates. * asan.c: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * auto-profile.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * ccmp.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * compare-elim.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * cppbuiltin.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * data-streamer-in.c: Likewise. * data-streamer-out.c: Likewise. * data-streamer.c: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * debug.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dojump.c: Likewise. * dominance.c: Likewise. * double-int.c: Likewise. * dse.c: Likewise. * dumpfile.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * fwprop.c: Likewise. * gcse.c: Likewise. * generic-match-head.c: Likewise. * ggc-common.c: Likewise. * gimple-builder.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-match-head.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple-walk.c: Likewise. * gimple.c: Likewise. * gimplify-me.c: Likewise. * gimplify.c: Likewise. * godump.c: Likewise. * graph.c: Likewise. * graphite-poly.c: Likewise. * haifa-sched.c: Likewise. * hw-doloop.c: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * internal-fn.c: Likewise. * ipa-chkp.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-icf-gimple.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-ref.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * realmpfr.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regrename.c: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl-chkp.c: Likewise. * rtl-error.c: Likewise. * rtlanal.c: Likewise. * rtlhooks.c: Likewise. * sanopt.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sese.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * statistics.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * symtab.c: Likewise. * target-globals.c: Likewise. * targhooks.c: Likewise. * toplev.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chkp-opt.c: Likewise. * tree-chkp.c: Likewise. * tree-chrec.c: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.c: Likewise. * tree-diagnostic.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-scopedtables.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-stdarg.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-streamer.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vtable-verify.c: Likewise. * web.c: Likewise. * wide-int-print.cc: Likewise. * wide-int.cc: Likewise. * xcoffout.c: Likewise. From-SVN: r229526
2015-10-29 14:57:32 +01:00
#include "target.h"
1991-11-06 00:39:50 +01:00
#include "rtl.h"
alias.c: Reorder #include statements and remove duplicates. 2015-10-29 Andrew MacLeod <amacleod@redhat.com> * alias.c: Reorder #include statements and remove duplicates. * asan.c: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * auto-profile.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * ccmp.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * compare-elim.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * cppbuiltin.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * data-streamer-in.c: Likewise. * data-streamer-out.c: Likewise. * data-streamer.c: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * debug.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dojump.c: Likewise. * dominance.c: Likewise. * double-int.c: Likewise. * dse.c: Likewise. * dumpfile.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * fwprop.c: Likewise. * gcse.c: Likewise. * generic-match-head.c: Likewise. * ggc-common.c: Likewise. * gimple-builder.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-match-head.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple-walk.c: Likewise. * gimple.c: Likewise. * gimplify-me.c: Likewise. * gimplify.c: Likewise. * godump.c: Likewise. * graph.c: Likewise. * graphite-poly.c: Likewise. * haifa-sched.c: Likewise. * hw-doloop.c: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * internal-fn.c: Likewise. * ipa-chkp.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-icf-gimple.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-ref.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * realmpfr.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regrename.c: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl-chkp.c: Likewise. * rtl-error.c: Likewise. * rtlanal.c: Likewise. * rtlhooks.c: Likewise. * sanopt.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sese.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * statistics.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * symtab.c: Likewise. * target-globals.c: Likewise. * targhooks.c: Likewise. * toplev.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chkp-opt.c: Likewise. * tree-chkp.c: Likewise. * tree-chrec.c: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.c: Likewise. * tree-diagnostic.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-scopedtables.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-stdarg.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-streamer.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vtable-verify.c: Likewise. * web.c: Likewise. * wide-int-print.cc: Likewise. * wide-int.cc: Likewise. * xcoffout.c: Likewise. From-SVN: r229526
2015-10-29 14:57:32 +01:00
#include "tree.h"
tree-core.h: Include symtab.h. 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * tree-core.h: Include symtab.h. * rtl.h: Include hard-reg-set.h but not flags.h. (HARD_CONST): Remove condition compilation involving HARD_CONST since hard-reg-set.h is always included. * regs.h: Don't include hard-reg-set.h or rtl.h. * cfg.h: Include dominance.h. * gimple.h: Include tree-ssa-alias.h and gimple-expr.h. * backend.h: New. Aggregate commonly used backend header files. * gimple-ssa.h: Don't include tree-hasher.h. * ssa.h: New. Aggregate commonly used SSA header files. * regset.h: Remove bitmap.h and hard-reg-set.h #includes. * sel-sched-ir.h: Flatten includes. * lra-int.h: Flatten completely. * sel-sched-dump.h: Flatten includes. * ira-int.h: Flatten includes. * gimple-streamer.h: Remove all includes. * cfgloop.h: Remove all #includes except cfgloopmanip.h. * resource.h: Flatten hard-reg-set.h and df.h. * sched-int.h: Flatten insn-arrt.h and df.h. * valtrack.h: flatten bitmap.h, df.h, and rtl.h * df.h: Flatten includes, leaving regset.h, alloc-pool.h and timevar.h. * genattrtab.c (write_header): Adjust generated includes. * genautomata.c (main): Likewise. * genconditions.c (write-header): Likewise. * genemit.c (main): Likewise. * gengtype.c (open_base_files): Likewise. * genopinit.c (main): Likewise. * genoutput.c (output_prologue): Likewise. * genpeep.c (main): Likewise. * genpreds.c (write_insn_preds_c): Likewise. * genrecog.c (write_header): Likewise. * alias.c: Adjust includes. * asan.c: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * auto-profile.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * ccmp.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * compare-elim.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * cppbuiltin.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * data-streamer-in.c: Likewise. * data-streamer-out.c: Likewise. * data-streamer.c: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * debug.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dojump.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * dse.c: Likewise. * dumpfile.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * fwprop.c: Likewise. * gcc-plugin.h: Likewise. * gcse-common.c: Likewise. * gcse.c: Likewise. * generic-match-head.c: Likewise. * ggc-page.c: Likewise. * gimple-builder.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-match-head.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple-walk.c: Likewise. * gimple.c: Likewise. * gimplify-me.c: Likewise. * gimplify.c: Likewise. * godump.c: Likewise. * graph.c: Likewise. * graphite-blocking.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-isl-ast-to-gimple.c: Likewise. * graphite-optimize-isl.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * haifa-sched.c: Likewise. * hw-doloop.c: Likewise. * ifcvt.c: Likewise. * init-regs.c: Likewise. * internal-fn.c: Likewise. * ipa-chkp.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-icf-gimple.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-ref.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * realmpfr.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regrename.c: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl-chkp.c: Likewise. * rtlanal.c: Likewise. * rtlhooks.c: Likewise. * sanopt.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched.c: Likewise. * sese.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * symtab.c: Likewise. * target-globals.c: Likewise. * targhooks.c: Likewise. * toplev.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-browser.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chkp-opt.c: Likewise. * tree-chkp.c: Likewise. * tree-chrec.c: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.c: Likewise. * tree-diagnostic.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-scopedtables.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-stdarg.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-streamer.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * valtrack.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vmsdbgout.c: Likewise. * vtable-verify.c: Likewise. * web.c: Likewise. * wide-int.cc: Likewise. * xcoffout.c: Likewise. * config/aarch64/aarch64-builtins.c: Likewise. * config/aarch64/aarch64.c: Likewise. * config/aarch64/cortex-a57-fma-steering.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/aarch-common.c: Likewise. * config/arm/arm-builtins.c: Likewise. * config/arm/arm-c.c: Likewise. * config/arm/arm.c: Likewise. * config/avr/avr-c.c: Likewise. * config/avr/avr-log.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/c6x/c6x.c: Likewise. * config/cr16/cr16.c: Likewise. * config/cris/cris.c: Likewise. * config/darwin-c.c: Likewise. * config/darwin.c: Likewise. * config/epiphany/epiphany.c: Likewise. * config/epiphany/mode-switch-use.c: Likewise. * config/epiphany/resolve-sw-modes.c: Likewise. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * config/ft32/ft32.c: Likewise. * config/h8300/h8300.c: Likewise. * config/i386/i386-c.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/msformat-c.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/i386/winnt-stubs.c: Likewise. * config/i386/winnt.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.c: Likewise. * config/m32c/m32c-pragma.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep-pragma.c: Likewise. * config/mep/mep.c: Likewise. * config/microblaze/microblaze-c.c: Likewise. * config/microblaze/microblaze.c: Likewise. * config/mips/mips.c: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/msp430/msp430-c.c: Likewise. * config/msp430/msp430.c: Likewise. * config/nds32/nds32-cost.c: Likewise. * config/nds32/nds32-fp-as-gp.c: Likewise. * config/nds32/nds32-intrinsic.c: Likewise. * config/nds32/nds32-isr.c: Likewise. * config/nds32/nds32-md-auxiliary.c: Likewise. * config/nds32/nds32-memory-manipulation.c: Likewise. * config/nds32/nds32-pipelines-auxiliary.c: Likewise. * config/nds32/nds32-predicates.c: Likewise. * config/nds32/nds32.c: Likewise. * config/nios2/nios2.c: Likewise. * config/nvptx/nvptx.c: Likewise. * config/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/rl78/rl78-c.c: Likewise. * config/rl78/rl78.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390-c.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh-c.c: Likewise. * config/sh/sh-mem.cc: Likewise. * config/sh/sh.c: Likewise. * config/sh/sh_optimize_sett_clrt.cc: Likewise. * config/sh/sh_treg_combine.cc: Likewise. * config/sol2-c.c: Likewise. * config/sol2-cxx.c: Likewise. * config/sol2-stubs.c: Likewise. * config/sol2.c: Likewise. * config/sparc/sparc-c.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu-c.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/tilegx/mul-tables.c: Likewise. * config/tilegx/tilegx-c.c: Likewise. * config/tilegx/tilegx.c: Likewise. * config/tilepro/mul-tables.c: Likewise. * config/tilepro/tilepro-c.c: Likewise. * config/tilepro/tilepro.c: Likewise. * config/v850/v850-c.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/visium/visium.c: Likewise. * config/vms/vms-c.c: Likewise. * config/vms/vms.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. ada 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * gcc-interface/cuintp.c: Adjust includes. * gcc-interface/decl.c: Likewise. * gcc-interface/misc.c: Likewise. * gcc-interface/targtyps.c: Likewise. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. * gcc-interface/utils2.c: Likewise. c 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * c-array-notation.c: Adjust includes. * c-aux-info.c: Likewise. * c-convert.c: Likewise. * c-decl.c: Likewise. * c-errors.c: Likewise. * c-lang.c: Likewise. * c-objc-common.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. c-family 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * array-notation-common.c: Adjust includes. * c-ada-spec.c: Likewise. * c-cilkplus.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-dump.c: Likewise. * c-format.c: Likewise. * c-gimplify.c: Likewise. * c-indentation.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-pch.c: Likewise. * c-ppoutput.c: Likewise. * c-pragma.c: Likewise. * c-pretty-print.c: Likewise. * c-semantics.c: Likewise. * c-ubsan.c: Likewise. * cilk.c: Likewise. * stub-objc.c: Likewise. cp 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * call.c: Adjust includes. * class.c: Likewise. * constexpr.c: Likewise. * cp-array-notation.c: Likewise. * cp-gimplify.c: Likewise. * cp-lang.c: Likewise. * cp-objcp-common.c: Likewise. * cp-ubsan.c: Likewise. * cvt.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * dump.c: Likewise. * error.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * friend.c: Likewise. * init.c: Likewise. * lambda.c: Likewise. * lex.c: Likewise. * mangle.c: Likewise. * method.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * ptree.c: Likewise. * repo.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * tree.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. fortran 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * convert.c: Adjust includes. * cpp.c: Likewise. * decl.c: Likewise. * f95-lang.c: Likewise. * iresolve.c: Likewise. * match.c: Likewise. * module.c: Likewise. * options.c: Likewise. * target-memory.c: Likewise. * trans-array.c: Likewise. * trans-common.c: Likewise. * trans-const.c: Likewise. * trans-decl.c: Likewise. * trans-expr.c: Likewise. * trans-intrinsic.c: Likewise. * trans-io.c: Likewise. * trans-openmp.c: Likewise. * trans-stmt.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. go 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * go-backend.c: Adjust includes. * go-gcc.cc: Likewise. * go-lang.c: Likewise. java 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * boehm.c: Adjust includes. * builtins.c: Likewise. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * java-gimplify.c: Likewise. * jcf-dump.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jvgenmain.c: Likewise. * lang.c: Likewise. * mangle.c: Likewise. * mangle_name.c: Likewise. * resource.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. jit 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * dummy-frontend.c: Adjust includes. * jit-common.h: Likewise. * jit-playback.c: Likewise. lto 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * lto-lang.c: Adjust includes. * lto-object.c: Likewise. * lto-partition.c: Likewise. * lto-symtab.c: Likewise. * lto.c: Likewise. objc 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * objc-act.c: Adjust includes. * objc-encoding.c: Likewise. * objc-gnu-runtime-abi-01.c: Likewise. * objc-lang.c: Likewise. * objc-map.c: Likewise. * objc-next-runtime-abi-01.c: Likewise. * objc-next-runtime-abi-02.c: Likewise. * objc-runtime-shared-support.c: Likewise. objcp 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * objcp-decl.c: Adjust includes. * objcp-lang.c: Likewise. From-SVN: r225531
2015-07-08 02:53:03 +02:00
#include "df.h"
Move MEMMODEL_* from coretypes.h to memmodel.h 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com> gcc/ * coretypes.h: Move MEMMODEL_* macros and enum memmodel definition into ... * memmodel.h: This file. * alias.c, asan.c, auto-inc-dec.c, bb-reorder.c, bt-load.c, caller-save.c, calls.c, ccmp.c, cfgbuild.c, cfgcleanup.c, cfgexpand.c, cfgloopanal.c, cfgrtl.c, cilk-common.c, combine.c, combine-stack-adj.c, common/config/aarch64/aarch64-common.c, common/config/arm/arm-common.c, common/config/bfin/bfin-common.c, common/config/c6x/c6x-common.c, common/config/i386/i386-common.c, common/config/ia64/ia64-common.c, common/config/nvptx/nvptx-common.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-c.c, config/aarch64/cortex-a57-fma-steering.c, config/arc/arc.c, config/arc/arc-c.c, config/arm/arm-builtins.c, config/arm/arm-c.c, config/avr/avr.c, config/avr/avr-c.c, config/avr/avr-log.c, config/bfin/bfin.c, config/c6x/c6x.c, config/cr16/cr16.c, config/cris/cris.c, config/darwin-c.c, config/darwin.c, config/epiphany/epiphany.c, config/epiphany/mode-switch-use.c, config/epiphany/resolve-sw-modes.c, config/fr30/fr30.c, config/frv/frv.c, config/ft32/ft32.c, config/h8300/h8300.c, config/i386/i386-c.c, config/i386/winnt.c, config/iq2000/iq2000.c, config/lm32/lm32.c, config/m32c/m32c.c, config/m32r/m32r.c, config/m68k/m68k.c, config/mcore/mcore.c, config/microblaze/microblaze.c, config/mmix/mmix.c, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-memory-manipulation.c, config/nds32/nds32-predicates.c, config/nds32/nds32.c, config/nios2/nios2.c, config/nvptx/nvptx.c, config/pa/pa.c, config/pdp11/pdp11.c, config/rl78/rl78.c, config/rs6000/rs6000-c.c, config/rx/rx.c, config/s390/s390-c.c, config/s390/s390.c, config/sh/sh.c, config/sh/sh-c.c, config/sh/sh-mem.cc, config/sh/sh_treg_combine.cc, config/sol2.c, config/spu/spu.c, config/stormy16/stormy16.c, config/tilegx/tilegx.c, config/tilepro/tilepro.c, config/v850/v850.c, config/vax/vax.c, config/visium/visium.c, config/vms/vms-c.c, config/xtensa/xtensa.c, coverage.c, cppbuiltin.c, cprop.c, cse.c, cselib.c, dbxout.c, dce.c, df-core.c, df-problems.c, df-scan.c, dojump.c, dse.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c, except.c, explow.c, expmed.c, expr.c, final.c, fold-const.c, function.c, fwprop.c, gcse.c, ggc-page.c, haifa-sched.c, hsa-brig.c, hsa-gen.c, hw-doloop.c, ifcvt.c, init-regs.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-lives.c, ira.c, jump.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lra.c, lra-assigns.c, lra-coalesce.c, lra-constraints.c, lra-eliminations.c, lra-lives.c, lra-remat.c, lra-spills.c, mode-switching.c, modulo-sched.c, omp-low.c, passes.c, postreload-gcse.c, postreload.c, predict.c, print-rtl-function.c, recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, reload.c, reload1.c, reorg.c, resource.c, rtl-chkp.c, rtl-tests.c, rtlanal.c, rtlhooks.c, sched-deps.c, sched-rgn.c, sdbout.c, sel-sched-ir.c, sel-sched.c, shrink-wrap.c, simplify-rtx.c, stack-ptr-mod.c, stmt.c, stor-layout.c, target-globals.c, targhooks.c, toplev.c, tree-nested.c, tree-outof-ssa.c, tree-profile.c, tree-ssa-coalesce.c, tree-ssa-ifcombine.c, tree-ssa-loop-ivopts.c, tree-ssa-loop.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-vect-data-refs.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Include memmodel.h. * genattrtab.c (write_header): Include memmodel.h in generated file. * genautomata.c (main): Likewise. * gengtype.c (open_base_files): Likewise. * genopinit.c (main): Likewise. * genconditions.c (write_header): Include memmodel.h earlier in generated file. * genemit.c (main): Likewise. * genoutput.c (output_prologue): Likewise. * genpeep.c (main): Likewise. * genpreds.c (write_insn_preds_c): Likewise. * genrecog.c (write_header): Likewise. * Makefile.in (PLUGIN_HEADERS): Include memmodel.h gcc/ada/ * gcc-interface/utils2.c: Include memmodel.h. gcc/c-family/ * c-cppbuiltin.c: Include memmodel.h. * c-opts.c: Likewise. * c-pragma.c: Likewise. * c-warn.c: Likewise. gcc/c/ * c-typeck.c: Include memmodel.h. gcc/cp/ * decl2.c: Include memmodel.h. * rtti.c: Likewise. gcc/fortran/ * trans-intrinsic.c: Include memmodel.h. gcc/go/ * go-backend.c: Include memmodel.h. libgcc/ * libgcov-profiler.c: Replace MEMMODEL_* macros by their __ATOMIC_* equivalent. * config/tilepro/atomic.c: Likewise and stop casting model to enum memmodel. From-SVN: r241121
2016-10-13 16:17:52 +02:00
#include "memmodel.h"
alias.c: Reorder #include statements and remove duplicates. 2015-10-29 Andrew MacLeod <amacleod@redhat.com> * alias.c: Reorder #include statements and remove duplicates. * asan.c: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * auto-profile.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * ccmp.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * compare-elim.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * cppbuiltin.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * data-streamer-in.c: Likewise. * data-streamer-out.c: Likewise. * data-streamer.c: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * debug.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dojump.c: Likewise. * dominance.c: Likewise. * double-int.c: Likewise. * dse.c: Likewise. * dumpfile.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * fwprop.c: Likewise. * gcse.c: Likewise. * generic-match-head.c: Likewise. * ggc-common.c: Likewise. * gimple-builder.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-match-head.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple-walk.c: Likewise. * gimple.c: Likewise. * gimplify-me.c: Likewise. * gimplify.c: Likewise. * godump.c: Likewise. * graph.c: Likewise. * graphite-poly.c: Likewise. * haifa-sched.c: Likewise. * hw-doloop.c: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * internal-fn.c: Likewise. * ipa-chkp.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-icf-gimple.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-ref.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * realmpfr.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regrename.c: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl-chkp.c: Likewise. * rtl-error.c: Likewise. * rtlanal.c: Likewise. * rtlhooks.c: Likewise. * sanopt.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sese.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * statistics.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * symtab.c: Likewise. * target-globals.c: Likewise. * targhooks.c: Likewise. * toplev.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chkp-opt.c: Likewise. * tree-chkp.c: Likewise. * tree-chrec.c: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.c: Likewise. * tree-diagnostic.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-scopedtables.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-stdarg.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-streamer.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vtable-verify.c: Likewise. * web.c: Likewise. * wide-int-print.cc: Likewise. * wide-int.cc: Likewise. * xcoffout.c: Likewise. From-SVN: r229526
2015-10-29 14:57:32 +01:00
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
#include "ira.h"
#include "recog.h"
#include "diagnostic-core.h"
#include "reload.h"
Warning fixes: * Makefile.in (c-lang.o): Depend on c-tree.h, c-lex.h and toplev.h. (c-lex.o): Depend on output.h. (c-common.o): Likewise. (stmt.o): Likewise. (calls.o): Likewise. (integrate.o): Depend on toplev.h. (regclass.o): Depend on output.h. (final.o): Depend on reload.h. * c-common.c: Include output.h. (check_format_info): Remove unused variable `integral_format'. * c-decl.c (print_lang_decl): Mark parameters `file', `node' and `indent' with ATTRIBUTE_UNUSED. (print_lang_type): Likewise. (maybe_build_cleanup): Likewise for parameter `decl'. (copy_lang_decl): Likewise for parameter `node'. * c-lang.c: Include c-tree.h, c-lex.h and toplev.h. (lang_print_xnode): Mark parameters `file', `node' and `indent' with ATTRIBUTE_UNUSED. (lookup_interface): Likewise for parameter `arg'. (is_class_name): Likewise. (maybe_objc_check_decl): Likewise for parameter `decl'. (maybe_objc_comptypes): Likewise for parameters `lhs', `rhs' and `reflexive'. (maybe_objc_method_name): Likewise for parameter `decl'. (build_objc_string): Likewise for parameters `len' and `str'. * c-lex.c: Include output.h. * c-lex.h (position_after_white_space): Correct typo in prototype. * c-tree.h (finish_file, c_expand_start_cond, c_expand_start_else, c_expand_end_cond, init_iterators): Add prototypes. * caller-save.c (set_reg_live): Mark parameters `reg' and `setter' with ATTRIBUTE_UNUSED. * calls.c: Include output.h. * cccp.c (pipe_closed): Mark parameter `signo' with ATTRIBUTE_UNUSED. * combine.c: Move inclusion of expr.h to after insn-config.h. * iris6.h (ASM_IDENTIFY_GCC, ASM_IDENTIFY_LANGUAGE): Don't define as empty, rather define as ((void)0). * sparc.c (sparc_check_64): Add braces around ambiguous `else'. Add parentheses around assignment used as truth value. * cplus-dem.c (squangle_mop_up): Change return type to void. (internal_cplus_demangle): Remove unused parameter `options'. All callers changed. (cplus_demangle_opname): Remove function wide variable `int i' and replace with `size_t i' at each location where it is used. (cplus_demangle_opname): change type of `i' from int to size_t. * cppexp.c (right_shift): Mark parameter `pfile' with ATTRIBUTE_UNUSED. * cpphash.c (cpp_lookup): Likewise. (cpp_hash_cleanup): Likewise. * cpplib.c (parse_name): Add a prototype and make it static. (null_underflow): Mark parameter `pfile' with ATTRIBUTE_UNUSED. (null_cleanup): Likewise for parameters `pbuf' and `pfile'. (macro_cleanup): Likewise for parameter `pfile'. (file_cleanup): Likewise. * cpplib.h (cpp_reader_init, cpp_options_init, cpp_start_read, cpp_read_check_assertion, skip_rest_of_line): Add prototypes. * crtstuff.c (force_to_data, __CTOR_LIST__, force_to_data, __DTOR_END__, __FRAME_END__): Mark with ATTRIBUTE_UNUSED. * cse.c (cse_check_loop_start): Mark parameter `set' with ATTRIBUTE_UNUSED. * dbxout.c (flag_minimal_debug, have_used_extensions, source_label_number): Move inside macro wrapper check against defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO). * dwarf2out.c (gen_entry_point_die): Hide prototype and definition. * except.h (doing_eh): Provide prototype. * expr.c: Move inclusion of expr.h to after insn-config.h. * final.c: Include reload.h. (shorten_branches): Cast the first argument of bzero to char *. * fix-header.c (cpp_print_containing_files): Mark parameter `pfile' with ATTRIBUTE_UNUSED. (cpp_fatal): Likewise. * flow.c (find_basic_blocks_1): Cast the first argument of bzero to char *. * genattrtab.c (make_length_attrs): Change the type of variable `i' from int to size_t. (zero_fn): Mark parameter `exp' with ATTRIBUTE_UNUSED. (one_fn): Likewise. * genextract.c (main): When generating insn-extract.c, mark variable `junk' with ATTRIBUTE_UNUSED. * gengenrtl.c (gencode): When generating genrtl.c, cast the first argument of bzero to char*. * integrate.c: Include toplev.h. * libgcc2.c: Wrap `struct exception_table' and `find_exception_handler' in macro DWARF2_UNWIND_INFO. * objc/Make-lang.in (objc-act.o): Depend on toplev.h. * objc/objc-act.c: Include toplev.h. (lang_print_xnode): Mark parameters `file', `node' and `indent' with ATTRIBUTE_UNUSED. (finish_protocol): Likewise for parameter `protocol'. * output.h (declare_weak): Add prototype. (decode_reg_name): Don't wrap with TREE_CODE macro. (assemble_alias): Add prototype. * regclass.c: Include output.h. * reload.h (reloads_conflict): Add prototype. * rtl.h (print_rtl_single, mark_elimiation, reg_class_subset_p, output_func_start_profiler): Add prototypes. * rtlanal.c (reg_set_p_1): Mark parameters `x' and `pat' with ATTRIBUTE_UNUSED. * scan-decls.c: Include scan.h. * scan.h (recognized_function, recognized_extern): Add prototypes. * stmt.c: Include output.h. * toplev.c (error_for_asm, warning_for_asm): Remove prototypes. (output_lang_identify): Hide prototype and definition. (float_signal): Mark parameter `signo' with ATTRIBUTE_UNUSED. (pipe_closed): Likewise. * toplev.h (count_error, strip_off_ending, error_for_asm, warning_for_asm): Add prototypes. From-SVN: r19712
1998-05-13 14:40:39 +02:00
#include "output.h"
#include "tree-pass.h"
/* Maximum register number used in this function, plus one. */
int max_regno;
1991-11-06 00:39:50 +01:00
/* Used to cache the results of simplifiable_subregs. SHAPE is the input
parameter and SIMPLIFIABLE_REGS is the result. */
struct simplifiable_subreg
{
simplifiable_subreg (const subreg_shape &);
subreg_shape shape;
HARD_REG_SET simplifiable_regs;
};
1991-11-06 00:39:50 +01:00
hard-reg-set.h (target_hard_regs): New structure. gcc/ * hard-reg-set.h (target_hard_regs): New structure. (default_target_hard_regs): Declare. (this_target_hard_regs): Declare as a variable or define as a macro. (fixed_regs, fixed_reg_set, call_used_regs, call_really_used_regs) (call_used_reg_set, call_fixed_reg_set, regs_invalidated_by_call) (reg_alloc_order, inv_reg_alloc_order, reg_class_contents) (reg_class_size, reg_class_subclasses, reg_class_subunion) (reg_class_superunion, reg_names): Redefine as macros. * reginfo.c (fixed_regs, fixed_reg_set, call_used_regs) (call_used_reg_set, call_really_used_regs, call_fixed_reg_set) (regs_invalidated_by_call, reg_alloc_order, inv_reg_alloc_order) (reg_class_contents, reg_class_size, reg_class_subclasses) (reg_class_subunion, reg_class_superunion, reg_names): Delete. (default_target_hard_regs): New variable (this_target_hard_regs, initial_call_really_used_regs) (initial_reg_alloc_order): New conditional variables. (initial_reg_names): New variable. (init_reg_sets): Assert that initial_call_really_used_regs, initial_reg_alloc_order and initial_reg_names are all the same size as their variable counterparts. Use them to initialize those counterparts. * target-globals.h (this_target_hard_regs): Declare. (target_globals): Add a hard_regs field. (restore_target_globals): Copy the hard_regs field to this_target_hard_regs. * target-globals.c: Include hard-reg-set.h. (default_target_globals): Initialize the hard_regs field. (save_target_globals): Likewise. From-SVN: r162089
2010-07-12 20:53:25 +02:00
struct target_hard_regs default_target_hard_regs;
struct target_regs default_target_regs;
#if SWITCHABLE_TARGET
hard-reg-set.h (target_hard_regs): New structure. gcc/ * hard-reg-set.h (target_hard_regs): New structure. (default_target_hard_regs): Declare. (this_target_hard_regs): Declare as a variable or define as a macro. (fixed_regs, fixed_reg_set, call_used_regs, call_really_used_regs) (call_used_reg_set, call_fixed_reg_set, regs_invalidated_by_call) (reg_alloc_order, inv_reg_alloc_order, reg_class_contents) (reg_class_size, reg_class_subclasses, reg_class_subunion) (reg_class_superunion, reg_names): Redefine as macros. * reginfo.c (fixed_regs, fixed_reg_set, call_used_regs) (call_used_reg_set, call_really_used_regs, call_fixed_reg_set) (regs_invalidated_by_call, reg_alloc_order, inv_reg_alloc_order) (reg_class_contents, reg_class_size, reg_class_subclasses) (reg_class_subunion, reg_class_superunion, reg_names): Delete. (default_target_hard_regs): New variable (this_target_hard_regs, initial_call_really_used_regs) (initial_reg_alloc_order): New conditional variables. (initial_reg_names): New variable. (init_reg_sets): Assert that initial_call_really_used_regs, initial_reg_alloc_order and initial_reg_names are all the same size as their variable counterparts. Use them to initialize those counterparts. * target-globals.h (this_target_hard_regs): Declare. (target_globals): Add a hard_regs field. (restore_target_globals): Copy the hard_regs field to this_target_hard_regs. * target-globals.c: Include hard-reg-set.h. (default_target_globals): Initialize the hard_regs field. (save_target_globals): Likewise. From-SVN: r162089
2010-07-12 20:53:25 +02:00
struct target_hard_regs *this_target_hard_regs = &default_target_hard_regs;
struct target_regs *this_target_regs = &default_target_regs;
#endif
hard-reg-set.h (target_hard_regs): New structure. gcc/ * hard-reg-set.h (target_hard_regs): New structure. (default_target_hard_regs): Declare. (this_target_hard_regs): Declare as a variable or define as a macro. (fixed_regs, fixed_reg_set, call_used_regs, call_really_used_regs) (call_used_reg_set, call_fixed_reg_set, regs_invalidated_by_call) (reg_alloc_order, inv_reg_alloc_order, reg_class_contents) (reg_class_size, reg_class_subclasses, reg_class_subunion) (reg_class_superunion, reg_names): Redefine as macros. * reginfo.c (fixed_regs, fixed_reg_set, call_used_regs) (call_used_reg_set, call_really_used_regs, call_fixed_reg_set) (regs_invalidated_by_call, reg_alloc_order, inv_reg_alloc_order) (reg_class_contents, reg_class_size, reg_class_subclasses) (reg_class_subunion, reg_class_superunion, reg_names): Delete. (default_target_hard_regs): New variable (this_target_hard_regs, initial_call_really_used_regs) (initial_reg_alloc_order): New conditional variables. (initial_reg_names): New variable. (init_reg_sets): Assert that initial_call_really_used_regs, initial_reg_alloc_order and initial_reg_names are all the same size as their variable counterparts. Use them to initialize those counterparts. * target-globals.h (this_target_hard_regs): Declare. (target_globals): Add a hard_regs field. (restore_target_globals): Copy the hard_regs field to this_target_hard_regs. * target-globals.c: Include hard-reg-set.h. (default_target_globals): Initialize the hard_regs field. (save_target_globals): Likewise. From-SVN: r162089
2010-07-12 20:53:25 +02:00
/* Data for initializing fixed_regs. */
static const char initial_fixed_regs[] = FIXED_REGISTERS;
1991-11-06 00:39:50 +01:00
hard-reg-set.h (target_hard_regs): New structure. gcc/ * hard-reg-set.h (target_hard_regs): New structure. (default_target_hard_regs): Declare. (this_target_hard_regs): Declare as a variable or define as a macro. (fixed_regs, fixed_reg_set, call_used_regs, call_really_used_regs) (call_used_reg_set, call_fixed_reg_set, regs_invalidated_by_call) (reg_alloc_order, inv_reg_alloc_order, reg_class_contents) (reg_class_size, reg_class_subclasses, reg_class_subunion) (reg_class_superunion, reg_names): Redefine as macros. * reginfo.c (fixed_regs, fixed_reg_set, call_used_regs) (call_used_reg_set, call_really_used_regs, call_fixed_reg_set) (regs_invalidated_by_call, reg_alloc_order, inv_reg_alloc_order) (reg_class_contents, reg_class_size, reg_class_subclasses) (reg_class_subunion, reg_class_superunion, reg_names): Delete. (default_target_hard_regs): New variable (this_target_hard_regs, initial_call_really_used_regs) (initial_reg_alloc_order): New conditional variables. (initial_reg_names): New variable. (init_reg_sets): Assert that initial_call_really_used_regs, initial_reg_alloc_order and initial_reg_names are all the same size as their variable counterparts. Use them to initialize those counterparts. * target-globals.h (this_target_hard_regs): Declare. (target_globals): Add a hard_regs field. (restore_target_globals): Copy the hard_regs field to this_target_hard_regs. * target-globals.c: Include hard-reg-set.h. (default_target_globals): Initialize the hard_regs field. (save_target_globals): Likewise. From-SVN: r162089
2010-07-12 20:53:25 +02:00
/* Data for initializing call_used_regs. */
static const char initial_call_used_regs[] = CALL_USED_REGISTERS;
#ifdef CALL_REALLY_USED_REGISTERS
hard-reg-set.h (target_hard_regs): New structure. gcc/ * hard-reg-set.h (target_hard_regs): New structure. (default_target_hard_regs): Declare. (this_target_hard_regs): Declare as a variable or define as a macro. (fixed_regs, fixed_reg_set, call_used_regs, call_really_used_regs) (call_used_reg_set, call_fixed_reg_set, regs_invalidated_by_call) (reg_alloc_order, inv_reg_alloc_order, reg_class_contents) (reg_class_size, reg_class_subclasses, reg_class_subunion) (reg_class_superunion, reg_names): Redefine as macros. * reginfo.c (fixed_regs, fixed_reg_set, call_used_regs) (call_used_reg_set, call_really_used_regs, call_fixed_reg_set) (regs_invalidated_by_call, reg_alloc_order, inv_reg_alloc_order) (reg_class_contents, reg_class_size, reg_class_subclasses) (reg_class_subunion, reg_class_superunion, reg_names): Delete. (default_target_hard_regs): New variable (this_target_hard_regs, initial_call_really_used_regs) (initial_reg_alloc_order): New conditional variables. (initial_reg_names): New variable. (init_reg_sets): Assert that initial_call_really_used_regs, initial_reg_alloc_order and initial_reg_names are all the same size as their variable counterparts. Use them to initialize those counterparts. * target-globals.h (this_target_hard_regs): Declare. (target_globals): Add a hard_regs field. (restore_target_globals): Copy the hard_regs field to this_target_hard_regs. * target-globals.c: Include hard-reg-set.h. (default_target_globals): Initialize the hard_regs field. (save_target_globals): Likewise. From-SVN: r162089
2010-07-12 20:53:25 +02:00
/* Data for initializing call_really_used_regs. */
static const char initial_call_really_used_regs[] = CALL_REALLY_USED_REGISTERS;
#endif
#ifdef CALL_REALLY_USED_REGISTERS
#define CALL_REALLY_USED_REGNO_P(X) call_really_used_regs[X]
#else
#define CALL_REALLY_USED_REGNO_P(X) call_used_regs[X]
#endif
1991-11-06 00:39:50 +01:00
/* Indexed by hard register number, contains 1 for registers
that are being used for global register decls.
These must be exempt from ordinary flow analysis
and are also considered fixed. */
char global_regs[FIRST_PSEUDO_REGISTER];
/* Declaration for the global register. */
tree global_regs_decl[FIRST_PSEUDO_REGISTER];
/* Same information as REGS_INVALIDATED_BY_CALL but in regset form to be used
in dataflow more conveniently. */
regset regs_invalidated_by_call_regset;
/* Same information as FIXED_REG_SET but in regset form. */
regset fixed_reg_set_regset;
/* The bitmap_obstack is used to hold some static variables that
should not be reset after each function is compiled. */
static bitmap_obstack persistent_obstack;
hard-reg-set.h (target_hard_regs): New structure. gcc/ * hard-reg-set.h (target_hard_regs): New structure. (default_target_hard_regs): Declare. (this_target_hard_regs): Declare as a variable or define as a macro. (fixed_regs, fixed_reg_set, call_used_regs, call_really_used_regs) (call_used_reg_set, call_fixed_reg_set, regs_invalidated_by_call) (reg_alloc_order, inv_reg_alloc_order, reg_class_contents) (reg_class_size, reg_class_subclasses, reg_class_subunion) (reg_class_superunion, reg_names): Redefine as macros. * reginfo.c (fixed_regs, fixed_reg_set, call_used_regs) (call_used_reg_set, call_really_used_regs, call_fixed_reg_set) (regs_invalidated_by_call, reg_alloc_order, inv_reg_alloc_order) (reg_class_contents, reg_class_size, reg_class_subclasses) (reg_class_subunion, reg_class_superunion, reg_names): Delete. (default_target_hard_regs): New variable (this_target_hard_regs, initial_call_really_used_regs) (initial_reg_alloc_order): New conditional variables. (initial_reg_names): New variable. (init_reg_sets): Assert that initial_call_really_used_regs, initial_reg_alloc_order and initial_reg_names are all the same size as their variable counterparts. Use them to initialize those counterparts. * target-globals.h (this_target_hard_regs): Declare. (target_globals): Add a hard_regs field. (restore_target_globals): Copy the hard_regs field to this_target_hard_regs. * target-globals.c: Include hard-reg-set.h. (default_target_globals): Initialize the hard_regs field. (save_target_globals): Likewise. From-SVN: r162089
2010-07-12 20:53:25 +02:00
/* Used to initialize reg_alloc_order. */
1991-11-06 00:39:50 +01:00
#ifdef REG_ALLOC_ORDER
hard-reg-set.h (target_hard_regs): New structure. gcc/ * hard-reg-set.h (target_hard_regs): New structure. (default_target_hard_regs): Declare. (this_target_hard_regs): Declare as a variable or define as a macro. (fixed_regs, fixed_reg_set, call_used_regs, call_really_used_regs) (call_used_reg_set, call_fixed_reg_set, regs_invalidated_by_call) (reg_alloc_order, inv_reg_alloc_order, reg_class_contents) (reg_class_size, reg_class_subclasses, reg_class_subunion) (reg_class_superunion, reg_names): Redefine as macros. * reginfo.c (fixed_regs, fixed_reg_set, call_used_regs) (call_used_reg_set, call_really_used_regs, call_fixed_reg_set) (regs_invalidated_by_call, reg_alloc_order, inv_reg_alloc_order) (reg_class_contents, reg_class_size, reg_class_subclasses) (reg_class_subunion, reg_class_superunion, reg_names): Delete. (default_target_hard_regs): New variable (this_target_hard_regs, initial_call_really_used_regs) (initial_reg_alloc_order): New conditional variables. (initial_reg_names): New variable. (init_reg_sets): Assert that initial_call_really_used_regs, initial_reg_alloc_order and initial_reg_names are all the same size as their variable counterparts. Use them to initialize those counterparts. * target-globals.h (this_target_hard_regs): Declare. (target_globals): Add a hard_regs field. (restore_target_globals): Copy the hard_regs field to this_target_hard_regs. * target-globals.c: Include hard-reg-set.h. (default_target_globals): Initialize the hard_regs field. (save_target_globals): Likewise. From-SVN: r162089
2010-07-12 20:53:25 +02:00
static int initial_reg_alloc_order[FIRST_PSEUDO_REGISTER] = REG_ALLOC_ORDER;
1991-11-06 00:39:50 +01:00
#endif
/* The same information, but as an array of unsigned ints. We copy from
these unsigned ints to the table above. We do this so the tm.h files
do not have to be aware of the wordsize for machines with <= 64 regs.
Note that we hard-code 32 here, not HOST_BITS_PER_INT. */
#define N_REG_INTS \
((FIRST_PSEUDO_REGISTER + (32 - 1)) / 32)
static const unsigned int_reg_class_contents[N_REG_CLASSES][N_REG_INTS]
= REG_CLASS_CONTENTS;
1991-11-06 00:39:50 +01:00
Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o. * Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o. (STAGESTUFF): Add min-insn-modes.c. (genobjs): Add genmodes.o. (print-rtl.o, print-rtl1.o): Depend on $(TM_P_H). (insn-modes.o): Depend on $(TM_H) not $(GTM_H); also real.h. (min-insn-modes.c, min-insn-modes.o): New rules. (s-modes): Also generate min-insn-modes.c. ($(BUILD_PREFIX_1)insn-modes.o): Kill. * genmodes.c (struct mode_data): Add format field. (blank_mode, validate_mode, complete_mode): Update to match. (make_scalar_mode): Separate into make_int_mode and make_float_mode. (_SCALAR_MODE): Kill. (FLOAT_MODE, FRACTIONAL_FLOAT_MODE): Add format argument. (emit_insn_modes_c_header): Adjust. (emit_min_insn_modes_c_header, emit_real_format_for_mode) (emit_min_insn_modes_c): New functions. (emit_insn_modes_c): Call emit_real_format_for_mode. (main): Add -m option to generate min-insn-modes.c. * machmode.h: Update documentation. Add format argument to all uses of FLOAT_MODE. * real.c: Don't define real_format_for_mode here. * dwarfout.c: Move default definition of PRINT_REG... * defaults.h: ...here. * print-rtl.c: Include tm_p.h. (DEBUG_PRINT_REG, DEBUG_REGISTER_NAMES, debug_reg_names, reg_names): Kill. (print_rtx): Use PRINT_REG, not DEBUG_PRINT_REG. But surround this entire block with #ifndef GENERATOR_FILE. * regclass.c: Unconditionally define reg_names. * config/mips/mips.h, config/rs6000/rs6000.h, config/sh/sh.h Don't define DEBUG_REGISTER_NAMES. * config/rs6000/darwin.h: Don't use DEBUG_REGISTER_NAMES in redefinition of REGISTER_NAMES. * config/i386/i386.h: Don't define DEBUG_PRINT_REG. * combine.c: Change all preprocessor conditionals on EXTRA_CC_MODES to use SELECT_CC_MODE instead; rearrange a bit for clarity. * genopinit.c: Remove mention of EXTRA_CC_MODES in comment. * configure.in: Don't define EXTRA_CC_MODES. * configure, config.in: Regenerate. * doc/tm.texi: Remove documentation of EXTRA_CC_MODES. * config/arc/arc.c, config/m32r/m32r.c, config/sparc/sparc.c: May assume that GET_MODE_CLASS is accurate for extra CC modes at all times. * config/i860/i860.h (INIT_CUMULATIVE_ARGS): Pass correct number of arguments to aggregate_value_p. * genmodes.c (RESET_FLOAT_FORMAT, reset_float_format): New. * machmode.def: Explain ARCH-modes.def. Document RESET_FLOAT_FORMAT. Improve commentary on various mode clusters. Do not define OI, PQI, PHI, PSI, PDI, QF, HF, TQF, XF, or TF modes here. Remove backward-compatibility definition of CC. * config/alpha/alpha-modes.def: New file; define TF mode. * config/arc/arm-modes.def: Define XF mode. * config/c4x/c4x-modes.def: Define QF and HF modes. Unset float format for SF and DF modes. * config/dsp16xx/dsp16xx-modes.def: New file; define HF mode. * config/i386/i386-modes.def: Define XF and TF modes. * config/i960/i960-modes.def: Define TF mode. * config/ia64/ia64-modes.def: Define TF and OI modes. * config/m68k/m68k-modes.def: New file; define XF mode. * config/mips/mips-modes.def: New file; define TF mode, reset formats for SF and DF modes. * config/pa/pa-modes.def: Define TF mode. * config/rs6000/rs6000.c: Define TF and PSI modes. * config/s390/s390-modes.def: Define OI mode. * config/sh/sh-modes.def: New file; define PSI mode. * config/sparc/sparc-modes.def: Define TF mode. * config/vax/vax-modes.def: New file; reset formats for SF and DF modes. * config/c4x/c4x.c (c4x_override_options): No need to mess with real_format_for_mode or set REAL_MODE_FORMATs. (c4x_immed_int_constant): Don't apply GET_MODE_CLASS to rtx variable. * config/i386/i386.c (override_options): No need to set REAL_MODE_FORMATs here. * config/i960/i960.c (i960_initialize): Likewise. * config/m68k/m68k.c (m68k_override_options): Likewise. * config/ia64/ia64.c (ia64_override_options): Set REAL_MODE_FORMAT for TFmode only if not the default. * config/mips/mips.c (override_options): Likewise. * config/vax/vax.c (override_optionms): Set REAL_MODE_FORMAT for DFmode only if not the default. * config/i370/i370.h (RET_REG): Don't consider TFmode. * config/m68hc11/m68hc11.c (print_operand): Don't consider XFmode. * config/dsp16xx/dsp16xx.c (hard_regno_mode_ok): #if 0 out use of modes that don't appear anywhere in the machine description. * config/arc/arc-modes.def, config/arm/arm-modes.def * config/c4x/c4x-modes.def, config/frv/frv-modes.def * config/i386/i386-modes.def, config/i960/i960-modes.def * config/ia64/ia64-modes.def, config/mmix/mmix-modes.def * config/pa/pa-modes.def, config/pdp11/pdp11-modes.def * config/rs6000/rs6000-modes.def, config/s390/s390-modes.def * config/sparc/sparc-modes.def: Convert to new style for declaring extra CC modes. From-SVN: r72440
2003-10-13 23:16:33 +02:00
/* Array containing all of the register names. */
hard-reg-set.h (target_hard_regs): New structure. gcc/ * hard-reg-set.h (target_hard_regs): New structure. (default_target_hard_regs): Declare. (this_target_hard_regs): Declare as a variable or define as a macro. (fixed_regs, fixed_reg_set, call_used_regs, call_really_used_regs) (call_used_reg_set, call_fixed_reg_set, regs_invalidated_by_call) (reg_alloc_order, inv_reg_alloc_order, reg_class_contents) (reg_class_size, reg_class_subclasses, reg_class_subunion) (reg_class_superunion, reg_names): Redefine as macros. * reginfo.c (fixed_regs, fixed_reg_set, call_used_regs) (call_used_reg_set, call_really_used_regs, call_fixed_reg_set) (regs_invalidated_by_call, reg_alloc_order, inv_reg_alloc_order) (reg_class_contents, reg_class_size, reg_class_subclasses) (reg_class_subunion, reg_class_superunion, reg_names): Delete. (default_target_hard_regs): New variable (this_target_hard_regs, initial_call_really_used_regs) (initial_reg_alloc_order): New conditional variables. (initial_reg_names): New variable. (init_reg_sets): Assert that initial_call_really_used_regs, initial_reg_alloc_order and initial_reg_names are all the same size as their variable counterparts. Use them to initialize those counterparts. * target-globals.h (this_target_hard_regs): Declare. (target_globals): Add a hard_regs field. (restore_target_globals): Copy the hard_regs field to this_target_hard_regs. * target-globals.c: Include hard-reg-set.h. (default_target_globals): Initialize the hard_regs field. (save_target_globals): Likewise. From-SVN: r162089
2010-07-12 20:53:25 +02:00
static const char *const initial_reg_names[] = REGISTER_NAMES;
/* Array containing all of the register class names. */
const char * reg_class_names[] = REG_CLASS_NAMES;
/* No more global register variables may be declared; true once
tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. 2008-01-29 Vladimir Makarov <vmakarov@redhat.com> * doc/tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. * doc/passes.texi: Remove entries about regclass, local-alloc, and global. Modify entries about regmove and IRA. * ra-conflict.c: Remove the file. * reload.c (push_reload, find_dummy_reload): Remove flag_ira. * tree-pass.h (pass_local_alloc, pass_global_alloc): Remove. (pass_regclass_init): Rename to pass_reginfo_init. * cfgloopanal.c (estimate_reg_pressure_cost): Remove flag_ira. * toplev.h (flag_ira): Remove. * caller-save.c (setup_save_areas): Remove flag_ira. * ira-color.c (ira_reuse_stack_slot, ira_mark_new_stack_slot): Ditto. * global.c: Remove the file. * opts.c: (decode_options): Remove flag_ira. * hard-reg-set.h (losing_caller_save_reg_set): Remove. * regmove.c: Modify file description. (find_use_as_address, try_auto_increment): Define them only if AUTO_INC_DEC is defined. (replacement_quality, replace_in_call_usage, fixup_match_1, stable_and_no_regs_but_for_p): Remove. (reg_set_in_bb): Make it static. (regmove_optimize): Remove flag_ira and code which worked for !flag_ira. * local-alloc.c: Remove the file. * common.opt (fira): Remove. * ira.c: Include except.h. (eliminable_regset): Move from global.c. (mark_elimination): Ditto. Remove flag_ira. (reg_renumber, struct equivalence, reg_equiv, equiv_mem, equiv_mem_modified, validate_equiv_mem_from_store, validate_equiv_mem, equiv_init_varies_p, equiv_init_movable_p, contains_replace_regs, memref_referenced_p, memref_used_between_p, no_equiv, recorded_label_ref): Move from local-alloc.c. (update_equiv_regs): Ditto. Make it static. (print_insn_chain, print_insn_chains): Move it from global.c. pseudo_for_reload_consideration_p): Ditto. Remove flag_ira. (build_insn_chain): Ditto. Make it static. (ra_init_live_subregs): Move from ra-conflict.c. Make it static. Rename to init_live_subregs. (gate_ira): Remove flag_ira. * regclass.c: Rename reginfo.c. Change file description. (FORBIDDEN_INC_DEC_CLASSES): Remove. (reg_class_superclasses, forbidden_inc_dec_class, in_inc_dec): Remove. (init_reg_sets_1): Remove code for evaluation of reg_class_superclasses and losing_caller_save_reg_set. (init_regs): Remove init_reg_autoinc. (struct costs, costs, init_cost, ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): Remove. (regclass_init): Rename to reginfo_init. Don't initialize init_cost. (pass_regclass_init): Rename to pass_reginfo_init. Modify corresponding entries. (dump_regclass, record_operand_costs, scan_one_insn, init_reg_autoinc, regclass, record_reg_classes, copy_cost, record_address_regs, auto_inc_dec_reg_p): Remove. (gt-regclass.h): Rename to gt-reginfo.h. * rtl.h (dump_global_regs, retry_global_alloc, build_insn_chain, dump_local_alloc, update_equiv_regs): Remove. * Makefile.in (RA_H): Remove. (OBJS-common): Remove global.o, local-alloc.o, and ra-conflict.o. Rename regclass.o to reginfo.o. (regclass.o): Rename to reginfo.o. Rename gt-regclass.h to gt-reginfo.h. (global.o, local-alloc.o, ra-conflict.o): Remove entries. (GTFILES): Rename regclass.c to reginfo.c. * passes.c (init_optimization_passes): Remove pass_local_alloc and pass_global_alloc. Rename pass_regclass_init to pass_reginfo_init. * reload1.c (compute_use_by_pseudos, reload, count_pseudo, count_spilled_pseudo, find_reg, alter_reg, delete_output_reload): Remove flag_ira. (finish_spills): Ditto. Remove code for !flga_ira. From-SVN: r143757
2009-01-29 15:51:46 +01:00
reginfo has been initialized. */
static int no_global_reg_vars = 0;
/* Given a register bitmap, turn on the bits in a HARD_REG_SET that
correspond to the hard registers, if any, set in that map. This
could be done far more efficiently by having all sorts of special-cases
with moving single words, but probably isn't worth the trouble. */
void
alias.c (rtx_equal_for_memref_p): Constify. * alias.c (rtx_equal_for_memref_p): Constify. * basic-block.h (const_edge, const_basic_block): New. (reg_set_to_hard_reg_set, dfs_enumerate_from, single_succ_p, single_pred_p, single_succ_edge, single_pred_edge, single_succ, single_pred, maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p, edge_probability_reliable_p, br_prob_note_reliable_p, forwarder_block_p, flow_nodes_print, inside_basic_block_p, control_flow_insn_p, dominated_by_p): Likewise. * bb-reorder.c (better_edge_p, push_to_next_round_p): Likewise. * bt-load.c (basic_block_freq, insn_sets_btr_p, can_move_up): Likewise. * cfganal.c (flow_active_insn_p, forwarder_block_p, flow_nodes_print, dfs_enumerate_from): Likewise. * cfgbuild.c (count_basic_blocks, inside_basic_block_p, control_flow_insn_p, count_basic_blocks): Likewise. * cfgloop.c (flow_bb_inside_loop_p, glb_enum_p, get_loop_body_with_size, loop_exit_edge_p): Likewise. * cfgloop.h (flow_bb_inside_loop_p, num_loop_insns, average_num_loop_insns, loop_exit_edge_p, just_once_each_iteration_p, can_duplicate_loop_p): Likewise. * cfgloopanal.c (just_once_each_iteration_p, num_loop_insns, average_num_loop_insns, seq_cost): Likewise. * cfgloopmanip.c (rpe_enum_p, can_duplicate_loop_p): Likewise. * dominance.c (dominated_by_p): Likewise. * emit-rtl.c (validate_subreg): Likewise. * except.c (can_throw_internal, can_throw_external): Likewise. * except.h (can_throw_internal, can_throw_external): Likewise. * gcse.c (gcse_constant_p, oprs_unchanged_p, oprs_anticipatable_p, oprs_available_p, hash_expr, expr_equiv_p, oprs_not_set_p, compute_transp, load_killed_in_block_p, reg_killed_on_edge, simple_mem, store_ops_ok, load_kills_store, find_loads, store_killed_in_insn, store_killed_after, store_killed_before, gcse_mem_operand, implicit_set_cond_p, store_killed_in_pat): Likewise. * ifcvt.c (count_bb_insns, cheap_bb_rtx_cost_p, noce_operand_ok, noce_mem_write_may_trap_or_fault_p): Likewise. * pointer-set.c (pointer_set_contains, pointer_map_contains): Likewise. * pointer-set.h (pointer_set_contains, pointer_map_contains): Likewise. * predict.c (can_predict_insn_p, maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p, edge_probability_reliable_p, br_prob_note_reliable_p, can_predict_insn_p): Likewise. * regclass.c (reg_set_to_hard_reg_set): Likewise. * resource.c (return_insn_p): Likewise. * rtl.h (reg_set_between_p, reg_set_p, validate_subreg): Likewise. * rtlanal.c (reg_set_between_p, reg_set_p): Likewise. * tracer.c (count_insns, ignore_bb_p, better_p): Likewise. * tree-cfg.c (verify_gimple_unary_expr, verify_gimple_binary_expr, verify_gimple_modify_stmt): Likewise. * tree-chrec.c (is_not_constant_evolution, is_multivariate_chrec_rec, is_multivariate_chrec, chrec_contains_symbols, chrec_contains_undetermined, tree_contains_chrecs, evolution_function_is_affine_multivariate_p, evolution_function_is_univariate_p, avoid_arithmetics_in_type_p, eq_evolutions_p, scev_direction): Likewise. * tree-chrec.h (automatically_generated_chrec_p, tree_is_chrec, eq_evolutions_p, is_multivariate_chrec, chrec_contains_symbols, chrec_contains_symbols_defined_in_loop, chrec_contains_undetermined, tree_contains_chrecs, evolution_function_is_affine_multivariate_p, evolution_function_is_univariate_p, chrec_zerop, evolution_function_is_constant_p, evolution_function_is_affine_p, evolution_function_is_affine_or_constant_p, tree_does_not_contain_chrecs, chrec_type): Likewise. * tree-data-ref.c (tree_fold_divides_p, object_address_invariant_in_loop_p, dr_may_alias_p, ziv_subscript_p, siv_subscript_p, gcd_of_steps_may_divide_p, same_access_functions, constant_access_functions, access_functions_are_affine_or_constant_p, find_vertex_for_stmt): Likewise. * tree-flow.h (scev_direction): Likewise. * tree-gimple.c (is_gimple_stmt): Likewise. * tree-outof-ssa.c (identical_copies_p, identical_stmt_lists_p): Likewise. * tree-pretty-print.c (op_prio): Likewise. * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop, analyzable_condition, backedge_phi_arg_p): Likewise. * tree-scalar-evolution.h (get_chrec_loop): Likewise. * tree-ssa-operands.c (get_name_decl, operand_build_cmp): Likewise. * tree-ssa-threadupdate.c (dbds_continue_enumeration_p): Likewise. From-SVN: r127404
2007-08-14 06:44:35 +02:00
reg_set_to_hard_reg_set (HARD_REG_SET *to, const_bitmap from)
{
unsigned i;
bitmap_iterator bi;
EXECUTE_IF_SET_IN_BITMAP (from, 0, i, bi)
{
if (i >= FIRST_PSEUDO_REGISTER)
return;
SET_HARD_REG_BIT (*to, i);
}
}
/* Function called only once per target_globals to initialize the
target_hard_regs structure. Once this is done, various switches
may override. */
1991-11-06 00:39:50 +01:00
void
init_reg_sets (void)
1991-11-06 00:39:50 +01:00
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
int i, j;
1991-11-06 00:39:50 +01:00
/* First copy the register information from the initial int form into
the regsets. */
for (i = 0; i < N_REG_CLASSES; i++)
{
CLEAR_HARD_REG_SET (reg_class_contents[i]);
/* Note that we hard-code 32 here, not HOST_BITS_PER_INT. */
for (j = 0; j < FIRST_PSEUDO_REGISTER; j++)
if (int_reg_class_contents[i][j / 32]
& ((unsigned) 1 << (j % 32)))
SET_HARD_REG_BIT (reg_class_contents[i], j);
}
/* Sanity check: make sure the target macros FIXED_REGISTERS and
CALL_USED_REGISTERS had the right number of initializers. */
gcc_assert (sizeof fixed_regs == sizeof initial_fixed_regs);
gcc_assert (sizeof call_used_regs == sizeof initial_call_used_regs);
hard-reg-set.h (target_hard_regs): New structure. gcc/ * hard-reg-set.h (target_hard_regs): New structure. (default_target_hard_regs): Declare. (this_target_hard_regs): Declare as a variable or define as a macro. (fixed_regs, fixed_reg_set, call_used_regs, call_really_used_regs) (call_used_reg_set, call_fixed_reg_set, regs_invalidated_by_call) (reg_alloc_order, inv_reg_alloc_order, reg_class_contents) (reg_class_size, reg_class_subclasses, reg_class_subunion) (reg_class_superunion, reg_names): Redefine as macros. * reginfo.c (fixed_regs, fixed_reg_set, call_used_regs) (call_used_reg_set, call_really_used_regs, call_fixed_reg_set) (regs_invalidated_by_call, reg_alloc_order, inv_reg_alloc_order) (reg_class_contents, reg_class_size, reg_class_subclasses) (reg_class_subunion, reg_class_superunion, reg_names): Delete. (default_target_hard_regs): New variable (this_target_hard_regs, initial_call_really_used_regs) (initial_reg_alloc_order): New conditional variables. (initial_reg_names): New variable. (init_reg_sets): Assert that initial_call_really_used_regs, initial_reg_alloc_order and initial_reg_names are all the same size as their variable counterparts. Use them to initialize those counterparts. * target-globals.h (this_target_hard_regs): Declare. (target_globals): Add a hard_regs field. (restore_target_globals): Copy the hard_regs field to this_target_hard_regs. * target-globals.c: Include hard-reg-set.h. (default_target_globals): Initialize the hard_regs field. (save_target_globals): Likewise. From-SVN: r162089
2010-07-12 20:53:25 +02:00
#ifdef CALL_REALLY_USED_REGISTERS
gcc_assert (sizeof call_really_used_regs
== sizeof initial_call_really_used_regs);
#endif
#ifdef REG_ALLOC_ORDER
gcc_assert (sizeof reg_alloc_order == sizeof initial_reg_alloc_order);
#endif
gcc_assert (sizeof reg_names == sizeof initial_reg_names);
1991-11-06 00:39:50 +01:00
memcpy (fixed_regs, initial_fixed_regs, sizeof fixed_regs);
memcpy (call_used_regs, initial_call_used_regs, sizeof call_used_regs);
hard-reg-set.h (target_hard_regs): New structure. gcc/ * hard-reg-set.h (target_hard_regs): New structure. (default_target_hard_regs): Declare. (this_target_hard_regs): Declare as a variable or define as a macro. (fixed_regs, fixed_reg_set, call_used_regs, call_really_used_regs) (call_used_reg_set, call_fixed_reg_set, regs_invalidated_by_call) (reg_alloc_order, inv_reg_alloc_order, reg_class_contents) (reg_class_size, reg_class_subclasses, reg_class_subunion) (reg_class_superunion, reg_names): Redefine as macros. * reginfo.c (fixed_regs, fixed_reg_set, call_used_regs) (call_used_reg_set, call_really_used_regs, call_fixed_reg_set) (regs_invalidated_by_call, reg_alloc_order, inv_reg_alloc_order) (reg_class_contents, reg_class_size, reg_class_subclasses) (reg_class_subunion, reg_class_superunion, reg_names): Delete. (default_target_hard_regs): New variable (this_target_hard_regs, initial_call_really_used_regs) (initial_reg_alloc_order): New conditional variables. (initial_reg_names): New variable. (init_reg_sets): Assert that initial_call_really_used_regs, initial_reg_alloc_order and initial_reg_names are all the same size as their variable counterparts. Use them to initialize those counterparts. * target-globals.h (this_target_hard_regs): Declare. (target_globals): Add a hard_regs field. (restore_target_globals): Copy the hard_regs field to this_target_hard_regs. * target-globals.c: Include hard-reg-set.h. (default_target_globals): Initialize the hard_regs field. (save_target_globals): Likewise. From-SVN: r162089
2010-07-12 20:53:25 +02:00
#ifdef CALL_REALLY_USED_REGISTERS
memcpy (call_really_used_regs, initial_call_really_used_regs,
sizeof call_really_used_regs);
#endif
#ifdef REG_ALLOC_ORDER
memcpy (reg_alloc_order, initial_reg_alloc_order, sizeof reg_alloc_order);
#endif
memcpy (reg_names, initial_reg_names, sizeof reg_names);
SET_HARD_REG_SET (accessible_reg_set);
SET_HARD_REG_SET (operand_reg_set);
}
/* We need to save copies of some of the register information which
can be munged by command-line switches so we can restore it during
subsequent back-end reinitialization. */
static char saved_fixed_regs[FIRST_PSEUDO_REGISTER];
static char saved_call_used_regs[FIRST_PSEUDO_REGISTER];
#ifdef CALL_REALLY_USED_REGISTERS
static char saved_call_really_used_regs[FIRST_PSEUDO_REGISTER];
#endif
static const char *saved_reg_names[FIRST_PSEUDO_REGISTER];
static HARD_REG_SET saved_accessible_reg_set;
static HARD_REG_SET saved_operand_reg_set;
/* Save the register information. */
void
save_register_info (void)
{
Separate target-specific initialization from general back-end initialization. 2007-08-27 Sandra Loosemore <sandra@codesourcery.com> David Ung <davidu@mips.com> Nigel Stephens <nigel@mips.com> gcc/ Separate target-specific initialization from general back-end initialization. * toplev.c (init_alignments): New, split out from... (process_options): ...here. (backend_init_target): New, split out from... (backend_init): ...here. (lang_dependent_init_target): New, split out from... (lang_dependent_init): ...here. (target_reinit): New. * toplev.h (target_reinit): Declare. * expr.c (init_expr_target): Renamed from init_expr_once, since it now can be called more than once. Update comments. * expr.h (init_expr_target): Likewise. * alias.c (init_alias_target): Renamed from init_alias_once, since it now can be called more than once. Explicitly zero static_reg_base_value. * emit-rtl.c (init_emit_regs): New, split out from... (init_emit_once): Here. * regclass.c (initial_fixed_regs, initial_call_used_regs): Make non-const, so that changes from command-line arguments can overwrite values provided by the static initializers. (initial_call_really_used_regs): New, used similarly to the above. (initial_reg_names): Likewise. (last_mode_for_init_move_cost): Promoted function-local static to file-scope static to make it accessible outside init_move_cost. (init_reg_sets): Do not initialize fixed_regs and call_used_regs yet. Do not initialize inv_reg_alloc_order yet, either. Do initialize reg_names since it is needed for parsing command-line options. (init_move_cost): Use last_mode_for_init_move_cost instead of function-local static. (init_reg_sets_1): Initialize fixed_regs, call_used_regs, and call_really_used_regs now. Reinitialize reg_names. Also initialize inv_reg_alloc_order. Zero reg_class_subunion and reg_class_superunion. Clear losing_caller_save_reg_set. Preserve global registers if called more than once. Reset move cost, may_move_in_cost, may_move_out_cost, and last_mode_for_init_move_cost. (init_reg_modes_target): Renamed from init_reg_modes_once, since it can now be invoked more than once. Update comments. (init_regs): Update comments. (fix_register): Update initial_fixed_regs, initial_call_used_regs, and initial_call_really_used_regs, instead of the non-initial variables. This allows us to save the command-line register settings after target reinitialization. (init_reg_autoinc): Zero forbidden_inc_dec_classes. * rtl.h (init_emit_regs): Declare. (init_reg_modes_target, init_alias_target): Renamed as described above. * reload1.c (init_reload): Update comments. * optabs.c (init_optabs): Likewise. * cfgloopanal.c (init_set_costs): Explicitly zero target_avail_regs. Co-Authored-By: David Ung <davidu@mips.com> Co-Authored-By: Nigel Stephens <nigel@mips.com> From-SVN: r127832
2007-08-27 15:34:14 +02:00
/* Sanity check: make sure the target macros FIXED_REGISTERS and
CALL_USED_REGISTERS had the right number of initializers. */
gcc_assert (sizeof fixed_regs == sizeof saved_fixed_regs);
gcc_assert (sizeof call_used_regs == sizeof saved_call_used_regs);
memcpy (saved_fixed_regs, fixed_regs, sizeof fixed_regs);
memcpy (saved_call_used_regs, call_used_regs, sizeof call_used_regs);
Separate target-specific initialization from general back-end initialization. 2007-08-27 Sandra Loosemore <sandra@codesourcery.com> David Ung <davidu@mips.com> Nigel Stephens <nigel@mips.com> gcc/ Separate target-specific initialization from general back-end initialization. * toplev.c (init_alignments): New, split out from... (process_options): ...here. (backend_init_target): New, split out from... (backend_init): ...here. (lang_dependent_init_target): New, split out from... (lang_dependent_init): ...here. (target_reinit): New. * toplev.h (target_reinit): Declare. * expr.c (init_expr_target): Renamed from init_expr_once, since it now can be called more than once. Update comments. * expr.h (init_expr_target): Likewise. * alias.c (init_alias_target): Renamed from init_alias_once, since it now can be called more than once. Explicitly zero static_reg_base_value. * emit-rtl.c (init_emit_regs): New, split out from... (init_emit_once): Here. * regclass.c (initial_fixed_regs, initial_call_used_regs): Make non-const, so that changes from command-line arguments can overwrite values provided by the static initializers. (initial_call_really_used_regs): New, used similarly to the above. (initial_reg_names): Likewise. (last_mode_for_init_move_cost): Promoted function-local static to file-scope static to make it accessible outside init_move_cost. (init_reg_sets): Do not initialize fixed_regs and call_used_regs yet. Do not initialize inv_reg_alloc_order yet, either. Do initialize reg_names since it is needed for parsing command-line options. (init_move_cost): Use last_mode_for_init_move_cost instead of function-local static. (init_reg_sets_1): Initialize fixed_regs, call_used_regs, and call_really_used_regs now. Reinitialize reg_names. Also initialize inv_reg_alloc_order. Zero reg_class_subunion and reg_class_superunion. Clear losing_caller_save_reg_set. Preserve global registers if called more than once. Reset move cost, may_move_in_cost, may_move_out_cost, and last_mode_for_init_move_cost. (init_reg_modes_target): Renamed from init_reg_modes_once, since it can now be invoked more than once. Update comments. (init_regs): Update comments. (fix_register): Update initial_fixed_regs, initial_call_used_regs, and initial_call_really_used_regs, instead of the non-initial variables. This allows us to save the command-line register settings after target reinitialization. (init_reg_autoinc): Zero forbidden_inc_dec_classes. * rtl.h (init_emit_regs): Declare. (init_reg_modes_target, init_alias_target): Renamed as described above. * reload1.c (init_reload): Update comments. * optabs.c (init_optabs): Likewise. * cfgloopanal.c (init_set_costs): Explicitly zero target_avail_regs. Co-Authored-By: David Ung <davidu@mips.com> Co-Authored-By: Nigel Stephens <nigel@mips.com> From-SVN: r127832
2007-08-27 15:34:14 +02:00
/* Likewise for call_really_used_regs. */
#ifdef CALL_REALLY_USED_REGISTERS
gcc_assert (sizeof call_really_used_regs
== sizeof saved_call_really_used_regs);
memcpy (saved_call_really_used_regs, call_really_used_regs,
Separate target-specific initialization from general back-end initialization. 2007-08-27 Sandra Loosemore <sandra@codesourcery.com> David Ung <davidu@mips.com> Nigel Stephens <nigel@mips.com> gcc/ Separate target-specific initialization from general back-end initialization. * toplev.c (init_alignments): New, split out from... (process_options): ...here. (backend_init_target): New, split out from... (backend_init): ...here. (lang_dependent_init_target): New, split out from... (lang_dependent_init): ...here. (target_reinit): New. * toplev.h (target_reinit): Declare. * expr.c (init_expr_target): Renamed from init_expr_once, since it now can be called more than once. Update comments. * expr.h (init_expr_target): Likewise. * alias.c (init_alias_target): Renamed from init_alias_once, since it now can be called more than once. Explicitly zero static_reg_base_value. * emit-rtl.c (init_emit_regs): New, split out from... (init_emit_once): Here. * regclass.c (initial_fixed_regs, initial_call_used_regs): Make non-const, so that changes from command-line arguments can overwrite values provided by the static initializers. (initial_call_really_used_regs): New, used similarly to the above. (initial_reg_names): Likewise. (last_mode_for_init_move_cost): Promoted function-local static to file-scope static to make it accessible outside init_move_cost. (init_reg_sets): Do not initialize fixed_regs and call_used_regs yet. Do not initialize inv_reg_alloc_order yet, either. Do initialize reg_names since it is needed for parsing command-line options. (init_move_cost): Use last_mode_for_init_move_cost instead of function-local static. (init_reg_sets_1): Initialize fixed_regs, call_used_regs, and call_really_used_regs now. Reinitialize reg_names. Also initialize inv_reg_alloc_order. Zero reg_class_subunion and reg_class_superunion. Clear losing_caller_save_reg_set. Preserve global registers if called more than once. Reset move cost, may_move_in_cost, may_move_out_cost, and last_mode_for_init_move_cost. (init_reg_modes_target): Renamed from init_reg_modes_once, since it can now be invoked more than once. Update comments. (init_regs): Update comments. (fix_register): Update initial_fixed_regs, initial_call_used_regs, and initial_call_really_used_regs, instead of the non-initial variables. This allows us to save the command-line register settings after target reinitialization. (init_reg_autoinc): Zero forbidden_inc_dec_classes. * rtl.h (init_emit_regs): Declare. (init_reg_modes_target, init_alias_target): Renamed as described above. * reload1.c (init_reload): Update comments. * optabs.c (init_optabs): Likewise. * cfgloopanal.c (init_set_costs): Explicitly zero target_avail_regs. Co-Authored-By: David Ung <davidu@mips.com> Co-Authored-By: Nigel Stephens <nigel@mips.com> From-SVN: r127832
2007-08-27 15:34:14 +02:00
sizeof call_really_used_regs);
#endif
/* And similarly for reg_names. */
gcc_assert (sizeof reg_names == sizeof saved_reg_names);
memcpy (saved_reg_names, reg_names, sizeof reg_names);
COPY_HARD_REG_SET (saved_accessible_reg_set, accessible_reg_set);
COPY_HARD_REG_SET (saved_operand_reg_set, operand_reg_set);
}
/* Restore the register information. */
static void
restore_register_info (void)
{
memcpy (fixed_regs, saved_fixed_regs, sizeof fixed_regs);
memcpy (call_used_regs, saved_call_used_regs, sizeof call_used_regs);
#ifdef CALL_REALLY_USED_REGISTERS
memcpy (call_really_used_regs, saved_call_really_used_regs,
sizeof call_really_used_regs);
#endif
memcpy (reg_names, saved_reg_names, sizeof reg_names);
COPY_HARD_REG_SET (accessible_reg_set, saved_accessible_reg_set);
COPY_HARD_REG_SET (operand_reg_set, saved_operand_reg_set);
}
/* After switches have been processed, which perhaps alter
`fixed_regs' and `call_used_regs', convert them to HARD_REG_SETs. */
static void
init_reg_sets_1 (void)
{
unsigned int i, j;
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
unsigned int /* machine_mode */ m;
restore_register_info ();
Separate target-specific initialization from general back-end initialization. 2007-08-27 Sandra Loosemore <sandra@codesourcery.com> David Ung <davidu@mips.com> Nigel Stephens <nigel@mips.com> gcc/ Separate target-specific initialization from general back-end initialization. * toplev.c (init_alignments): New, split out from... (process_options): ...here. (backend_init_target): New, split out from... (backend_init): ...here. (lang_dependent_init_target): New, split out from... (lang_dependent_init): ...here. (target_reinit): New. * toplev.h (target_reinit): Declare. * expr.c (init_expr_target): Renamed from init_expr_once, since it now can be called more than once. Update comments. * expr.h (init_expr_target): Likewise. * alias.c (init_alias_target): Renamed from init_alias_once, since it now can be called more than once. Explicitly zero static_reg_base_value. * emit-rtl.c (init_emit_regs): New, split out from... (init_emit_once): Here. * regclass.c (initial_fixed_regs, initial_call_used_regs): Make non-const, so that changes from command-line arguments can overwrite values provided by the static initializers. (initial_call_really_used_regs): New, used similarly to the above. (initial_reg_names): Likewise. (last_mode_for_init_move_cost): Promoted function-local static to file-scope static to make it accessible outside init_move_cost. (init_reg_sets): Do not initialize fixed_regs and call_used_regs yet. Do not initialize inv_reg_alloc_order yet, either. Do initialize reg_names since it is needed for parsing command-line options. (init_move_cost): Use last_mode_for_init_move_cost instead of function-local static. (init_reg_sets_1): Initialize fixed_regs, call_used_regs, and call_really_used_regs now. Reinitialize reg_names. Also initialize inv_reg_alloc_order. Zero reg_class_subunion and reg_class_superunion. Clear losing_caller_save_reg_set. Preserve global registers if called more than once. Reset move cost, may_move_in_cost, may_move_out_cost, and last_mode_for_init_move_cost. (init_reg_modes_target): Renamed from init_reg_modes_once, since it can now be invoked more than once. Update comments. (init_regs): Update comments. (fix_register): Update initial_fixed_regs, initial_call_used_regs, and initial_call_really_used_regs, instead of the non-initial variables. This allows us to save the command-line register settings after target reinitialization. (init_reg_autoinc): Zero forbidden_inc_dec_classes. * rtl.h (init_emit_regs): Declare. (init_reg_modes_target, init_alias_target): Renamed as described above. * reload1.c (init_reload): Update comments. * optabs.c (init_optabs): Likewise. * cfgloopanal.c (init_set_costs): Explicitly zero target_avail_regs. Co-Authored-By: David Ung <davidu@mips.com> Co-Authored-By: Nigel Stephens <nigel@mips.com> From-SVN: r127832
2007-08-27 15:34:14 +02:00
#ifdef REG_ALLOC_ORDER
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
inv_reg_alloc_order[reg_alloc_order[i]] = i;
#endif
target.def (conditional_register_usage): Define. * target.def (conditional_register_usage): Define. * reginfo.c (init_reg_sets_1): Call targetm.conditional_register_usage. * system.h (CONDITIONAL_REGISTER_USAGE): Poison. * doc/tm.texi.in (CONDITIONAL_REGISTER_USAGE): Adjust language for making it a hook. * doc/tm.texi: Regenerate. * config/alpha/alpha.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/alpha/alpha.c (alpha_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/arc/arc.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/arc/arc.c (arc_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/arm/arm.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/arm/arm.c (arm_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/bfin/bfin.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/bfin/bfin-protos.h (conditional_register_usage): Delete. * config/bfin/bfin.c (conditional_register_usage): Move code into... (bfin_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/cris/cris.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/cris/cris-protos.h (cris_conditional_register_usage): Delete. * config/cris/cris.c (cris_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/fr30/fr30.h (FIXED_REGISTERS): Adjust comment. * config/frv/frv.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/frv/frv-protos.h (frv_conditional_register_usage): Delete. * config/frv/frv.c (frv_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/h8300/h8300.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/h8300/h8300.c (h8300_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/i386/i386.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/i386/i386-protos.h (ix86_conditional_register_usage): Delete. * config/i386/i386.c (ix86_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/m32c/m32c.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/m32c/m32c-protos.h (m32c_conditional_register_usage): Delete. * config/m32c/m32c.c (m32c_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/m32r/m32r.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/m32r/m32r.c (m32r_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/m68hc11/m68hc11.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/m68hc11/m68hc11-protos.h (m68hc11_conditional_register_usage): Delete. * config/m68hc11/m68hc11.c (m68hc11_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/mep/mep.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/mep/mep-protos.h (mep_conditional_register_usage): Delete. * config/mep/mep.c (mep_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/mips/mips.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/mips/mips-protos.h (mips_conditional_register_usage): Delete. * config/mips/mips.c (mips_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/mmix/mmix.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/mmix/mmix-protos.h (mmix_conditional_register_usage): Delete. * config/mmix/mmix.c (mmix_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/mn10300/mn10300.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/mn10300/mn10300.c (mn10300_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/pa/pa32-regs.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/pa/pa64-regs.h (CONDITIONAL_REGISTER_USAGE): ...with this... * config/pa/pa.c (pa_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/pdp11/pdp11.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/pdp11/pdp11.c (pdp11_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/rs6000/rs6000.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/rs6000/rs6000-protos.h (rs6000_conditional_register_usage): Delete. * config/rs6000/rs6000.c (rs6000_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/rx/rx.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/rx/rx-protos.h (rx_conditional_register_usage): Delete. * config/rx/rx.c (rx_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/s390/s390.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/s390/s390-protos.h (s390_conditional_register_usage): Delete. * config/s390/s390.c (s390_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/score/score.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/score/score.c (score_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/sh/sh.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/sh/sh.c (sh_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/sparc/sparc.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/sparc/sparc.c (sparc_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/spu/spu.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/spu/spu-protos.h (spu_conditional_register_usage): Delete. * config/spu/spu.c (spu_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/v850/v850.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/v850/v850.c (v850_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. From-SVN: r167020
2010-11-22 02:57:50 +01:00
/* Let the target tweak things if necessary. */
target.def (conditional_register_usage): Define. * target.def (conditional_register_usage): Define. * reginfo.c (init_reg_sets_1): Call targetm.conditional_register_usage. * system.h (CONDITIONAL_REGISTER_USAGE): Poison. * doc/tm.texi.in (CONDITIONAL_REGISTER_USAGE): Adjust language for making it a hook. * doc/tm.texi: Regenerate. * config/alpha/alpha.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/alpha/alpha.c (alpha_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/arc/arc.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/arc/arc.c (arc_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/arm/arm.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/arm/arm.c (arm_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/bfin/bfin.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/bfin/bfin-protos.h (conditional_register_usage): Delete. * config/bfin/bfin.c (conditional_register_usage): Move code into... (bfin_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/cris/cris.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/cris/cris-protos.h (cris_conditional_register_usage): Delete. * config/cris/cris.c (cris_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/fr30/fr30.h (FIXED_REGISTERS): Adjust comment. * config/frv/frv.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/frv/frv-protos.h (frv_conditional_register_usage): Delete. * config/frv/frv.c (frv_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/h8300/h8300.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/h8300/h8300.c (h8300_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/i386/i386.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/i386/i386-protos.h (ix86_conditional_register_usage): Delete. * config/i386/i386.c (ix86_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/m32c/m32c.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/m32c/m32c-protos.h (m32c_conditional_register_usage): Delete. * config/m32c/m32c.c (m32c_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/m32r/m32r.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/m32r/m32r.c (m32r_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/m68hc11/m68hc11.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/m68hc11/m68hc11-protos.h (m68hc11_conditional_register_usage): Delete. * config/m68hc11/m68hc11.c (m68hc11_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/mep/mep.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/mep/mep-protos.h (mep_conditional_register_usage): Delete. * config/mep/mep.c (mep_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/mips/mips.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/mips/mips-protos.h (mips_conditional_register_usage): Delete. * config/mips/mips.c (mips_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/mmix/mmix.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/mmix/mmix-protos.h (mmix_conditional_register_usage): Delete. * config/mmix/mmix.c (mmix_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/mn10300/mn10300.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/mn10300/mn10300.c (mn10300_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/pa/pa32-regs.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/pa/pa64-regs.h (CONDITIONAL_REGISTER_USAGE): ...with this... * config/pa/pa.c (pa_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/pdp11/pdp11.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/pdp11/pdp11.c (pdp11_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/rs6000/rs6000.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/rs6000/rs6000-protos.h (rs6000_conditional_register_usage): Delete. * config/rs6000/rs6000.c (rs6000_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/rx/rx.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/rx/rx-protos.h (rx_conditional_register_usage): Delete. * config/rx/rx.c (rx_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/s390/s390.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/s390/s390-protos.h (s390_conditional_register_usage): Delete. * config/s390/s390.c (s390_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/score/score.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/score/score.c (score_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/sh/sh.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/sh/sh.c (sh_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/sparc/sparc.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/sparc/sparc.c (sparc_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/spu/spu.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/spu/spu-protos.h (spu_conditional_register_usage): Delete. * config/spu/spu.c (spu_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/v850/v850.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/v850/v850.c (v850_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. From-SVN: r167020
2010-11-22 02:57:50 +01:00
targetm.conditional_register_usage ();
1991-11-06 00:39:50 +01:00
/* Compute number of hard regs in each class. */
memset (reg_class_size, 0, sizeof reg_class_size);
1991-11-06 00:39:50 +01:00
for (i = 0; i < N_REG_CLASSES; i++)
{
bool any_nonfixed = false;
for (j = 0; j < FIRST_PSEUDO_REGISTER; j++)
if (TEST_HARD_REG_BIT (reg_class_contents[i], j))
{
reg_class_size[i]++;
if (!fixed_regs[j])
any_nonfixed = true;
}
class_only_fixed_regs[i] = !any_nonfixed;
}
1991-11-06 00:39:50 +01:00
/* Initialize the table of subunions.
reg_class_subunion[I][J] gets the largest-numbered reg-class
that is contained in the union of classes I and J. */
Separate target-specific initialization from general back-end initialization. 2007-08-27 Sandra Loosemore <sandra@codesourcery.com> David Ung <davidu@mips.com> Nigel Stephens <nigel@mips.com> gcc/ Separate target-specific initialization from general back-end initialization. * toplev.c (init_alignments): New, split out from... (process_options): ...here. (backend_init_target): New, split out from... (backend_init): ...here. (lang_dependent_init_target): New, split out from... (lang_dependent_init): ...here. (target_reinit): New. * toplev.h (target_reinit): Declare. * expr.c (init_expr_target): Renamed from init_expr_once, since it now can be called more than once. Update comments. * expr.h (init_expr_target): Likewise. * alias.c (init_alias_target): Renamed from init_alias_once, since it now can be called more than once. Explicitly zero static_reg_base_value. * emit-rtl.c (init_emit_regs): New, split out from... (init_emit_once): Here. * regclass.c (initial_fixed_regs, initial_call_used_regs): Make non-const, so that changes from command-line arguments can overwrite values provided by the static initializers. (initial_call_really_used_regs): New, used similarly to the above. (initial_reg_names): Likewise. (last_mode_for_init_move_cost): Promoted function-local static to file-scope static to make it accessible outside init_move_cost. (init_reg_sets): Do not initialize fixed_regs and call_used_regs yet. Do not initialize inv_reg_alloc_order yet, either. Do initialize reg_names since it is needed for parsing command-line options. (init_move_cost): Use last_mode_for_init_move_cost instead of function-local static. (init_reg_sets_1): Initialize fixed_regs, call_used_regs, and call_really_used_regs now. Reinitialize reg_names. Also initialize inv_reg_alloc_order. Zero reg_class_subunion and reg_class_superunion. Clear losing_caller_save_reg_set. Preserve global registers if called more than once. Reset move cost, may_move_in_cost, may_move_out_cost, and last_mode_for_init_move_cost. (init_reg_modes_target): Renamed from init_reg_modes_once, since it can now be invoked more than once. Update comments. (init_regs): Update comments. (fix_register): Update initial_fixed_regs, initial_call_used_regs, and initial_call_really_used_regs, instead of the non-initial variables. This allows us to save the command-line register settings after target reinitialization. (init_reg_autoinc): Zero forbidden_inc_dec_classes. * rtl.h (init_emit_regs): Declare. (init_reg_modes_target, init_alias_target): Renamed as described above. * reload1.c (init_reload): Update comments. * optabs.c (init_optabs): Likewise. * cfgloopanal.c (init_set_costs): Explicitly zero target_avail_regs. Co-Authored-By: David Ung <davidu@mips.com> Co-Authored-By: Nigel Stephens <nigel@mips.com> From-SVN: r127832
2007-08-27 15:34:14 +02:00
memset (reg_class_subunion, 0, sizeof reg_class_subunion);
1991-11-06 00:39:50 +01:00
for (i = 0; i < N_REG_CLASSES; i++)
{
for (j = 0; j < N_REG_CLASSES; j++)
{
HARD_REG_SET c;
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
int k;
1991-11-06 00:39:50 +01:00
COPY_HARD_REG_SET (c, reg_class_contents[i]);
IOR_HARD_REG_SET (c, reg_class_contents[j]);
for (k = 0; k < N_REG_CLASSES; k++)
if (hard_reg_set_subset_p (reg_class_contents[k], c)
&& !hard_reg_set_subset_p (reg_class_contents[k],
reg_class_contents
[(int) reg_class_subunion[i][j]]))
1991-11-06 00:39:50 +01:00
reg_class_subunion[i][j] = (enum reg_class) k;
}
}
/* Initialize the table of superunions.
reg_class_superunion[I][J] gets the smallest-numbered reg-class
containing the union of classes I and J. */
Separate target-specific initialization from general back-end initialization. 2007-08-27 Sandra Loosemore <sandra@codesourcery.com> David Ung <davidu@mips.com> Nigel Stephens <nigel@mips.com> gcc/ Separate target-specific initialization from general back-end initialization. * toplev.c (init_alignments): New, split out from... (process_options): ...here. (backend_init_target): New, split out from... (backend_init): ...here. (lang_dependent_init_target): New, split out from... (lang_dependent_init): ...here. (target_reinit): New. * toplev.h (target_reinit): Declare. * expr.c (init_expr_target): Renamed from init_expr_once, since it now can be called more than once. Update comments. * expr.h (init_expr_target): Likewise. * alias.c (init_alias_target): Renamed from init_alias_once, since it now can be called more than once. Explicitly zero static_reg_base_value. * emit-rtl.c (init_emit_regs): New, split out from... (init_emit_once): Here. * regclass.c (initial_fixed_regs, initial_call_used_regs): Make non-const, so that changes from command-line arguments can overwrite values provided by the static initializers. (initial_call_really_used_regs): New, used similarly to the above. (initial_reg_names): Likewise. (last_mode_for_init_move_cost): Promoted function-local static to file-scope static to make it accessible outside init_move_cost. (init_reg_sets): Do not initialize fixed_regs and call_used_regs yet. Do not initialize inv_reg_alloc_order yet, either. Do initialize reg_names since it is needed for parsing command-line options. (init_move_cost): Use last_mode_for_init_move_cost instead of function-local static. (init_reg_sets_1): Initialize fixed_regs, call_used_regs, and call_really_used_regs now. Reinitialize reg_names. Also initialize inv_reg_alloc_order. Zero reg_class_subunion and reg_class_superunion. Clear losing_caller_save_reg_set. Preserve global registers if called more than once. Reset move cost, may_move_in_cost, may_move_out_cost, and last_mode_for_init_move_cost. (init_reg_modes_target): Renamed from init_reg_modes_once, since it can now be invoked more than once. Update comments. (init_regs): Update comments. (fix_register): Update initial_fixed_regs, initial_call_used_regs, and initial_call_really_used_regs, instead of the non-initial variables. This allows us to save the command-line register settings after target reinitialization. (init_reg_autoinc): Zero forbidden_inc_dec_classes. * rtl.h (init_emit_regs): Declare. (init_reg_modes_target, init_alias_target): Renamed as described above. * reload1.c (init_reload): Update comments. * optabs.c (init_optabs): Likewise. * cfgloopanal.c (init_set_costs): Explicitly zero target_avail_regs. Co-Authored-By: David Ung <davidu@mips.com> Co-Authored-By: Nigel Stephens <nigel@mips.com> From-SVN: r127832
2007-08-27 15:34:14 +02:00
memset (reg_class_superunion, 0, sizeof reg_class_superunion);
1991-11-06 00:39:50 +01:00
for (i = 0; i < N_REG_CLASSES; i++)
{
for (j = 0; j < N_REG_CLASSES; j++)
{
HARD_REG_SET c;
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
int k;
1991-11-06 00:39:50 +01:00
COPY_HARD_REG_SET (c, reg_class_contents[i]);
IOR_HARD_REG_SET (c, reg_class_contents[j]);
for (k = 0; k < N_REG_CLASSES; k++)
if (hard_reg_set_subset_p (c, reg_class_contents[k]))
break;
1991-11-06 00:39:50 +01:00
reg_class_superunion[i][j] = (enum reg_class) k;
}
}
/* Initialize the tables of subclasses and superclasses of each reg class.
First clear the whole table, then add the elements as they are found. */
for (i = 0; i < N_REG_CLASSES; i++)
{
for (j = 0; j < N_REG_CLASSES; j++)
tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. 2008-01-29 Vladimir Makarov <vmakarov@redhat.com> * doc/tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. * doc/passes.texi: Remove entries about regclass, local-alloc, and global. Modify entries about regmove and IRA. * ra-conflict.c: Remove the file. * reload.c (push_reload, find_dummy_reload): Remove flag_ira. * tree-pass.h (pass_local_alloc, pass_global_alloc): Remove. (pass_regclass_init): Rename to pass_reginfo_init. * cfgloopanal.c (estimate_reg_pressure_cost): Remove flag_ira. * toplev.h (flag_ira): Remove. * caller-save.c (setup_save_areas): Remove flag_ira. * ira-color.c (ira_reuse_stack_slot, ira_mark_new_stack_slot): Ditto. * global.c: Remove the file. * opts.c: (decode_options): Remove flag_ira. * hard-reg-set.h (losing_caller_save_reg_set): Remove. * regmove.c: Modify file description. (find_use_as_address, try_auto_increment): Define them only if AUTO_INC_DEC is defined. (replacement_quality, replace_in_call_usage, fixup_match_1, stable_and_no_regs_but_for_p): Remove. (reg_set_in_bb): Make it static. (regmove_optimize): Remove flag_ira and code which worked for !flag_ira. * local-alloc.c: Remove the file. * common.opt (fira): Remove. * ira.c: Include except.h. (eliminable_regset): Move from global.c. (mark_elimination): Ditto. Remove flag_ira. (reg_renumber, struct equivalence, reg_equiv, equiv_mem, equiv_mem_modified, validate_equiv_mem_from_store, validate_equiv_mem, equiv_init_varies_p, equiv_init_movable_p, contains_replace_regs, memref_referenced_p, memref_used_between_p, no_equiv, recorded_label_ref): Move from local-alloc.c. (update_equiv_regs): Ditto. Make it static. (print_insn_chain, print_insn_chains): Move it from global.c. pseudo_for_reload_consideration_p): Ditto. Remove flag_ira. (build_insn_chain): Ditto. Make it static. (ra_init_live_subregs): Move from ra-conflict.c. Make it static. Rename to init_live_subregs. (gate_ira): Remove flag_ira. * regclass.c: Rename reginfo.c. Change file description. (FORBIDDEN_INC_DEC_CLASSES): Remove. (reg_class_superclasses, forbidden_inc_dec_class, in_inc_dec): Remove. (init_reg_sets_1): Remove code for evaluation of reg_class_superclasses and losing_caller_save_reg_set. (init_regs): Remove init_reg_autoinc. (struct costs, costs, init_cost, ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): Remove. (regclass_init): Rename to reginfo_init. Don't initialize init_cost. (pass_regclass_init): Rename to pass_reginfo_init. Modify corresponding entries. (dump_regclass, record_operand_costs, scan_one_insn, init_reg_autoinc, regclass, record_reg_classes, copy_cost, record_address_regs, auto_inc_dec_reg_p): Remove. (gt-regclass.h): Rename to gt-reginfo.h. * rtl.h (dump_global_regs, retry_global_alloc, build_insn_chain, dump_local_alloc, update_equiv_regs): Remove. * Makefile.in (RA_H): Remove. (OBJS-common): Remove global.o, local-alloc.o, and ra-conflict.o. Rename regclass.o to reginfo.o. (regclass.o): Rename to reginfo.o. Rename gt-regclass.h to gt-reginfo.h. (global.o, local-alloc.o, ra-conflict.o): Remove entries. (GTFILES): Rename regclass.c to reginfo.c. * passes.c (init_optimization_passes): Remove pass_local_alloc and pass_global_alloc. Rename pass_regclass_init to pass_reginfo_init. * reload1.c (compute_use_by_pseudos, reload, count_pseudo, count_spilled_pseudo, find_reg, alter_reg, delete_output_reload): Remove flag_ira. (finish_spills): Ditto. Remove code for !flga_ira. From-SVN: r143757
2009-01-29 15:51:46 +01:00
reg_class_subclasses[i][j] = LIM_REG_CLASSES;
1991-11-06 00:39:50 +01:00
}
for (i = 0; i < N_REG_CLASSES; i++)
{
if (i == (int) NO_REGS)
continue;
for (j = i + 1; j < N_REG_CLASSES; j++)
if (hard_reg_set_subset_p (reg_class_contents[i],
reg_class_contents[j]))
{
/* Reg class I is a subclass of J.
Add J to the table of superclasses of I. */
enum reg_class *p;
/* Add I to the table of superclasses of J. */
p = &reg_class_subclasses[j][0];
while (*p != LIM_REG_CLASSES) p++;
*p = (enum reg_class) i;
}
1991-11-06 00:39:50 +01:00
}
1991-11-06 00:39:50 +01:00
/* Initialize "constant" tables. */
CLEAR_HARD_REG_SET (fixed_reg_set);
CLEAR_HARD_REG_SET (call_used_reg_set);
CLEAR_HARD_REG_SET (call_fixed_reg_set);
CLEAR_HARD_REG_SET (regs_invalidated_by_call);
if (!regs_invalidated_by_call_regset)
{
bitmap_obstack_initialize (&persistent_obstack);
regs_invalidated_by_call_regset = ALLOC_REG_SET (&persistent_obstack);
}
else
CLEAR_REG_SET (regs_invalidated_by_call_regset);
if (!fixed_reg_set_regset)
fixed_reg_set_regset = ALLOC_REG_SET (&persistent_obstack);
else
CLEAR_REG_SET (fixed_reg_set_regset);
1991-11-06 00:39:50 +01:00
AND_HARD_REG_SET (operand_reg_set, accessible_reg_set);
1991-11-06 00:39:50 +01:00
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
{
/* As a special exception, registers whose class is NO_REGS are
not accepted by `register_operand'. The reason for this change
is to allow the representation of special architecture artifacts
(such as a condition code register) without extending the rtl
definitions. Since registers of class NO_REGS cannot be used
as registers in any case where register classes are examined,
it is better to apply this exception in a target-independent way. */
if (REGNO_REG_CLASS (i) == NO_REGS)
CLEAR_HARD_REG_BIT (operand_reg_set, i);
/* If a register is too limited to be treated as a register operand,
then it should never be allocated to a pseudo. */
if (!TEST_HARD_REG_BIT (operand_reg_set, i))
{
fixed_regs[i] = 1;
call_used_regs[i] = 1;
}
/* call_used_regs must include fixed_regs. */
ra-build.c (copy_insn_p, [...]): Use gcc_assert and gcc_unreachable instead of abort. * ra-build.c (copy_insn_p, remember_move, defuse_overlap_p_1, live_out_1, prune_hardregs_for_mode, init_one_web_common, reinit_one_web, add_subweb, add_subweb_2, init_web_parts, record_conflict, compare_and_free_webs, init_webs_defs_uses, parts_to_webs_1, parts_to_webs, reset_conflicts, check_conflict_numbers, remember_web_was_spilled, handle_asm_insn, ra_build_free): Use gcc_assert and gcc_unreachable instead of abort. * ra-colorize.c (push_list, put_web, reset_lists, put_web_at_end, put_move, remove_move, combine, select_spill, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias, restore_conflicts_from_coalesce, sort_and_combine_web_pairs, check_uncoalesced_moves): Likewise. * ra-rewrite.c (spill_coalescing, slots_overlap_p, emit_loads, reloads_to_loads, rewrite_program2, emit_colors): Likewise. * ra.c (first_hard_reg, create_insn_info, find_subweb, init_ra, check_df): Likewise. * real.c (do_add, do_multiply, do_divide, do_compare, do_fix_trunc, real_arithmetic, real_compare, real_exponent, real_ldexp, real_identical, real_to_integer, real_to_integer2, real_to_decimal, real_to_hexadecimal, real_from_integer, ten_to_ptwo, ten_to_mptwo, real_digit, real_nan, real_maxval, round_for_format, real_convert, real_to_target, real_from_target, real_hash, encode_ieee_single, encode_ieee_double, encode_ieee_extended, encode_ieee_quad, encode_vax_f, encode_vax_d, encode_vax_g, encode_i370_single, encode_i370_double, encode_c4x_single, encode_c4x_extended): Likewise. * recog.c (validate_change, validate_replace_rtx_1, asm_operand_ok, extract_insn, peep2_next_insn, peep2_reg_dead_p, peep2_find_free_register, peephole2_optimize, store_data_bypass_p, if_test_bypass_p): Likewise. * reg-stack.c (record_label_references, get_asm_operand_n_inputs, stack_result, remove_regno_note, get_hard_regnum, emit_pop_insn, emit_swap_insn, swap_to_top, move_for_stack_reg, subst_stack_regs_pat, subst_asm_stack_regs, change_stack, compensate_edge, convert_regs_1): Likewise. * regclass.c (init_reg_sets, init_reg_sets_1, memory_move_secondary_cost): Likewise. * regrename.c (note_sets, clear_dead_regs, scan_rtx_reg, scan_rtx): Likewise. * reload.c (push_secondary_reload, find_valid_class, push_reload, operands_match_p, decompose, immune_p, find_reloads, find_reloads_toplev, find_reloads_address_1, subst_reloads, copy_replacements, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (compute_use_by_pseudos, replace_pseudos_in, reload, count_pseudo, find_reg, eliminate_regs, eliminate_regs_in_insn, verify_initial_elim_offsets, finish_spills, clear_reload_reg_in_use, reload_reg_free_p, reload_reg_reaches_end_p, reloads_conflict, choose_reload_regs, merge_assigned_reloads, emit_input_reload_insns, do_output_reload, fixup_abnormal_edges): Likewise. * reorg.c (stop_search_p, emit_delay_sequence, get_jump_flags, fill_slots_from_thread, relax_delay_slots): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtl.c (copy_rtx, rtx_equal_p): Likewise. * rtlanal.c (insn_dependent_p, reg_overlap_mentioned_p, dead_or_set_p, find_reg_fusage, remove_note, replace_rtx, subreg_lsb_1, subreg_regno_offset, subreg_offset_representable_p, find_first_parameter_load, can_hoist_insn_p, hoist_update_store, hoist_insn_after, hoist_insn_to_edge, nonzero_bits1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sbitmap.c (sbitmap_difference): Likewise. * sched-deps.c (add_dependence, sched_analyze_1, sched_analyze_2, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, schedule_ebb): Likewise. * sched-rgn.c (debug_regions, compute_trg_info, schedule_region, schedule_insns): Likewise. * sched-vis.c (print_pattern): Likewise. * sdbout.c (sdbout_symbol, sdbout_toplevel_data): Likewise. * simplify-rtx.c (simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_ternary_operation, simplify_immed_subreg, simplify_subreg, simplify_gen_subreg): Likewise. * sreal.c (copy, sreal_sub, sreal_div): Likewise. * stmt.c (force_label_rtx, expand_goto, expand_asm_operands, resolve_operand_name_1, expand_return, expand_decl, expand_anon_union_decl, emit_case_bit_tests, expand_case): Likewise. * stor-layout.c (put_pending_size, smallest_mode_for_size, int_mode_for_mode, layout_decl, finish_builtin_struct, layout_type, set_sizetype, get_mode_bounds): Likewise. From-SVN: r87244
2004-09-09 19:19:16 +02:00
gcc_assert (!fixed_regs[i] || call_used_regs[i]);
#ifdef CALL_REALLY_USED_REGISTERS
/* call_used_regs must include call_really_used_regs. */
ra-build.c (copy_insn_p, [...]): Use gcc_assert and gcc_unreachable instead of abort. * ra-build.c (copy_insn_p, remember_move, defuse_overlap_p_1, live_out_1, prune_hardregs_for_mode, init_one_web_common, reinit_one_web, add_subweb, add_subweb_2, init_web_parts, record_conflict, compare_and_free_webs, init_webs_defs_uses, parts_to_webs_1, parts_to_webs, reset_conflicts, check_conflict_numbers, remember_web_was_spilled, handle_asm_insn, ra_build_free): Use gcc_assert and gcc_unreachable instead of abort. * ra-colorize.c (push_list, put_web, reset_lists, put_web_at_end, put_move, remove_move, combine, select_spill, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias, restore_conflicts_from_coalesce, sort_and_combine_web_pairs, check_uncoalesced_moves): Likewise. * ra-rewrite.c (spill_coalescing, slots_overlap_p, emit_loads, reloads_to_loads, rewrite_program2, emit_colors): Likewise. * ra.c (first_hard_reg, create_insn_info, find_subweb, init_ra, check_df): Likewise. * real.c (do_add, do_multiply, do_divide, do_compare, do_fix_trunc, real_arithmetic, real_compare, real_exponent, real_ldexp, real_identical, real_to_integer, real_to_integer2, real_to_decimal, real_to_hexadecimal, real_from_integer, ten_to_ptwo, ten_to_mptwo, real_digit, real_nan, real_maxval, round_for_format, real_convert, real_to_target, real_from_target, real_hash, encode_ieee_single, encode_ieee_double, encode_ieee_extended, encode_ieee_quad, encode_vax_f, encode_vax_d, encode_vax_g, encode_i370_single, encode_i370_double, encode_c4x_single, encode_c4x_extended): Likewise. * recog.c (validate_change, validate_replace_rtx_1, asm_operand_ok, extract_insn, peep2_next_insn, peep2_reg_dead_p, peep2_find_free_register, peephole2_optimize, store_data_bypass_p, if_test_bypass_p): Likewise. * reg-stack.c (record_label_references, get_asm_operand_n_inputs, stack_result, remove_regno_note, get_hard_regnum, emit_pop_insn, emit_swap_insn, swap_to_top, move_for_stack_reg, subst_stack_regs_pat, subst_asm_stack_regs, change_stack, compensate_edge, convert_regs_1): Likewise. * regclass.c (init_reg_sets, init_reg_sets_1, memory_move_secondary_cost): Likewise. * regrename.c (note_sets, clear_dead_regs, scan_rtx_reg, scan_rtx): Likewise. * reload.c (push_secondary_reload, find_valid_class, push_reload, operands_match_p, decompose, immune_p, find_reloads, find_reloads_toplev, find_reloads_address_1, subst_reloads, copy_replacements, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (compute_use_by_pseudos, replace_pseudos_in, reload, count_pseudo, find_reg, eliminate_regs, eliminate_regs_in_insn, verify_initial_elim_offsets, finish_spills, clear_reload_reg_in_use, reload_reg_free_p, reload_reg_reaches_end_p, reloads_conflict, choose_reload_regs, merge_assigned_reloads, emit_input_reload_insns, do_output_reload, fixup_abnormal_edges): Likewise. * reorg.c (stop_search_p, emit_delay_sequence, get_jump_flags, fill_slots_from_thread, relax_delay_slots): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtl.c (copy_rtx, rtx_equal_p): Likewise. * rtlanal.c (insn_dependent_p, reg_overlap_mentioned_p, dead_or_set_p, find_reg_fusage, remove_note, replace_rtx, subreg_lsb_1, subreg_regno_offset, subreg_offset_representable_p, find_first_parameter_load, can_hoist_insn_p, hoist_update_store, hoist_insn_after, hoist_insn_to_edge, nonzero_bits1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sbitmap.c (sbitmap_difference): Likewise. * sched-deps.c (add_dependence, sched_analyze_1, sched_analyze_2, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, schedule_ebb): Likewise. * sched-rgn.c (debug_regions, compute_trg_info, schedule_region, schedule_insns): Likewise. * sched-vis.c (print_pattern): Likewise. * sdbout.c (sdbout_symbol, sdbout_toplevel_data): Likewise. * simplify-rtx.c (simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_ternary_operation, simplify_immed_subreg, simplify_subreg, simplify_gen_subreg): Likewise. * sreal.c (copy, sreal_sub, sreal_div): Likewise. * stmt.c (force_label_rtx, expand_goto, expand_asm_operands, resolve_operand_name_1, expand_return, expand_decl, expand_anon_union_decl, emit_case_bit_tests, expand_case): Likewise. * stor-layout.c (put_pending_size, smallest_mode_for_size, int_mode_for_mode, layout_decl, finish_builtin_struct, layout_type, set_sizetype, get_mode_bounds): Likewise. From-SVN: r87244
2004-09-09 19:19:16 +02:00
gcc_assert (!call_really_used_regs[i] || call_used_regs[i]);
#endif
1991-11-06 00:39:50 +01:00
if (fixed_regs[i])
{
SET_HARD_REG_BIT (fixed_reg_set, i);
SET_REGNO_REG_SET (fixed_reg_set_regset, i);
}
1991-11-06 00:39:50 +01:00
if (call_used_regs[i])
SET_HARD_REG_BIT (call_used_reg_set, i);
/* There are a couple of fixed registers that we know are safe to
exclude from being clobbered by calls:
reginfo.c (init_reg_sets_1): Adjust comments. * reginfo.c (init_reg_sets_1): Adjust comments. * combine-stack-adj.c (rest_of_handle_stack_adjustments): Likewise. * calls.c (prepare_call_address): Likewise. (emit_call_1): Use targetm.calls.return_pops_args. (expand_call): Likewise. * function.c (assign_parms): Likewise. * system.h (RETURN_POPS_ARGS): Add to #pragma poison list. * target.h (struct gcc_target) [struct calls]: Add return_pops_args field. * targhooks.h (default_return_pops_args): Declare. * targhooks.c (default_return_pops_args): Define. * target-def.h (TARGET_RETURN_POPS_ARGS): Define. (TARGET_CALLS): Add TARGET_RETURN_POPS_ARGS. * doc/tm.texi (RETURN_POPS_ARGS): Rename to... (TARGET_RETURN_POPS_ARGS): ...this. Use deftypefn. Adjust documentation. * config/alpha/alpha.h (RETURN_POPS_ARGS): Delete. * config/arc/arc.h (RETURN_POPS_ARGS): Likewise. * config/arm/arm.h (RETURN_POPS_ARGS): Likewise. * config/avr/avr.h (RETURN_POPS_ARGS): Likewise. * config/bfin/bfin.h (RETURN_POPS_ARGS): Likewise. * config/cris/cris.h (RETURN_POPS_ARGS): Likewise. * config/crx/crx.h (RETURN_POPS_ARGS): Likewise. * config/fr30/fr30.h (RETURN_POPS_ARGS): Likewise. * config/frv/frv.h (RETURN_POPS_ARGS): Likewise. * config/h8300/h8300.h (RETURN_POPS_ARGS): Likewise. * config/ia64/ia64.h (RETURN_POPS_ARGS): Likewise. * config/iq2000/iq2000.h (RETURN_POPS_ARGS): Likewise. * config/lm32/lm32.h (RETURN_POPS_ARGS): Likewise. * config/m32c/m32c.h (RETURN_POPS_ARGS): Likewise. * config/m32r/m32r.h (RETURN_POPS_ARGS): Likewise. * config/m68hc11/m68hc11.h (RETURN_POPS_ARGS): Likewise. * config/mcore/mcore.h (RETURN_POPS_ARGS): Likewise. * config/mep/mep.h (RETURN_POPS_ARGS): Likewise. * config/mips/mips.h (RETURN_POPS_ARGS): Likewise. * config/mmix/mmix.h (RETURN_POPS_ARGS): Likewise. * config/mn10300/mn10300.h (RETURN_POPS_ARGS): Likewise. * config/moxie/moxie.h (RETURN_POPS_ARGS): Likewise. * config/pa/pa.h (RETURN_POPS_ARGS): Likewise. * config/pdp11/pdp11.h (RETURN_POPS_ARGS): Likewise. * config/picochip/picochip.h (RETURN_POPS_ARGS): Likewise. * config/rs6000/rs6000.h (RETURN_POPS_ARGS): Likewise. * config/rx/rx.h (RETURN_POPS_ARGS): Likewise. * config/s390/s390.h (RETURN_POPS_ARGS): Likewise. * config/score/score.h (RETURN_POPS_ARGS): Likewise. * config/sh/sh.h (RETURN_POPS_ARGS): Likewise. * config/sparc/sparc.h (RETURN_POPS_ARGS): Likewise. * config/spu/spu.h (RETURN_POPS_ARGS): Likewise. * config/stormy16/stormy16.h (RETURN_POPS_ARGS): Likewise. * config/v850/v850.h (RETURN_POPS_ARGS): Likewise. * config/xtensa/xtensa.h (RETURN_POPS_ARGS): Likewise. * config/i386/i386-protos.h (ix86_return_pops_args): Delete. * config/i386/i386.h (RETURN_POPS_ARGS): Delete. * config/i386/i386.c (ix86_return_pops_args): Make static. Constify arguments. (TARGET_RETURN_POPS_ARGS): Define. * config/m68k/m68k.h (RETURN_POPS_ARGS): Move to... * config/m68k/m68k.c (m68k_return_pops_args): ...here. New function. (TARGET_RETURN_POPS_ARGS): Define. * config/vax/vax.h (RETURN_POPS_ARGS): Move to... * config/vax/vax.c (vax_return_pops_args): ...here. New function. (TARGET_RETURN_POPS_ARGS): Define. From-SVN: r161528
2010-06-29 14:18:36 +02:00
The frame pointer is always preserved across calls. The arg
pointer is if it is fixed. The stack pointer usually is,
unless TARGET_RETURN_POPS_ARGS, in which case an explicit
CLOBBER will be present. If we are generating PIC code, the
PIC offset table register is preserved across calls, though the
target can override that. */
if (i == STACK_POINTER_REGNUM)
;
else if (global_regs[i])
{
SET_HARD_REG_BIT (regs_invalidated_by_call, i);
SET_REGNO_REG_SET (regs_invalidated_by_call_regset, i);
}
else if (i == FRAME_POINTER_REGNUM)
;
else if (!HARD_FRAME_POINTER_IS_FRAME_POINTER
&& i == HARD_FRAME_POINTER_REGNUM)
;
else if (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
&& i == ARG_POINTER_REGNUM && fixed_regs[i])
;
else if (!PIC_OFFSET_TABLE_REG_CALL_CLOBBERED
&& i == (unsigned) PIC_OFFSET_TABLE_REGNUM && fixed_regs[i])
;
else if (CALL_REALLY_USED_REGNO_P (i))
{
SET_HARD_REG_BIT (regs_invalidated_by_call, i);
SET_REGNO_REG_SET (regs_invalidated_by_call_regset, i);
}
1991-11-06 00:39:50 +01:00
}
alloc-pool.c, [...]: Add missing whitespace before "(". gcc/ * alloc-pool.c, asan.c, auto-inc-dec.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, bt-load.c, builtins.c, calls.c, cfgcleanup.c, cfgexpand.c, cfghooks.c, cfgloop.c, cfgloopmanip.c, cfgrtl.c, cgraph.c, cgraph.h, cgraphbuild.c, cgraphclones.c, cgraphunit.c, collect2.c, combine-stack-adj.c, combine.c, compare-elim.c, context.c, context.h, cprop.c, cse.c, cselib.c, dbxout.c, dce.c, defaults.h, df-core.c, df-problems.c, df-scan.c, df.h, diagnostic.c, double-int.c, dse.c, dumpfile.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c, errors.c, except.c, expmed.c, expr.c, file-find.c, final.c, fixed-value.c, fold-const.c, function.c, fwprop.c, gcc-ar.c, gcc.c, gcov-io.c, gcov-io.h, gcov.c, gcse.c, genattr-common.c, genattr.c, genattrtab.c, genautomata.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, gengtype-state.c, gengtype.c, genmodes.c, genopinit.c, genoutput.c, genpeep.c, genpreds.c, genrecog.c, gensupport.c, ggc-common.c, ggc-page.c, gimple-fold.c, gimple-low.c, gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimple.c, gimple.h, godump.c, graphite-clast-to-gimple.c, graphite-optimize-isl.c, graphite-poly.h, graphite-sese-to-poly.c, graphite.c, haifa-sched.c, hash-table.c, hash-table.h, hwint.c, hwint.h, ifcvt.c, incpath.c, init-regs.c, input.h, intl.c, intl.h, ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c, ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c, ipa-utils.c, ipa.c, ira-build.c, ira.c, jump.c, loop-doloop.c, loop-init.c, loop-invariant.c, loop-iv.c, lower-subreg.c, lto-cgraph.c, lto-streamer-in.c, lto-streamer-out.c, lto-wrapper.c, mcf.c, mode-switching.c, modulo-sched.c, omp-low.c, optabs.c, opts.c, pass_manager.h, passes.c, plugin.c, postreload-gcse.c, postreload.c, predict.c, prefix.c, pretty-print.c, print-rtl.c, print-tree.c, profile.c, read-md.c, real.c, real.h, recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regmove.c, regrename.c, regs.h, regstat.c, reload1.c, reorg.c, rtl.c, rtl.h, rtlanal.c, sbitmap.c, sched-rgn.c, sdbout.c, sel-sched-ir.c, sel-sched.c, sparseset.c, stack-ptr-mod.c, statistics.c, stmt.c, stor-layout.c, store-motion.c, streamer-hooks.h, system.h, target-hooks-macros.h, targhooks.c, targhooks.h, toplev.c, tracer.c, trans-mem.c, tree-browser.c, tree-call-cdce.c, tree-cfg.c, tree-cfgcleanup.c, tree-complex.c, tree-data-ref.c, tree-data-ref.h, tree-eh.c, tree-emutls.c, tree-flow.h, tree-if-conv.c, tree-into-ssa.c, tree-iterator.c, tree-loop-distribution.c, tree-mudflap.c, tree-nested.c, tree-nomudflap.c, tree-nrv.c, tree-object-size.c, tree-optimize.c, tree-pass.h, tree-pretty-print.c, tree-profile.c, tree-scalar-evolution.c, tree-sra.c, tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-copyrename.c, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c, tree-ssa-live.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c, tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c, tree-ssa-structalias.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c, tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-ssanames.c, tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop-manip.c, tree-vect-stmts.c, tree-vectorizer.c, tree-vectorizer.h, tree-vrp.c, tree.c, tree.h, tsan.c, tsystem.h, value-prof.c, var-tracking.c, varasm.c, vec.h, vmsdbgout.c, vtable-verify.c, web.c: Add missing whitespace before "(". From-SVN: r203004
2013-09-28 10:42:34 +02:00
COPY_HARD_REG_SET (call_fixed_reg_set, fixed_reg_set);
COPY_HARD_REG_SET (fixed_nonglobal_reg_set, fixed_reg_set);
Separate target-specific initialization from general back-end initialization. 2007-08-27 Sandra Loosemore <sandra@codesourcery.com> David Ung <davidu@mips.com> Nigel Stephens <nigel@mips.com> gcc/ Separate target-specific initialization from general back-end initialization. * toplev.c (init_alignments): New, split out from... (process_options): ...here. (backend_init_target): New, split out from... (backend_init): ...here. (lang_dependent_init_target): New, split out from... (lang_dependent_init): ...here. (target_reinit): New. * toplev.h (target_reinit): Declare. * expr.c (init_expr_target): Renamed from init_expr_once, since it now can be called more than once. Update comments. * expr.h (init_expr_target): Likewise. * alias.c (init_alias_target): Renamed from init_alias_once, since it now can be called more than once. Explicitly zero static_reg_base_value. * emit-rtl.c (init_emit_regs): New, split out from... (init_emit_once): Here. * regclass.c (initial_fixed_regs, initial_call_used_regs): Make non-const, so that changes from command-line arguments can overwrite values provided by the static initializers. (initial_call_really_used_regs): New, used similarly to the above. (initial_reg_names): Likewise. (last_mode_for_init_move_cost): Promoted function-local static to file-scope static to make it accessible outside init_move_cost. (init_reg_sets): Do not initialize fixed_regs and call_used_regs yet. Do not initialize inv_reg_alloc_order yet, either. Do initialize reg_names since it is needed for parsing command-line options. (init_move_cost): Use last_mode_for_init_move_cost instead of function-local static. (init_reg_sets_1): Initialize fixed_regs, call_used_regs, and call_really_used_regs now. Reinitialize reg_names. Also initialize inv_reg_alloc_order. Zero reg_class_subunion and reg_class_superunion. Clear losing_caller_save_reg_set. Preserve global registers if called more than once. Reset move cost, may_move_in_cost, may_move_out_cost, and last_mode_for_init_move_cost. (init_reg_modes_target): Renamed from init_reg_modes_once, since it can now be invoked more than once. Update comments. (init_regs): Update comments. (fix_register): Update initial_fixed_regs, initial_call_used_regs, and initial_call_really_used_regs, instead of the non-initial variables. This allows us to save the command-line register settings after target reinitialization. (init_reg_autoinc): Zero forbidden_inc_dec_classes. * rtl.h (init_emit_regs): Declare. (init_reg_modes_target, init_alias_target): Renamed as described above. * reload1.c (init_reload): Update comments. * optabs.c (init_optabs): Likewise. * cfgloopanal.c (init_set_costs): Explicitly zero target_avail_regs. Co-Authored-By: David Ung <davidu@mips.com> Co-Authored-By: Nigel Stephens <nigel@mips.com> From-SVN: r127832
2007-08-27 15:34:14 +02:00
/* Preserve global registers if called more than once. */
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
{
if (global_regs[i])
{
fixed_regs[i] = call_used_regs[i] = 1;
Separate target-specific initialization from general back-end initialization. 2007-08-27 Sandra Loosemore <sandra@codesourcery.com> David Ung <davidu@mips.com> Nigel Stephens <nigel@mips.com> gcc/ Separate target-specific initialization from general back-end initialization. * toplev.c (init_alignments): New, split out from... (process_options): ...here. (backend_init_target): New, split out from... (backend_init): ...here. (lang_dependent_init_target): New, split out from... (lang_dependent_init): ...here. (target_reinit): New. * toplev.h (target_reinit): Declare. * expr.c (init_expr_target): Renamed from init_expr_once, since it now can be called more than once. Update comments. * expr.h (init_expr_target): Likewise. * alias.c (init_alias_target): Renamed from init_alias_once, since it now can be called more than once. Explicitly zero static_reg_base_value. * emit-rtl.c (init_emit_regs): New, split out from... (init_emit_once): Here. * regclass.c (initial_fixed_regs, initial_call_used_regs): Make non-const, so that changes from command-line arguments can overwrite values provided by the static initializers. (initial_call_really_used_regs): New, used similarly to the above. (initial_reg_names): Likewise. (last_mode_for_init_move_cost): Promoted function-local static to file-scope static to make it accessible outside init_move_cost. (init_reg_sets): Do not initialize fixed_regs and call_used_regs yet. Do not initialize inv_reg_alloc_order yet, either. Do initialize reg_names since it is needed for parsing command-line options. (init_move_cost): Use last_mode_for_init_move_cost instead of function-local static. (init_reg_sets_1): Initialize fixed_regs, call_used_regs, and call_really_used_regs now. Reinitialize reg_names. Also initialize inv_reg_alloc_order. Zero reg_class_subunion and reg_class_superunion. Clear losing_caller_save_reg_set. Preserve global registers if called more than once. Reset move cost, may_move_in_cost, may_move_out_cost, and last_mode_for_init_move_cost. (init_reg_modes_target): Renamed from init_reg_modes_once, since it can now be invoked more than once. Update comments. (init_regs): Update comments. (fix_register): Update initial_fixed_regs, initial_call_used_regs, and initial_call_really_used_regs, instead of the non-initial variables. This allows us to save the command-line register settings after target reinitialization. (init_reg_autoinc): Zero forbidden_inc_dec_classes. * rtl.h (init_emit_regs): Declare. (init_reg_modes_target, init_alias_target): Renamed as described above. * reload1.c (init_reload): Update comments. * optabs.c (init_optabs): Likewise. * cfgloopanal.c (init_set_costs): Explicitly zero target_avail_regs. Co-Authored-By: David Ung <davidu@mips.com> Co-Authored-By: Nigel Stephens <nigel@mips.com> From-SVN: r127832
2007-08-27 15:34:14 +02:00
SET_HARD_REG_BIT (fixed_reg_set, i);
SET_HARD_REG_BIT (call_used_reg_set, i);
SET_HARD_REG_BIT (call_fixed_reg_set, i);
}
}
tree-cfg.c (gimplify_val): Move from tree-complex.c. 2004-07-22 Paolo Bonzini <bonzini@gnu.org> * tree-cfg.c (gimplify_val): Move from tree-complex.c. (gimplify_build1): Move from tree-complex.c do_unop. (gimplify_build2): Move from tree-complex.c do_binop. (gimplify_build3): New. * tree-complex.c (gimplify_val, do_unop, do_binop): Remove. Adjust throughout to call the functions above. * tree-flow.h: Declare the functions above. * tree-nested.c (gimplify_val): Rename to... (tsi_gimplify_val): ... this. * Makefile.in (tree_complex.o): Update dependencies. (stor-layout.o): Depend on regs.h. * c-common.c (handle_vector_size_attribute): Update for vector types without corresponding vector modes. * expr.c (expand_expr): Treat VECTOR_CST's like CONSTRUCTORS if a corresponding vector mode is not available. * print-tree.c (print_node): Print nunits for vector types * regclass.c (have_regs_of_mode): New. (init_reg_sets_1): Initialize it and use it instead of allocatable_regs_of_mode. * regs.h (have_regs_of_mode): Declare it. * stor-layout.c (layout_type): Pick a mode for vector types. * tree-complex.c (build_word_mode_vector_type, tree_vec_extract, build_replicated_const, do_unop, do_binop, do_plus_minus, do_negate, expand_vector_piecewise, expand_vector_parallel, expand_vector_addition, expand_vector_operations_1, expand_vector_operations, tree_lower_operations, pass_lower_vector_ssa, pass_pre_expand): New. (expand_complex_operations, pass_lower_complex): Remove. * tree-optimize.c (init_tree_optimization_passes): Adjust pass ordering for changes in tree-complex.c. * tree-pass.h: Declare new passes. * tree.c (finish_vector_type): Remove. (make_vector_type): New. (build_vector_type_for_mode, build_vector_type): Rewritten. * tree.def (VECTOR_TYPE): Document where the number of subparts is stored. * tree.h (TYPE_VECTOR_SUBPARTS): Use TYPE_PRECISION field. (make_vector): Remove declaration. From-SVN: r85039
2004-07-22 10:20:40 +02:00
memset (have_regs_of_mode, 0, sizeof (have_regs_of_mode));
memset (contains_reg_of_mode, 0, sizeof (contains_reg_of_mode));
print-rtl.c (print_rtx): Cast enums to int for comparison. * print-rtl.c (print_rtx): Cast enums to int for comparison. * c-decl.c (grokdeclarator): Cast enums to int for comparison and shifts. * c-format.c (C_STD_VER): Cast to int for comparisons. (check_function_format): Cast various enums to int for &. (maybe_read_dollar_number): Likewise. (check_format_info): Likewise. (check_format_info_main): Likewise. * expr.c (emit_move_insn_1): Cast enums to unsigned int for comparison. (safe_from_p): Likewise. * varasm.c (const_hash): Cast enum to int for %. * emit-rtl.c (init_emit_once): Use int loop variable to work around pcc enum problems with < and ++ operators. * regclass.c (init_reg_sets_1): Cast enums for comparison. (choose_hard_reg_mode): Use unsigned int to iterate over CCmodes. (regclass_init): Change enum class to int to iterate over reg_classes. * genrecog.c (merge_trees): Cast enums for comparison. * rtl.h (GET_CODE): Cast to enum rtx_code. (PUT_CODE): Cast to ENUM_BITFIELD(rtx_code). (GET_MODE): Cast to enum machine_mode. (PUT_MODE): Cast to ENUM_BITFIELD(machine_mode). (GET_NOTE_INSN_NAME): Cast enum to int. * tree.h (TREE_CODE): Cast to enum tree_code. (TREE_SET_CODE): Cast VALUE to ENUM_BITFIELD(tree_code). * timevar.c (timevar_print): Change loop variable id from enum to unsigned int. * fixinc/fixincl.c (VLEVEL): Cast enums in comparison to unsigned int. * config/i386/i386.md: Use PUT_MODE for mode assignment. * toplev.c (compile_file): Cast enum DFI to int. (decode_d_option): Likewise. From-SVN: r40193
2001-03-02 22:41:37 +01:00
for (m = 0; m < (unsigned int) MAX_MACHINE_MODE; m++)
{
HARD_REG_SET ok_regs, ok_regs2;
CLEAR_HARD_REG_SET (ok_regs);
CLEAR_HARD_REG_SET (ok_regs2);
for (j = 0; j < FIRST_PSEUDO_REGISTER; j++)
if (!TEST_HARD_REG_BIT (fixed_nonglobal_reg_set, j)
&& HARD_REGNO_MODE_OK (j, (machine_mode) m))
{
SET_HARD_REG_BIT (ok_regs, j);
if (!fixed_regs[j])
SET_HARD_REG_BIT (ok_regs2, j);
}
Fix enum conversions which are invalid in C++: gcc/: Fix enum conversions which are invalid in C++: * auto-inc-dec.c (attempt_change): Change 0 to SET in function call. * calls.c (store_one_arg): Change 0 to EXPAND_NORMAL in function call. * cse.c (hash_rtx_cb): Change 0 to VOIDmode in function call. * dbgcnt.c (dbg_cnt_set_limit_by_name): Add cast to enum type. * dbxout.c (dbxout_symbol): Change 0 to VOIDmode in function call. (dbxout_parms): Likewise. * df-core.c (df_set_flags): Change changeable_flags parameter to int. (df_clear_flags): Likewise. * df-problems.c (df_rd_bb_local_compute_process_def): Change top_flag parameter to int. (df_chain_create_bb_process_use): Likewise. (df_chain_add_problem): Change chain_flags parameter to unsigned int. Remove cast. * df-scan.c (df_ref_create): Change ref_flags parameter to int. (df_ref_create_structure, df_def_record_1): Likewise. (df_defs_record, df_uses_record, df_get_call_refs): Likewise. (df_notes_rescan): Change 0 to VOIDmode in function call. (df_get_call_refs, df_insn_refs_collect): Likewise. (df_bb_regs_collect): Likewise. (df_entry_block_defs_collect): Likewise. (df_exit_block_uses_collect): Likewise. * df.h: Update declarations. * double-int.c (double_int_divmod): Add cast to enum type. * dse.c (replace_inc_dec): Reverse parameters to gen_int_mode. * dwarf2out.c (new_reg_loc_descr): Add casts to enum type. (based_loc_descr): Likewise. (loc_descriptor_from_tree_1): Change first_op and second_op to enum dwarf_location_atom. Add cast to enum type. * expmed.c (init_expmed): Change 0 to SET in function call. * expr.c (init_expr_target): Change 0 to VOIDmode in function call. (expand_expr_real_1): Change 0 to EXPAND_NORMAL in function call. (do_store_flag): Likewise. * fixed-value.h (struct fixed_value): Change mode to enum machine_mode. * function.c (assign_parms): Change 0 to VOIDmode in function call. * genautomata.c (insert_automaton_decl): Change 1 to INSERT in function call. (insert_insn_decl, insert_decl, insert_state): Likewise. (automata_list_finish): Likewise. * genrecog.c (process_define_predicate): Add cast to enum type. * gensupport.c (init_predicate_table): Add cast to enum type. * gimple.c (gimple_build_return): Change 0 to ERROR_MARK in function call. (gimple_build_call_1, gimple_build_label): Likewise. (gimple_build_goto, gimple_build_asm_1): Likewise. (gimple_build_switch_1, gimple_build_cdt): Likewise. * gimple.h (GIMPLE_CHECK): Change 0 to ERROR_MARK in function call. (enum fallback): Rename from enum fallback_t. (fallback_t): Typedef as int. * gimple-low.c (lower_builtin_setjmp): Change TSI_SAME_STMT to GSI_SAME_STMT in function call. * ira.c (setup_class_subset_and_memory_move_costs): Add casts to enum type. (setup_reg_class_relations): Likewise. (setup_reg_class_nregs): Change cl to int. Add casts to enum type. (setup_prohibited_class_mode_regs): Add cast to enum type. (setup_prohibited_mode_move_regs): Likewise. * ira-costs.c (record_reg_classes): Change rclass to enum reg_class. (record_address_regs): Change i to enum reg_class. * lists.c (alloc_EXPR_LIST): Add cast to enum type. * machmode.h (GET_MODE_CLASS): Cast value to enum mode_class. (GET_MODE_WIDER_MODE): Cast value to enum machine_mode. (GET_MODE_2XWIDER_MODE): Likewise. (GET_CLASS_NARROWEST_MODE): Likewise. * omp-low.c (expand_omp_for): Add cast to enum type. * optabs.c (debug_optab_libfuncs): Add casts to enum type. * opts.c (enable_warning_as_error): Change kind to diagostic_t. * postreload.c (reload_cse_simplify_operands): Change rclass local to enum reg_class. * predict.c (combine_predictions_for_insn): Change best_predictor and predictor to enum br_predictor. (combine_predictions_for_bb): Likewise. (build_predict_expr): Change assignment to PREDICT_EXPR_OUTCOME to use SET_PREDICT_EXPR_OUTCOME. * real.c (real_arithmetic): Change icode to code in function call. * reginfo.c (init_move_cost): Add casts to enum type. (init_reg_sets_1, init_fake_stack_mems): Likewise. * regmove.c (regclass_compatible_p): Change class0 and class1 to enum reg_class. * reload.c (find_valid_class): Add casts to enum type. (push_reload): Change 0 to NO_REGS in function call. (find_reloads): Change this_alternative to array of enum reg_class. Remove some now-unnecessary casts. (make_memloc): Change 0 to VOIDmode in function call. * reload1.c (reload): Change 0 to VOIDmode in function call. (eliminate_regs_1, elimination_effects): Likewise. (eliminate_regs_in_insn): Likewise. (emit_input_reload_insns): Add cast to enum type. (delete_output_reload): Change 0 to VOIDmode in function call. * reorg.c (insn_sets_resource_p): Convert include_delayed_effects to enum type in function call. * tree.h (PREDICT_EXPR_OUTCOME): Add cast to enum type. (SET_PREDICT_EXPR_OUTCOME): Define. * tree-dump.c (get_dump_file_info): Change phase parameter to int. (get_dump_file_name, dump_begin, dump_enabled_p): Likewise. (dump_initialized_p, dump_flag_name, dump_end): Likewise. (dump_function): Likewise. * tree-dump.h: Update declarations. * tree-pass.h: Update declarations. * varasm.c (assemble_integer): Change mclass to enum mode_class. * config/arm/arm.c (thumb_legitimize_reload_address): Add cast to enum type. (arm_rtx_costs_1): Correct parenthesization. (arm_rtx_costs): Add casts to enum type. (adjacent_mem_locations): Reverse arguments to const_ok_for_op. (vfp_emit_fstmd): Use add_rg_note. (emit_multi_reg_push, emit_sfm): Likewise. (thumb_set_frame_pointer): Likewise. (arm_expand_prologue): Likewise. (arm_regno_class): Change return type to enum reg_class. (thumb1_expand_prologue): Use add_reg_note. * config/arm/arm-protos.h (arm_regno_class): Update declaration. * config/arm/arm.h (INITIALIZE_TRAMPOLINE): Change 0 to LCT_NORMAL in function call. * config/arm/gentune.sh: Add cast to enum type. * config/arm/arm-tune.md: Rebuild. * config/i386/i386.c (ix86_expand_prologue): Use add_reg_note. (ix86_split_fp_branch, predict_jump): Likewise. (ix86_expand_multi_arg_builtin): Change sub_code from enum insn_code to enum rtx_code. (ix86_builtin_vectorized_function): Add cast to enum type. * config/i386/i386.md (truncdfsf2): Change slot to enum ix86_stack_slot. (truncxf<mode>2, isinf<mode>2): Likewise. * config/i386/i386-c.c (ix86_pragma_target_parse): Add cast to enum type. * config/ia64/ia64.c (ia64_split_tmode_move): Use add_reg_note. (spill_restore_mem, do_spill, ia64_expand_prologue): Likewise. (insert_bundle_state): Change 1 to INSERT in function call. (ia64_add_bundle_selector_before): Likewise. * config/ia64/ia64.md (cpu attr): Add cast to enum type. (save_stack_nonlocal): Change 0 to LCT_NORMAL in function call. (restore_stack_nonlocal): Likewise. * config/mips/mips.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in function call. * config/mips/mips.c (mips_binary_cost): Change 0 to SET in function call. (mips_rtx_costs): Likewise. (mips_override_options): Add casts to enum type. * config/mips/sdemtk.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in function call. * config/pa/pa.c (legitimize_pic_address): Use add_reg_note. (store_reg, set_reg_plus_d): Likewise. (hppa_expand_prologue, hppa_profile_hook): Likewise. * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Add cast to enum type. (altivec_expand_vec_set_builtin): Change 0 to EXPAND_NORMAL in function call. (emit_unlikely_jump): Use add_reg_note. (rs6000_emit_allocate_stack): Likewise. (rs6000_frame_related, rs6000_emit_prologue): Likewise. (output_toc): Change 1 to INSERT in function call. (output_profile_hook): Change 0 to LCT_NORMAL in function call. (rs6000_initialize_trampoline): Likewise. (rs6000_init_dwarf_reg_sizes_extra): Change 0 to EXPAND_NORMAL in function call. * config/s390/s390.c (s390_rtx_costs): Add cast to enum type. (s390_expand_movmem): Change 0 to OPTAB_DIRECT in function call. (s390_expand_setmem, s390_expand_cmpmem): Likewise. (save_gprs): Use add_reg_note. (s390_emit_prologue): Likewise. (s390_expand_builtin): Change 0 to EXPAND_NORMAL in function call. * config/sparc/sparc.c (sparc_expand_prologue): Use add_reg_note. (sparc_fold_builtin): Add cast to enum type. * config/spu/spu.c (spu_emit_branch_or_set): Change ior_code to enum insn_code. (spu_expand_prologue): Use add_reg_note. (expand_builtin_args): Change 0 to EXPAND_NORMAL in function call. * c-parser.c (c_parser_attributes): Change VEC back to tree list. (c_parser_postfix_expression_after_primary): Get VEC for list of arguments. Get original types of arguments. Call build_function_call_vec. (cached_expr_list_1, cached_expr_list_2): New static variables. (c_parser_expr_list): Change return type to VEC *. Add p_orig_types parameter. Change all callers. (c_parser_release_expr): New static function. (c_parser_vec_to_tree_list): New static function. * c-typeck.c (build_function_call): Rewrite to build a VEC and call build_function_call_vec. (build_function_call_vec): New function, based on old build_function_call. (convert_arguments): Remove nargs and argarray parameters. Change values to a VEC. Add origtypes parameter. (build_modify_expr): Add rhs_origtype parameter. Change all callers. (convert_for_assignment): Add origtype parameter. Change all callers. If warn_cxx_compat, check for conversion to an enum type when calling a function. (store_init_value): Add origtype parameter. Change all callers. (digest_init): Likewise. (struct init_node): Add origtype field. (add_pending_init): Add origtype parameter. Change all callers. (output_init_element): Likewise. (output_pending_init_elements): Pass origtype from init_node to output_init_element. (process_init_elemnt): Pass origtype from c_expr to output_init_element. (c_finish_return): Add origtype parameter. Change all callers. * c-common.c (sync_resolve_size): Change params to VEC *. Change caller. (sync_resolve_params): Likewise. (sync_resolve_return): Change params to first_param. Change caller. (resolve_overloaded_builtins): Change params to VEC *. Change callers. Save first parameter around call to build_function_call_vec. * c-decl.c (finish_decl): Add origtype parameter. Change all callers. Call build_function_call_vec rather than build_function_call for cleanup. * c-tree.h: Update declarations. * c-common.h: Update declarations. * stub-objc.c (objc_rewrite_function_call): Change parameter from params to first_param. * target.h (struct gcc_target): Change resolve_overloaded_builtin params parameter from tree to void *. * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Change arglist parameter to have type void *, and to be a pointer to a VEC. * config/rs6000/rs6000-protos.h (altivec_resolve_overloaded_builtin): Update declaration. * config/spu/spu-c.c (spu_resolved_overloaded_builtin): Change fnargs parameter to have type void *, and to be a pointer to a VEC. Call build_function_call_vec instead of build_function_call. * config/spu/spu-protos.h (spu_expand_builtin): Update declaration. gcc/cp/: * typeck.c (build_function_call_vec): New function. (cp_build_function_call): Only pass first parameter to objc_rewrite_function_call. (build_modify_expr): Add rhs_origtype parameter. Change all callers. * decl.c (finish_decl): Add origtype parameter. Change all callers. * semantics.c (finish_call_expr): Pass VEC to resolve_overloaded_builtin. gcc/objc: * objc-act.c (objc_rewrite_function_call): Change parameter from params to first_param. Change all callers. gcc/testsuite: * gcc.dg/Wcxx-compat-3.c: New testcase. From-SVN: r146451
2009-04-20 21:35:00 +02:00
for (i = 0; i < N_REG_CLASSES; i++)
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
if ((targetm.class_max_nregs ((reg_class_t) i, (machine_mode) m)
Fix enum conversions which are invalid in C++: gcc/: Fix enum conversions which are invalid in C++: * auto-inc-dec.c (attempt_change): Change 0 to SET in function call. * calls.c (store_one_arg): Change 0 to EXPAND_NORMAL in function call. * cse.c (hash_rtx_cb): Change 0 to VOIDmode in function call. * dbgcnt.c (dbg_cnt_set_limit_by_name): Add cast to enum type. * dbxout.c (dbxout_symbol): Change 0 to VOIDmode in function call. (dbxout_parms): Likewise. * df-core.c (df_set_flags): Change changeable_flags parameter to int. (df_clear_flags): Likewise. * df-problems.c (df_rd_bb_local_compute_process_def): Change top_flag parameter to int. (df_chain_create_bb_process_use): Likewise. (df_chain_add_problem): Change chain_flags parameter to unsigned int. Remove cast. * df-scan.c (df_ref_create): Change ref_flags parameter to int. (df_ref_create_structure, df_def_record_1): Likewise. (df_defs_record, df_uses_record, df_get_call_refs): Likewise. (df_notes_rescan): Change 0 to VOIDmode in function call. (df_get_call_refs, df_insn_refs_collect): Likewise. (df_bb_regs_collect): Likewise. (df_entry_block_defs_collect): Likewise. (df_exit_block_uses_collect): Likewise. * df.h: Update declarations. * double-int.c (double_int_divmod): Add cast to enum type. * dse.c (replace_inc_dec): Reverse parameters to gen_int_mode. * dwarf2out.c (new_reg_loc_descr): Add casts to enum type. (based_loc_descr): Likewise. (loc_descriptor_from_tree_1): Change first_op and second_op to enum dwarf_location_atom. Add cast to enum type. * expmed.c (init_expmed): Change 0 to SET in function call. * expr.c (init_expr_target): Change 0 to VOIDmode in function call. (expand_expr_real_1): Change 0 to EXPAND_NORMAL in function call. (do_store_flag): Likewise. * fixed-value.h (struct fixed_value): Change mode to enum machine_mode. * function.c (assign_parms): Change 0 to VOIDmode in function call. * genautomata.c (insert_automaton_decl): Change 1 to INSERT in function call. (insert_insn_decl, insert_decl, insert_state): Likewise. (automata_list_finish): Likewise. * genrecog.c (process_define_predicate): Add cast to enum type. * gensupport.c (init_predicate_table): Add cast to enum type. * gimple.c (gimple_build_return): Change 0 to ERROR_MARK in function call. (gimple_build_call_1, gimple_build_label): Likewise. (gimple_build_goto, gimple_build_asm_1): Likewise. (gimple_build_switch_1, gimple_build_cdt): Likewise. * gimple.h (GIMPLE_CHECK): Change 0 to ERROR_MARK in function call. (enum fallback): Rename from enum fallback_t. (fallback_t): Typedef as int. * gimple-low.c (lower_builtin_setjmp): Change TSI_SAME_STMT to GSI_SAME_STMT in function call. * ira.c (setup_class_subset_and_memory_move_costs): Add casts to enum type. (setup_reg_class_relations): Likewise. (setup_reg_class_nregs): Change cl to int. Add casts to enum type. (setup_prohibited_class_mode_regs): Add cast to enum type. (setup_prohibited_mode_move_regs): Likewise. * ira-costs.c (record_reg_classes): Change rclass to enum reg_class. (record_address_regs): Change i to enum reg_class. * lists.c (alloc_EXPR_LIST): Add cast to enum type. * machmode.h (GET_MODE_CLASS): Cast value to enum mode_class. (GET_MODE_WIDER_MODE): Cast value to enum machine_mode. (GET_MODE_2XWIDER_MODE): Likewise. (GET_CLASS_NARROWEST_MODE): Likewise. * omp-low.c (expand_omp_for): Add cast to enum type. * optabs.c (debug_optab_libfuncs): Add casts to enum type. * opts.c (enable_warning_as_error): Change kind to diagostic_t. * postreload.c (reload_cse_simplify_operands): Change rclass local to enum reg_class. * predict.c (combine_predictions_for_insn): Change best_predictor and predictor to enum br_predictor. (combine_predictions_for_bb): Likewise. (build_predict_expr): Change assignment to PREDICT_EXPR_OUTCOME to use SET_PREDICT_EXPR_OUTCOME. * real.c (real_arithmetic): Change icode to code in function call. * reginfo.c (init_move_cost): Add casts to enum type. (init_reg_sets_1, init_fake_stack_mems): Likewise. * regmove.c (regclass_compatible_p): Change class0 and class1 to enum reg_class. * reload.c (find_valid_class): Add casts to enum type. (push_reload): Change 0 to NO_REGS in function call. (find_reloads): Change this_alternative to array of enum reg_class. Remove some now-unnecessary casts. (make_memloc): Change 0 to VOIDmode in function call. * reload1.c (reload): Change 0 to VOIDmode in function call. (eliminate_regs_1, elimination_effects): Likewise. (eliminate_regs_in_insn): Likewise. (emit_input_reload_insns): Add cast to enum type. (delete_output_reload): Change 0 to VOIDmode in function call. * reorg.c (insn_sets_resource_p): Convert include_delayed_effects to enum type in function call. * tree.h (PREDICT_EXPR_OUTCOME): Add cast to enum type. (SET_PREDICT_EXPR_OUTCOME): Define. * tree-dump.c (get_dump_file_info): Change phase parameter to int. (get_dump_file_name, dump_begin, dump_enabled_p): Likewise. (dump_initialized_p, dump_flag_name, dump_end): Likewise. (dump_function): Likewise. * tree-dump.h: Update declarations. * tree-pass.h: Update declarations. * varasm.c (assemble_integer): Change mclass to enum mode_class. * config/arm/arm.c (thumb_legitimize_reload_address): Add cast to enum type. (arm_rtx_costs_1): Correct parenthesization. (arm_rtx_costs): Add casts to enum type. (adjacent_mem_locations): Reverse arguments to const_ok_for_op. (vfp_emit_fstmd): Use add_rg_note. (emit_multi_reg_push, emit_sfm): Likewise. (thumb_set_frame_pointer): Likewise. (arm_expand_prologue): Likewise. (arm_regno_class): Change return type to enum reg_class. (thumb1_expand_prologue): Use add_reg_note. * config/arm/arm-protos.h (arm_regno_class): Update declaration. * config/arm/arm.h (INITIALIZE_TRAMPOLINE): Change 0 to LCT_NORMAL in function call. * config/arm/gentune.sh: Add cast to enum type. * config/arm/arm-tune.md: Rebuild. * config/i386/i386.c (ix86_expand_prologue): Use add_reg_note. (ix86_split_fp_branch, predict_jump): Likewise. (ix86_expand_multi_arg_builtin): Change sub_code from enum insn_code to enum rtx_code. (ix86_builtin_vectorized_function): Add cast to enum type. * config/i386/i386.md (truncdfsf2): Change slot to enum ix86_stack_slot. (truncxf<mode>2, isinf<mode>2): Likewise. * config/i386/i386-c.c (ix86_pragma_target_parse): Add cast to enum type. * config/ia64/ia64.c (ia64_split_tmode_move): Use add_reg_note. (spill_restore_mem, do_spill, ia64_expand_prologue): Likewise. (insert_bundle_state): Change 1 to INSERT in function call. (ia64_add_bundle_selector_before): Likewise. * config/ia64/ia64.md (cpu attr): Add cast to enum type. (save_stack_nonlocal): Change 0 to LCT_NORMAL in function call. (restore_stack_nonlocal): Likewise. * config/mips/mips.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in function call. * config/mips/mips.c (mips_binary_cost): Change 0 to SET in function call. (mips_rtx_costs): Likewise. (mips_override_options): Add casts to enum type. * config/mips/sdemtk.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in function call. * config/pa/pa.c (legitimize_pic_address): Use add_reg_note. (store_reg, set_reg_plus_d): Likewise. (hppa_expand_prologue, hppa_profile_hook): Likewise. * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Add cast to enum type. (altivec_expand_vec_set_builtin): Change 0 to EXPAND_NORMAL in function call. (emit_unlikely_jump): Use add_reg_note. (rs6000_emit_allocate_stack): Likewise. (rs6000_frame_related, rs6000_emit_prologue): Likewise. (output_toc): Change 1 to INSERT in function call. (output_profile_hook): Change 0 to LCT_NORMAL in function call. (rs6000_initialize_trampoline): Likewise. (rs6000_init_dwarf_reg_sizes_extra): Change 0 to EXPAND_NORMAL in function call. * config/s390/s390.c (s390_rtx_costs): Add cast to enum type. (s390_expand_movmem): Change 0 to OPTAB_DIRECT in function call. (s390_expand_setmem, s390_expand_cmpmem): Likewise. (save_gprs): Use add_reg_note. (s390_emit_prologue): Likewise. (s390_expand_builtin): Change 0 to EXPAND_NORMAL in function call. * config/sparc/sparc.c (sparc_expand_prologue): Use add_reg_note. (sparc_fold_builtin): Add cast to enum type. * config/spu/spu.c (spu_emit_branch_or_set): Change ior_code to enum insn_code. (spu_expand_prologue): Use add_reg_note. (expand_builtin_args): Change 0 to EXPAND_NORMAL in function call. * c-parser.c (c_parser_attributes): Change VEC back to tree list. (c_parser_postfix_expression_after_primary): Get VEC for list of arguments. Get original types of arguments. Call build_function_call_vec. (cached_expr_list_1, cached_expr_list_2): New static variables. (c_parser_expr_list): Change return type to VEC *. Add p_orig_types parameter. Change all callers. (c_parser_release_expr): New static function. (c_parser_vec_to_tree_list): New static function. * c-typeck.c (build_function_call): Rewrite to build a VEC and call build_function_call_vec. (build_function_call_vec): New function, based on old build_function_call. (convert_arguments): Remove nargs and argarray parameters. Change values to a VEC. Add origtypes parameter. (build_modify_expr): Add rhs_origtype parameter. Change all callers. (convert_for_assignment): Add origtype parameter. Change all callers. If warn_cxx_compat, check for conversion to an enum type when calling a function. (store_init_value): Add origtype parameter. Change all callers. (digest_init): Likewise. (struct init_node): Add origtype field. (add_pending_init): Add origtype parameter. Change all callers. (output_init_element): Likewise. (output_pending_init_elements): Pass origtype from init_node to output_init_element. (process_init_elemnt): Pass origtype from c_expr to output_init_element. (c_finish_return): Add origtype parameter. Change all callers. * c-common.c (sync_resolve_size): Change params to VEC *. Change caller. (sync_resolve_params): Likewise. (sync_resolve_return): Change params to first_param. Change caller. (resolve_overloaded_builtins): Change params to VEC *. Change callers. Save first parameter around call to build_function_call_vec. * c-decl.c (finish_decl): Add origtype parameter. Change all callers. Call build_function_call_vec rather than build_function_call for cleanup. * c-tree.h: Update declarations. * c-common.h: Update declarations. * stub-objc.c (objc_rewrite_function_call): Change parameter from params to first_param. * target.h (struct gcc_target): Change resolve_overloaded_builtin params parameter from tree to void *. * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Change arglist parameter to have type void *, and to be a pointer to a VEC. * config/rs6000/rs6000-protos.h (altivec_resolve_overloaded_builtin): Update declaration. * config/spu/spu-c.c (spu_resolved_overloaded_builtin): Change fnargs parameter to have type void *, and to be a pointer to a VEC. Call build_function_call_vec instead of build_function_call. * config/spu/spu-protos.h (spu_expand_builtin): Update declaration. gcc/cp/: * typeck.c (build_function_call_vec): New function. (cp_build_function_call): Only pass first parameter to objc_rewrite_function_call. (build_modify_expr): Add rhs_origtype parameter. Change all callers. * decl.c (finish_decl): Add origtype parameter. Change all callers. * semantics.c (finish_call_expr): Pass VEC to resolve_overloaded_builtin. gcc/objc: * objc-act.c (objc_rewrite_function_call): Change parameter from params to first_param. Change all callers. gcc/testsuite: * gcc.dg/Wcxx-compat-3.c: New testcase. From-SVN: r146451
2009-04-20 21:35:00 +02:00
<= reg_class_size[i])
&& hard_reg_set_intersect_p (ok_regs, reg_class_contents[i]))
{
contains_reg_of_mode[i][m] = 1;
if (hard_reg_set_intersect_p (ok_regs2, reg_class_contents[i]))
{
have_regs_of_mode[m] = 1;
contains_allocatable_reg_of_mode[i][m] = 1;
}
}
}
}
/* Compute the table of register modes.
These values are used to record death information for individual registers
Separate target-specific initialization from general back-end initialization. 2007-08-27 Sandra Loosemore <sandra@codesourcery.com> David Ung <davidu@mips.com> Nigel Stephens <nigel@mips.com> gcc/ Separate target-specific initialization from general back-end initialization. * toplev.c (init_alignments): New, split out from... (process_options): ...here. (backend_init_target): New, split out from... (backend_init): ...here. (lang_dependent_init_target): New, split out from... (lang_dependent_init): ...here. (target_reinit): New. * toplev.h (target_reinit): Declare. * expr.c (init_expr_target): Renamed from init_expr_once, since it now can be called more than once. Update comments. * expr.h (init_expr_target): Likewise. * alias.c (init_alias_target): Renamed from init_alias_once, since it now can be called more than once. Explicitly zero static_reg_base_value. * emit-rtl.c (init_emit_regs): New, split out from... (init_emit_once): Here. * regclass.c (initial_fixed_regs, initial_call_used_regs): Make non-const, so that changes from command-line arguments can overwrite values provided by the static initializers. (initial_call_really_used_regs): New, used similarly to the above. (initial_reg_names): Likewise. (last_mode_for_init_move_cost): Promoted function-local static to file-scope static to make it accessible outside init_move_cost. (init_reg_sets): Do not initialize fixed_regs and call_used_regs yet. Do not initialize inv_reg_alloc_order yet, either. Do initialize reg_names since it is needed for parsing command-line options. (init_move_cost): Use last_mode_for_init_move_cost instead of function-local static. (init_reg_sets_1): Initialize fixed_regs, call_used_regs, and call_really_used_regs now. Reinitialize reg_names. Also initialize inv_reg_alloc_order. Zero reg_class_subunion and reg_class_superunion. Clear losing_caller_save_reg_set. Preserve global registers if called more than once. Reset move cost, may_move_in_cost, may_move_out_cost, and last_mode_for_init_move_cost. (init_reg_modes_target): Renamed from init_reg_modes_once, since it can now be invoked more than once. Update comments. (init_regs): Update comments. (fix_register): Update initial_fixed_regs, initial_call_used_regs, and initial_call_really_used_regs, instead of the non-initial variables. This allows us to save the command-line register settings after target reinitialization. (init_reg_autoinc): Zero forbidden_inc_dec_classes. * rtl.h (init_emit_regs): Declare. (init_reg_modes_target, init_alias_target): Renamed as described above. * reload1.c (init_reload): Update comments. * optabs.c (init_optabs): Likewise. * cfgloopanal.c (init_set_costs): Explicitly zero target_avail_regs. Co-Authored-By: David Ung <davidu@mips.com> Co-Authored-By: Nigel Stephens <nigel@mips.com> From-SVN: r127832
2007-08-27 15:34:14 +02:00
(as opposed to a multi-register mode).
This function might be invoked more than once, if the target has support
for changing register usage conventions on a per-function basis.
*/
void
Separate target-specific initialization from general back-end initialization. 2007-08-27 Sandra Loosemore <sandra@codesourcery.com> David Ung <davidu@mips.com> Nigel Stephens <nigel@mips.com> gcc/ Separate target-specific initialization from general back-end initialization. * toplev.c (init_alignments): New, split out from... (process_options): ...here. (backend_init_target): New, split out from... (backend_init): ...here. (lang_dependent_init_target): New, split out from... (lang_dependent_init): ...here. (target_reinit): New. * toplev.h (target_reinit): Declare. * expr.c (init_expr_target): Renamed from init_expr_once, since it now can be called more than once. Update comments. * expr.h (init_expr_target): Likewise. * alias.c (init_alias_target): Renamed from init_alias_once, since it now can be called more than once. Explicitly zero static_reg_base_value. * emit-rtl.c (init_emit_regs): New, split out from... (init_emit_once): Here. * regclass.c (initial_fixed_regs, initial_call_used_regs): Make non-const, so that changes from command-line arguments can overwrite values provided by the static initializers. (initial_call_really_used_regs): New, used similarly to the above. (initial_reg_names): Likewise. (last_mode_for_init_move_cost): Promoted function-local static to file-scope static to make it accessible outside init_move_cost. (init_reg_sets): Do not initialize fixed_regs and call_used_regs yet. Do not initialize inv_reg_alloc_order yet, either. Do initialize reg_names since it is needed for parsing command-line options. (init_move_cost): Use last_mode_for_init_move_cost instead of function-local static. (init_reg_sets_1): Initialize fixed_regs, call_used_regs, and call_really_used_regs now. Reinitialize reg_names. Also initialize inv_reg_alloc_order. Zero reg_class_subunion and reg_class_superunion. Clear losing_caller_save_reg_set. Preserve global registers if called more than once. Reset move cost, may_move_in_cost, may_move_out_cost, and last_mode_for_init_move_cost. (init_reg_modes_target): Renamed from init_reg_modes_once, since it can now be invoked more than once. Update comments. (init_regs): Update comments. (fix_register): Update initial_fixed_regs, initial_call_used_regs, and initial_call_really_used_regs, instead of the non-initial variables. This allows us to save the command-line register settings after target reinitialization. (init_reg_autoinc): Zero forbidden_inc_dec_classes. * rtl.h (init_emit_regs): Declare. (init_reg_modes_target, init_alias_target): Renamed as described above. * reload1.c (init_reload): Update comments. * optabs.c (init_optabs): Likewise. * cfgloopanal.c (init_set_costs): Explicitly zero target_avail_regs. Co-Authored-By: David Ung <davidu@mips.com> Co-Authored-By: Nigel Stephens <nigel@mips.com> From-SVN: r127832
2007-08-27 15:34:14 +02:00
init_reg_modes_target (void)
{
alias.c (record_set): Use hard_regno_nregs. * alias.c (record_set): Use hard_regno_nregs. * bt-load.c (find_btr_reference, note_btr_set): Likewise. * builtins.c (apply_args_size): Likewise. * caller-save.c (setup_save_areas, save_call_clobbered_regs, mark_set_regs, add_stored_regs, mark_referenced_regs, insert_restore, insert_save, insert_one_insn): Likewise. * cfgcleanup.c: Include regs.h (mark_effect, mentions_nonequal_regs): Likewise. * cfgrtl.c (mark_killed_regs): Likewise * combine.c (update_table_tick, record_value_for_reg, record_dead_and_set_regs, get_last_value_validate, use_crosses_set_p, reg_dead_at_p_1, reg_dead_at_p, mark_used_regs_combine, move_deaths, reg_bitfield_target_p, distribute_notes): Likewise. * cse.c (mention_regs, insert, invalidate, invalidate_for_call, exp_equiv_p, cse_insn): Likewise. * cselib.c (cselib_lookup): Likewise. (cselib_invalidate_regno, cselib_record_set): Likewise. * df.c (df_ref_record): Likewise. * dwarf2out.c (reg_loc_descriptor, multiple_reg_loc_descriptor): Likewise. * flow.c (mark_reg, insn_dead_p, mark_set_1, mark_used_reg, count_or_remove_death_notes_bb): Likewise. * function.c (aggregate_value_p, keep_stack_depressed): Likewise. * gloval.c (global_alloc, find_reg, mark_reg_store, mark_reg_conflicts, mark_reg_death, set_preference, reg_becomes_live, reg_dies): Likewise. * integrate.c (mark_stores): Likewise. * jump.c (delete_prior_computation): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (combine_regs, find_free_reg, post_mark_life): Likewise. * loop.c (LOOP_REGNO_NREGS): Likewise. * postreload.c (reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * ra-colorize.c (combine, color_usable_p, get_free_reg, calculate_dont_begin, calculate_dont_begin, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias): Likewise. * ra-debug.c: Include regs.h (ra_print_rtx_object): Likewise. * ra-rewrite (choose_spill_colors): Likewise. (spill_same_color_p, update_spill_colors, spill_is_free): Likewise. * ra.c (init_ra): Likewise. * recog.c (reg_fits_class_p, peep2_reg_dead_p, peep2_find_free_register): Likewise. * reg-stack.c (subst_stack_regs_pat, convert_regs_exit): Likewise. * regclass.c (hard_regno_nregs): New array. (init_reg_modes_once): Initialize it. (choose_hard_reg_mode): Use it. (record_reg_classes): Likewise. * regmove.c (mark_flags_life_zones): Likewise. * regrename.c (note_sets, clear_dead_regs, regrename_optimize, scan_rtx_reg, dump_def_use_chain, kill_value, set_value_regno, copy_value, maybe_mode_change, find_oldest_value_reg, copyprop_hardreg_forward_1): * regs.h (hard_regno_nregs): Declare. * realod.c (reload_inner_reg_of_subreg): Use it. (push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, refers_to_regno_for_reload_p, find_equiv_reg, regno_clobbered_p, reload_adjust_reg_for_mode): Likewise. * reload1.c (compute_use_by_pseudos, count_pseudo, count_spilled_pseudo, find_reg, find_reload_regs, mark_home_live, spill_hard_reg, forget_old_reloads_1, mark_reload_reg_in_use, clear_reload_reg_in_use, reload_reg_free_for_value_p, free_for_value_p allocate_reload_reg, choose_reload_regs, emit_reload_insns, delete_output_reload): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c: Include regs.h (refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, subreg_regno_offset, subreg_offset_representable_p, hoist_test_store): Likewise. * sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise. * sched-rgn.c (check_live_1, update_live_1): Likewise. * stmt.c: Include regs.h (decl_conflicts_with_clobbers_p): Likewise. * varasm.c (make_decl_rtl): Likewise. * Makefile.in (cfgcleanup.o, rtlanal.o, ra-debug.o): Add regs.h dependnecy. From-SVN: r77088
2004-02-02 01:17:18 +01:00
int i, j;
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
for (j = 0; j < MAX_MACHINE_MODE; j++)
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
hard_regno_nregs[i][j] = HARD_REGNO_NREGS (i, (machine_mode)j);
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
{
reg_raw_mode[i] = choose_hard_reg_mode (i, 1, false);
/* If we couldn't find a valid mode, just use the previous mode
if it is suitable, otherwise fall back on word_mode. */
if (reg_raw_mode[i] == VOIDmode)
{
if (i > 0 && hard_regno_nregs[i][reg_raw_mode[i - 1]] == 1)
reg_raw_mode[i] = reg_raw_mode[i - 1];
else
reg_raw_mode[i] = word_mode;
}
}
}
Separate target-specific initialization from general back-end initialization. 2007-08-27 Sandra Loosemore <sandra@codesourcery.com> David Ung <davidu@mips.com> Nigel Stephens <nigel@mips.com> gcc/ Separate target-specific initialization from general back-end initialization. * toplev.c (init_alignments): New, split out from... (process_options): ...here. (backend_init_target): New, split out from... (backend_init): ...here. (lang_dependent_init_target): New, split out from... (lang_dependent_init): ...here. (target_reinit): New. * toplev.h (target_reinit): Declare. * expr.c (init_expr_target): Renamed from init_expr_once, since it now can be called more than once. Update comments. * expr.h (init_expr_target): Likewise. * alias.c (init_alias_target): Renamed from init_alias_once, since it now can be called more than once. Explicitly zero static_reg_base_value. * emit-rtl.c (init_emit_regs): New, split out from... (init_emit_once): Here. * regclass.c (initial_fixed_regs, initial_call_used_regs): Make non-const, so that changes from command-line arguments can overwrite values provided by the static initializers. (initial_call_really_used_regs): New, used similarly to the above. (initial_reg_names): Likewise. (last_mode_for_init_move_cost): Promoted function-local static to file-scope static to make it accessible outside init_move_cost. (init_reg_sets): Do not initialize fixed_regs and call_used_regs yet. Do not initialize inv_reg_alloc_order yet, either. Do initialize reg_names since it is needed for parsing command-line options. (init_move_cost): Use last_mode_for_init_move_cost instead of function-local static. (init_reg_sets_1): Initialize fixed_regs, call_used_regs, and call_really_used_regs now. Reinitialize reg_names. Also initialize inv_reg_alloc_order. Zero reg_class_subunion and reg_class_superunion. Clear losing_caller_save_reg_set. Preserve global registers if called more than once. Reset move cost, may_move_in_cost, may_move_out_cost, and last_mode_for_init_move_cost. (init_reg_modes_target): Renamed from init_reg_modes_once, since it can now be invoked more than once. Update comments. (init_regs): Update comments. (fix_register): Update initial_fixed_regs, initial_call_used_regs, and initial_call_really_used_regs, instead of the non-initial variables. This allows us to save the command-line register settings after target reinitialization. (init_reg_autoinc): Zero forbidden_inc_dec_classes. * rtl.h (init_emit_regs): Declare. (init_reg_modes_target, init_alias_target): Renamed as described above. * reload1.c (init_reload): Update comments. * optabs.c (init_optabs): Likewise. * cfgloopanal.c (init_set_costs): Explicitly zero target_avail_regs. Co-Authored-By: David Ung <davidu@mips.com> Co-Authored-By: Nigel Stephens <nigel@mips.com> From-SVN: r127832
2007-08-27 15:34:14 +02:00
/* Finish initializing the register sets and initialize the register modes.
This function might be invoked more than once, if the target has support
for changing register usage conventions on a per-function basis.
*/
void
init_regs (void)
{
/* This finishes what was started by init_reg_sets, but couldn't be done
until after register usage was specified. */
init_reg_sets_1 ();
}
tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. 2008-01-29 Vladimir Makarov <vmakarov@redhat.com> * doc/tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. * doc/passes.texi: Remove entries about regclass, local-alloc, and global. Modify entries about regmove and IRA. * ra-conflict.c: Remove the file. * reload.c (push_reload, find_dummy_reload): Remove flag_ira. * tree-pass.h (pass_local_alloc, pass_global_alloc): Remove. (pass_regclass_init): Rename to pass_reginfo_init. * cfgloopanal.c (estimate_reg_pressure_cost): Remove flag_ira. * toplev.h (flag_ira): Remove. * caller-save.c (setup_save_areas): Remove flag_ira. * ira-color.c (ira_reuse_stack_slot, ira_mark_new_stack_slot): Ditto. * global.c: Remove the file. * opts.c: (decode_options): Remove flag_ira. * hard-reg-set.h (losing_caller_save_reg_set): Remove. * regmove.c: Modify file description. (find_use_as_address, try_auto_increment): Define them only if AUTO_INC_DEC is defined. (replacement_quality, replace_in_call_usage, fixup_match_1, stable_and_no_regs_but_for_p): Remove. (reg_set_in_bb): Make it static. (regmove_optimize): Remove flag_ira and code which worked for !flag_ira. * local-alloc.c: Remove the file. * common.opt (fira): Remove. * ira.c: Include except.h. (eliminable_regset): Move from global.c. (mark_elimination): Ditto. Remove flag_ira. (reg_renumber, struct equivalence, reg_equiv, equiv_mem, equiv_mem_modified, validate_equiv_mem_from_store, validate_equiv_mem, equiv_init_varies_p, equiv_init_movable_p, contains_replace_regs, memref_referenced_p, memref_used_between_p, no_equiv, recorded_label_ref): Move from local-alloc.c. (update_equiv_regs): Ditto. Make it static. (print_insn_chain, print_insn_chains): Move it from global.c. pseudo_for_reload_consideration_p): Ditto. Remove flag_ira. (build_insn_chain): Ditto. Make it static. (ra_init_live_subregs): Move from ra-conflict.c. Make it static. Rename to init_live_subregs. (gate_ira): Remove flag_ira. * regclass.c: Rename reginfo.c. Change file description. (FORBIDDEN_INC_DEC_CLASSES): Remove. (reg_class_superclasses, forbidden_inc_dec_class, in_inc_dec): Remove. (init_reg_sets_1): Remove code for evaluation of reg_class_superclasses and losing_caller_save_reg_set. (init_regs): Remove init_reg_autoinc. (struct costs, costs, init_cost, ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): Remove. (regclass_init): Rename to reginfo_init. Don't initialize init_cost. (pass_regclass_init): Rename to pass_reginfo_init. Modify corresponding entries. (dump_regclass, record_operand_costs, scan_one_insn, init_reg_autoinc, regclass, record_reg_classes, copy_cost, record_address_regs, auto_inc_dec_reg_p): Remove. (gt-regclass.h): Rename to gt-reginfo.h. * rtl.h (dump_global_regs, retry_global_alloc, build_insn_chain, dump_local_alloc, update_equiv_regs): Remove. * Makefile.in (RA_H): Remove. (OBJS-common): Remove global.o, local-alloc.o, and ra-conflict.o. Rename regclass.o to reginfo.o. (regclass.o): Rename to reginfo.o. Rename gt-regclass.h to gt-reginfo.h. (global.o, local-alloc.o, ra-conflict.o): Remove entries. (GTFILES): Rename regclass.c to reginfo.c. * passes.c (init_optimization_passes): Remove pass_local_alloc and pass_global_alloc. Rename pass_regclass_init to pass_reginfo_init. * reload1.c (compute_use_by_pseudos, reload, count_pseudo, count_spilled_pseudo, find_reg, alter_reg, delete_output_reload): Remove flag_ira. (finish_spills): Ditto. Remove code for !flga_ira. From-SVN: r143757
2009-01-29 15:51:46 +01:00
/* The same as previous function plus initializing IRA. */
void
reinit_regs (void)
{
init_regs ();
/* caller_save needs to be re-initialized. */
caller_save_initialized_p = false;
if (this_target_rtl->target_specific_initialized)
{
ira_init ();
recog_init ();
}
}
/* Initialize some fake stack-frame MEM references for use in
memory_move_secondary_cost. */
void
init_fake_stack_mems (void)
{
tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. 2008-01-29 Vladimir Makarov <vmakarov@redhat.com> * doc/tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. * doc/passes.texi: Remove entries about regclass, local-alloc, and global. Modify entries about regmove and IRA. * ra-conflict.c: Remove the file. * reload.c (push_reload, find_dummy_reload): Remove flag_ira. * tree-pass.h (pass_local_alloc, pass_global_alloc): Remove. (pass_regclass_init): Rename to pass_reginfo_init. * cfgloopanal.c (estimate_reg_pressure_cost): Remove flag_ira. * toplev.h (flag_ira): Remove. * caller-save.c (setup_save_areas): Remove flag_ira. * ira-color.c (ira_reuse_stack_slot, ira_mark_new_stack_slot): Ditto. * global.c: Remove the file. * opts.c: (decode_options): Remove flag_ira. * hard-reg-set.h (losing_caller_save_reg_set): Remove. * regmove.c: Modify file description. (find_use_as_address, try_auto_increment): Define them only if AUTO_INC_DEC is defined. (replacement_quality, replace_in_call_usage, fixup_match_1, stable_and_no_regs_but_for_p): Remove. (reg_set_in_bb): Make it static. (regmove_optimize): Remove flag_ira and code which worked for !flag_ira. * local-alloc.c: Remove the file. * common.opt (fira): Remove. * ira.c: Include except.h. (eliminable_regset): Move from global.c. (mark_elimination): Ditto. Remove flag_ira. (reg_renumber, struct equivalence, reg_equiv, equiv_mem, equiv_mem_modified, validate_equiv_mem_from_store, validate_equiv_mem, equiv_init_varies_p, equiv_init_movable_p, contains_replace_regs, memref_referenced_p, memref_used_between_p, no_equiv, recorded_label_ref): Move from local-alloc.c. (update_equiv_regs): Ditto. Make it static. (print_insn_chain, print_insn_chains): Move it from global.c. pseudo_for_reload_consideration_p): Ditto. Remove flag_ira. (build_insn_chain): Ditto. Make it static. (ra_init_live_subregs): Move from ra-conflict.c. Make it static. Rename to init_live_subregs. (gate_ira): Remove flag_ira. * regclass.c: Rename reginfo.c. Change file description. (FORBIDDEN_INC_DEC_CLASSES): Remove. (reg_class_superclasses, forbidden_inc_dec_class, in_inc_dec): Remove. (init_reg_sets_1): Remove code for evaluation of reg_class_superclasses and losing_caller_save_reg_set. (init_regs): Remove init_reg_autoinc. (struct costs, costs, init_cost, ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): Remove. (regclass_init): Rename to reginfo_init. Don't initialize init_cost. (pass_regclass_init): Rename to pass_reginfo_init. Modify corresponding entries. (dump_regclass, record_operand_costs, scan_one_insn, init_reg_autoinc, regclass, record_reg_classes, copy_cost, record_address_regs, auto_inc_dec_reg_p): Remove. (gt-regclass.h): Rename to gt-reginfo.h. * rtl.h (dump_global_regs, retry_global_alloc, build_insn_chain, dump_local_alloc, update_equiv_regs): Remove. * Makefile.in (RA_H): Remove. (OBJS-common): Remove global.o, local-alloc.o, and ra-conflict.o. Rename regclass.o to reginfo.o. (regclass.o): Rename to reginfo.o. Rename gt-regclass.h to gt-reginfo.h. (global.o, local-alloc.o, ra-conflict.o): Remove entries. (GTFILES): Rename regclass.c to reginfo.c. * passes.c (init_optimization_passes): Remove pass_local_alloc and pass_global_alloc. Rename pass_regclass_init to pass_reginfo_init. * reload1.c (compute_use_by_pseudos, reload, count_pseudo, count_spilled_pseudo, find_reg, alter_reg, delete_output_reload): Remove flag_ira. (finish_spills): Ditto. Remove code for !flga_ira. From-SVN: r143757
2009-01-29 15:51:46 +01:00
int i;
Fix enum conversions which are invalid in C++: gcc/: Fix enum conversions which are invalid in C++: * auto-inc-dec.c (attempt_change): Change 0 to SET in function call. * calls.c (store_one_arg): Change 0 to EXPAND_NORMAL in function call. * cse.c (hash_rtx_cb): Change 0 to VOIDmode in function call. * dbgcnt.c (dbg_cnt_set_limit_by_name): Add cast to enum type. * dbxout.c (dbxout_symbol): Change 0 to VOIDmode in function call. (dbxout_parms): Likewise. * df-core.c (df_set_flags): Change changeable_flags parameter to int. (df_clear_flags): Likewise. * df-problems.c (df_rd_bb_local_compute_process_def): Change top_flag parameter to int. (df_chain_create_bb_process_use): Likewise. (df_chain_add_problem): Change chain_flags parameter to unsigned int. Remove cast. * df-scan.c (df_ref_create): Change ref_flags parameter to int. (df_ref_create_structure, df_def_record_1): Likewise. (df_defs_record, df_uses_record, df_get_call_refs): Likewise. (df_notes_rescan): Change 0 to VOIDmode in function call. (df_get_call_refs, df_insn_refs_collect): Likewise. (df_bb_regs_collect): Likewise. (df_entry_block_defs_collect): Likewise. (df_exit_block_uses_collect): Likewise. * df.h: Update declarations. * double-int.c (double_int_divmod): Add cast to enum type. * dse.c (replace_inc_dec): Reverse parameters to gen_int_mode. * dwarf2out.c (new_reg_loc_descr): Add casts to enum type. (based_loc_descr): Likewise. (loc_descriptor_from_tree_1): Change first_op and second_op to enum dwarf_location_atom. Add cast to enum type. * expmed.c (init_expmed): Change 0 to SET in function call. * expr.c (init_expr_target): Change 0 to VOIDmode in function call. (expand_expr_real_1): Change 0 to EXPAND_NORMAL in function call. (do_store_flag): Likewise. * fixed-value.h (struct fixed_value): Change mode to enum machine_mode. * function.c (assign_parms): Change 0 to VOIDmode in function call. * genautomata.c (insert_automaton_decl): Change 1 to INSERT in function call. (insert_insn_decl, insert_decl, insert_state): Likewise. (automata_list_finish): Likewise. * genrecog.c (process_define_predicate): Add cast to enum type. * gensupport.c (init_predicate_table): Add cast to enum type. * gimple.c (gimple_build_return): Change 0 to ERROR_MARK in function call. (gimple_build_call_1, gimple_build_label): Likewise. (gimple_build_goto, gimple_build_asm_1): Likewise. (gimple_build_switch_1, gimple_build_cdt): Likewise. * gimple.h (GIMPLE_CHECK): Change 0 to ERROR_MARK in function call. (enum fallback): Rename from enum fallback_t. (fallback_t): Typedef as int. * gimple-low.c (lower_builtin_setjmp): Change TSI_SAME_STMT to GSI_SAME_STMT in function call. * ira.c (setup_class_subset_and_memory_move_costs): Add casts to enum type. (setup_reg_class_relations): Likewise. (setup_reg_class_nregs): Change cl to int. Add casts to enum type. (setup_prohibited_class_mode_regs): Add cast to enum type. (setup_prohibited_mode_move_regs): Likewise. * ira-costs.c (record_reg_classes): Change rclass to enum reg_class. (record_address_regs): Change i to enum reg_class. * lists.c (alloc_EXPR_LIST): Add cast to enum type. * machmode.h (GET_MODE_CLASS): Cast value to enum mode_class. (GET_MODE_WIDER_MODE): Cast value to enum machine_mode. (GET_MODE_2XWIDER_MODE): Likewise. (GET_CLASS_NARROWEST_MODE): Likewise. * omp-low.c (expand_omp_for): Add cast to enum type. * optabs.c (debug_optab_libfuncs): Add casts to enum type. * opts.c (enable_warning_as_error): Change kind to diagostic_t. * postreload.c (reload_cse_simplify_operands): Change rclass local to enum reg_class. * predict.c (combine_predictions_for_insn): Change best_predictor and predictor to enum br_predictor. (combine_predictions_for_bb): Likewise. (build_predict_expr): Change assignment to PREDICT_EXPR_OUTCOME to use SET_PREDICT_EXPR_OUTCOME. * real.c (real_arithmetic): Change icode to code in function call. * reginfo.c (init_move_cost): Add casts to enum type. (init_reg_sets_1, init_fake_stack_mems): Likewise. * regmove.c (regclass_compatible_p): Change class0 and class1 to enum reg_class. * reload.c (find_valid_class): Add casts to enum type. (push_reload): Change 0 to NO_REGS in function call. (find_reloads): Change this_alternative to array of enum reg_class. Remove some now-unnecessary casts. (make_memloc): Change 0 to VOIDmode in function call. * reload1.c (reload): Change 0 to VOIDmode in function call. (eliminate_regs_1, elimination_effects): Likewise. (eliminate_regs_in_insn): Likewise. (emit_input_reload_insns): Add cast to enum type. (delete_output_reload): Change 0 to VOIDmode in function call. * reorg.c (insn_sets_resource_p): Convert include_delayed_effects to enum type in function call. * tree.h (PREDICT_EXPR_OUTCOME): Add cast to enum type. (SET_PREDICT_EXPR_OUTCOME): Define. * tree-dump.c (get_dump_file_info): Change phase parameter to int. (get_dump_file_name, dump_begin, dump_enabled_p): Likewise. (dump_initialized_p, dump_flag_name, dump_end): Likewise. (dump_function): Likewise. * tree-dump.h: Update declarations. * tree-pass.h: Update declarations. * varasm.c (assemble_integer): Change mclass to enum mode_class. * config/arm/arm.c (thumb_legitimize_reload_address): Add cast to enum type. (arm_rtx_costs_1): Correct parenthesization. (arm_rtx_costs): Add casts to enum type. (adjacent_mem_locations): Reverse arguments to const_ok_for_op. (vfp_emit_fstmd): Use add_rg_note. (emit_multi_reg_push, emit_sfm): Likewise. (thumb_set_frame_pointer): Likewise. (arm_expand_prologue): Likewise. (arm_regno_class): Change return type to enum reg_class. (thumb1_expand_prologue): Use add_reg_note. * config/arm/arm-protos.h (arm_regno_class): Update declaration. * config/arm/arm.h (INITIALIZE_TRAMPOLINE): Change 0 to LCT_NORMAL in function call. * config/arm/gentune.sh: Add cast to enum type. * config/arm/arm-tune.md: Rebuild. * config/i386/i386.c (ix86_expand_prologue): Use add_reg_note. (ix86_split_fp_branch, predict_jump): Likewise. (ix86_expand_multi_arg_builtin): Change sub_code from enum insn_code to enum rtx_code. (ix86_builtin_vectorized_function): Add cast to enum type. * config/i386/i386.md (truncdfsf2): Change slot to enum ix86_stack_slot. (truncxf<mode>2, isinf<mode>2): Likewise. * config/i386/i386-c.c (ix86_pragma_target_parse): Add cast to enum type. * config/ia64/ia64.c (ia64_split_tmode_move): Use add_reg_note. (spill_restore_mem, do_spill, ia64_expand_prologue): Likewise. (insert_bundle_state): Change 1 to INSERT in function call. (ia64_add_bundle_selector_before): Likewise. * config/ia64/ia64.md (cpu attr): Add cast to enum type. (save_stack_nonlocal): Change 0 to LCT_NORMAL in function call. (restore_stack_nonlocal): Likewise. * config/mips/mips.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in function call. * config/mips/mips.c (mips_binary_cost): Change 0 to SET in function call. (mips_rtx_costs): Likewise. (mips_override_options): Add casts to enum type. * config/mips/sdemtk.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in function call. * config/pa/pa.c (legitimize_pic_address): Use add_reg_note. (store_reg, set_reg_plus_d): Likewise. (hppa_expand_prologue, hppa_profile_hook): Likewise. * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Add cast to enum type. (altivec_expand_vec_set_builtin): Change 0 to EXPAND_NORMAL in function call. (emit_unlikely_jump): Use add_reg_note. (rs6000_emit_allocate_stack): Likewise. (rs6000_frame_related, rs6000_emit_prologue): Likewise. (output_toc): Change 1 to INSERT in function call. (output_profile_hook): Change 0 to LCT_NORMAL in function call. (rs6000_initialize_trampoline): Likewise. (rs6000_init_dwarf_reg_sizes_extra): Change 0 to EXPAND_NORMAL in function call. * config/s390/s390.c (s390_rtx_costs): Add cast to enum type. (s390_expand_movmem): Change 0 to OPTAB_DIRECT in function call. (s390_expand_setmem, s390_expand_cmpmem): Likewise. (save_gprs): Use add_reg_note. (s390_emit_prologue): Likewise. (s390_expand_builtin): Change 0 to EXPAND_NORMAL in function call. * config/sparc/sparc.c (sparc_expand_prologue): Use add_reg_note. (sparc_fold_builtin): Add cast to enum type. * config/spu/spu.c (spu_emit_branch_or_set): Change ior_code to enum insn_code. (spu_expand_prologue): Use add_reg_note. (expand_builtin_args): Change 0 to EXPAND_NORMAL in function call. * c-parser.c (c_parser_attributes): Change VEC back to tree list. (c_parser_postfix_expression_after_primary): Get VEC for list of arguments. Get original types of arguments. Call build_function_call_vec. (cached_expr_list_1, cached_expr_list_2): New static variables. (c_parser_expr_list): Change return type to VEC *. Add p_orig_types parameter. Change all callers. (c_parser_release_expr): New static function. (c_parser_vec_to_tree_list): New static function. * c-typeck.c (build_function_call): Rewrite to build a VEC and call build_function_call_vec. (build_function_call_vec): New function, based on old build_function_call. (convert_arguments): Remove nargs and argarray parameters. Change values to a VEC. Add origtypes parameter. (build_modify_expr): Add rhs_origtype parameter. Change all callers. (convert_for_assignment): Add origtype parameter. Change all callers. If warn_cxx_compat, check for conversion to an enum type when calling a function. (store_init_value): Add origtype parameter. Change all callers. (digest_init): Likewise. (struct init_node): Add origtype field. (add_pending_init): Add origtype parameter. Change all callers. (output_init_element): Likewise. (output_pending_init_elements): Pass origtype from init_node to output_init_element. (process_init_elemnt): Pass origtype from c_expr to output_init_element. (c_finish_return): Add origtype parameter. Change all callers. * c-common.c (sync_resolve_size): Change params to VEC *. Change caller. (sync_resolve_params): Likewise. (sync_resolve_return): Change params to first_param. Change caller. (resolve_overloaded_builtins): Change params to VEC *. Change callers. Save first parameter around call to build_function_call_vec. * c-decl.c (finish_decl): Add origtype parameter. Change all callers. Call build_function_call_vec rather than build_function_call for cleanup. * c-tree.h: Update declarations. * c-common.h: Update declarations. * stub-objc.c (objc_rewrite_function_call): Change parameter from params to first_param. * target.h (struct gcc_target): Change resolve_overloaded_builtin params parameter from tree to void *. * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Change arglist parameter to have type void *, and to be a pointer to a VEC. * config/rs6000/rs6000-protos.h (altivec_resolve_overloaded_builtin): Update declaration. * config/spu/spu-c.c (spu_resolved_overloaded_builtin): Change fnargs parameter to have type void *, and to be a pointer to a VEC. Call build_function_call_vec instead of build_function_call. * config/spu/spu-protos.h (spu_expand_builtin): Update declaration. gcc/cp/: * typeck.c (build_function_call_vec): New function. (cp_build_function_call): Only pass first parameter to objc_rewrite_function_call. (build_modify_expr): Add rhs_origtype parameter. Change all callers. * decl.c (finish_decl): Add origtype parameter. Change all callers. * semantics.c (finish_call_expr): Pass VEC to resolve_overloaded_builtin. gcc/objc: * objc-act.c (objc_rewrite_function_call): Change parameter from params to first_param. Change all callers. gcc/testsuite: * gcc.dg/Wcxx-compat-3.c: New testcase. From-SVN: r146451
2009-04-20 21:35:00 +02:00
tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. 2008-01-29 Vladimir Makarov <vmakarov@redhat.com> * doc/tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. * doc/passes.texi: Remove entries about regclass, local-alloc, and global. Modify entries about regmove and IRA. * ra-conflict.c: Remove the file. * reload.c (push_reload, find_dummy_reload): Remove flag_ira. * tree-pass.h (pass_local_alloc, pass_global_alloc): Remove. (pass_regclass_init): Rename to pass_reginfo_init. * cfgloopanal.c (estimate_reg_pressure_cost): Remove flag_ira. * toplev.h (flag_ira): Remove. * caller-save.c (setup_save_areas): Remove flag_ira. * ira-color.c (ira_reuse_stack_slot, ira_mark_new_stack_slot): Ditto. * global.c: Remove the file. * opts.c: (decode_options): Remove flag_ira. * hard-reg-set.h (losing_caller_save_reg_set): Remove. * regmove.c: Modify file description. (find_use_as_address, try_auto_increment): Define them only if AUTO_INC_DEC is defined. (replacement_quality, replace_in_call_usage, fixup_match_1, stable_and_no_regs_but_for_p): Remove. (reg_set_in_bb): Make it static. (regmove_optimize): Remove flag_ira and code which worked for !flag_ira. * local-alloc.c: Remove the file. * common.opt (fira): Remove. * ira.c: Include except.h. (eliminable_regset): Move from global.c. (mark_elimination): Ditto. Remove flag_ira. (reg_renumber, struct equivalence, reg_equiv, equiv_mem, equiv_mem_modified, validate_equiv_mem_from_store, validate_equiv_mem, equiv_init_varies_p, equiv_init_movable_p, contains_replace_regs, memref_referenced_p, memref_used_between_p, no_equiv, recorded_label_ref): Move from local-alloc.c. (update_equiv_regs): Ditto. Make it static. (print_insn_chain, print_insn_chains): Move it from global.c. pseudo_for_reload_consideration_p): Ditto. Remove flag_ira. (build_insn_chain): Ditto. Make it static. (ra_init_live_subregs): Move from ra-conflict.c. Make it static. Rename to init_live_subregs. (gate_ira): Remove flag_ira. * regclass.c: Rename reginfo.c. Change file description. (FORBIDDEN_INC_DEC_CLASSES): Remove. (reg_class_superclasses, forbidden_inc_dec_class, in_inc_dec): Remove. (init_reg_sets_1): Remove code for evaluation of reg_class_superclasses and losing_caller_save_reg_set. (init_regs): Remove init_reg_autoinc. (struct costs, costs, init_cost, ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): Remove. (regclass_init): Rename to reginfo_init. Don't initialize init_cost. (pass_regclass_init): Rename to pass_reginfo_init. Modify corresponding entries. (dump_regclass, record_operand_costs, scan_one_insn, init_reg_autoinc, regclass, record_reg_classes, copy_cost, record_address_regs, auto_inc_dec_reg_p): Remove. (gt-regclass.h): Rename to gt-reginfo.h. * rtl.h (dump_global_regs, retry_global_alloc, build_insn_chain, dump_local_alloc, update_equiv_regs): Remove. * Makefile.in (RA_H): Remove. (OBJS-common): Remove global.o, local-alloc.o, and ra-conflict.o. Rename regclass.o to reginfo.o. (regclass.o): Rename to reginfo.o. Rename gt-regclass.h to gt-reginfo.h. (global.o, local-alloc.o, ra-conflict.o): Remove entries. (GTFILES): Rename regclass.c to reginfo.c. * passes.c (init_optimization_passes): Remove pass_local_alloc and pass_global_alloc. Rename pass_regclass_init to pass_reginfo_init. * reload1.c (compute_use_by_pseudos, reload, count_pseudo, count_spilled_pseudo, find_reg, alter_reg, delete_output_reload): Remove flag_ira. (finish_spills): Ditto. Remove code for !flga_ira. From-SVN: r143757
2009-01-29 15:51:46 +01:00
for (i = 0; i < MAX_MACHINE_MODE; i++)
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
top_of_stack[i] = gen_rtx_MEM ((machine_mode) i, stack_pointer_rtx);
}
2010-06-27 13:40:42 +02:00
/* Compute cost of moving data from a register of class FROM to one of
TO, using MODE. */
int
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
register_move_cost (machine_mode mode, reg_class_t from, reg_class_t to)
2010-06-27 13:40:42 +02:00
{
return targetm.register_move_cost (mode, from, to);
}
/* Compute cost of moving registers to/from memory. */
int
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
memory_move_cost (machine_mode mode, reg_class_t rclass, bool in)
{
return targetm.memory_move_cost (mode, rclass, in);
}
/* Compute extra cost of moving registers to/from memory due to reloads.
Only needed if secondary reloads are required for memory moves. */
int
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
memory_move_secondary_cost (machine_mode mode, reg_class_t rclass,
bool in)
{
reg_class_t altclass;
int partial_cost = 0;
/* We need a memory reference to feed to SECONDARY... macros. */
/* mem may be unused even if the SECONDARY_ macros are defined. */
Makefile.in (toplev.o): Depend on loop.h. * Makefile.in (toplev.o): Depend on loop.h. * dwarfout.c: Include tm_p.h. * emit-rtl.c (restore_emit_status): Mark parameter with ATTRIBUTE_UNUSED. * final.c (final_scan_insn): Likewise. * flow.c (flow_nodes_print, flow_exits_print, flow_loops_cfg_dump, flow_loop_nested_p, flow_loop_exits_find, flow_loop_nodes_find, flow_depth_first_order_compute, flow_loop_pre_header_find, flow_loop_tree_node_add, flow_loops_tree_build, flow_loop_level_compute, flow_loops_level_compute, flow_loop_outside_edge_p): Add prototypes. (recompute_reg_usage): Mark parameters with ATTRIBUTE_UNUSED. * ggc-callbacks.c (lang_mark_tree, lang_mark_false_label_stack): Mark with ATTRIBUTE_NORETURN. * hash.c (hash_newfunc): Mark parameter with ATTRIBUTE_UNUSED. * local-alloc.c (no_conflict_p): Likewise. * loop.c (insert_bct): Hide definitions of variables with hidden usage. (note_reg_stored): Mark parameter with ATTRIBUTE_UNUSED. * regclass.c (memory_move_secondary_cost): Mark variable `mem' with ATTRIBUTE_UNUSED. (record_reg_classes): Mark parameter with ATTRIBUTE_UNUSED. (reg_scan): Likewise. * reload.c (find_reloads): Remove unused variables `changed'. * reload1.c (reload_reg_class_lower): Don't unnecessarily cast away const-ness. (allocate_reload_reg): Mark parameter with ATTRIBUTE_UNUSED. Remove unused variable `insn'. * toplev.c: Include loop.h. (report_file_and_line): Remove unnecessary prototype. * tree.c (build_block): Mark parameter with ATTRIBUTE_UNUSED. * unroll.c (biv_total_increment): Likewise. From-SVN: r31085
1999-12-24 15:04:54 +01:00
rtx mem ATTRIBUTE_UNUSED = top_of_stack[(int) mode];
altclass = secondary_reload_class (in ? 1 : 0, rclass, mode, mem);
if (altclass == NO_REGS)
return 0;
if (in)
2010-06-27 13:40:42 +02:00
partial_cost = register_move_cost (mode, altclass, rclass);
else
2010-06-27 13:40:42 +02:00
partial_cost = register_move_cost (mode, rclass, altclass);
if (rclass == altclass)
/* This isn't simply a copy-to-temporary situation. Can't guess
what it is, so TARGET_MEMORY_MOVE_COST really ought not to be
calling here in that case.
ra-build.c (copy_insn_p, [...]): Use gcc_assert and gcc_unreachable instead of abort. * ra-build.c (copy_insn_p, remember_move, defuse_overlap_p_1, live_out_1, prune_hardregs_for_mode, init_one_web_common, reinit_one_web, add_subweb, add_subweb_2, init_web_parts, record_conflict, compare_and_free_webs, init_webs_defs_uses, parts_to_webs_1, parts_to_webs, reset_conflicts, check_conflict_numbers, remember_web_was_spilled, handle_asm_insn, ra_build_free): Use gcc_assert and gcc_unreachable instead of abort. * ra-colorize.c (push_list, put_web, reset_lists, put_web_at_end, put_move, remove_move, combine, select_spill, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias, restore_conflicts_from_coalesce, sort_and_combine_web_pairs, check_uncoalesced_moves): Likewise. * ra-rewrite.c (spill_coalescing, slots_overlap_p, emit_loads, reloads_to_loads, rewrite_program2, emit_colors): Likewise. * ra.c (first_hard_reg, create_insn_info, find_subweb, init_ra, check_df): Likewise. * real.c (do_add, do_multiply, do_divide, do_compare, do_fix_trunc, real_arithmetic, real_compare, real_exponent, real_ldexp, real_identical, real_to_integer, real_to_integer2, real_to_decimal, real_to_hexadecimal, real_from_integer, ten_to_ptwo, ten_to_mptwo, real_digit, real_nan, real_maxval, round_for_format, real_convert, real_to_target, real_from_target, real_hash, encode_ieee_single, encode_ieee_double, encode_ieee_extended, encode_ieee_quad, encode_vax_f, encode_vax_d, encode_vax_g, encode_i370_single, encode_i370_double, encode_c4x_single, encode_c4x_extended): Likewise. * recog.c (validate_change, validate_replace_rtx_1, asm_operand_ok, extract_insn, peep2_next_insn, peep2_reg_dead_p, peep2_find_free_register, peephole2_optimize, store_data_bypass_p, if_test_bypass_p): Likewise. * reg-stack.c (record_label_references, get_asm_operand_n_inputs, stack_result, remove_regno_note, get_hard_regnum, emit_pop_insn, emit_swap_insn, swap_to_top, move_for_stack_reg, subst_stack_regs_pat, subst_asm_stack_regs, change_stack, compensate_edge, convert_regs_1): Likewise. * regclass.c (init_reg_sets, init_reg_sets_1, memory_move_secondary_cost): Likewise. * regrename.c (note_sets, clear_dead_regs, scan_rtx_reg, scan_rtx): Likewise. * reload.c (push_secondary_reload, find_valid_class, push_reload, operands_match_p, decompose, immune_p, find_reloads, find_reloads_toplev, find_reloads_address_1, subst_reloads, copy_replacements, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (compute_use_by_pseudos, replace_pseudos_in, reload, count_pseudo, find_reg, eliminate_regs, eliminate_regs_in_insn, verify_initial_elim_offsets, finish_spills, clear_reload_reg_in_use, reload_reg_free_p, reload_reg_reaches_end_p, reloads_conflict, choose_reload_regs, merge_assigned_reloads, emit_input_reload_insns, do_output_reload, fixup_abnormal_edges): Likewise. * reorg.c (stop_search_p, emit_delay_sequence, get_jump_flags, fill_slots_from_thread, relax_delay_slots): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtl.c (copy_rtx, rtx_equal_p): Likewise. * rtlanal.c (insn_dependent_p, reg_overlap_mentioned_p, dead_or_set_p, find_reg_fusage, remove_note, replace_rtx, subreg_lsb_1, subreg_regno_offset, subreg_offset_representable_p, find_first_parameter_load, can_hoist_insn_p, hoist_update_store, hoist_insn_after, hoist_insn_to_edge, nonzero_bits1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sbitmap.c (sbitmap_difference): Likewise. * sched-deps.c (add_dependence, sched_analyze_1, sched_analyze_2, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, schedule_ebb): Likewise. * sched-rgn.c (debug_regions, compute_trg_info, schedule_region, schedule_insns): Likewise. * sched-vis.c (print_pattern): Likewise. * sdbout.c (sdbout_symbol, sdbout_toplevel_data): Likewise. * simplify-rtx.c (simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_ternary_operation, simplify_immed_subreg, simplify_subreg, simplify_gen_subreg): Likewise. * sreal.c (copy, sreal_sub, sreal_div): Likewise. * stmt.c (force_label_rtx, expand_goto, expand_asm_operands, resolve_operand_name_1, expand_return, expand_decl, expand_anon_union_decl, emit_case_bit_tests, expand_case): Likewise. * stor-layout.c (put_pending_size, smallest_mode_for_size, int_mode_for_mode, layout_decl, finish_builtin_struct, layout_type, set_sizetype, get_mode_bounds): Likewise. From-SVN: r87244
2004-09-09 19:19:16 +02:00
I'm tempted to put in an assert here, but returning this will
probably only give poor estimates, which is what we would've
had before this code anyways. */
return partial_cost;
/* Check if the secondary reload register will also need a
secondary reload. */
return memory_move_secondary_cost (mode, altclass, in) + partial_cost;
}
/* Return a machine mode that is legitimate for hard reg REGNO and large
enough to save nregs. If we can't find one, return VOIDmode.
If CALL_SAVED is true, only consider modes that are call saved. */
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode
choose_hard_reg_mode (unsigned int regno ATTRIBUTE_UNUSED,
unsigned int nregs, bool call_saved)
{
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
unsigned int /* machine_mode */ m;
machine_mode found_mode = VOIDmode, mode;
/* We first look for the largest integer mode that can be validly
held in REGNO. If none, we look for the largest floating-point mode.
If we still didn't find a valid mode, try CCmode. */
for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT);
mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode))
alias.c (record_set): Use hard_regno_nregs. * alias.c (record_set): Use hard_regno_nregs. * bt-load.c (find_btr_reference, note_btr_set): Likewise. * builtins.c (apply_args_size): Likewise. * caller-save.c (setup_save_areas, save_call_clobbered_regs, mark_set_regs, add_stored_regs, mark_referenced_regs, insert_restore, insert_save, insert_one_insn): Likewise. * cfgcleanup.c: Include regs.h (mark_effect, mentions_nonequal_regs): Likewise. * cfgrtl.c (mark_killed_regs): Likewise * combine.c (update_table_tick, record_value_for_reg, record_dead_and_set_regs, get_last_value_validate, use_crosses_set_p, reg_dead_at_p_1, reg_dead_at_p, mark_used_regs_combine, move_deaths, reg_bitfield_target_p, distribute_notes): Likewise. * cse.c (mention_regs, insert, invalidate, invalidate_for_call, exp_equiv_p, cse_insn): Likewise. * cselib.c (cselib_lookup): Likewise. (cselib_invalidate_regno, cselib_record_set): Likewise. * df.c (df_ref_record): Likewise. * dwarf2out.c (reg_loc_descriptor, multiple_reg_loc_descriptor): Likewise. * flow.c (mark_reg, insn_dead_p, mark_set_1, mark_used_reg, count_or_remove_death_notes_bb): Likewise. * function.c (aggregate_value_p, keep_stack_depressed): Likewise. * gloval.c (global_alloc, find_reg, mark_reg_store, mark_reg_conflicts, mark_reg_death, set_preference, reg_becomes_live, reg_dies): Likewise. * integrate.c (mark_stores): Likewise. * jump.c (delete_prior_computation): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (combine_regs, find_free_reg, post_mark_life): Likewise. * loop.c (LOOP_REGNO_NREGS): Likewise. * postreload.c (reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * ra-colorize.c (combine, color_usable_p, get_free_reg, calculate_dont_begin, calculate_dont_begin, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias): Likewise. * ra-debug.c: Include regs.h (ra_print_rtx_object): Likewise. * ra-rewrite (choose_spill_colors): Likewise. (spill_same_color_p, update_spill_colors, spill_is_free): Likewise. * ra.c (init_ra): Likewise. * recog.c (reg_fits_class_p, peep2_reg_dead_p, peep2_find_free_register): Likewise. * reg-stack.c (subst_stack_regs_pat, convert_regs_exit): Likewise. * regclass.c (hard_regno_nregs): New array. (init_reg_modes_once): Initialize it. (choose_hard_reg_mode): Use it. (record_reg_classes): Likewise. * regmove.c (mark_flags_life_zones): Likewise. * regrename.c (note_sets, clear_dead_regs, regrename_optimize, scan_rtx_reg, dump_def_use_chain, kill_value, set_value_regno, copy_value, maybe_mode_change, find_oldest_value_reg, copyprop_hardreg_forward_1): * regs.h (hard_regno_nregs): Declare. * realod.c (reload_inner_reg_of_subreg): Use it. (push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, refers_to_regno_for_reload_p, find_equiv_reg, regno_clobbered_p, reload_adjust_reg_for_mode): Likewise. * reload1.c (compute_use_by_pseudos, count_pseudo, count_spilled_pseudo, find_reg, find_reload_regs, mark_home_live, spill_hard_reg, forget_old_reloads_1, mark_reload_reg_in_use, clear_reload_reg_in_use, reload_reg_free_for_value_p, free_for_value_p allocate_reload_reg, choose_reload_regs, emit_reload_insns, delete_output_reload): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c: Include regs.h (refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, subreg_regno_offset, subreg_offset_representable_p, hoist_test_store): Likewise. * sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise. * sched-rgn.c (check_live_1, update_live_1): Likewise. * stmt.c: Include regs.h (decl_conflicts_with_clobbers_p): Likewise. * varasm.c (make_decl_rtl): Likewise. * Makefile.in (cfgcleanup.o, rtlanal.o, ra-debug.o): Add regs.h dependnecy. From-SVN: r77088
2004-02-02 01:17:18 +01:00
if ((unsigned) hard_regno_nregs[regno][mode] == nregs
&& HARD_REGNO_MODE_OK (regno, mode)
&& (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
&& GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
found_mode = mode;
for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT);
mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode))
alias.c (record_set): Use hard_regno_nregs. * alias.c (record_set): Use hard_regno_nregs. * bt-load.c (find_btr_reference, note_btr_set): Likewise. * builtins.c (apply_args_size): Likewise. * caller-save.c (setup_save_areas, save_call_clobbered_regs, mark_set_regs, add_stored_regs, mark_referenced_regs, insert_restore, insert_save, insert_one_insn): Likewise. * cfgcleanup.c: Include regs.h (mark_effect, mentions_nonequal_regs): Likewise. * cfgrtl.c (mark_killed_regs): Likewise * combine.c (update_table_tick, record_value_for_reg, record_dead_and_set_regs, get_last_value_validate, use_crosses_set_p, reg_dead_at_p_1, reg_dead_at_p, mark_used_regs_combine, move_deaths, reg_bitfield_target_p, distribute_notes): Likewise. * cse.c (mention_regs, insert, invalidate, invalidate_for_call, exp_equiv_p, cse_insn): Likewise. * cselib.c (cselib_lookup): Likewise. (cselib_invalidate_regno, cselib_record_set): Likewise. * df.c (df_ref_record): Likewise. * dwarf2out.c (reg_loc_descriptor, multiple_reg_loc_descriptor): Likewise. * flow.c (mark_reg, insn_dead_p, mark_set_1, mark_used_reg, count_or_remove_death_notes_bb): Likewise. * function.c (aggregate_value_p, keep_stack_depressed): Likewise. * gloval.c (global_alloc, find_reg, mark_reg_store, mark_reg_conflicts, mark_reg_death, set_preference, reg_becomes_live, reg_dies): Likewise. * integrate.c (mark_stores): Likewise. * jump.c (delete_prior_computation): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (combine_regs, find_free_reg, post_mark_life): Likewise. * loop.c (LOOP_REGNO_NREGS): Likewise. * postreload.c (reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * ra-colorize.c (combine, color_usable_p, get_free_reg, calculate_dont_begin, calculate_dont_begin, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias): Likewise. * ra-debug.c: Include regs.h (ra_print_rtx_object): Likewise. * ra-rewrite (choose_spill_colors): Likewise. (spill_same_color_p, update_spill_colors, spill_is_free): Likewise. * ra.c (init_ra): Likewise. * recog.c (reg_fits_class_p, peep2_reg_dead_p, peep2_find_free_register): Likewise. * reg-stack.c (subst_stack_regs_pat, convert_regs_exit): Likewise. * regclass.c (hard_regno_nregs): New array. (init_reg_modes_once): Initialize it. (choose_hard_reg_mode): Use it. (record_reg_classes): Likewise. * regmove.c (mark_flags_life_zones): Likewise. * regrename.c (note_sets, clear_dead_regs, regrename_optimize, scan_rtx_reg, dump_def_use_chain, kill_value, set_value_regno, copy_value, maybe_mode_change, find_oldest_value_reg, copyprop_hardreg_forward_1): * regs.h (hard_regno_nregs): Declare. * realod.c (reload_inner_reg_of_subreg): Use it. (push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, refers_to_regno_for_reload_p, find_equiv_reg, regno_clobbered_p, reload_adjust_reg_for_mode): Likewise. * reload1.c (compute_use_by_pseudos, count_pseudo, count_spilled_pseudo, find_reg, find_reload_regs, mark_home_live, spill_hard_reg, forget_old_reloads_1, mark_reload_reg_in_use, clear_reload_reg_in_use, reload_reg_free_for_value_p, free_for_value_p allocate_reload_reg, choose_reload_regs, emit_reload_insns, delete_output_reload): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c: Include regs.h (refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, subreg_regno_offset, subreg_offset_representable_p, hoist_test_store): Likewise. * sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise. * sched-rgn.c (check_live_1, update_live_1): Likewise. * stmt.c: Include regs.h (decl_conflicts_with_clobbers_p): Likewise. * varasm.c (make_decl_rtl): Likewise. * Makefile.in (cfgcleanup.o, rtlanal.o, ra-debug.o): Add regs.h dependnecy. From-SVN: r77088
2004-02-02 01:17:18 +01:00
if ((unsigned) hard_regno_nregs[regno][mode] == nregs
&& HARD_REGNO_MODE_OK (regno, mode)
&& (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
&& GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
found_mode = mode;
for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT);
mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode))
alias.c (record_set): Use hard_regno_nregs. * alias.c (record_set): Use hard_regno_nregs. * bt-load.c (find_btr_reference, note_btr_set): Likewise. * builtins.c (apply_args_size): Likewise. * caller-save.c (setup_save_areas, save_call_clobbered_regs, mark_set_regs, add_stored_regs, mark_referenced_regs, insert_restore, insert_save, insert_one_insn): Likewise. * cfgcleanup.c: Include regs.h (mark_effect, mentions_nonequal_regs): Likewise. * cfgrtl.c (mark_killed_regs): Likewise * combine.c (update_table_tick, record_value_for_reg, record_dead_and_set_regs, get_last_value_validate, use_crosses_set_p, reg_dead_at_p_1, reg_dead_at_p, mark_used_regs_combine, move_deaths, reg_bitfield_target_p, distribute_notes): Likewise. * cse.c (mention_regs, insert, invalidate, invalidate_for_call, exp_equiv_p, cse_insn): Likewise. * cselib.c (cselib_lookup): Likewise. (cselib_invalidate_regno, cselib_record_set): Likewise. * df.c (df_ref_record): Likewise. * dwarf2out.c (reg_loc_descriptor, multiple_reg_loc_descriptor): Likewise. * flow.c (mark_reg, insn_dead_p, mark_set_1, mark_used_reg, count_or_remove_death_notes_bb): Likewise. * function.c (aggregate_value_p, keep_stack_depressed): Likewise. * gloval.c (global_alloc, find_reg, mark_reg_store, mark_reg_conflicts, mark_reg_death, set_preference, reg_becomes_live, reg_dies): Likewise. * integrate.c (mark_stores): Likewise. * jump.c (delete_prior_computation): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (combine_regs, find_free_reg, post_mark_life): Likewise. * loop.c (LOOP_REGNO_NREGS): Likewise. * postreload.c (reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * ra-colorize.c (combine, color_usable_p, get_free_reg, calculate_dont_begin, calculate_dont_begin, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias): Likewise. * ra-debug.c: Include regs.h (ra_print_rtx_object): Likewise. * ra-rewrite (choose_spill_colors): Likewise. (spill_same_color_p, update_spill_colors, spill_is_free): Likewise. * ra.c (init_ra): Likewise. * recog.c (reg_fits_class_p, peep2_reg_dead_p, peep2_find_free_register): Likewise. * reg-stack.c (subst_stack_regs_pat, convert_regs_exit): Likewise. * regclass.c (hard_regno_nregs): New array. (init_reg_modes_once): Initialize it. (choose_hard_reg_mode): Use it. (record_reg_classes): Likewise. * regmove.c (mark_flags_life_zones): Likewise. * regrename.c (note_sets, clear_dead_regs, regrename_optimize, scan_rtx_reg, dump_def_use_chain, kill_value, set_value_regno, copy_value, maybe_mode_change, find_oldest_value_reg, copyprop_hardreg_forward_1): * regs.h (hard_regno_nregs): Declare. * realod.c (reload_inner_reg_of_subreg): Use it. (push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, refers_to_regno_for_reload_p, find_equiv_reg, regno_clobbered_p, reload_adjust_reg_for_mode): Likewise. * reload1.c (compute_use_by_pseudos, count_pseudo, count_spilled_pseudo, find_reg, find_reload_regs, mark_home_live, spill_hard_reg, forget_old_reloads_1, mark_reload_reg_in_use, clear_reload_reg_in_use, reload_reg_free_for_value_p, free_for_value_p allocate_reload_reg, choose_reload_regs, emit_reload_insns, delete_output_reload): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c: Include regs.h (refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, subreg_regno_offset, subreg_offset_representable_p, hoist_test_store): Likewise. * sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise. * sched-rgn.c (check_live_1, update_live_1): Likewise. * stmt.c: Include regs.h (decl_conflicts_with_clobbers_p): Likewise. * varasm.c (make_decl_rtl): Likewise. * Makefile.in (cfgcleanup.o, rtlanal.o, ra-debug.o): Add regs.h dependnecy. From-SVN: r77088
2004-02-02 01:17:18 +01:00
if ((unsigned) hard_regno_nregs[regno][mode] == nregs
&& HARD_REGNO_MODE_OK (regno, mode)
&& (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
&& GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
found_mode = mode;
for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT);
mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode))
alias.c (record_set): Use hard_regno_nregs. * alias.c (record_set): Use hard_regno_nregs. * bt-load.c (find_btr_reference, note_btr_set): Likewise. * builtins.c (apply_args_size): Likewise. * caller-save.c (setup_save_areas, save_call_clobbered_regs, mark_set_regs, add_stored_regs, mark_referenced_regs, insert_restore, insert_save, insert_one_insn): Likewise. * cfgcleanup.c: Include regs.h (mark_effect, mentions_nonequal_regs): Likewise. * cfgrtl.c (mark_killed_regs): Likewise * combine.c (update_table_tick, record_value_for_reg, record_dead_and_set_regs, get_last_value_validate, use_crosses_set_p, reg_dead_at_p_1, reg_dead_at_p, mark_used_regs_combine, move_deaths, reg_bitfield_target_p, distribute_notes): Likewise. * cse.c (mention_regs, insert, invalidate, invalidate_for_call, exp_equiv_p, cse_insn): Likewise. * cselib.c (cselib_lookup): Likewise. (cselib_invalidate_regno, cselib_record_set): Likewise. * df.c (df_ref_record): Likewise. * dwarf2out.c (reg_loc_descriptor, multiple_reg_loc_descriptor): Likewise. * flow.c (mark_reg, insn_dead_p, mark_set_1, mark_used_reg, count_or_remove_death_notes_bb): Likewise. * function.c (aggregate_value_p, keep_stack_depressed): Likewise. * gloval.c (global_alloc, find_reg, mark_reg_store, mark_reg_conflicts, mark_reg_death, set_preference, reg_becomes_live, reg_dies): Likewise. * integrate.c (mark_stores): Likewise. * jump.c (delete_prior_computation): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (combine_regs, find_free_reg, post_mark_life): Likewise. * loop.c (LOOP_REGNO_NREGS): Likewise. * postreload.c (reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * ra-colorize.c (combine, color_usable_p, get_free_reg, calculate_dont_begin, calculate_dont_begin, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias): Likewise. * ra-debug.c: Include regs.h (ra_print_rtx_object): Likewise. * ra-rewrite (choose_spill_colors): Likewise. (spill_same_color_p, update_spill_colors, spill_is_free): Likewise. * ra.c (init_ra): Likewise. * recog.c (reg_fits_class_p, peep2_reg_dead_p, peep2_find_free_register): Likewise. * reg-stack.c (subst_stack_regs_pat, convert_regs_exit): Likewise. * regclass.c (hard_regno_nregs): New array. (init_reg_modes_once): Initialize it. (choose_hard_reg_mode): Use it. (record_reg_classes): Likewise. * regmove.c (mark_flags_life_zones): Likewise. * regrename.c (note_sets, clear_dead_regs, regrename_optimize, scan_rtx_reg, dump_def_use_chain, kill_value, set_value_regno, copy_value, maybe_mode_change, find_oldest_value_reg, copyprop_hardreg_forward_1): * regs.h (hard_regno_nregs): Declare. * realod.c (reload_inner_reg_of_subreg): Use it. (push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, refers_to_regno_for_reload_p, find_equiv_reg, regno_clobbered_p, reload_adjust_reg_for_mode): Likewise. * reload1.c (compute_use_by_pseudos, count_pseudo, count_spilled_pseudo, find_reg, find_reload_regs, mark_home_live, spill_hard_reg, forget_old_reloads_1, mark_reload_reg_in_use, clear_reload_reg_in_use, reload_reg_free_for_value_p, free_for_value_p allocate_reload_reg, choose_reload_regs, emit_reload_insns, delete_output_reload): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c: Include regs.h (refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, subreg_regno_offset, subreg_offset_representable_p, hoist_test_store): Likewise. * sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise. * sched-rgn.c (check_live_1, update_live_1): Likewise. * stmt.c: Include regs.h (decl_conflicts_with_clobbers_p): Likewise. * varasm.c (make_decl_rtl): Likewise. * Makefile.in (cfgcleanup.o, rtlanal.o, ra-debug.o): Add regs.h dependnecy. From-SVN: r77088
2004-02-02 01:17:18 +01:00
if ((unsigned) hard_regno_nregs[regno][mode] == nregs
&& HARD_REGNO_MODE_OK (regno, mode)
&& (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
&& GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
found_mode = mode;
if (found_mode != VOIDmode)
return found_mode;
/* Iterate over all of the CCmodes. */
print-rtl.c (print_rtx): Cast enums to int for comparison. * print-rtl.c (print_rtx): Cast enums to int for comparison. * c-decl.c (grokdeclarator): Cast enums to int for comparison and shifts. * c-format.c (C_STD_VER): Cast to int for comparisons. (check_function_format): Cast various enums to int for &. (maybe_read_dollar_number): Likewise. (check_format_info): Likewise. (check_format_info_main): Likewise. * expr.c (emit_move_insn_1): Cast enums to unsigned int for comparison. (safe_from_p): Likewise. * varasm.c (const_hash): Cast enum to int for %. * emit-rtl.c (init_emit_once): Use int loop variable to work around pcc enum problems with < and ++ operators. * regclass.c (init_reg_sets_1): Cast enums for comparison. (choose_hard_reg_mode): Use unsigned int to iterate over CCmodes. (regclass_init): Change enum class to int to iterate over reg_classes. * genrecog.c (merge_trees): Cast enums for comparison. * rtl.h (GET_CODE): Cast to enum rtx_code. (PUT_CODE): Cast to ENUM_BITFIELD(rtx_code). (GET_MODE): Cast to enum machine_mode. (PUT_MODE): Cast to ENUM_BITFIELD(machine_mode). (GET_NOTE_INSN_NAME): Cast enum to int. * tree.h (TREE_CODE): Cast to enum tree_code. (TREE_SET_CODE): Cast VALUE to ENUM_BITFIELD(tree_code). * timevar.c (timevar_print): Change loop variable id from enum to unsigned int. * fixinc/fixincl.c (VLEVEL): Cast enums in comparison to unsigned int. * config/i386/i386.md: Use PUT_MODE for mode assignment. * toplev.c (compile_file): Cast enum DFI to int. (decode_d_option): Likewise. From-SVN: r40193
2001-03-02 22:41:37 +01:00
for (m = (unsigned int) CCmode; m < (unsigned int) NUM_MACHINE_MODES; ++m)
{
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
mode = (machine_mode) m;
alias.c (record_set): Use hard_regno_nregs. * alias.c (record_set): Use hard_regno_nregs. * bt-load.c (find_btr_reference, note_btr_set): Likewise. * builtins.c (apply_args_size): Likewise. * caller-save.c (setup_save_areas, save_call_clobbered_regs, mark_set_regs, add_stored_regs, mark_referenced_regs, insert_restore, insert_save, insert_one_insn): Likewise. * cfgcleanup.c: Include regs.h (mark_effect, mentions_nonequal_regs): Likewise. * cfgrtl.c (mark_killed_regs): Likewise * combine.c (update_table_tick, record_value_for_reg, record_dead_and_set_regs, get_last_value_validate, use_crosses_set_p, reg_dead_at_p_1, reg_dead_at_p, mark_used_regs_combine, move_deaths, reg_bitfield_target_p, distribute_notes): Likewise. * cse.c (mention_regs, insert, invalidate, invalidate_for_call, exp_equiv_p, cse_insn): Likewise. * cselib.c (cselib_lookup): Likewise. (cselib_invalidate_regno, cselib_record_set): Likewise. * df.c (df_ref_record): Likewise. * dwarf2out.c (reg_loc_descriptor, multiple_reg_loc_descriptor): Likewise. * flow.c (mark_reg, insn_dead_p, mark_set_1, mark_used_reg, count_or_remove_death_notes_bb): Likewise. * function.c (aggregate_value_p, keep_stack_depressed): Likewise. * gloval.c (global_alloc, find_reg, mark_reg_store, mark_reg_conflicts, mark_reg_death, set_preference, reg_becomes_live, reg_dies): Likewise. * integrate.c (mark_stores): Likewise. * jump.c (delete_prior_computation): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (combine_regs, find_free_reg, post_mark_life): Likewise. * loop.c (LOOP_REGNO_NREGS): Likewise. * postreload.c (reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * ra-colorize.c (combine, color_usable_p, get_free_reg, calculate_dont_begin, calculate_dont_begin, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias): Likewise. * ra-debug.c: Include regs.h (ra_print_rtx_object): Likewise. * ra-rewrite (choose_spill_colors): Likewise. (spill_same_color_p, update_spill_colors, spill_is_free): Likewise. * ra.c (init_ra): Likewise. * recog.c (reg_fits_class_p, peep2_reg_dead_p, peep2_find_free_register): Likewise. * reg-stack.c (subst_stack_regs_pat, convert_regs_exit): Likewise. * regclass.c (hard_regno_nregs): New array. (init_reg_modes_once): Initialize it. (choose_hard_reg_mode): Use it. (record_reg_classes): Likewise. * regmove.c (mark_flags_life_zones): Likewise. * regrename.c (note_sets, clear_dead_regs, regrename_optimize, scan_rtx_reg, dump_def_use_chain, kill_value, set_value_regno, copy_value, maybe_mode_change, find_oldest_value_reg, copyprop_hardreg_forward_1): * regs.h (hard_regno_nregs): Declare. * realod.c (reload_inner_reg_of_subreg): Use it. (push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, refers_to_regno_for_reload_p, find_equiv_reg, regno_clobbered_p, reload_adjust_reg_for_mode): Likewise. * reload1.c (compute_use_by_pseudos, count_pseudo, count_spilled_pseudo, find_reg, find_reload_regs, mark_home_live, spill_hard_reg, forget_old_reloads_1, mark_reload_reg_in_use, clear_reload_reg_in_use, reload_reg_free_for_value_p, free_for_value_p allocate_reload_reg, choose_reload_regs, emit_reload_insns, delete_output_reload): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c: Include regs.h (refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, subreg_regno_offset, subreg_offset_representable_p, hoist_test_store): Likewise. * sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise. * sched-rgn.c (check_live_1, update_live_1): Likewise. * stmt.c: Include regs.h (decl_conflicts_with_clobbers_p): Likewise. * varasm.c (make_decl_rtl): Likewise. * Makefile.in (cfgcleanup.o, rtlanal.o, ra-debug.o): Add regs.h dependnecy. From-SVN: r77088
2004-02-02 01:17:18 +01:00
if ((unsigned) hard_regno_nregs[regno][mode] == nregs
&& HARD_REGNO_MODE_OK (regno, mode)
&& (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
print-rtl.c (print_rtx): Cast enums to int for comparison. * print-rtl.c (print_rtx): Cast enums to int for comparison. * c-decl.c (grokdeclarator): Cast enums to int for comparison and shifts. * c-format.c (C_STD_VER): Cast to int for comparisons. (check_function_format): Cast various enums to int for &. (maybe_read_dollar_number): Likewise. (check_format_info): Likewise. (check_format_info_main): Likewise. * expr.c (emit_move_insn_1): Cast enums to unsigned int for comparison. (safe_from_p): Likewise. * varasm.c (const_hash): Cast enum to int for %. * emit-rtl.c (init_emit_once): Use int loop variable to work around pcc enum problems with < and ++ operators. * regclass.c (init_reg_sets_1): Cast enums for comparison. (choose_hard_reg_mode): Use unsigned int to iterate over CCmodes. (regclass_init): Change enum class to int to iterate over reg_classes. * genrecog.c (merge_trees): Cast enums for comparison. * rtl.h (GET_CODE): Cast to enum rtx_code. (PUT_CODE): Cast to ENUM_BITFIELD(rtx_code). (GET_MODE): Cast to enum machine_mode. (PUT_MODE): Cast to ENUM_BITFIELD(machine_mode). (GET_NOTE_INSN_NAME): Cast enum to int. * tree.h (TREE_CODE): Cast to enum tree_code. (TREE_SET_CODE): Cast VALUE to ENUM_BITFIELD(tree_code). * timevar.c (timevar_print): Change loop variable id from enum to unsigned int. * fixinc/fixincl.c (VLEVEL): Cast enums in comparison to unsigned int. * config/i386/i386.md: Use PUT_MODE for mode assignment. * toplev.c (compile_file): Cast enum DFI to int. (decode_d_option): Likewise. From-SVN: r40193
2001-03-02 22:41:37 +01:00
return mode;
}
/* We can't find a mode valid for this register. */
return VOIDmode;
1991-11-06 00:39:50 +01:00
}
/* Specify the usage characteristics of the register named NAME.
It should be a fixed register if FIXED and a
call-used register if CALL_USED. */
void
fix_register (const char *name, int fixed, int call_used)
1991-11-06 00:39:50 +01:00
{
int i;
int reg, nregs;
1991-11-06 00:39:50 +01:00
/* Decode the name and update the primary form of
the register info. */
if ((reg = decode_reg_name_and_count (name, &nregs)) >= 0)
{
gcc_assert (nregs >= 1);
for (i = reg; i < reg + nregs; i++)
{
if ((i == STACK_POINTER_REGNUM
#ifdef HARD_FRAME_POINTER_REGNUM
|| i == HARD_FRAME_POINTER_REGNUM
#else
|| i == FRAME_POINTER_REGNUM
#endif
)
&& (fixed == 0 || call_used == 0))
{
switch (fixed)
{
case 0:
switch (call_used)
{
case 0:
error ("can%'t use %qs as a call-saved register", name);
break;
case 1:
error ("can%'t use %qs as a call-used register", name);
break;
default:
gcc_unreachable ();
}
break;
case 1:
switch (call_used)
{
case 1:
error ("can%'t use %qs as a fixed register", name);
break;
case 0:
default:
gcc_unreachable ();
}
break;
default:
gcc_unreachable ();
}
}
else
{
fixed_regs[i] = fixed;
call_used_regs[i] = call_used;
#ifdef CALL_REALLY_USED_REGISTERS
if (fixed == 0)
call_really_used_regs[i] = call_used;
#endif
}
}
}
else
1991-11-06 00:39:50 +01:00
{
diagnostic.c (warning): Accept parameter to classify warning option. * diagnostic.c (warning): Accept parameter to classify warning option. (warning0): New, for when a pointer to an error() like function is needed. * errors.c (warning): Likewise. * errors.h (warning, warning0): Adjust prototypes. * toplev.h (warning, warning0): Likewise. * attribs.c, builtins.c, c-common.c, c-decl.c, c-format.c, c-gimplify.c, c-lex.c, c-objc-common.c, c-opts.c, c-parser.c, c-pragma.c, c-typeck.c, calls.c, cgraph.c, coverage.c, emit-rtl.c, fold-const.c, fortran/trans-decl.c, function.c, gcse.c, genautomata.c, haifa-sched.c, opts.c, passes.c, regclass.c, reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c, tree-dump.c, tree-inline.c, tree-mudflap.c, tree-optimize.c, tree-ssa.c, tree.c, varasm.c: Adjust warning() callers. * config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/bfin/bfin.c, config/c4x/c4x-c.c, config/c4x/c4x.c, config/cris/cris.c, config/darwin-c.c, config/darwin.c, config/darwin.h, config/h8300/h8300.c, config/i386/cygming.h, config/i386/djgpp.h, config/i386/i386.c, config/i386/winnt.c, config/ia64/ia64-c.c, config/ia64/ia64.c, config/ip2k/ip2k.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/mcore/mcore.c, config/mips/mips.c, config/mmix/mmix.c, config/ns32k/ns32k.c, config/pa/pa-hpux11.h, config/pa/pa.c, config/rs6000/aix43.h, config/rs6000/aix51.h, config/rs6000/aix52.h, config/rs6000/darwin.h, config/rs6000/rs6000-c.c, config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c, config/sh/sh.h, config/sh/symbian.c, config/sol2-c.c, config/sol2.c, config/stormy16/stormy16.c, config/v850/v850-c.c, config/v850/v850.c, config/xtensa/xtensa.c: Adjust warning() callers. * ada/misc.c: Adjust warning() callers. * cp/call.c, cp/class.c, cp/cvt.c, cp/decl.c, cp/decl2.c, cp/except.c, cp/friend.c, cp/init.c, cp/lex.c, cp/mangle.c, cp/method.c, cp/name-lookup.c, cp/parser.c, cp/repo.c, cp/rtti.c, cp/tree.c, cp/typeck.c, cp/typeck2.c: Adjust warning() callers. * fortran/trans-decl.c: Adjust warning() callers. * java/class.c, java/decl.c, java/expr.c, java/jcf-io.c, java/jcf-parse.c, java/jv-scan.c, java/parse.y: Adjust warning() callers. * objc/objc-act.c: Adjust warning() callers. * treelang/parse.y: Adjust warning() callers. From-SVN: r98633
2005-04-23 23:29:07 +02:00
warning (0, "unknown register name: %s", name);
1991-11-06 00:39:50 +01:00
}
}
/* Mark register number I as global. */
void
globalize_reg (tree decl, int i)
{
location_t loc = DECL_SOURCE_LOCATION (decl);
#ifdef STACK_REGS
if (IN_RANGE (i, FIRST_STACK_REG, LAST_STACK_REG))
{
error ("stack register used for global register variable");
return;
}
#endif
if (fixed_regs[i] == 0 && no_global_reg_vars)
error_at (loc, "global register variable follows a function definition");
if (global_regs[i])
{
warning_at (loc, 0,
"register of %qD used for multiple global register variables",
decl);
inform (DECL_SOURCE_LOCATION (global_regs_decl[i]),
"conflicts with %qD", global_regs_decl[i]);
return;
}
if (call_used_regs[i] && ! fixed_regs[i])
warning_at (loc, 0, "call-clobbered register used for global register variable");
global_regs[i] = 1;
global_regs_decl[i] = decl;
/* If we're globalizing the frame pointer, we need to set the
appropriate regs_invalidated_by_call bit, even if it's already
set in fixed_regs. */
if (i != STACK_POINTER_REGNUM)
{
SET_HARD_REG_BIT (regs_invalidated_by_call, i);
SET_REGNO_REG_SET (regs_invalidated_by_call_regset, i);
tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. 2008-01-29 Vladimir Makarov <vmakarov@redhat.com> * doc/tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. * doc/passes.texi: Remove entries about regclass, local-alloc, and global. Modify entries about regmove and IRA. * ra-conflict.c: Remove the file. * reload.c (push_reload, find_dummy_reload): Remove flag_ira. * tree-pass.h (pass_local_alloc, pass_global_alloc): Remove. (pass_regclass_init): Rename to pass_reginfo_init. * cfgloopanal.c (estimate_reg_pressure_cost): Remove flag_ira. * toplev.h (flag_ira): Remove. * caller-save.c (setup_save_areas): Remove flag_ira. * ira-color.c (ira_reuse_stack_slot, ira_mark_new_stack_slot): Ditto. * global.c: Remove the file. * opts.c: (decode_options): Remove flag_ira. * hard-reg-set.h (losing_caller_save_reg_set): Remove. * regmove.c: Modify file description. (find_use_as_address, try_auto_increment): Define them only if AUTO_INC_DEC is defined. (replacement_quality, replace_in_call_usage, fixup_match_1, stable_and_no_regs_but_for_p): Remove. (reg_set_in_bb): Make it static. (regmove_optimize): Remove flag_ira and code which worked for !flag_ira. * local-alloc.c: Remove the file. * common.opt (fira): Remove. * ira.c: Include except.h. (eliminable_regset): Move from global.c. (mark_elimination): Ditto. Remove flag_ira. (reg_renumber, struct equivalence, reg_equiv, equiv_mem, equiv_mem_modified, validate_equiv_mem_from_store, validate_equiv_mem, equiv_init_varies_p, equiv_init_movable_p, contains_replace_regs, memref_referenced_p, memref_used_between_p, no_equiv, recorded_label_ref): Move from local-alloc.c. (update_equiv_regs): Ditto. Make it static. (print_insn_chain, print_insn_chains): Move it from global.c. pseudo_for_reload_consideration_p): Ditto. Remove flag_ira. (build_insn_chain): Ditto. Make it static. (ra_init_live_subregs): Move from ra-conflict.c. Make it static. Rename to init_live_subregs. (gate_ira): Remove flag_ira. * regclass.c: Rename reginfo.c. Change file description. (FORBIDDEN_INC_DEC_CLASSES): Remove. (reg_class_superclasses, forbidden_inc_dec_class, in_inc_dec): Remove. (init_reg_sets_1): Remove code for evaluation of reg_class_superclasses and losing_caller_save_reg_set. (init_regs): Remove init_reg_autoinc. (struct costs, costs, init_cost, ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): Remove. (regclass_init): Rename to reginfo_init. Don't initialize init_cost. (pass_regclass_init): Rename to pass_reginfo_init. Modify corresponding entries. (dump_regclass, record_operand_costs, scan_one_insn, init_reg_autoinc, regclass, record_reg_classes, copy_cost, record_address_regs, auto_inc_dec_reg_p): Remove. (gt-regclass.h): Rename to gt-reginfo.h. * rtl.h (dump_global_regs, retry_global_alloc, build_insn_chain, dump_local_alloc, update_equiv_regs): Remove. * Makefile.in (RA_H): Remove. (OBJS-common): Remove global.o, local-alloc.o, and ra-conflict.o. Rename regclass.o to reginfo.o. (regclass.o): Rename to reginfo.o. Rename gt-regclass.h to gt-reginfo.h. (global.o, local-alloc.o, ra-conflict.o): Remove entries. (GTFILES): Rename regclass.c to reginfo.c. * passes.c (init_optimization_passes): Remove pass_local_alloc and pass_global_alloc. Rename pass_regclass_init to pass_reginfo_init. * reload1.c (compute_use_by_pseudos, reload, count_pseudo, count_spilled_pseudo, find_reg, alter_reg, delete_output_reload): Remove flag_ira. (finish_spills): Ditto. Remove code for !flga_ira. From-SVN: r143757
2009-01-29 15:51:46 +01:00
}
/* If already fixed, nothing else to do. */
if (fixed_regs[i])
return;
fixed_regs[i] = call_used_regs[i] = 1;
#ifdef CALL_REALLY_USED_REGISTERS
call_really_used_regs[i] = 1;
#endif
SET_HARD_REG_BIT (fixed_reg_set, i);
SET_HARD_REG_BIT (call_used_reg_set, i);
SET_HARD_REG_BIT (call_fixed_reg_set, i);
reinit_regs ();
}
1991-11-06 00:39:50 +01:00
/* Structure used to record preferences of given pseudo. */
struct reg_pref
{
/* (enum reg_class) prefclass is the preferred class. May be
NO_REGS if no class is better than memory. */
char prefclass;
/* altclass is a register class that we should use for allocating
pseudo if no register in the preferred class is available.
If no register in this class is available, memory is preferred.
It might appear to be more general to have a bitmask of classes here,
but since it is recommended that there be a class corresponding to the
union of most major pair of classes, that generality is not required. */
char altclass;
invoke.texi (-fsched-pressure): Document it. 2009-09-02 Vladimir Makarov <vmakarov@redhat.com> * doc/invoke.texi (-fsched-pressure): Document it. (-fsched-reg-pressure-heuristic): Remove it. * reload.c (ira.h): Include. (find_reloads): Add choosing reload on number of small spilled classes. * haifa-sched.c (ira.h): Include. (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure, saved_reg_pressure, curr_reg_live, saved_reg_live, region_ref_regs): New variables. (sched_init_region_reg_pressure_info, mark_regno_birth_or_death, initiate_reg_pressure_info, setup_ref_regs, initiate_bb_reg_pressure_info, save_reg_pressure, restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New functions. (setup_insn_reg_pressure_info): New function. (rank_for_schedule): Add pressure checking and insn issue time. Remove comparison of insn reg weights. (ready_sort): Set insn reg pressure info. (update_register_pressure, setup_insn_max_reg_pressure, update_reg_and_insn_max_reg_pressure, sched_setup_bb_reg_pressure_info): New functions. (schedule_insn): Add code for printing and updating reg pressure info. (find_set_reg_weight, find_insn_reg_weight): Remove. (ok_for_early_queue_removal): Do nothing if pressure_only_p. (debug_ready_list): Print reg pressure info. (schedule_block): Ditto. Check insn issue time. (sched_init): Set up sched_pressure_p. Allocate and set up some reg pressure related info. (sched_finish): Free some reg pressure related info. (fix_tick_ready): Make insn always ready if pressure_p. (init_h_i_d): Don't call find_insn_reg_weight. (haifa_finish_h_i_d): Free insn reg pressure info. * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move to ira.h. * ira-lives.c (single_reg_class): Check mode to find how many registers are necessary for operand. (ira_implicitly_set_insn_hard_regs): New. * common.opt (fsched-pressure): New options. (fsched-reg-pressure-heuristic): Remove. * ira.c (setup_eliminable_regset): Rename to ira_setup_eliminable_regset. Make it external. (expand_reg_info): Pass cover class to setup_reg_classes. (ira): Call resize_reg_info instead of allocate_reg_info. * sched-deps.c: Include ira.h. (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New. (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses, reg_pressure_info, insn_use_p, mark_insn_pseudo_birth, mark_insn_hard_regno_birth, mark_insn_reg_birth, mark_pseudo_death, mark_hard_regno_death, mark_reg_death, mark_insn_reg_store, mark_insn_reg_clobber, setup_insn_reg_pressure_info): New. (sched_analyze_1): Update implicit_reg_pending_uses. (sched_analyze_insn): Find implicit sets, uses, clobbers of regs. Use them to create dependencies. Set insn reg uses and pressure info. Process reg_pending_uses in one place. (free_deps): Free implicit sets. (remove_from_deps): Remove implicit sets if necessary. Check implicit sets when clearing reg_last_in_use. (init_deps_global): Clear implicit_reg_pending_clobbers and implicit_reg_pending_uses. * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move from ira-int.h. (ira_setup_eliminable_regset, ira_set_pseudo_classes, ira_implicitly_set_insn_hard_regs): New prototypes. * ira-costs.c (pseudo_classes_defined_p, allocno_p, cost_elements_num): New variables. (allocno_costs, total_costs): Rename to costs and total_allocno_costs. (COSTS_OF_ALLOCNO): Rename to COSTS. (allocno_pref): Rename to pref. (allocno_pref_buffer): Rename to pref_buffer. (common_classes): Rename to regno_cover_class. (COST_INDEX): New. (record_reg_classes): Set allocno attributes only if allocno_p. (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM. (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM and COSTS_OF_ALLOCNO. (print_costs): Rename to print_allocno_costs. (print_pseudo_costs): New. (process_bb_node_for_costs): Split into 2 functions with new function process_bb_for_costs. Pass BB to process_bb_for_costs. (find_allocno_class_costs): Rename to find_costs_and_classes. Add new parameter dump_file. Use cost_elements_num instead of ira_allocnos_num. Make one iteration if preferred classes were already calculated for scheduler. Make 2 versions of code depending on allocno_p. (setup_allocno_cover_class_and_costs): Check allocno_p. Use regno_cover_class and COSTS instead of common_classes and COSTS_OF_ALLOCNO. (init_costs, finish_costs): New. (ira_costs): Set up allocno_p and cost_elements_num. Call init_costs and finish_costs. (ira_set_pseudo_classes): New. * rtl.h (allocate_reg_info): Remove. (resize_reg_info): Change return type. (reg_cover_class): New. (setup_reg_classes): Add new parameter. * sched-int.h (struct deps_reg): New member implicit_sets. (sched_pressure_p, sched_regno_cover_class): New external definitions. (INCREASE_BITS): New macro. (struct reg_pressure_data, struct reg_use_data): New. (struct _haifa_insn_data): Remove reg_weight. Add members reg_pressure, reg_use_list, reg_set_list, and reg_pressure_excess_cost_change. (struct deps): New member implicit_sets. (pressure_p): New variable. (COVER_CLASS_BITS, INCREASE_BITS): New macros. (struct reg_pressure_data, struct reg_use_data): New. (INSN_REG_WEIGHT): Remove. (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST, INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros. (sched_init_region_reg_pressure_info, sched_setup_bb_reg_pressure_info): New prototypes. * reginfo.c (struct reg_pref): New member coverclass. (reg_cover_class): New function. (reginfo_init, pass_reginfo_init): Move after free_reg_info. (reg_info_size): New variable. (allocate_reg_info): Make static. Setup reg_info_size. (resize_reg_info): Use reg_info_size. Return flag of resizing. (setup_reg_classes): Add a new parameter. Setup cover class too. * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the dependencies. * sched-rgn.c (deps_join): Set up implicit_sets. (schedule_region): Set up region and basic blocks pressure relative info. * passes.c (init_optimization_passes): Move pass_subregs_of_mode_init before pass_sched. From-SVN: r151348
2009-09-02 20:54:25 +02:00
[multiple changes] 2011-03-28 Vladimir Makarov <vmakarov@redhat.com> * ira-color.c (update_left_conflict_sizes_p): Don't assume that conflict object hard regset nodes have intersecting hard reg sets. * regmove.c (regmove_optimize): Move ira_set_pseudo_classes call after regstat_init_n_sets_and_refs. * ira.c: Add more comments at the top. (setup_stack_reg_pressure_class, setup_pressure_classes): Add comments how we compute the register pressure classes. (setup_allocno_and_important_classes): Add more comments. (setup_class_translate_array, reorder_important_classes) (setup_reg_class_relations): Add comments. * ira-emit.c: Add 2011 to the Copyright line. Add comments at the start of the file. * ira-color.c: Add 2011 to the Copyright line. (assign_hard_reg): Add more comments. (improve_allocation): Ditto. * ira-costs.c: Add 2011 to the Copyright line. (setup_cost_classes, setup_regno_cost_classes_by_aclass): Add more comments. (setup_regno_cost_classes_by_mode): Ditto. Initial patches from ira-improv branch: 2010-08-13 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c: (ira_create_object): Remove initialization of OBJECT_PROFITABLE_HARD_REGS. Initialize OBJECT_ADD_DATA. (ira_create_allocno): Remove initialization of ALLOCNO_MEM_OPTIMIZED_DEST, ALLOCNO_MEM_OPTIMIZED_DEST_P, ALLOCNO_SOMEWHERE_RENAMED_P, ALLOCNO_CHILD_RENAMED_P, ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P, ALLOCNO_COLORABLE_P, ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO, ALLOCNO_FIRST_COALESCED_ALLOCNO, ALLOCNO_NEXT_COALESCED_ALLOCNO. Initialize ALLOCNO_ADD_DATA. (copy_info_to_removed_store_destinations): Use ALLOCNO_EMIT_DATA and allocno_emit_reg instead of ALLOCNO_MEM_OPTIMIZED_DEST_P and ALLOCNO_REG. (ira_flattening): Ditto. Use ALLOCNO_EMIT_DATA instead of ALLOCNO_MEM_OPTIMIZED_DEST and ALLOCNO_SOMEWHERE_RENAMED_P. * ira.c (ira_reallocate): Remove. (setup_pressure_classes): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. (setup_allocno_assignment_flags): Use ALLOCNO_EMIT_DATA. (ira): Call ira_initiate_emit_data and ira_finish_emit_data. * ira-color.c: Use ALLOCNO_COLOR_DATA instead of ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P, ALLOCNO_COLORABLE_P, ALLOCNO_AVAILABLE_REGS_NUM, ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO. ALLOCNO_TEMP. Use OBJECT_COLOR_DATA instead of OBJECT_PROFITABLE_HARD_REGS, OBJECT_HARD_REGS_NODE, OBJECT_HARD_REGS_SUBNODES_START, OBJECT_HARD_REGS_SUBNODES_NUM. Fix formatting. (object_hard_regs_t, object_hard_regs_node_t): Move from ira-int.h. (struct object_hard_regs, struct object_hard_regs_node): Ditto. (struct allocno_color_data): New. (allocno_color_data_t): New typedef. (allocno_color_data): New definition. (ALLOCNO_COLOR_DATA): New macro. (struct object_color_data): New. (object_color_data_t): New typedef. (object_color_data): New definition. (OBJECT_COLOR_DATA): New macro. (update_copy_costs, calculate_allocno_spill_cost): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. (move_spill_restore, update_curr_costs): Ditto. (allocno_spill_priority): Make it inline. (color_pass): Allocate and free allocno_color_dat and object_color_data. (struct coalesce_data, coalesce_data_t): New. (allocno_coalesce_data): New definition. (ALLOCNO_COALESCE_DATA): New macro. (merge_allocnos, coalesced_allocno_conflict_p): Use ALLOCNO_COALESCED_DATA instead of ALLOCNO_FIRST_COALESCED_ALLOCNO, ALLOCNO_NEXT_COALESCED_ALLOCNO, ALLOCNO_TEMP. (coalesce_allocnos): Ditto. (setup_coalesced_allocno_costs_and_nums): Ditto. (collect_spilled_coalesced_allocnos): Ditto. (slot_coalesced_allocno_live_ranges_intersect_p): Ditto. (setup_slot_coalesced_allocno_live_ranges): Ditto. (coalesce_spill_slots): Ditto. (ira_sort_regnos_for_alter_reg): Ditto. Allocate, initialize and free allocno_coalesce_data. * ira-conflicts.c: Fix formatting. (process_regs_for_copy): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. (build_object_conflicts): Optimize. * ira-costs.c (record_reg_classes): Optimize. Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost, ira_may_move_in_cost, and ira_may_move_out_cost instead of ira_get_register_move_cost and ira_get_may_move_cost. (record_address_regs): Ditto. (scan_one_insn): Optimize. (find_costs_and_classes): Optimize. (process_bb_node_for_hard_reg_moves): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. * ira-emit.c: Use allocno_emit_reg, ALLOCNO_EMIT_DATA instead of ALLOCNO_REG, ALLOCNO_CHILD_RENAMED_P, ALLOCNO_MEM_OPTIMIZED_DEST, ALLOCNO_MEM_OPTIMIZED_DEST_P, and ALLOCNO_SOMEWHERE_RENAMED_P. (ira_allocno_emit_data, void_p, new_allocno_emit_data_vec): New definitions. (ira_initiate_emit_data, ira_finish_emit_data) (create_new_allocno): New functions. (modify_move_list): Call create_new_alloc instead of ira_create_allocno. (emit_move_list): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. * ira-int.h: Fix some comments. (object_hard_regs_t, object_hard_regs_node_t): Move to ira-color.c. (struct object_hard_regs, struct object_hard_regs_node): Ditto. (struct ira_object): Remove profitable_hard_regs, hard_regs_node, hard_regs_subnodes_start, hard_regs_subnodes_num. Add new member add_data. (struct ira_allocno): Make mode and aclass a bitfield. Move other bitfield after mode. Make hard_regno a short int. Make hard_regno short. Remove first_coalesced_allocno and next_coalesced_allocno. Move mem_optimized_dest_p, somewhere_renamed_p, child_renamed_p, reg, and mem_optimized_dest into struct ira_emit_data. Remove in_graph_p, may_be_spilled_p, available_regs_num, next_bucket_allocno, prev_bucket_allocno, temp, colorable_p. Add new member add_data. (ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P): Remove. (ALLOCNO_COLORABLE_P, ALLOCNO_AVAILABLE_REGS_NUM): Remove. (ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO): Remove. (ALLOCNO_TEMP, ALLOCNO_FIRST_COALESCED_ALLOCNO): Remove. (ALLOCNO_NEXT_COALESCED_ALLOCNO): Remove. (ALLOCNO_ADD_DATA): New macro. (ira_emit_data_t): New typedef. (struct ira_emit_data): New. Move mem_optimized_dest_p, somewhere_renamed_p, child_renamed_p, reg, mem_optimized_dest from struct ira_allocno. (ALLOCNO_EMIT_DATA): New macro. (ira_allocno_emit_data, allocno_emit_reg): New. (ALLOCNO_PROFITABLE_HARD_REGS, OBJECT_HARD_REGS_NODE): Remove. (OBJECT_HARD_REGS_SUBNODES_STAR, OBJECT_HARD_REGS_SUBNODES_NUM): Remove. (OBJECT_ADD_DATA): New macro. (ira_reallocate): Remove. (ira_initiate_emit_data, ira_finish_emit_data): New. (ira_get_register_move_cost, ira_get_may_move_cost): Remove. (ira_init_register_move_cost_if_necessary): New. (ira_object_conflict_iter_next): Merge into ira_object_conflict_iter_cond. (FOR_EACH_OBJECT_CONFLICT): Don't use ira_object_conflict_iter_next. * ira-live.c: (process_single_reg_class_operands): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. 2010-08-13 Vladimir Makarov <vmakarov@redhat.com> * ira-int.h (struct target_ira_int): Remove x_cost_classes. * ira-costs.c: Fix formatting. (cost_classes, cost_classes_num): Remove. (struct cost_classes, cost_classes_t, const_cost_classes_t): New. (regno_cost_classes, cost_classes_hash, cost_classes_eq): New. (cost_classes_del, cost_classes_htab): New. (cost_classes_aclass_cache, cost_classes_mode_cache): New. (initiate_regno_cost_classes, setup_cost_classes): New. (setup_regno_cost_classes_by_aclass): New. (setup_regno_cost_classes_by_mode, finish_regno_cost_classes): New. (record_reg_classes): Use regno_cost_classes instead of cost_classes. Move checking opposite operand up. (record_address_regs): Use regno_cost_classes instead of cost_classes. (scan_one_insn): Ditto. Use always general register. (print_allocno_costs): Use regno_cost_classes instead of cost_classes. (print_pseudo_costs): Ditto. Use Reg_N_REFS. (find_costs_and_classes): Set up cost classes for each registers. Use also their mode for this. Use regno_cost_classes instead of cost_classes. (setup_allocno_class_and_costs): Use regno_cost_classes instead of cost_classes. (free_ira_costs, ira_init_costs): Don't use cost_classes. (ira_costs, ira_set_pseudo_classes): Call initiate_regno_cost_classes and finish_regno_cost_classes. 2010-10-04 Vladimir Makarov <vmakarov@redhat.com> * target-def.h (TARGET_IRA_COVER_CLASSES): Remove. * target.def (ira_cover_classes): Remove. * doc/tm.texi: Remove TARGET_IRA_COVER_CLASSES and IRA_COVER_CLASSES. * doc/tm.texi.in: Ditto. * ira-conflicts.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Use ALLOCNO_COVER_CLASS_COST instead of ALLOCNO_CLASS_COST. Fix formatting. * targhooks.c (default_ira_cover_classes): Remove. * targhooks.h (default_ira_cover_classes): Ditto. * haifa-sched.c: Remove mentioning cover classes from the file. Use ira_reg_pressure_cover instead of ira_reg_class_cover. Use ira_pressure_classes and ira_pressure_classes_num instead of ira_reg_class_cover_size and ira_reg_class_cover. Use sched_regno_pressure_class instead of sched_regno_cover_class. (mark_regno_birth_or_death, setup_insn_reg_pressure_info): Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. * ira-int.h: Add 2010 to Copyright. Remove mentioning cover classes from the file. (object_hard_regs_t, object_hard_regs_node_t): New typedefs. (struct object_hard_regs, struct object_hard_regs_node): New. (struct ira_object): New members profitable_hard_regs, hard_regs_node, hard_regs_subnodes_start, hard_regs_subnodes_num. (struct ira_allocno): Rename cover_class to aclass. Rename cover_class_cost and updated_cover_class_cost to class_cost and updated_class_cost. Remove splay_removed_p and left_conflict_size. Add new members colorable_p. (ALLOCNO_SPLAY_REMOVED_P, ALLOCNO_LEFT_CONFLICTS_SIZE): Remove. (ALLOCNO_COLORABLE_P): New macro. (ALLOCNO_COVER_CLASS): Rename to ALLOCNO_CLASS. (ALLOCNO_COVER_CLASS_COST, ALLOCNO_UPDATED_COVER_CLASS_COST): Rename to ALLOCNO_CLASS_COST and ALLOCNO_UPDATED__CLASS_COST. (OBJECT_...): Rename parameter C to O. (OBJECT_PROFITABLE_HARD_REGS): New macro. (OBJECT_HARD_REGS_NODE, OBJECT_HARD_REGS_SUBNODES_START) (OBJECT_HARD_REGS_SUBNODES_NUM): New macros. (struct target_ira_int): New members x_ira_max_memory_move_cost, x_ira_max_register_move_cost, x_ira_max_may_move_in_cost, x_ira_max_may_move_out_cost, x_ira_reg_allocno_class_p, x_ira_reg_pressure_class_p, x_ira_important_class_nums, x_ira_reg_class_superunion. Rename x_prohibited_class_mode_reg to x_ira_prohibited_class_mode_reg. Rename x_ira_reg_class_union to x_ira_reg_class_subunion. (ira_max_memory_move_cost, ira_max_register_move_cost) (ira_max_may_move_in_cost, ira_max_may_move_out_cost) (ira_reg_allocno_class_p, ira_reg_pressure_class_p) (ira_important_class_nums, ira_reg_class_superunion): New macros. (prohibited_class_mode_regs): Rename to ira_prohibited_class_mode_regs. (ira_reg_class_union): Rename to ira_reg_class_subunion. (ira_debug_class_cover): Rename to ira_debug_allocno_classes. (ira_set_allocno_cover_class): Rename to ira_set_allocno_class. (ira_tune_allocno_costs_and_cover_classes): Rename to ira_tune_allocno_costs. (ira_debug_hard_regs_forest): New. (ira_object_conflict_iter_init, ira_object_conflict_iter_cond) (ira_object_conflict_iter_next): Fix comments. (ira_hard_reg_set_intersection_p, hard_reg_set_size): New functions. (ira_allocate_and_set_costs, ira_allocate_and_copy_costs): Rename cover_class to aclass. (ira_allocate_and_accumulate_costs): Ditto. (ira_allocate_and_set_or_copy_costs): Ditto. * opts.c (decode_options): Remove ira_cover_class check. * ira-color.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS, ALLOCNO_CLASS_COST, and ALLOCNO_UPDATED_CLASS_COST instead of ALLOCNO_COVER_CLASS, ALLOCNO_COVER_CLASS_COST, and ALLOCNO_UPDATED_COVER_CLASS_COST. Fix formatting. (splay-tree.h): Remove include. (allocno_coalesced_p, processed_coalesced_allocno_bitmap): Move before copy_freq_compare_func. (allocnos_for_spilling, removed_splay_allocno_vec): Remove. (object_hard_regs_vec, object_hard_regs_htab, node_check_tick): New definitions. (hard_regs_roots, hard_regs_node_vec): Ditto. (object_hard_regs_hash, object_hard_regs_eq, find_hard_regs): Ditto. (insert_hard_regs, init_object_hard_regs, add_object_hard_regs): Ditto. (finish_object_hard_regs, object_hard_regs_compare): Ditto. (create_new_object_hard_regs_node): Ditto. (add_new_object_hard_regs_node_to_forest): Ditto. (add_object_hard_regs_to_forest, collect_object_hard_regs_cover): Ditto. (setup_object_hard_regs_nodes_parent, first_common_ancestor_node): Ditto. (print_hard_reg_set, print_hard_regs_subforest): Ditto. (print_hard_regs_forest, ira_debug_hard_regs_forest): Ditto. (remove_unused_object_hard_regs_nodes): Ditto. (enumerate_object_hard_regs_nodes): Ditto. (object_hard_regs_nodes_num, object_hard_regs_nodes): Ditto. (object_hard_regs_subnode_t): Ditto. (struct object_hard_regs_subnode): Ditto. (object_hard_regs_subnodes, object_hard_regs_subnode_index): Ditto. (setup_object_hard_regs_subnode_index): Ditto. (get_object_hard_regs_subnodes_num): Ditto. (form_object_hard_regs_nodes_forest): Ditto. (finish_object_hard_regs_nodes_tree): Ditto. (finish_object_hard_regs_nodes_forest): Ditto. (allocnos_have_intersected_live_ranges_p): Rename to allocnos_conflict_by_live_ranges_p. Move before copy_freq_compare_func. (pseudos_have_intersected_live_ranges_p): Rename to conflict_by_live_ranges_p. Move before copy_freq_compare_func. (setup_left_conflict_sizes_p, update_left_conflict_sizes_p): Ditto. (empty_profitable_hard_regs, setup_profitable_hard_regs): Ditto. (update_copy_costs): Remove assert. Skip cost update if the hard reg does not belong the class. (assign_hard_reg): Process only profitable hard regs. (uncolorable_allocnos_num): Make it scalar. (allocno_spill_priority): Use ALLOCNO_EXCESS_PRESSURE_POINTS_NUM and ira_reg_class_max_nregs instead of ALLOCNO_LEFT_CONFLICTS_SIZE and ira_reg_class_max_nregs. (bucket_allocno_compare_func): Check frequency first. (sort_bucket): Add compare function as a parameter. (add_allocno_to_ordered_bucket): Assume no coalesced allocnos. (uncolorable_allocnos_splay_tree, USE_SPLAY_P): Remove. (push_allocno_to_stack): Rewrite for checking new allocno colorability. (remove_allocno_from_bucket_and_push): Print cost too. Remove assert. (push_only_colorable): Pass new parameter to sort_bucket. (push_allocno_to_spill): Remove. (allocno_spill_priority_compare): Make it inline and rewrite. (splay_tree_allocate, splay_tree_free): Remove. (allocno_spill_sort_compare): New function. (push_allocnos_to_stack): Sort allocnos for spilling once. Don't build and use splay tree. Choose first allocno in uncolorable allocno bucket to spill. Remove setting spill cost. (all_conflicting_hard_regs): Remove. (setup_allocno_available_regs_num): Check only profitable hard regs. Print info about hard regs nodes. (setup_allocno_left_conflicts_size): Remove. (put_allocno_into_bucket): Don't call setup_allocno_left_conflicts_size. Use setup_left_conflict_sizes_p. (improve_allocation): New. (color_allocnos): Call setup_profitable_hard_regs, form_object_hard_regs_nodes_forest, improve_allocation, finish_object_hard_regs_nodes_forest. Setup spill cost. (print_loop_title): Use pressure classes. (color_allocnso): Ditto. (do_coloring): Remove allocation and freeing splay_tree_node_pool and allocnos_for_spilling. (ira_sort_regnos_for_alter_reg): Don't setup members {first,next}_coalesced_allocno. (color): Remove allocating and freeing removed_splay_allocno_vec. (fast_allocation): Use ira_prohibited_class_mode_regs instead of prohibited_class_mode_regs. * ira-lives.c: Remove mentioning cover classes from the file. Fix formatting. (update_allocno_pressure_excess_length): Use pressure classes. (inc_register_pressure, dec_register_pressure): Check for pressure class. (mark_pseudo_regno_live, mark_pseudo_regno_subword_live): Use pressure class. Use ira_reg_class_nregs instead of ira_reg_class_max_nregs. (mark_pseudo_regno_dead, mark_pseudo_regno_subword_dead): Ditto. (mark_hard_reg_live, mark_hard_reg_dead): Use pressure class. (single_reg_class): Use ira_reg_class_nregs instead of ira_reg_class_max_nregs. (process_bb_node_lives): Use pressure classes. * ira-emit.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Fix formatting. (change_loop): Use pressure classes. (modify_move_list): Call ira_set_allocno_class instead of ira_set_allocno_cover_class. * ira-build.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS and ALLOCNO_CLASS_COST instead of ALLOCNO_COVER_CLASS and ALLOCNO_COVER_CLASS_COST. Use ALLOCNO_UPDATED_CLASS_COST instead of ALLOCNO_UPDATED_COVER_CLASS_COST. Fix formatting. (ira_create_object): Initiate OBJECT_PROFITABLE_HARD_REGS. (ira_create_allocno): Remove initialization of ALLOCNO_SPLAY_REMOVED_P, ALLOCNO_LEFT_CONFLICT_SIZE. Initialize ALLOCNO_COLORABLE_P. (ira_set_allocno_cover_class): Rename to ira_set_allocno_class. Update conflict regs for the objects. (create_cap_allocno): Remove assert. Don't propagate ALLOCNO_AVAILABLE_REGS_NUM. (ira_free_allocno_costs): New function. (finish_allocno): Change a part of code into call of ira_free_allocno_costs. (low_pressure_loop_node_p): Use pressure classes. (object_range_compare_func): Don't compare classes. (setup_min_max_conflict_allocno_ids): Ditto. * loop-invariant.c: Remove mentioning cover classes from the file. Use ira_pressure_classes and ira_pressure_classes_num instead of ira_reg_class_cover_size and ira_reg_class_cover. Fix formatting. (get_cover_class_and_nregs): Rename to get_cover_pressure_and_nregs. Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. Use reg_allocno_class instead of reg_cover_class. (get_inv_cost): Use instead ira_stack_reg_pressure_class of STACK_REG_COVER_CLASS. (get_regno_cover_class): Rename to get_regno_pressure_class. (move_loop_invariants): Initialize and finalize regstat. * ira.c: Remove mentioning cover classes from the file. Add comments about coloring without cover classes. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Fix formatting. (alloc_reg_class_subclasses, setup_reg_subclasses): Move it before setup_class_subset_and_memory_move_costs. (setup_stack_reg_pressure_class, setup_pressure_classes): New. (setup_cover_and_important_classes): Rename to setup_allocno_and_important_classes. (setup_class_translate_array): New. (setup_class_translate): Call it for allocno and pressure classes. (cover_class_order): Rename to allocno_class_order. (comp_reg_classes_func): Use ira_allocno_class_translate instead of ira_class_translate. (reorder_important_classes): Set up ira_important_class_nums. (setup_reg_class_relations): Set up ira_reg_class_superunion. (print_class_cover): Rename to print_classes. Add parameter. (ira_debug_class_cover): Rename to ira_debug_allocno_classes. Print pressure classes too. (find_reg_class_closure): Rename to find_reg_classes. Don't call setup_reg_subclasses. (ira_hard_regno_cover_class): Rename to ira_hard_regno_allocno_class. (ira_reg_class_nregs): Rename to ira_reg_class_max_nregs. (setup_prohibited_class_mode_regs): Use ira_prohibited_class_mode_regs instead of prohibited_class_mode_regs. (clarify_prohibited_class_mode_regs): New function. (ira_init_register_move_cost): Set up ira_max_register_move_cost, ira_max_may_move_in_cost, and ira_max_may_move_out_cost. (ira_init_once): Initialize them. (free_register_move_costs): Process them. (ira_init): Move calls of find_reg_classes and setup_hard_regno_aclass after setup_prohibited_class_mode_regs. Call clarify_prohibited_class_mode_regs. (ira_no_alloc_reg): Remove. (too_high_register_pressure_p): Use pressure classes. * sched-deps.c: Remove mentioning cover classes from the file. Use ira_reg_pressure_cover instead of ira_reg_class_cover. Use ira_pressure_classes and ira_pressure_classes_num instead of ira_reg_class_cover_size and ira_reg_class_cover. (mark_insn_hard_regno_birth, mark_hard_regno_death): Use sched_regno_pressure_class instead of sched_regno_cover_class. (mark_insn_pseudo_birth, mark_pseudo_death): Ditto. Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. * ira.h: Add 2010 to Copyright. (ira_no_alloc_reg): Remove external. (struct target_ira): Rename x_ira_hard_regno_cover_class, x_ira_reg_class_cover_size, x_ira_reg_class_cover, and x_ira_class_translate to x_ira_hard_regno_allocno_class, x_ira_allocno_classes_num, x_ira_allocno_classes, and x_ira_allocno_class_translate. Add x_ira_pressure_classes_num, x_ira_pressure_classes, x_ira_pressure_class_translate, and x_ira_stack_reg_pressure_class. Rename x_ira_reg_class_nregs to x_ira_reg_class_max_nregs. Add x_ira_reg_class_min_nregs and x_ira_no_alloc_regs. (ira_hard_regno_cover_class): Rename to ira_hard_regno_allocno_class. (ira_reg_class_cover_size, ira_reg_class_cover): Rename to ira_allocno_classes_num and ira_allocno_classes. (ira_class_translate): Rename to ira_allocno_class_translate. (ira_pressure_classes_num, ira_pressure_classes): New definitions. (ira_pressure_class_translate, ira_stack_reg_pressure_class): Ditto. (ira_reg_class_nregs): Rename to ira_reg_class_max_nregs. (ira_reg_class_min_nregs, ira_stack_reg_pressure_class): New (ira_no_alloc_regs): New. * ira-costs.c: Add 2010 to Copyright. Remove mentioning cover classes from the file. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Use ALLOCNO_CLASS_COST instead of ALLOCNO_COVER_CLASS_COST. (regno_cover_class): Rename to regno_aclass. (record_reg_classes): Use ira_reg_class_subunion instead of ira_reg_class_union. (record_address_regs): Check overflow. (scan_one_insn): Ditto. (print_allocno_costs): Print total mem cost fore regional allocation. (print_pseudo_costs): Use REG_N_REFS. (find_costs_and_classes): Use classes intersected with them on the 1st pass. Check overflow. Use ira_reg_class_subunion instead of ira_reg_class_union. Use ira_allocno_class_translate and regno_aclass instead of ira_class_translate and regno_cover_class. Modify code for finding regno_aclass. Setup preferred classes for the next pass. (setup_allocno_cover_class_and_costs): Rename to setup_allocno_class_and_costs. Use regno_aclass instead of regno_cover_class. Use ira_set_allocno_class instead of ira_set_allocno_cover_class. (init_costs, finish_costs): Use regno_aclass instead of regno_cover_class. (ira_costs): Use setup_allocno_class_and_costs instead of setup_allocno_cover_class_and_costs. (ira_tune_allocno_costs_and_cover_classes): Rename to ira_tune_allocno_costs. Check overflow. Skip conflict hard regs by processing objects. Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. * rtl.h (reg_cover_class): Rename to reg_allocno_class. * sched-int.h: Remove mentioning cover classes from the file. (sched_regno_cover_class): Rename to sched_regno_pressure_class. * reginfo.c: Add 2010 to Copyright. Remove mentioning cover classes from the file. (struct reg_pref): Rename coverclass into allocnoclass. (reg_cover_class): Rename to reg_allocno_class. * Makefile.in (ira-color.o): Remove SPLAY_TREE_H from dependencies. * config/alpha/alpha.h (IRA_COVER_CLASSES): Remove. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/avr/avr.h (IRA_COVER_CLASSES): Ditto. * config/bfin/bfin.h (IRA_COVER_CLASSES): Ditto. * config/cris/cris.h (IRA_COVER_CLASSES): Ditto. * config/fr30/fr30.h (IRA_COVER_CLASSES): Ditto. * config/frv/frv.h (IRA_COVER_CLASSES): Ditto. * config/h8300/h8300.h (IRA_COVER_CLASSES): Ditto. * config/i386/i386.h (STACK_REG_COVER_CLASS): Ditto. * config/i386/i386.c (TARGET_IRA_COVER_CLASSES) (i386_ira_cover_classes): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/iq2000/iq2000.h (IRA_COVER_CLASSES): Ditto. * config/m32r/m32r.h (IRA_COVER_CLASSES): Ditto. * config/m68k/m68k.h (IRA_COVER_CLASSES): Ditto. * config/mcore/mcore.h (IRA_COVER_CLASSES): Ditto. * config/mep/mep.h (IRA_COVER_CLASSES): Ditto. * config/mips/mips.c (TARGET_IRA_COVER_CLASSES) (mips_ira_cover_classes): Ditto. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): Ditto. * config/moxie/moxie.h (IRA_COVER_CLASSES): Ditto. * config/pa/pa64-regs.h (IRA_COVER_CLASSES): Ditto. * config/pa/pa32-regs.h (IRA_COVER_CLASSES): Ditto. * config/picochip/picochip.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES_PRE_VSX) (IRA_COVER_CLASSES_VSX): Ditto. * config/rs6000/rs6000.c (TARGET_IRA_COVER_CLASSES) (rs6000_ira_cover_classes): Ditto. * config/rx/rx.h (IRA_COVER_CLASSES): Ditto. * config/s390/s390.h (IRA_COVER_CLASSES): Ditto. * config/score/score.h (IRA_COVER_CLASSES): Ditto. * config/sh/sh.h (IRA_COVER_CLASSES): Ditto. * config/sparc/sparc.h (IRA_COVER_CLASSES): Ditto. * config/spu/spu.h (IRA_COVER_CLASSES): Ditto. * config/stormy16/stormy16.h (IRA_COVER_CLASSES): Ditto. * config/v850/v850.h (IRA_COVER_CLASSES): Ditto. * config/vax/vax.h (IRA_COVER_CLASSES): Ditto. * config/xtensa/xtensa.h (IRA_COVER_CLASSES): Ditto. From-SVN: r171649
2011-03-29 03:02:05 +02:00
/* allocnoclass is a register class that IRA uses for allocating
invoke.texi (-fsched-pressure): Document it. 2009-09-02 Vladimir Makarov <vmakarov@redhat.com> * doc/invoke.texi (-fsched-pressure): Document it. (-fsched-reg-pressure-heuristic): Remove it. * reload.c (ira.h): Include. (find_reloads): Add choosing reload on number of small spilled classes. * haifa-sched.c (ira.h): Include. (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure, saved_reg_pressure, curr_reg_live, saved_reg_live, region_ref_regs): New variables. (sched_init_region_reg_pressure_info, mark_regno_birth_or_death, initiate_reg_pressure_info, setup_ref_regs, initiate_bb_reg_pressure_info, save_reg_pressure, restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New functions. (setup_insn_reg_pressure_info): New function. (rank_for_schedule): Add pressure checking and insn issue time. Remove comparison of insn reg weights. (ready_sort): Set insn reg pressure info. (update_register_pressure, setup_insn_max_reg_pressure, update_reg_and_insn_max_reg_pressure, sched_setup_bb_reg_pressure_info): New functions. (schedule_insn): Add code for printing and updating reg pressure info. (find_set_reg_weight, find_insn_reg_weight): Remove. (ok_for_early_queue_removal): Do nothing if pressure_only_p. (debug_ready_list): Print reg pressure info. (schedule_block): Ditto. Check insn issue time. (sched_init): Set up sched_pressure_p. Allocate and set up some reg pressure related info. (sched_finish): Free some reg pressure related info. (fix_tick_ready): Make insn always ready if pressure_p. (init_h_i_d): Don't call find_insn_reg_weight. (haifa_finish_h_i_d): Free insn reg pressure info. * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move to ira.h. * ira-lives.c (single_reg_class): Check mode to find how many registers are necessary for operand. (ira_implicitly_set_insn_hard_regs): New. * common.opt (fsched-pressure): New options. (fsched-reg-pressure-heuristic): Remove. * ira.c (setup_eliminable_regset): Rename to ira_setup_eliminable_regset. Make it external. (expand_reg_info): Pass cover class to setup_reg_classes. (ira): Call resize_reg_info instead of allocate_reg_info. * sched-deps.c: Include ira.h. (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New. (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses, reg_pressure_info, insn_use_p, mark_insn_pseudo_birth, mark_insn_hard_regno_birth, mark_insn_reg_birth, mark_pseudo_death, mark_hard_regno_death, mark_reg_death, mark_insn_reg_store, mark_insn_reg_clobber, setup_insn_reg_pressure_info): New. (sched_analyze_1): Update implicit_reg_pending_uses. (sched_analyze_insn): Find implicit sets, uses, clobbers of regs. Use them to create dependencies. Set insn reg uses and pressure info. Process reg_pending_uses in one place. (free_deps): Free implicit sets. (remove_from_deps): Remove implicit sets if necessary. Check implicit sets when clearing reg_last_in_use. (init_deps_global): Clear implicit_reg_pending_clobbers and implicit_reg_pending_uses. * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move from ira-int.h. (ira_setup_eliminable_regset, ira_set_pseudo_classes, ira_implicitly_set_insn_hard_regs): New prototypes. * ira-costs.c (pseudo_classes_defined_p, allocno_p, cost_elements_num): New variables. (allocno_costs, total_costs): Rename to costs and total_allocno_costs. (COSTS_OF_ALLOCNO): Rename to COSTS. (allocno_pref): Rename to pref. (allocno_pref_buffer): Rename to pref_buffer. (common_classes): Rename to regno_cover_class. (COST_INDEX): New. (record_reg_classes): Set allocno attributes only if allocno_p. (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM. (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM and COSTS_OF_ALLOCNO. (print_costs): Rename to print_allocno_costs. (print_pseudo_costs): New. (process_bb_node_for_costs): Split into 2 functions with new function process_bb_for_costs. Pass BB to process_bb_for_costs. (find_allocno_class_costs): Rename to find_costs_and_classes. Add new parameter dump_file. Use cost_elements_num instead of ira_allocnos_num. Make one iteration if preferred classes were already calculated for scheduler. Make 2 versions of code depending on allocno_p. (setup_allocno_cover_class_and_costs): Check allocno_p. Use regno_cover_class and COSTS instead of common_classes and COSTS_OF_ALLOCNO. (init_costs, finish_costs): New. (ira_costs): Set up allocno_p and cost_elements_num. Call init_costs and finish_costs. (ira_set_pseudo_classes): New. * rtl.h (allocate_reg_info): Remove. (resize_reg_info): Change return type. (reg_cover_class): New. (setup_reg_classes): Add new parameter. * sched-int.h (struct deps_reg): New member implicit_sets. (sched_pressure_p, sched_regno_cover_class): New external definitions. (INCREASE_BITS): New macro. (struct reg_pressure_data, struct reg_use_data): New. (struct _haifa_insn_data): Remove reg_weight. Add members reg_pressure, reg_use_list, reg_set_list, and reg_pressure_excess_cost_change. (struct deps): New member implicit_sets. (pressure_p): New variable. (COVER_CLASS_BITS, INCREASE_BITS): New macros. (struct reg_pressure_data, struct reg_use_data): New. (INSN_REG_WEIGHT): Remove. (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST, INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros. (sched_init_region_reg_pressure_info, sched_setup_bb_reg_pressure_info): New prototypes. * reginfo.c (struct reg_pref): New member coverclass. (reg_cover_class): New function. (reginfo_init, pass_reginfo_init): Move after free_reg_info. (reg_info_size): New variable. (allocate_reg_info): Make static. Setup reg_info_size. (resize_reg_info): Use reg_info_size. Return flag of resizing. (setup_reg_classes): Add a new parameter. Setup cover class too. * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the dependencies. * sched-rgn.c (deps_join): Set up implicit_sets. (schedule_region): Set up region and basic blocks pressure relative info. * passes.c (init_optimization_passes): Move pass_subregs_of_mode_init before pass_sched. From-SVN: r151348
2009-09-02 20:54:25 +02:00
the pseudo. */
[multiple changes] 2011-03-28 Vladimir Makarov <vmakarov@redhat.com> * ira-color.c (update_left_conflict_sizes_p): Don't assume that conflict object hard regset nodes have intersecting hard reg sets. * regmove.c (regmove_optimize): Move ira_set_pseudo_classes call after regstat_init_n_sets_and_refs. * ira.c: Add more comments at the top. (setup_stack_reg_pressure_class, setup_pressure_classes): Add comments how we compute the register pressure classes. (setup_allocno_and_important_classes): Add more comments. (setup_class_translate_array, reorder_important_classes) (setup_reg_class_relations): Add comments. * ira-emit.c: Add 2011 to the Copyright line. Add comments at the start of the file. * ira-color.c: Add 2011 to the Copyright line. (assign_hard_reg): Add more comments. (improve_allocation): Ditto. * ira-costs.c: Add 2011 to the Copyright line. (setup_cost_classes, setup_regno_cost_classes_by_aclass): Add more comments. (setup_regno_cost_classes_by_mode): Ditto. Initial patches from ira-improv branch: 2010-08-13 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c: (ira_create_object): Remove initialization of OBJECT_PROFITABLE_HARD_REGS. Initialize OBJECT_ADD_DATA. (ira_create_allocno): Remove initialization of ALLOCNO_MEM_OPTIMIZED_DEST, ALLOCNO_MEM_OPTIMIZED_DEST_P, ALLOCNO_SOMEWHERE_RENAMED_P, ALLOCNO_CHILD_RENAMED_P, ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P, ALLOCNO_COLORABLE_P, ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO, ALLOCNO_FIRST_COALESCED_ALLOCNO, ALLOCNO_NEXT_COALESCED_ALLOCNO. Initialize ALLOCNO_ADD_DATA. (copy_info_to_removed_store_destinations): Use ALLOCNO_EMIT_DATA and allocno_emit_reg instead of ALLOCNO_MEM_OPTIMIZED_DEST_P and ALLOCNO_REG. (ira_flattening): Ditto. Use ALLOCNO_EMIT_DATA instead of ALLOCNO_MEM_OPTIMIZED_DEST and ALLOCNO_SOMEWHERE_RENAMED_P. * ira.c (ira_reallocate): Remove. (setup_pressure_classes): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. (setup_allocno_assignment_flags): Use ALLOCNO_EMIT_DATA. (ira): Call ira_initiate_emit_data and ira_finish_emit_data. * ira-color.c: Use ALLOCNO_COLOR_DATA instead of ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P, ALLOCNO_COLORABLE_P, ALLOCNO_AVAILABLE_REGS_NUM, ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO. ALLOCNO_TEMP. Use OBJECT_COLOR_DATA instead of OBJECT_PROFITABLE_HARD_REGS, OBJECT_HARD_REGS_NODE, OBJECT_HARD_REGS_SUBNODES_START, OBJECT_HARD_REGS_SUBNODES_NUM. Fix formatting. (object_hard_regs_t, object_hard_regs_node_t): Move from ira-int.h. (struct object_hard_regs, struct object_hard_regs_node): Ditto. (struct allocno_color_data): New. (allocno_color_data_t): New typedef. (allocno_color_data): New definition. (ALLOCNO_COLOR_DATA): New macro. (struct object_color_data): New. (object_color_data_t): New typedef. (object_color_data): New definition. (OBJECT_COLOR_DATA): New macro. (update_copy_costs, calculate_allocno_spill_cost): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. (move_spill_restore, update_curr_costs): Ditto. (allocno_spill_priority): Make it inline. (color_pass): Allocate and free allocno_color_dat and object_color_data. (struct coalesce_data, coalesce_data_t): New. (allocno_coalesce_data): New definition. (ALLOCNO_COALESCE_DATA): New macro. (merge_allocnos, coalesced_allocno_conflict_p): Use ALLOCNO_COALESCED_DATA instead of ALLOCNO_FIRST_COALESCED_ALLOCNO, ALLOCNO_NEXT_COALESCED_ALLOCNO, ALLOCNO_TEMP. (coalesce_allocnos): Ditto. (setup_coalesced_allocno_costs_and_nums): Ditto. (collect_spilled_coalesced_allocnos): Ditto. (slot_coalesced_allocno_live_ranges_intersect_p): Ditto. (setup_slot_coalesced_allocno_live_ranges): Ditto. (coalesce_spill_slots): Ditto. (ira_sort_regnos_for_alter_reg): Ditto. Allocate, initialize and free allocno_coalesce_data. * ira-conflicts.c: Fix formatting. (process_regs_for_copy): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. (build_object_conflicts): Optimize. * ira-costs.c (record_reg_classes): Optimize. Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost, ira_may_move_in_cost, and ira_may_move_out_cost instead of ira_get_register_move_cost and ira_get_may_move_cost. (record_address_regs): Ditto. (scan_one_insn): Optimize. (find_costs_and_classes): Optimize. (process_bb_node_for_hard_reg_moves): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. * ira-emit.c: Use allocno_emit_reg, ALLOCNO_EMIT_DATA instead of ALLOCNO_REG, ALLOCNO_CHILD_RENAMED_P, ALLOCNO_MEM_OPTIMIZED_DEST, ALLOCNO_MEM_OPTIMIZED_DEST_P, and ALLOCNO_SOMEWHERE_RENAMED_P. (ira_allocno_emit_data, void_p, new_allocno_emit_data_vec): New definitions. (ira_initiate_emit_data, ira_finish_emit_data) (create_new_allocno): New functions. (modify_move_list): Call create_new_alloc instead of ira_create_allocno. (emit_move_list): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. * ira-int.h: Fix some comments. (object_hard_regs_t, object_hard_regs_node_t): Move to ira-color.c. (struct object_hard_regs, struct object_hard_regs_node): Ditto. (struct ira_object): Remove profitable_hard_regs, hard_regs_node, hard_regs_subnodes_start, hard_regs_subnodes_num. Add new member add_data. (struct ira_allocno): Make mode and aclass a bitfield. Move other bitfield after mode. Make hard_regno a short int. Make hard_regno short. Remove first_coalesced_allocno and next_coalesced_allocno. Move mem_optimized_dest_p, somewhere_renamed_p, child_renamed_p, reg, and mem_optimized_dest into struct ira_emit_data. Remove in_graph_p, may_be_spilled_p, available_regs_num, next_bucket_allocno, prev_bucket_allocno, temp, colorable_p. Add new member add_data. (ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P): Remove. (ALLOCNO_COLORABLE_P, ALLOCNO_AVAILABLE_REGS_NUM): Remove. (ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO): Remove. (ALLOCNO_TEMP, ALLOCNO_FIRST_COALESCED_ALLOCNO): Remove. (ALLOCNO_NEXT_COALESCED_ALLOCNO): Remove. (ALLOCNO_ADD_DATA): New macro. (ira_emit_data_t): New typedef. (struct ira_emit_data): New. Move mem_optimized_dest_p, somewhere_renamed_p, child_renamed_p, reg, mem_optimized_dest from struct ira_allocno. (ALLOCNO_EMIT_DATA): New macro. (ira_allocno_emit_data, allocno_emit_reg): New. (ALLOCNO_PROFITABLE_HARD_REGS, OBJECT_HARD_REGS_NODE): Remove. (OBJECT_HARD_REGS_SUBNODES_STAR, OBJECT_HARD_REGS_SUBNODES_NUM): Remove. (OBJECT_ADD_DATA): New macro. (ira_reallocate): Remove. (ira_initiate_emit_data, ira_finish_emit_data): New. (ira_get_register_move_cost, ira_get_may_move_cost): Remove. (ira_init_register_move_cost_if_necessary): New. (ira_object_conflict_iter_next): Merge into ira_object_conflict_iter_cond. (FOR_EACH_OBJECT_CONFLICT): Don't use ira_object_conflict_iter_next. * ira-live.c: (process_single_reg_class_operands): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. 2010-08-13 Vladimir Makarov <vmakarov@redhat.com> * ira-int.h (struct target_ira_int): Remove x_cost_classes. * ira-costs.c: Fix formatting. (cost_classes, cost_classes_num): Remove. (struct cost_classes, cost_classes_t, const_cost_classes_t): New. (regno_cost_classes, cost_classes_hash, cost_classes_eq): New. (cost_classes_del, cost_classes_htab): New. (cost_classes_aclass_cache, cost_classes_mode_cache): New. (initiate_regno_cost_classes, setup_cost_classes): New. (setup_regno_cost_classes_by_aclass): New. (setup_regno_cost_classes_by_mode, finish_regno_cost_classes): New. (record_reg_classes): Use regno_cost_classes instead of cost_classes. Move checking opposite operand up. (record_address_regs): Use regno_cost_classes instead of cost_classes. (scan_one_insn): Ditto. Use always general register. (print_allocno_costs): Use regno_cost_classes instead of cost_classes. (print_pseudo_costs): Ditto. Use Reg_N_REFS. (find_costs_and_classes): Set up cost classes for each registers. Use also their mode for this. Use regno_cost_classes instead of cost_classes. (setup_allocno_class_and_costs): Use regno_cost_classes instead of cost_classes. (free_ira_costs, ira_init_costs): Don't use cost_classes. (ira_costs, ira_set_pseudo_classes): Call initiate_regno_cost_classes and finish_regno_cost_classes. 2010-10-04 Vladimir Makarov <vmakarov@redhat.com> * target-def.h (TARGET_IRA_COVER_CLASSES): Remove. * target.def (ira_cover_classes): Remove. * doc/tm.texi: Remove TARGET_IRA_COVER_CLASSES and IRA_COVER_CLASSES. * doc/tm.texi.in: Ditto. * ira-conflicts.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Use ALLOCNO_COVER_CLASS_COST instead of ALLOCNO_CLASS_COST. Fix formatting. * targhooks.c (default_ira_cover_classes): Remove. * targhooks.h (default_ira_cover_classes): Ditto. * haifa-sched.c: Remove mentioning cover classes from the file. Use ira_reg_pressure_cover instead of ira_reg_class_cover. Use ira_pressure_classes and ira_pressure_classes_num instead of ira_reg_class_cover_size and ira_reg_class_cover. Use sched_regno_pressure_class instead of sched_regno_cover_class. (mark_regno_birth_or_death, setup_insn_reg_pressure_info): Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. * ira-int.h: Add 2010 to Copyright. Remove mentioning cover classes from the file. (object_hard_regs_t, object_hard_regs_node_t): New typedefs. (struct object_hard_regs, struct object_hard_regs_node): New. (struct ira_object): New members profitable_hard_regs, hard_regs_node, hard_regs_subnodes_start, hard_regs_subnodes_num. (struct ira_allocno): Rename cover_class to aclass. Rename cover_class_cost and updated_cover_class_cost to class_cost and updated_class_cost. Remove splay_removed_p and left_conflict_size. Add new members colorable_p. (ALLOCNO_SPLAY_REMOVED_P, ALLOCNO_LEFT_CONFLICTS_SIZE): Remove. (ALLOCNO_COLORABLE_P): New macro. (ALLOCNO_COVER_CLASS): Rename to ALLOCNO_CLASS. (ALLOCNO_COVER_CLASS_COST, ALLOCNO_UPDATED_COVER_CLASS_COST): Rename to ALLOCNO_CLASS_COST and ALLOCNO_UPDATED__CLASS_COST. (OBJECT_...): Rename parameter C to O. (OBJECT_PROFITABLE_HARD_REGS): New macro. (OBJECT_HARD_REGS_NODE, OBJECT_HARD_REGS_SUBNODES_START) (OBJECT_HARD_REGS_SUBNODES_NUM): New macros. (struct target_ira_int): New members x_ira_max_memory_move_cost, x_ira_max_register_move_cost, x_ira_max_may_move_in_cost, x_ira_max_may_move_out_cost, x_ira_reg_allocno_class_p, x_ira_reg_pressure_class_p, x_ira_important_class_nums, x_ira_reg_class_superunion. Rename x_prohibited_class_mode_reg to x_ira_prohibited_class_mode_reg. Rename x_ira_reg_class_union to x_ira_reg_class_subunion. (ira_max_memory_move_cost, ira_max_register_move_cost) (ira_max_may_move_in_cost, ira_max_may_move_out_cost) (ira_reg_allocno_class_p, ira_reg_pressure_class_p) (ira_important_class_nums, ira_reg_class_superunion): New macros. (prohibited_class_mode_regs): Rename to ira_prohibited_class_mode_regs. (ira_reg_class_union): Rename to ira_reg_class_subunion. (ira_debug_class_cover): Rename to ira_debug_allocno_classes. (ira_set_allocno_cover_class): Rename to ira_set_allocno_class. (ira_tune_allocno_costs_and_cover_classes): Rename to ira_tune_allocno_costs. (ira_debug_hard_regs_forest): New. (ira_object_conflict_iter_init, ira_object_conflict_iter_cond) (ira_object_conflict_iter_next): Fix comments. (ira_hard_reg_set_intersection_p, hard_reg_set_size): New functions. (ira_allocate_and_set_costs, ira_allocate_and_copy_costs): Rename cover_class to aclass. (ira_allocate_and_accumulate_costs): Ditto. (ira_allocate_and_set_or_copy_costs): Ditto. * opts.c (decode_options): Remove ira_cover_class check. * ira-color.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS, ALLOCNO_CLASS_COST, and ALLOCNO_UPDATED_CLASS_COST instead of ALLOCNO_COVER_CLASS, ALLOCNO_COVER_CLASS_COST, and ALLOCNO_UPDATED_COVER_CLASS_COST. Fix formatting. (splay-tree.h): Remove include. (allocno_coalesced_p, processed_coalesced_allocno_bitmap): Move before copy_freq_compare_func. (allocnos_for_spilling, removed_splay_allocno_vec): Remove. (object_hard_regs_vec, object_hard_regs_htab, node_check_tick): New definitions. (hard_regs_roots, hard_regs_node_vec): Ditto. (object_hard_regs_hash, object_hard_regs_eq, find_hard_regs): Ditto. (insert_hard_regs, init_object_hard_regs, add_object_hard_regs): Ditto. (finish_object_hard_regs, object_hard_regs_compare): Ditto. (create_new_object_hard_regs_node): Ditto. (add_new_object_hard_regs_node_to_forest): Ditto. (add_object_hard_regs_to_forest, collect_object_hard_regs_cover): Ditto. (setup_object_hard_regs_nodes_parent, first_common_ancestor_node): Ditto. (print_hard_reg_set, print_hard_regs_subforest): Ditto. (print_hard_regs_forest, ira_debug_hard_regs_forest): Ditto. (remove_unused_object_hard_regs_nodes): Ditto. (enumerate_object_hard_regs_nodes): Ditto. (object_hard_regs_nodes_num, object_hard_regs_nodes): Ditto. (object_hard_regs_subnode_t): Ditto. (struct object_hard_regs_subnode): Ditto. (object_hard_regs_subnodes, object_hard_regs_subnode_index): Ditto. (setup_object_hard_regs_subnode_index): Ditto. (get_object_hard_regs_subnodes_num): Ditto. (form_object_hard_regs_nodes_forest): Ditto. (finish_object_hard_regs_nodes_tree): Ditto. (finish_object_hard_regs_nodes_forest): Ditto. (allocnos_have_intersected_live_ranges_p): Rename to allocnos_conflict_by_live_ranges_p. Move before copy_freq_compare_func. (pseudos_have_intersected_live_ranges_p): Rename to conflict_by_live_ranges_p. Move before copy_freq_compare_func. (setup_left_conflict_sizes_p, update_left_conflict_sizes_p): Ditto. (empty_profitable_hard_regs, setup_profitable_hard_regs): Ditto. (update_copy_costs): Remove assert. Skip cost update if the hard reg does not belong the class. (assign_hard_reg): Process only profitable hard regs. (uncolorable_allocnos_num): Make it scalar. (allocno_spill_priority): Use ALLOCNO_EXCESS_PRESSURE_POINTS_NUM and ira_reg_class_max_nregs instead of ALLOCNO_LEFT_CONFLICTS_SIZE and ira_reg_class_max_nregs. (bucket_allocno_compare_func): Check frequency first. (sort_bucket): Add compare function as a parameter. (add_allocno_to_ordered_bucket): Assume no coalesced allocnos. (uncolorable_allocnos_splay_tree, USE_SPLAY_P): Remove. (push_allocno_to_stack): Rewrite for checking new allocno colorability. (remove_allocno_from_bucket_and_push): Print cost too. Remove assert. (push_only_colorable): Pass new parameter to sort_bucket. (push_allocno_to_spill): Remove. (allocno_spill_priority_compare): Make it inline and rewrite. (splay_tree_allocate, splay_tree_free): Remove. (allocno_spill_sort_compare): New function. (push_allocnos_to_stack): Sort allocnos for spilling once. Don't build and use splay tree. Choose first allocno in uncolorable allocno bucket to spill. Remove setting spill cost. (all_conflicting_hard_regs): Remove. (setup_allocno_available_regs_num): Check only profitable hard regs. Print info about hard regs nodes. (setup_allocno_left_conflicts_size): Remove. (put_allocno_into_bucket): Don't call setup_allocno_left_conflicts_size. Use setup_left_conflict_sizes_p. (improve_allocation): New. (color_allocnos): Call setup_profitable_hard_regs, form_object_hard_regs_nodes_forest, improve_allocation, finish_object_hard_regs_nodes_forest. Setup spill cost. (print_loop_title): Use pressure classes. (color_allocnso): Ditto. (do_coloring): Remove allocation and freeing splay_tree_node_pool and allocnos_for_spilling. (ira_sort_regnos_for_alter_reg): Don't setup members {first,next}_coalesced_allocno. (color): Remove allocating and freeing removed_splay_allocno_vec. (fast_allocation): Use ira_prohibited_class_mode_regs instead of prohibited_class_mode_regs. * ira-lives.c: Remove mentioning cover classes from the file. Fix formatting. (update_allocno_pressure_excess_length): Use pressure classes. (inc_register_pressure, dec_register_pressure): Check for pressure class. (mark_pseudo_regno_live, mark_pseudo_regno_subword_live): Use pressure class. Use ira_reg_class_nregs instead of ira_reg_class_max_nregs. (mark_pseudo_regno_dead, mark_pseudo_regno_subword_dead): Ditto. (mark_hard_reg_live, mark_hard_reg_dead): Use pressure class. (single_reg_class): Use ira_reg_class_nregs instead of ira_reg_class_max_nregs. (process_bb_node_lives): Use pressure classes. * ira-emit.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Fix formatting. (change_loop): Use pressure classes. (modify_move_list): Call ira_set_allocno_class instead of ira_set_allocno_cover_class. * ira-build.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS and ALLOCNO_CLASS_COST instead of ALLOCNO_COVER_CLASS and ALLOCNO_COVER_CLASS_COST. Use ALLOCNO_UPDATED_CLASS_COST instead of ALLOCNO_UPDATED_COVER_CLASS_COST. Fix formatting. (ira_create_object): Initiate OBJECT_PROFITABLE_HARD_REGS. (ira_create_allocno): Remove initialization of ALLOCNO_SPLAY_REMOVED_P, ALLOCNO_LEFT_CONFLICT_SIZE. Initialize ALLOCNO_COLORABLE_P. (ira_set_allocno_cover_class): Rename to ira_set_allocno_class. Update conflict regs for the objects. (create_cap_allocno): Remove assert. Don't propagate ALLOCNO_AVAILABLE_REGS_NUM. (ira_free_allocno_costs): New function. (finish_allocno): Change a part of code into call of ira_free_allocno_costs. (low_pressure_loop_node_p): Use pressure classes. (object_range_compare_func): Don't compare classes. (setup_min_max_conflict_allocno_ids): Ditto. * loop-invariant.c: Remove mentioning cover classes from the file. Use ira_pressure_classes and ira_pressure_classes_num instead of ira_reg_class_cover_size and ira_reg_class_cover. Fix formatting. (get_cover_class_and_nregs): Rename to get_cover_pressure_and_nregs. Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. Use reg_allocno_class instead of reg_cover_class. (get_inv_cost): Use instead ira_stack_reg_pressure_class of STACK_REG_COVER_CLASS. (get_regno_cover_class): Rename to get_regno_pressure_class. (move_loop_invariants): Initialize and finalize regstat. * ira.c: Remove mentioning cover classes from the file. Add comments about coloring without cover classes. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Fix formatting. (alloc_reg_class_subclasses, setup_reg_subclasses): Move it before setup_class_subset_and_memory_move_costs. (setup_stack_reg_pressure_class, setup_pressure_classes): New. (setup_cover_and_important_classes): Rename to setup_allocno_and_important_classes. (setup_class_translate_array): New. (setup_class_translate): Call it for allocno and pressure classes. (cover_class_order): Rename to allocno_class_order. (comp_reg_classes_func): Use ira_allocno_class_translate instead of ira_class_translate. (reorder_important_classes): Set up ira_important_class_nums. (setup_reg_class_relations): Set up ira_reg_class_superunion. (print_class_cover): Rename to print_classes. Add parameter. (ira_debug_class_cover): Rename to ira_debug_allocno_classes. Print pressure classes too. (find_reg_class_closure): Rename to find_reg_classes. Don't call setup_reg_subclasses. (ira_hard_regno_cover_class): Rename to ira_hard_regno_allocno_class. (ira_reg_class_nregs): Rename to ira_reg_class_max_nregs. (setup_prohibited_class_mode_regs): Use ira_prohibited_class_mode_regs instead of prohibited_class_mode_regs. (clarify_prohibited_class_mode_regs): New function. (ira_init_register_move_cost): Set up ira_max_register_move_cost, ira_max_may_move_in_cost, and ira_max_may_move_out_cost. (ira_init_once): Initialize them. (free_register_move_costs): Process them. (ira_init): Move calls of find_reg_classes and setup_hard_regno_aclass after setup_prohibited_class_mode_regs. Call clarify_prohibited_class_mode_regs. (ira_no_alloc_reg): Remove. (too_high_register_pressure_p): Use pressure classes. * sched-deps.c: Remove mentioning cover classes from the file. Use ira_reg_pressure_cover instead of ira_reg_class_cover. Use ira_pressure_classes and ira_pressure_classes_num instead of ira_reg_class_cover_size and ira_reg_class_cover. (mark_insn_hard_regno_birth, mark_hard_regno_death): Use sched_regno_pressure_class instead of sched_regno_cover_class. (mark_insn_pseudo_birth, mark_pseudo_death): Ditto. Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. * ira.h: Add 2010 to Copyright. (ira_no_alloc_reg): Remove external. (struct target_ira): Rename x_ira_hard_regno_cover_class, x_ira_reg_class_cover_size, x_ira_reg_class_cover, and x_ira_class_translate to x_ira_hard_regno_allocno_class, x_ira_allocno_classes_num, x_ira_allocno_classes, and x_ira_allocno_class_translate. Add x_ira_pressure_classes_num, x_ira_pressure_classes, x_ira_pressure_class_translate, and x_ira_stack_reg_pressure_class. Rename x_ira_reg_class_nregs to x_ira_reg_class_max_nregs. Add x_ira_reg_class_min_nregs and x_ira_no_alloc_regs. (ira_hard_regno_cover_class): Rename to ira_hard_regno_allocno_class. (ira_reg_class_cover_size, ira_reg_class_cover): Rename to ira_allocno_classes_num and ira_allocno_classes. (ira_class_translate): Rename to ira_allocno_class_translate. (ira_pressure_classes_num, ira_pressure_classes): New definitions. (ira_pressure_class_translate, ira_stack_reg_pressure_class): Ditto. (ira_reg_class_nregs): Rename to ira_reg_class_max_nregs. (ira_reg_class_min_nregs, ira_stack_reg_pressure_class): New (ira_no_alloc_regs): New. * ira-costs.c: Add 2010 to Copyright. Remove mentioning cover classes from the file. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Use ALLOCNO_CLASS_COST instead of ALLOCNO_COVER_CLASS_COST. (regno_cover_class): Rename to regno_aclass. (record_reg_classes): Use ira_reg_class_subunion instead of ira_reg_class_union. (record_address_regs): Check overflow. (scan_one_insn): Ditto. (print_allocno_costs): Print total mem cost fore regional allocation. (print_pseudo_costs): Use REG_N_REFS. (find_costs_and_classes): Use classes intersected with them on the 1st pass. Check overflow. Use ira_reg_class_subunion instead of ira_reg_class_union. Use ira_allocno_class_translate and regno_aclass instead of ira_class_translate and regno_cover_class. Modify code for finding regno_aclass. Setup preferred classes for the next pass. (setup_allocno_cover_class_and_costs): Rename to setup_allocno_class_and_costs. Use regno_aclass instead of regno_cover_class. Use ira_set_allocno_class instead of ira_set_allocno_cover_class. (init_costs, finish_costs): Use regno_aclass instead of regno_cover_class. (ira_costs): Use setup_allocno_class_and_costs instead of setup_allocno_cover_class_and_costs. (ira_tune_allocno_costs_and_cover_classes): Rename to ira_tune_allocno_costs. Check overflow. Skip conflict hard regs by processing objects. Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. * rtl.h (reg_cover_class): Rename to reg_allocno_class. * sched-int.h: Remove mentioning cover classes from the file. (sched_regno_cover_class): Rename to sched_regno_pressure_class. * reginfo.c: Add 2010 to Copyright. Remove mentioning cover classes from the file. (struct reg_pref): Rename coverclass into allocnoclass. (reg_cover_class): Rename to reg_allocno_class. * Makefile.in (ira-color.o): Remove SPLAY_TREE_H from dependencies. * config/alpha/alpha.h (IRA_COVER_CLASSES): Remove. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/avr/avr.h (IRA_COVER_CLASSES): Ditto. * config/bfin/bfin.h (IRA_COVER_CLASSES): Ditto. * config/cris/cris.h (IRA_COVER_CLASSES): Ditto. * config/fr30/fr30.h (IRA_COVER_CLASSES): Ditto. * config/frv/frv.h (IRA_COVER_CLASSES): Ditto. * config/h8300/h8300.h (IRA_COVER_CLASSES): Ditto. * config/i386/i386.h (STACK_REG_COVER_CLASS): Ditto. * config/i386/i386.c (TARGET_IRA_COVER_CLASSES) (i386_ira_cover_classes): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/iq2000/iq2000.h (IRA_COVER_CLASSES): Ditto. * config/m32r/m32r.h (IRA_COVER_CLASSES): Ditto. * config/m68k/m68k.h (IRA_COVER_CLASSES): Ditto. * config/mcore/mcore.h (IRA_COVER_CLASSES): Ditto. * config/mep/mep.h (IRA_COVER_CLASSES): Ditto. * config/mips/mips.c (TARGET_IRA_COVER_CLASSES) (mips_ira_cover_classes): Ditto. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): Ditto. * config/moxie/moxie.h (IRA_COVER_CLASSES): Ditto. * config/pa/pa64-regs.h (IRA_COVER_CLASSES): Ditto. * config/pa/pa32-regs.h (IRA_COVER_CLASSES): Ditto. * config/picochip/picochip.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES_PRE_VSX) (IRA_COVER_CLASSES_VSX): Ditto. * config/rs6000/rs6000.c (TARGET_IRA_COVER_CLASSES) (rs6000_ira_cover_classes): Ditto. * config/rx/rx.h (IRA_COVER_CLASSES): Ditto. * config/s390/s390.h (IRA_COVER_CLASSES): Ditto. * config/score/score.h (IRA_COVER_CLASSES): Ditto. * config/sh/sh.h (IRA_COVER_CLASSES): Ditto. * config/sparc/sparc.h (IRA_COVER_CLASSES): Ditto. * config/spu/spu.h (IRA_COVER_CLASSES): Ditto. * config/stormy16/stormy16.h (IRA_COVER_CLASSES): Ditto. * config/v850/v850.h (IRA_COVER_CLASSES): Ditto. * config/vax/vax.h (IRA_COVER_CLASSES): Ditto. * config/xtensa/xtensa.h (IRA_COVER_CLASSES): Ditto. From-SVN: r171649
2011-03-29 03:02:05 +02:00
char allocnoclass;
};
tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. 2008-01-29 Vladimir Makarov <vmakarov@redhat.com> * doc/tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. * doc/passes.texi: Remove entries about regclass, local-alloc, and global. Modify entries about regmove and IRA. * ra-conflict.c: Remove the file. * reload.c (push_reload, find_dummy_reload): Remove flag_ira. * tree-pass.h (pass_local_alloc, pass_global_alloc): Remove. (pass_regclass_init): Rename to pass_reginfo_init. * cfgloopanal.c (estimate_reg_pressure_cost): Remove flag_ira. * toplev.h (flag_ira): Remove. * caller-save.c (setup_save_areas): Remove flag_ira. * ira-color.c (ira_reuse_stack_slot, ira_mark_new_stack_slot): Ditto. * global.c: Remove the file. * opts.c: (decode_options): Remove flag_ira. * hard-reg-set.h (losing_caller_save_reg_set): Remove. * regmove.c: Modify file description. (find_use_as_address, try_auto_increment): Define them only if AUTO_INC_DEC is defined. (replacement_quality, replace_in_call_usage, fixup_match_1, stable_and_no_regs_but_for_p): Remove. (reg_set_in_bb): Make it static. (regmove_optimize): Remove flag_ira and code which worked for !flag_ira. * local-alloc.c: Remove the file. * common.opt (fira): Remove. * ira.c: Include except.h. (eliminable_regset): Move from global.c. (mark_elimination): Ditto. Remove flag_ira. (reg_renumber, struct equivalence, reg_equiv, equiv_mem, equiv_mem_modified, validate_equiv_mem_from_store, validate_equiv_mem, equiv_init_varies_p, equiv_init_movable_p, contains_replace_regs, memref_referenced_p, memref_used_between_p, no_equiv, recorded_label_ref): Move from local-alloc.c. (update_equiv_regs): Ditto. Make it static. (print_insn_chain, print_insn_chains): Move it from global.c. pseudo_for_reload_consideration_p): Ditto. Remove flag_ira. (build_insn_chain): Ditto. Make it static. (ra_init_live_subregs): Move from ra-conflict.c. Make it static. Rename to init_live_subregs. (gate_ira): Remove flag_ira. * regclass.c: Rename reginfo.c. Change file description. (FORBIDDEN_INC_DEC_CLASSES): Remove. (reg_class_superclasses, forbidden_inc_dec_class, in_inc_dec): Remove. (init_reg_sets_1): Remove code for evaluation of reg_class_superclasses and losing_caller_save_reg_set. (init_regs): Remove init_reg_autoinc. (struct costs, costs, init_cost, ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): Remove. (regclass_init): Rename to reginfo_init. Don't initialize init_cost. (pass_regclass_init): Rename to pass_reginfo_init. Modify corresponding entries. (dump_regclass, record_operand_costs, scan_one_insn, init_reg_autoinc, regclass, record_reg_classes, copy_cost, record_address_regs, auto_inc_dec_reg_p): Remove. (gt-regclass.h): Rename to gt-reginfo.h. * rtl.h (dump_global_regs, retry_global_alloc, build_insn_chain, dump_local_alloc, update_equiv_regs): Remove. * Makefile.in (RA_H): Remove. (OBJS-common): Remove global.o, local-alloc.o, and ra-conflict.o. Rename regclass.o to reginfo.o. (regclass.o): Rename to reginfo.o. Rename gt-regclass.h to gt-reginfo.h. (global.o, local-alloc.o, ra-conflict.o): Remove entries. (GTFILES): Rename regclass.c to reginfo.c. * passes.c (init_optimization_passes): Remove pass_local_alloc and pass_global_alloc. Rename pass_regclass_init to pass_reginfo_init. * reload1.c (compute_use_by_pseudos, reload, count_pseudo, count_spilled_pseudo, find_reg, alter_reg, delete_output_reload): Remove flag_ira. (finish_spills): Ditto. Remove code for !flga_ira. From-SVN: r143757
2009-01-29 15:51:46 +01:00
/* Record preferences of each pseudo. This is available after RA is
run. */
static struct reg_pref *reg_pref;
params.def (PARAM_IRA_LOOP_RESERVED_REGS): New. 2009-09-26 Vladimir Makarov <vmakarov@redhat.com> * params.def (PARAM_IRA_LOOP_RESERVED_REGS): New. * params.h (IRA_LOOP_RESERVED_REGS): New * tree-pass.h (pass_subregs_of_mode_init, pass_subregs_of_mode_finish): Remove. * passes.c (pass_subregs_of_mode_init, pass_subregs_of_mode_finish): Remove. (pass_reginfo_init): Move before loop optimizations. * config/i386/i386.h (STACK_REG_COVER_CLASS): Define. * common.opt (fira-loop-pressure): New. * toplev.h (flag_ira_loop_pressure): New. * rtl.h (init_subregs_of_mode, finish_subregs_of_mode): New externals. * reginfo.c (init_subregs_of_mode, finish_subregs_of_mode): Make external and void type functions. (gate_subregs_of_mode_init, pass_subregs_of_mode_init, pass_subregs_of_mode_finish): Remove. * ira-costs.c (init_costs): Call init_subregs_of_mode. * regmove.c: Include ira.h. (regmove_optimize): Call ira_set_pseudo_classes after IRA based register pressure calculation in loops. * loop-invariant.c: Include REGS_H and ira.h. (struct loop_data): New members max_reg_pressure, regs_ref, and regs_live. (struct invariant): New member orig_regno. (curr_loop): New variable. (find_exits): Initialize regs_ref and regs_live. (create_new_invariant): Initialize orig_regno. (get_cover_class_and_nregs): New. (get_inv_cost): Make aregs_needed an array. Use regs_needed as an array. Add code for flag_ira_loop_pressure. (gain_for_invariant): Make new_regs an array. Add code for flag_ira_loop_pressure. (best_gain_for_invariant): Ditto. (set_move_mark): New parameter gain. Use it for debugging output. (find_invariants_to_move): Make regs_needed and new_regs an array. Add code for flag_ira_loop_pressure. (move_invariant_reg): Set up orig_regno. (move_invariants): Set up reg classes for pseudos for flag_ira_loop_pressure. (free_loop_data): Clear regs_ref and regs_live. (curr_regs_live, curr_reg_pressure, regs_set, n_regs_set, get_regno_cover_class, change_pressure, mark_regno_live, mark_regno_death, mark_reg_store, mark_reg_clobber, mark_reg_death, mark_ref_regs, calculate_loop_reg_pressure): New. (move_loop_invariants): Calculate pressure. Initialize curr_loop. * ira.c (ira): Call ira_set_pseudo_classes after IRA based register pressure calculation in loops if new regs were added. Call finish_subregs_of_mode. * opts.c (decode_options): Set up flag_ira_loop_pressure. * Makefile.in (loop-invariant.o): Add ira.h. (regmove.o): Ditto. * doc/invoke.texi (-fira-loop-pressure, ira-loop-reserved-regs): Describe. * doc/tm.texi (STACK_REG_COVER_CLASS): Describe. From-SVN: r152770
2009-10-14 18:24:11 +02:00
/* Current size of reg_info. */
static int reg_info_size;
/* Max_reg_num still last resize_reg_info call. */
static int max_regno_since_last_resize;
params.def (PARAM_IRA_LOOP_RESERVED_REGS): New. 2009-09-26 Vladimir Makarov <vmakarov@redhat.com> * params.def (PARAM_IRA_LOOP_RESERVED_REGS): New. * params.h (IRA_LOOP_RESERVED_REGS): New * tree-pass.h (pass_subregs_of_mode_init, pass_subregs_of_mode_finish): Remove. * passes.c (pass_subregs_of_mode_init, pass_subregs_of_mode_finish): Remove. (pass_reginfo_init): Move before loop optimizations. * config/i386/i386.h (STACK_REG_COVER_CLASS): Define. * common.opt (fira-loop-pressure): New. * toplev.h (flag_ira_loop_pressure): New. * rtl.h (init_subregs_of_mode, finish_subregs_of_mode): New externals. * reginfo.c (init_subregs_of_mode, finish_subregs_of_mode): Make external and void type functions. (gate_subregs_of_mode_init, pass_subregs_of_mode_init, pass_subregs_of_mode_finish): Remove. * ira-costs.c (init_costs): Call init_subregs_of_mode. * regmove.c: Include ira.h. (regmove_optimize): Call ira_set_pseudo_classes after IRA based register pressure calculation in loops. * loop-invariant.c: Include REGS_H and ira.h. (struct loop_data): New members max_reg_pressure, regs_ref, and regs_live. (struct invariant): New member orig_regno. (curr_loop): New variable. (find_exits): Initialize regs_ref and regs_live. (create_new_invariant): Initialize orig_regno. (get_cover_class_and_nregs): New. (get_inv_cost): Make aregs_needed an array. Use regs_needed as an array. Add code for flag_ira_loop_pressure. (gain_for_invariant): Make new_regs an array. Add code for flag_ira_loop_pressure. (best_gain_for_invariant): Ditto. (set_move_mark): New parameter gain. Use it for debugging output. (find_invariants_to_move): Make regs_needed and new_regs an array. Add code for flag_ira_loop_pressure. (move_invariant_reg): Set up orig_regno. (move_invariants): Set up reg classes for pseudos for flag_ira_loop_pressure. (free_loop_data): Clear regs_ref and regs_live. (curr_regs_live, curr_reg_pressure, regs_set, n_regs_set, get_regno_cover_class, change_pressure, mark_regno_live, mark_regno_death, mark_reg_store, mark_reg_clobber, mark_reg_death, mark_ref_regs, calculate_loop_reg_pressure): New. (move_loop_invariants): Calculate pressure. Initialize curr_loop. * ira.c (ira): Call ira_set_pseudo_classes after IRA based register pressure calculation in loops if new regs were added. Call finish_subregs_of_mode. * opts.c (decode_options): Set up flag_ira_loop_pressure. * Makefile.in (loop-invariant.o): Add ira.h. (regmove.o): Ditto. * doc/invoke.texi (-fira-loop-pressure, ira-loop-reserved-regs): Describe. * doc/tm.texi (STACK_REG_COVER_CLASS): Describe. From-SVN: r152770
2009-10-14 18:24:11 +02:00
1991-11-06 00:39:50 +01:00
/* Return the reg_class in which pseudo reg number REGNO is best allocated.
This function is sometimes called before the info has been computed.
When that happens, just return GENERAL_REGS, which is innocuous. */
enum reg_class
reg_preferred_class (int regno)
1991-11-06 00:39:50 +01:00
{
if (reg_pref == 0)
1991-11-06 00:39:50 +01:00
return GENERAL_REGS;
[multiple changes] 2008-08-26 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c, ira-color.c, ira-costs.c, ira.h, ira-lives.c, ira.c, ira-conflicts.c, ira-emit.c, ira-int.h: New files. * doc/passes.texi: Describe IRA. * doc/tm.texi (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Describe the new macros. * doc/invoke.texi (ira-max-loops-num): Describe the new parameter. (-fira, -fira-algorithm, -fira-coalesce, -fno-ira-move-spills, -fira-propagate-cost, -fno-ira-share-save-slots, -fno-ira-share-spill-slots, -fira-verbose): Describe new options. * flags.h (ira_algorithm): New enumeration. (flag_ira_algorithm, flag_ira_verbose): New external variable declarations. * postreload.c (gate_handle_postreload): Don't do post reload optimizations unless the reload is completed. * reload.c (push_reload, find_dummy_reload): Use DF_LR_OUT for IRA. * tree-pass.h (pass_ira): New external variable declaration. * reload.h: Add 2008 to the Copyright. * cfgloopanal.c: Include params.h. (estimate_reg_pressure_cost): Decrease cost for IRA optimization mode. * params.h (IRA_MAX_LOOPS_NUM): New macro. * toplev.c (ira.h): New include. (flag_ira_algorithm, flag_ira_verbose): New external variables. (backend_init_target): Call ira_init. (backend_init): Call ira_init_once. (finalize): Call finish_ira_once. * toplev.h (flag_ira, flag_ira_coalesce, flag_ira_move_spills, flag_ira_share_save_slots, flag_ira_share_spill_slots): New external variables. * regs.h (contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): New external variable declarations. (move_table): New typedef. * caller-save.c: Include headers output.h and ira.h. (no_caller_save_reg_set): New global variable. (save_slots_num, save_slots): New variables. (reg_save_code, reg_restore_code, add_stored_regs): Add prototypes. (init_caller_save): Set up no_caller_save_reg_set. (init_save_areas): Reset save_slots_num. (saved_hard_reg): New structure. (hard_reg_map, saved_regs_num, all_saved_regs): New variables. (initiate_saved_hard_regs, new_saved_hard_reg, finish_saved_hard_regs, saved_hard_reg_compare_func): New functions. (setup_save_areas): Add code for sharing stack slots. (all_blocks): New variable. (save_call_clobbered_regs): Process pseudo-register too. (mark_set_regs): Process pseudo-register too. (insert_one_insn): Put the insn after bb note in a empty basic block. Add insn check. * global.c (eliminable_regset): Make it external. (mark_elimination): Use DF_LR_IN for IRA. (pseudo_for_reload_consideration_p): New. (build_insn_chain): Make it external. Don't ignore spilled pseudos for IRA. Use pseudo_for_reload_consideration_p. (gate_handle_global_alloc): New function. (pass_global_alloc): Add the gate function. * opts.c (decode_options): Set up flag_ira. Print the warning for -fira. (common_handle_option): Process -fira-algorithm and -fira-verbose. * timevar.def (TV_IRA, TV_RELOAD): New passes. * regmove.c (regmove_optimize): Don't do replacement of output for IRA. * hard-reg-set.h (no_caller_save_reg_set, reg_class_subclasses): New external variable declarations. * local-alloc.c (update_equiv_regs): Make it external. Return true if jump label rebuilding should be done. Rescan new_insn for notes. (gate_handle_local_alloc): New function. (pass_local_alloc): Add the gate function. * alias.c (value_addr_p, stack_addr_p): New functions. (nonoverlapping_memrefs_p): Use them for IRA. * common.opt (fira, fira-algorithm, fira-coalesce, fira-move-spills, fira-share-save-slots, fira-share-spill-slots, fira-verbose): New options. * regclass.c (reg_class_subclasses, contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): Make the variables external. (move_table): Remove typedef. (init_move_cost): Make it external. (allocate_reg_info, resize_reg_info, setup_reg_classes): New functions. * rtl.h (init_move_cost, allocate_reg_info, resize_reg_info, setup_reg_classes): New function prototypes. (eliminable_regset): New external variable declaration. (build_insn_chain, update_equiv_regs): New function prototypes. * Makefile.in (IRA_INT_H): New definition. (OBJS-common): Add ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, and ira-lives.o. (reload1.o, toplev.o): Add dependence on ira.h. (cfgloopanal.o): Add PARAMS_H. (caller-save.o): Add dependence on output.h and ira.h. (ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, ira-lives.o): New entries. * passes.c (pass_ira): New pass. * params.def (PARAM_IRA_MAX_LOOPS_NUM): New parameter. * reload1.c (ira.h): Include the header. (changed_allocation_pseudos): New bitmap. (init_reload): Initiate the bitmap. (compute_use_by_pseudos): Permits spilled registers in FROM. (temp_pseudo_reg_arr): New variable. (reload): Allocate and free temp_pseudo_reg_arr. Sort pseudos for IRA. Call alter_reg with the additional parameter. Don't clear spilled_pseudos for IRA. Restore original insn chain for IRA. Clear changed_allocation_pseudos at the end of reload. (calculate_needs_all_insns): Call IRA's mark_memory_move_deletion. (hard_regno_to_pseudo_regno): New variable. (count_pseudo): Check spilled pseudos. Set up hard_regno_to_pseudo_regno. (count_spilled_pseudo): Check spilled pseudos. Update hard_regno_to_pseudo_regno. (find_reg): Use better_spill_reload_regno_p. Check hard_regno_to_pseudo_regno. (alter_reg): Set up spilled_pseudos. Add a new parameter. Add code for IRA. (eliminate_regs_1): Use additional parameter for alter_reg. (finish_spills): Set up pseudo_previous_regs only for spilled pseudos. Call reassign_pseudos once for all spilled pseudos, pass more arguments. Don't clear live_throughout and dead_or_set for spilled pseudos. Use additional parameter for alter_reg. Call mark_allocation_change. Set up changed_allocation_pseudos. Remove sanity check. (emit_input_reload_insns, delete_output_reload): Use additional parameter for alter_reg. Call mark_allocation_change. (substitute, gen_reload_chain_without_interm_reg_p): New functions. (reloads_conflict): Use gen_reload_chain_without_interm_reg_p. * testsuite/gcc.dg/20080410-1.c: New file. * config/s390/s390.h (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Define. * config/sparc/sparc.h (IRA_COVER_CLASSES): New macro. * config/i386/i386.h (IRA_COVER_CLASSES): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES): Ditto. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/alpha/alpha.h (IRA_COVER_CLASSES): Ditto. 2008-08-24 Jeff Law <law@redhat.com> * ira.c (setup_reg_class_intersect_union): Prefer smallest class when ignoring unavailable registers. 2008-08-24 Jeff Law <law@redhat.com> * ira-color.c (coalesced_pseudo_reg_slot_compare): Check FRAME_GROWS_DOWNWARD and STACK_GROWS_DOWNWARD. * ira.c (setup_eliminable_regset): Check stack_realign_needed. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): New macro. 2008-06-03 Steve Chamberlain <steve.chamberlain@gmail.com> * ira-build.c (allocno_range_compare_func): Stabilize sort. 2008-05-29 Andy Hutchinson <hutchinsonandy@aim.com> * config/avr/avr.h (IRA_COVER_CLASSES): New macro. * reload1.c (find_reg): Process registers in register allocation order. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * toplev.c (backend_init_target): Move ira_init call from here... (lang_dependent_init_target): ...to here. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * ira.c (setup_class_subset_and_memory_move_costs): Don't calculate memory move costs for NO_REGS. 2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org> * ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if STACK_REGS is defined. 2008-04-08 Andrew Pinski <andrew_pinski@playstation.sony.com> * config/spu/spu.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Bernd Schmidt <bernd.schmidt@analog.com> * config/bfin/bfin.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Kaz Kojima <kkojima@gcc.gnu.org> * config/sh/sh.h (IRA_COVER_CLASSES): Define. * config/sh/sh.md (movsicc_true+3): Check if emit returns a barrier. From-SVN: r139590
2008-08-26 14:39:58 +02:00
gcc_assert (regno < reg_info_size);
return (enum reg_class) reg_pref[regno].prefclass;
1991-11-06 00:39:50 +01:00
}
enum reg_class
reg_alternate_class (int regno)
1991-11-06 00:39:50 +01:00
{
if (reg_pref == 0)
return ALL_REGS;
gcc_assert (regno < reg_info_size);
return (enum reg_class) reg_pref[regno].altclass;
1991-11-06 00:39:50 +01:00
}
invoke.texi (-fsched-pressure): Document it. 2009-09-02 Vladimir Makarov <vmakarov@redhat.com> * doc/invoke.texi (-fsched-pressure): Document it. (-fsched-reg-pressure-heuristic): Remove it. * reload.c (ira.h): Include. (find_reloads): Add choosing reload on number of small spilled classes. * haifa-sched.c (ira.h): Include. (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure, saved_reg_pressure, curr_reg_live, saved_reg_live, region_ref_regs): New variables. (sched_init_region_reg_pressure_info, mark_regno_birth_or_death, initiate_reg_pressure_info, setup_ref_regs, initiate_bb_reg_pressure_info, save_reg_pressure, restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New functions. (setup_insn_reg_pressure_info): New function. (rank_for_schedule): Add pressure checking and insn issue time. Remove comparison of insn reg weights. (ready_sort): Set insn reg pressure info. (update_register_pressure, setup_insn_max_reg_pressure, update_reg_and_insn_max_reg_pressure, sched_setup_bb_reg_pressure_info): New functions. (schedule_insn): Add code for printing and updating reg pressure info. (find_set_reg_weight, find_insn_reg_weight): Remove. (ok_for_early_queue_removal): Do nothing if pressure_only_p. (debug_ready_list): Print reg pressure info. (schedule_block): Ditto. Check insn issue time. (sched_init): Set up sched_pressure_p. Allocate and set up some reg pressure related info. (sched_finish): Free some reg pressure related info. (fix_tick_ready): Make insn always ready if pressure_p. (init_h_i_d): Don't call find_insn_reg_weight. (haifa_finish_h_i_d): Free insn reg pressure info. * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move to ira.h. * ira-lives.c (single_reg_class): Check mode to find how many registers are necessary for operand. (ira_implicitly_set_insn_hard_regs): New. * common.opt (fsched-pressure): New options. (fsched-reg-pressure-heuristic): Remove. * ira.c (setup_eliminable_regset): Rename to ira_setup_eliminable_regset. Make it external. (expand_reg_info): Pass cover class to setup_reg_classes. (ira): Call resize_reg_info instead of allocate_reg_info. * sched-deps.c: Include ira.h. (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New. (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses, reg_pressure_info, insn_use_p, mark_insn_pseudo_birth, mark_insn_hard_regno_birth, mark_insn_reg_birth, mark_pseudo_death, mark_hard_regno_death, mark_reg_death, mark_insn_reg_store, mark_insn_reg_clobber, setup_insn_reg_pressure_info): New. (sched_analyze_1): Update implicit_reg_pending_uses. (sched_analyze_insn): Find implicit sets, uses, clobbers of regs. Use them to create dependencies. Set insn reg uses and pressure info. Process reg_pending_uses in one place. (free_deps): Free implicit sets. (remove_from_deps): Remove implicit sets if necessary. Check implicit sets when clearing reg_last_in_use. (init_deps_global): Clear implicit_reg_pending_clobbers and implicit_reg_pending_uses. * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move from ira-int.h. (ira_setup_eliminable_regset, ira_set_pseudo_classes, ira_implicitly_set_insn_hard_regs): New prototypes. * ira-costs.c (pseudo_classes_defined_p, allocno_p, cost_elements_num): New variables. (allocno_costs, total_costs): Rename to costs and total_allocno_costs. (COSTS_OF_ALLOCNO): Rename to COSTS. (allocno_pref): Rename to pref. (allocno_pref_buffer): Rename to pref_buffer. (common_classes): Rename to regno_cover_class. (COST_INDEX): New. (record_reg_classes): Set allocno attributes only if allocno_p. (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM. (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM and COSTS_OF_ALLOCNO. (print_costs): Rename to print_allocno_costs. (print_pseudo_costs): New. (process_bb_node_for_costs): Split into 2 functions with new function process_bb_for_costs. Pass BB to process_bb_for_costs. (find_allocno_class_costs): Rename to find_costs_and_classes. Add new parameter dump_file. Use cost_elements_num instead of ira_allocnos_num. Make one iteration if preferred classes were already calculated for scheduler. Make 2 versions of code depending on allocno_p. (setup_allocno_cover_class_and_costs): Check allocno_p. Use regno_cover_class and COSTS instead of common_classes and COSTS_OF_ALLOCNO. (init_costs, finish_costs): New. (ira_costs): Set up allocno_p and cost_elements_num. Call init_costs and finish_costs. (ira_set_pseudo_classes): New. * rtl.h (allocate_reg_info): Remove. (resize_reg_info): Change return type. (reg_cover_class): New. (setup_reg_classes): Add new parameter. * sched-int.h (struct deps_reg): New member implicit_sets. (sched_pressure_p, sched_regno_cover_class): New external definitions. (INCREASE_BITS): New macro. (struct reg_pressure_data, struct reg_use_data): New. (struct _haifa_insn_data): Remove reg_weight. Add members reg_pressure, reg_use_list, reg_set_list, and reg_pressure_excess_cost_change. (struct deps): New member implicit_sets. (pressure_p): New variable. (COVER_CLASS_BITS, INCREASE_BITS): New macros. (struct reg_pressure_data, struct reg_use_data): New. (INSN_REG_WEIGHT): Remove. (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST, INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros. (sched_init_region_reg_pressure_info, sched_setup_bb_reg_pressure_info): New prototypes. * reginfo.c (struct reg_pref): New member coverclass. (reg_cover_class): New function. (reginfo_init, pass_reginfo_init): Move after free_reg_info. (reg_info_size): New variable. (allocate_reg_info): Make static. Setup reg_info_size. (resize_reg_info): Use reg_info_size. Return flag of resizing. (setup_reg_classes): Add a new parameter. Setup cover class too. * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the dependencies. * sched-rgn.c (deps_join): Set up implicit_sets. (schedule_region): Set up region and basic blocks pressure relative info. * passes.c (init_optimization_passes): Move pass_subregs_of_mode_init before pass_sched. From-SVN: r151348
2009-09-02 20:54:25 +02:00
/* Return the reg_class which is used by IRA for its allocation. */
enum reg_class
[multiple changes] 2011-03-28 Vladimir Makarov <vmakarov@redhat.com> * ira-color.c (update_left_conflict_sizes_p): Don't assume that conflict object hard regset nodes have intersecting hard reg sets. * regmove.c (regmove_optimize): Move ira_set_pseudo_classes call after regstat_init_n_sets_and_refs. * ira.c: Add more comments at the top. (setup_stack_reg_pressure_class, setup_pressure_classes): Add comments how we compute the register pressure classes. (setup_allocno_and_important_classes): Add more comments. (setup_class_translate_array, reorder_important_classes) (setup_reg_class_relations): Add comments. * ira-emit.c: Add 2011 to the Copyright line. Add comments at the start of the file. * ira-color.c: Add 2011 to the Copyright line. (assign_hard_reg): Add more comments. (improve_allocation): Ditto. * ira-costs.c: Add 2011 to the Copyright line. (setup_cost_classes, setup_regno_cost_classes_by_aclass): Add more comments. (setup_regno_cost_classes_by_mode): Ditto. Initial patches from ira-improv branch: 2010-08-13 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c: (ira_create_object): Remove initialization of OBJECT_PROFITABLE_HARD_REGS. Initialize OBJECT_ADD_DATA. (ira_create_allocno): Remove initialization of ALLOCNO_MEM_OPTIMIZED_DEST, ALLOCNO_MEM_OPTIMIZED_DEST_P, ALLOCNO_SOMEWHERE_RENAMED_P, ALLOCNO_CHILD_RENAMED_P, ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P, ALLOCNO_COLORABLE_P, ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO, ALLOCNO_FIRST_COALESCED_ALLOCNO, ALLOCNO_NEXT_COALESCED_ALLOCNO. Initialize ALLOCNO_ADD_DATA. (copy_info_to_removed_store_destinations): Use ALLOCNO_EMIT_DATA and allocno_emit_reg instead of ALLOCNO_MEM_OPTIMIZED_DEST_P and ALLOCNO_REG. (ira_flattening): Ditto. Use ALLOCNO_EMIT_DATA instead of ALLOCNO_MEM_OPTIMIZED_DEST and ALLOCNO_SOMEWHERE_RENAMED_P. * ira.c (ira_reallocate): Remove. (setup_pressure_classes): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. (setup_allocno_assignment_flags): Use ALLOCNO_EMIT_DATA. (ira): Call ira_initiate_emit_data and ira_finish_emit_data. * ira-color.c: Use ALLOCNO_COLOR_DATA instead of ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P, ALLOCNO_COLORABLE_P, ALLOCNO_AVAILABLE_REGS_NUM, ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO. ALLOCNO_TEMP. Use OBJECT_COLOR_DATA instead of OBJECT_PROFITABLE_HARD_REGS, OBJECT_HARD_REGS_NODE, OBJECT_HARD_REGS_SUBNODES_START, OBJECT_HARD_REGS_SUBNODES_NUM. Fix formatting. (object_hard_regs_t, object_hard_regs_node_t): Move from ira-int.h. (struct object_hard_regs, struct object_hard_regs_node): Ditto. (struct allocno_color_data): New. (allocno_color_data_t): New typedef. (allocno_color_data): New definition. (ALLOCNO_COLOR_DATA): New macro. (struct object_color_data): New. (object_color_data_t): New typedef. (object_color_data): New definition. (OBJECT_COLOR_DATA): New macro. (update_copy_costs, calculate_allocno_spill_cost): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. (move_spill_restore, update_curr_costs): Ditto. (allocno_spill_priority): Make it inline. (color_pass): Allocate and free allocno_color_dat and object_color_data. (struct coalesce_data, coalesce_data_t): New. (allocno_coalesce_data): New definition. (ALLOCNO_COALESCE_DATA): New macro. (merge_allocnos, coalesced_allocno_conflict_p): Use ALLOCNO_COALESCED_DATA instead of ALLOCNO_FIRST_COALESCED_ALLOCNO, ALLOCNO_NEXT_COALESCED_ALLOCNO, ALLOCNO_TEMP. (coalesce_allocnos): Ditto. (setup_coalesced_allocno_costs_and_nums): Ditto. (collect_spilled_coalesced_allocnos): Ditto. (slot_coalesced_allocno_live_ranges_intersect_p): Ditto. (setup_slot_coalesced_allocno_live_ranges): Ditto. (coalesce_spill_slots): Ditto. (ira_sort_regnos_for_alter_reg): Ditto. Allocate, initialize and free allocno_coalesce_data. * ira-conflicts.c: Fix formatting. (process_regs_for_copy): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. (build_object_conflicts): Optimize. * ira-costs.c (record_reg_classes): Optimize. Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost, ira_may_move_in_cost, and ira_may_move_out_cost instead of ira_get_register_move_cost and ira_get_may_move_cost. (record_address_regs): Ditto. (scan_one_insn): Optimize. (find_costs_and_classes): Optimize. (process_bb_node_for_hard_reg_moves): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. * ira-emit.c: Use allocno_emit_reg, ALLOCNO_EMIT_DATA instead of ALLOCNO_REG, ALLOCNO_CHILD_RENAMED_P, ALLOCNO_MEM_OPTIMIZED_DEST, ALLOCNO_MEM_OPTIMIZED_DEST_P, and ALLOCNO_SOMEWHERE_RENAMED_P. (ira_allocno_emit_data, void_p, new_allocno_emit_data_vec): New definitions. (ira_initiate_emit_data, ira_finish_emit_data) (create_new_allocno): New functions. (modify_move_list): Call create_new_alloc instead of ira_create_allocno. (emit_move_list): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. * ira-int.h: Fix some comments. (object_hard_regs_t, object_hard_regs_node_t): Move to ira-color.c. (struct object_hard_regs, struct object_hard_regs_node): Ditto. (struct ira_object): Remove profitable_hard_regs, hard_regs_node, hard_regs_subnodes_start, hard_regs_subnodes_num. Add new member add_data. (struct ira_allocno): Make mode and aclass a bitfield. Move other bitfield after mode. Make hard_regno a short int. Make hard_regno short. Remove first_coalesced_allocno and next_coalesced_allocno. Move mem_optimized_dest_p, somewhere_renamed_p, child_renamed_p, reg, and mem_optimized_dest into struct ira_emit_data. Remove in_graph_p, may_be_spilled_p, available_regs_num, next_bucket_allocno, prev_bucket_allocno, temp, colorable_p. Add new member add_data. (ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P): Remove. (ALLOCNO_COLORABLE_P, ALLOCNO_AVAILABLE_REGS_NUM): Remove. (ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO): Remove. (ALLOCNO_TEMP, ALLOCNO_FIRST_COALESCED_ALLOCNO): Remove. (ALLOCNO_NEXT_COALESCED_ALLOCNO): Remove. (ALLOCNO_ADD_DATA): New macro. (ira_emit_data_t): New typedef. (struct ira_emit_data): New. Move mem_optimized_dest_p, somewhere_renamed_p, child_renamed_p, reg, mem_optimized_dest from struct ira_allocno. (ALLOCNO_EMIT_DATA): New macro. (ira_allocno_emit_data, allocno_emit_reg): New. (ALLOCNO_PROFITABLE_HARD_REGS, OBJECT_HARD_REGS_NODE): Remove. (OBJECT_HARD_REGS_SUBNODES_STAR, OBJECT_HARD_REGS_SUBNODES_NUM): Remove. (OBJECT_ADD_DATA): New macro. (ira_reallocate): Remove. (ira_initiate_emit_data, ira_finish_emit_data): New. (ira_get_register_move_cost, ira_get_may_move_cost): Remove. (ira_init_register_move_cost_if_necessary): New. (ira_object_conflict_iter_next): Merge into ira_object_conflict_iter_cond. (FOR_EACH_OBJECT_CONFLICT): Don't use ira_object_conflict_iter_next. * ira-live.c: (process_single_reg_class_operands): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. 2010-08-13 Vladimir Makarov <vmakarov@redhat.com> * ira-int.h (struct target_ira_int): Remove x_cost_classes. * ira-costs.c: Fix formatting. (cost_classes, cost_classes_num): Remove. (struct cost_classes, cost_classes_t, const_cost_classes_t): New. (regno_cost_classes, cost_classes_hash, cost_classes_eq): New. (cost_classes_del, cost_classes_htab): New. (cost_classes_aclass_cache, cost_classes_mode_cache): New. (initiate_regno_cost_classes, setup_cost_classes): New. (setup_regno_cost_classes_by_aclass): New. (setup_regno_cost_classes_by_mode, finish_regno_cost_classes): New. (record_reg_classes): Use regno_cost_classes instead of cost_classes. Move checking opposite operand up. (record_address_regs): Use regno_cost_classes instead of cost_classes. (scan_one_insn): Ditto. Use always general register. (print_allocno_costs): Use regno_cost_classes instead of cost_classes. (print_pseudo_costs): Ditto. Use Reg_N_REFS. (find_costs_and_classes): Set up cost classes for each registers. Use also their mode for this. Use regno_cost_classes instead of cost_classes. (setup_allocno_class_and_costs): Use regno_cost_classes instead of cost_classes. (free_ira_costs, ira_init_costs): Don't use cost_classes. (ira_costs, ira_set_pseudo_classes): Call initiate_regno_cost_classes and finish_regno_cost_classes. 2010-10-04 Vladimir Makarov <vmakarov@redhat.com> * target-def.h (TARGET_IRA_COVER_CLASSES): Remove. * target.def (ira_cover_classes): Remove. * doc/tm.texi: Remove TARGET_IRA_COVER_CLASSES and IRA_COVER_CLASSES. * doc/tm.texi.in: Ditto. * ira-conflicts.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Use ALLOCNO_COVER_CLASS_COST instead of ALLOCNO_CLASS_COST. Fix formatting. * targhooks.c (default_ira_cover_classes): Remove. * targhooks.h (default_ira_cover_classes): Ditto. * haifa-sched.c: Remove mentioning cover classes from the file. Use ira_reg_pressure_cover instead of ira_reg_class_cover. Use ira_pressure_classes and ira_pressure_classes_num instead of ira_reg_class_cover_size and ira_reg_class_cover. Use sched_regno_pressure_class instead of sched_regno_cover_class. (mark_regno_birth_or_death, setup_insn_reg_pressure_info): Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. * ira-int.h: Add 2010 to Copyright. Remove mentioning cover classes from the file. (object_hard_regs_t, object_hard_regs_node_t): New typedefs. (struct object_hard_regs, struct object_hard_regs_node): New. (struct ira_object): New members profitable_hard_regs, hard_regs_node, hard_regs_subnodes_start, hard_regs_subnodes_num. (struct ira_allocno): Rename cover_class to aclass. Rename cover_class_cost and updated_cover_class_cost to class_cost and updated_class_cost. Remove splay_removed_p and left_conflict_size. Add new members colorable_p. (ALLOCNO_SPLAY_REMOVED_P, ALLOCNO_LEFT_CONFLICTS_SIZE): Remove. (ALLOCNO_COLORABLE_P): New macro. (ALLOCNO_COVER_CLASS): Rename to ALLOCNO_CLASS. (ALLOCNO_COVER_CLASS_COST, ALLOCNO_UPDATED_COVER_CLASS_COST): Rename to ALLOCNO_CLASS_COST and ALLOCNO_UPDATED__CLASS_COST. (OBJECT_...): Rename parameter C to O. (OBJECT_PROFITABLE_HARD_REGS): New macro. (OBJECT_HARD_REGS_NODE, OBJECT_HARD_REGS_SUBNODES_START) (OBJECT_HARD_REGS_SUBNODES_NUM): New macros. (struct target_ira_int): New members x_ira_max_memory_move_cost, x_ira_max_register_move_cost, x_ira_max_may_move_in_cost, x_ira_max_may_move_out_cost, x_ira_reg_allocno_class_p, x_ira_reg_pressure_class_p, x_ira_important_class_nums, x_ira_reg_class_superunion. Rename x_prohibited_class_mode_reg to x_ira_prohibited_class_mode_reg. Rename x_ira_reg_class_union to x_ira_reg_class_subunion. (ira_max_memory_move_cost, ira_max_register_move_cost) (ira_max_may_move_in_cost, ira_max_may_move_out_cost) (ira_reg_allocno_class_p, ira_reg_pressure_class_p) (ira_important_class_nums, ira_reg_class_superunion): New macros. (prohibited_class_mode_regs): Rename to ira_prohibited_class_mode_regs. (ira_reg_class_union): Rename to ira_reg_class_subunion. (ira_debug_class_cover): Rename to ira_debug_allocno_classes. (ira_set_allocno_cover_class): Rename to ira_set_allocno_class. (ira_tune_allocno_costs_and_cover_classes): Rename to ira_tune_allocno_costs. (ira_debug_hard_regs_forest): New. (ira_object_conflict_iter_init, ira_object_conflict_iter_cond) (ira_object_conflict_iter_next): Fix comments. (ira_hard_reg_set_intersection_p, hard_reg_set_size): New functions. (ira_allocate_and_set_costs, ira_allocate_and_copy_costs): Rename cover_class to aclass. (ira_allocate_and_accumulate_costs): Ditto. (ira_allocate_and_set_or_copy_costs): Ditto. * opts.c (decode_options): Remove ira_cover_class check. * ira-color.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS, ALLOCNO_CLASS_COST, and ALLOCNO_UPDATED_CLASS_COST instead of ALLOCNO_COVER_CLASS, ALLOCNO_COVER_CLASS_COST, and ALLOCNO_UPDATED_COVER_CLASS_COST. Fix formatting. (splay-tree.h): Remove include. (allocno_coalesced_p, processed_coalesced_allocno_bitmap): Move before copy_freq_compare_func. (allocnos_for_spilling, removed_splay_allocno_vec): Remove. (object_hard_regs_vec, object_hard_regs_htab, node_check_tick): New definitions. (hard_regs_roots, hard_regs_node_vec): Ditto. (object_hard_regs_hash, object_hard_regs_eq, find_hard_regs): Ditto. (insert_hard_regs, init_object_hard_regs, add_object_hard_regs): Ditto. (finish_object_hard_regs, object_hard_regs_compare): Ditto. (create_new_object_hard_regs_node): Ditto. (add_new_object_hard_regs_node_to_forest): Ditto. (add_object_hard_regs_to_forest, collect_object_hard_regs_cover): Ditto. (setup_object_hard_regs_nodes_parent, first_common_ancestor_node): Ditto. (print_hard_reg_set, print_hard_regs_subforest): Ditto. (print_hard_regs_forest, ira_debug_hard_regs_forest): Ditto. (remove_unused_object_hard_regs_nodes): Ditto. (enumerate_object_hard_regs_nodes): Ditto. (object_hard_regs_nodes_num, object_hard_regs_nodes): Ditto. (object_hard_regs_subnode_t): Ditto. (struct object_hard_regs_subnode): Ditto. (object_hard_regs_subnodes, object_hard_regs_subnode_index): Ditto. (setup_object_hard_regs_subnode_index): Ditto. (get_object_hard_regs_subnodes_num): Ditto. (form_object_hard_regs_nodes_forest): Ditto. (finish_object_hard_regs_nodes_tree): Ditto. (finish_object_hard_regs_nodes_forest): Ditto. (allocnos_have_intersected_live_ranges_p): Rename to allocnos_conflict_by_live_ranges_p. Move before copy_freq_compare_func. (pseudos_have_intersected_live_ranges_p): Rename to conflict_by_live_ranges_p. Move before copy_freq_compare_func. (setup_left_conflict_sizes_p, update_left_conflict_sizes_p): Ditto. (empty_profitable_hard_regs, setup_profitable_hard_regs): Ditto. (update_copy_costs): Remove assert. Skip cost update if the hard reg does not belong the class. (assign_hard_reg): Process only profitable hard regs. (uncolorable_allocnos_num): Make it scalar. (allocno_spill_priority): Use ALLOCNO_EXCESS_PRESSURE_POINTS_NUM and ira_reg_class_max_nregs instead of ALLOCNO_LEFT_CONFLICTS_SIZE and ira_reg_class_max_nregs. (bucket_allocno_compare_func): Check frequency first. (sort_bucket): Add compare function as a parameter. (add_allocno_to_ordered_bucket): Assume no coalesced allocnos. (uncolorable_allocnos_splay_tree, USE_SPLAY_P): Remove. (push_allocno_to_stack): Rewrite for checking new allocno colorability. (remove_allocno_from_bucket_and_push): Print cost too. Remove assert. (push_only_colorable): Pass new parameter to sort_bucket. (push_allocno_to_spill): Remove. (allocno_spill_priority_compare): Make it inline and rewrite. (splay_tree_allocate, splay_tree_free): Remove. (allocno_spill_sort_compare): New function. (push_allocnos_to_stack): Sort allocnos for spilling once. Don't build and use splay tree. Choose first allocno in uncolorable allocno bucket to spill. Remove setting spill cost. (all_conflicting_hard_regs): Remove. (setup_allocno_available_regs_num): Check only profitable hard regs. Print info about hard regs nodes. (setup_allocno_left_conflicts_size): Remove. (put_allocno_into_bucket): Don't call setup_allocno_left_conflicts_size. Use setup_left_conflict_sizes_p. (improve_allocation): New. (color_allocnos): Call setup_profitable_hard_regs, form_object_hard_regs_nodes_forest, improve_allocation, finish_object_hard_regs_nodes_forest. Setup spill cost. (print_loop_title): Use pressure classes. (color_allocnso): Ditto. (do_coloring): Remove allocation and freeing splay_tree_node_pool and allocnos_for_spilling. (ira_sort_regnos_for_alter_reg): Don't setup members {first,next}_coalesced_allocno. (color): Remove allocating and freeing removed_splay_allocno_vec. (fast_allocation): Use ira_prohibited_class_mode_regs instead of prohibited_class_mode_regs. * ira-lives.c: Remove mentioning cover classes from the file. Fix formatting. (update_allocno_pressure_excess_length): Use pressure classes. (inc_register_pressure, dec_register_pressure): Check for pressure class. (mark_pseudo_regno_live, mark_pseudo_regno_subword_live): Use pressure class. Use ira_reg_class_nregs instead of ira_reg_class_max_nregs. (mark_pseudo_regno_dead, mark_pseudo_regno_subword_dead): Ditto. (mark_hard_reg_live, mark_hard_reg_dead): Use pressure class. (single_reg_class): Use ira_reg_class_nregs instead of ira_reg_class_max_nregs. (process_bb_node_lives): Use pressure classes. * ira-emit.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Fix formatting. (change_loop): Use pressure classes. (modify_move_list): Call ira_set_allocno_class instead of ira_set_allocno_cover_class. * ira-build.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS and ALLOCNO_CLASS_COST instead of ALLOCNO_COVER_CLASS and ALLOCNO_COVER_CLASS_COST. Use ALLOCNO_UPDATED_CLASS_COST instead of ALLOCNO_UPDATED_COVER_CLASS_COST. Fix formatting. (ira_create_object): Initiate OBJECT_PROFITABLE_HARD_REGS. (ira_create_allocno): Remove initialization of ALLOCNO_SPLAY_REMOVED_P, ALLOCNO_LEFT_CONFLICT_SIZE. Initialize ALLOCNO_COLORABLE_P. (ira_set_allocno_cover_class): Rename to ira_set_allocno_class. Update conflict regs for the objects. (create_cap_allocno): Remove assert. Don't propagate ALLOCNO_AVAILABLE_REGS_NUM. (ira_free_allocno_costs): New function. (finish_allocno): Change a part of code into call of ira_free_allocno_costs. (low_pressure_loop_node_p): Use pressure classes. (object_range_compare_func): Don't compare classes. (setup_min_max_conflict_allocno_ids): Ditto. * loop-invariant.c: Remove mentioning cover classes from the file. Use ira_pressure_classes and ira_pressure_classes_num instead of ira_reg_class_cover_size and ira_reg_class_cover. Fix formatting. (get_cover_class_and_nregs): Rename to get_cover_pressure_and_nregs. Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. Use reg_allocno_class instead of reg_cover_class. (get_inv_cost): Use instead ira_stack_reg_pressure_class of STACK_REG_COVER_CLASS. (get_regno_cover_class): Rename to get_regno_pressure_class. (move_loop_invariants): Initialize and finalize regstat. * ira.c: Remove mentioning cover classes from the file. Add comments about coloring without cover classes. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Fix formatting. (alloc_reg_class_subclasses, setup_reg_subclasses): Move it before setup_class_subset_and_memory_move_costs. (setup_stack_reg_pressure_class, setup_pressure_classes): New. (setup_cover_and_important_classes): Rename to setup_allocno_and_important_classes. (setup_class_translate_array): New. (setup_class_translate): Call it for allocno and pressure classes. (cover_class_order): Rename to allocno_class_order. (comp_reg_classes_func): Use ira_allocno_class_translate instead of ira_class_translate. (reorder_important_classes): Set up ira_important_class_nums. (setup_reg_class_relations): Set up ira_reg_class_superunion. (print_class_cover): Rename to print_classes. Add parameter. (ira_debug_class_cover): Rename to ira_debug_allocno_classes. Print pressure classes too. (find_reg_class_closure): Rename to find_reg_classes. Don't call setup_reg_subclasses. (ira_hard_regno_cover_class): Rename to ira_hard_regno_allocno_class. (ira_reg_class_nregs): Rename to ira_reg_class_max_nregs. (setup_prohibited_class_mode_regs): Use ira_prohibited_class_mode_regs instead of prohibited_class_mode_regs. (clarify_prohibited_class_mode_regs): New function. (ira_init_register_move_cost): Set up ira_max_register_move_cost, ira_max_may_move_in_cost, and ira_max_may_move_out_cost. (ira_init_once): Initialize them. (free_register_move_costs): Process them. (ira_init): Move calls of find_reg_classes and setup_hard_regno_aclass after setup_prohibited_class_mode_regs. Call clarify_prohibited_class_mode_regs. (ira_no_alloc_reg): Remove. (too_high_register_pressure_p): Use pressure classes. * sched-deps.c: Remove mentioning cover classes from the file. Use ira_reg_pressure_cover instead of ira_reg_class_cover. Use ira_pressure_classes and ira_pressure_classes_num instead of ira_reg_class_cover_size and ira_reg_class_cover. (mark_insn_hard_regno_birth, mark_hard_regno_death): Use sched_regno_pressure_class instead of sched_regno_cover_class. (mark_insn_pseudo_birth, mark_pseudo_death): Ditto. Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. * ira.h: Add 2010 to Copyright. (ira_no_alloc_reg): Remove external. (struct target_ira): Rename x_ira_hard_regno_cover_class, x_ira_reg_class_cover_size, x_ira_reg_class_cover, and x_ira_class_translate to x_ira_hard_regno_allocno_class, x_ira_allocno_classes_num, x_ira_allocno_classes, and x_ira_allocno_class_translate. Add x_ira_pressure_classes_num, x_ira_pressure_classes, x_ira_pressure_class_translate, and x_ira_stack_reg_pressure_class. Rename x_ira_reg_class_nregs to x_ira_reg_class_max_nregs. Add x_ira_reg_class_min_nregs and x_ira_no_alloc_regs. (ira_hard_regno_cover_class): Rename to ira_hard_regno_allocno_class. (ira_reg_class_cover_size, ira_reg_class_cover): Rename to ira_allocno_classes_num and ira_allocno_classes. (ira_class_translate): Rename to ira_allocno_class_translate. (ira_pressure_classes_num, ira_pressure_classes): New definitions. (ira_pressure_class_translate, ira_stack_reg_pressure_class): Ditto. (ira_reg_class_nregs): Rename to ira_reg_class_max_nregs. (ira_reg_class_min_nregs, ira_stack_reg_pressure_class): New (ira_no_alloc_regs): New. * ira-costs.c: Add 2010 to Copyright. Remove mentioning cover classes from the file. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Use ALLOCNO_CLASS_COST instead of ALLOCNO_COVER_CLASS_COST. (regno_cover_class): Rename to regno_aclass. (record_reg_classes): Use ira_reg_class_subunion instead of ira_reg_class_union. (record_address_regs): Check overflow. (scan_one_insn): Ditto. (print_allocno_costs): Print total mem cost fore regional allocation. (print_pseudo_costs): Use REG_N_REFS. (find_costs_and_classes): Use classes intersected with them on the 1st pass. Check overflow. Use ira_reg_class_subunion instead of ira_reg_class_union. Use ira_allocno_class_translate and regno_aclass instead of ira_class_translate and regno_cover_class. Modify code for finding regno_aclass. Setup preferred classes for the next pass. (setup_allocno_cover_class_and_costs): Rename to setup_allocno_class_and_costs. Use regno_aclass instead of regno_cover_class. Use ira_set_allocno_class instead of ira_set_allocno_cover_class. (init_costs, finish_costs): Use regno_aclass instead of regno_cover_class. (ira_costs): Use setup_allocno_class_and_costs instead of setup_allocno_cover_class_and_costs. (ira_tune_allocno_costs_and_cover_classes): Rename to ira_tune_allocno_costs. Check overflow. Skip conflict hard regs by processing objects. Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. * rtl.h (reg_cover_class): Rename to reg_allocno_class. * sched-int.h: Remove mentioning cover classes from the file. (sched_regno_cover_class): Rename to sched_regno_pressure_class. * reginfo.c: Add 2010 to Copyright. Remove mentioning cover classes from the file. (struct reg_pref): Rename coverclass into allocnoclass. (reg_cover_class): Rename to reg_allocno_class. * Makefile.in (ira-color.o): Remove SPLAY_TREE_H from dependencies. * config/alpha/alpha.h (IRA_COVER_CLASSES): Remove. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/avr/avr.h (IRA_COVER_CLASSES): Ditto. * config/bfin/bfin.h (IRA_COVER_CLASSES): Ditto. * config/cris/cris.h (IRA_COVER_CLASSES): Ditto. * config/fr30/fr30.h (IRA_COVER_CLASSES): Ditto. * config/frv/frv.h (IRA_COVER_CLASSES): Ditto. * config/h8300/h8300.h (IRA_COVER_CLASSES): Ditto. * config/i386/i386.h (STACK_REG_COVER_CLASS): Ditto. * config/i386/i386.c (TARGET_IRA_COVER_CLASSES) (i386_ira_cover_classes): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/iq2000/iq2000.h (IRA_COVER_CLASSES): Ditto. * config/m32r/m32r.h (IRA_COVER_CLASSES): Ditto. * config/m68k/m68k.h (IRA_COVER_CLASSES): Ditto. * config/mcore/mcore.h (IRA_COVER_CLASSES): Ditto. * config/mep/mep.h (IRA_COVER_CLASSES): Ditto. * config/mips/mips.c (TARGET_IRA_COVER_CLASSES) (mips_ira_cover_classes): Ditto. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): Ditto. * config/moxie/moxie.h (IRA_COVER_CLASSES): Ditto. * config/pa/pa64-regs.h (IRA_COVER_CLASSES): Ditto. * config/pa/pa32-regs.h (IRA_COVER_CLASSES): Ditto. * config/picochip/picochip.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES_PRE_VSX) (IRA_COVER_CLASSES_VSX): Ditto. * config/rs6000/rs6000.c (TARGET_IRA_COVER_CLASSES) (rs6000_ira_cover_classes): Ditto. * config/rx/rx.h (IRA_COVER_CLASSES): Ditto. * config/s390/s390.h (IRA_COVER_CLASSES): Ditto. * config/score/score.h (IRA_COVER_CLASSES): Ditto. * config/sh/sh.h (IRA_COVER_CLASSES): Ditto. * config/sparc/sparc.h (IRA_COVER_CLASSES): Ditto. * config/spu/spu.h (IRA_COVER_CLASSES): Ditto. * config/stormy16/stormy16.h (IRA_COVER_CLASSES): Ditto. * config/v850/v850.h (IRA_COVER_CLASSES): Ditto. * config/vax/vax.h (IRA_COVER_CLASSES): Ditto. * config/xtensa/xtensa.h (IRA_COVER_CLASSES): Ditto. From-SVN: r171649
2011-03-29 03:02:05 +02:00
reg_allocno_class (int regno)
1991-11-06 00:39:50 +01:00
{
invoke.texi (-fsched-pressure): Document it. 2009-09-02 Vladimir Makarov <vmakarov@redhat.com> * doc/invoke.texi (-fsched-pressure): Document it. (-fsched-reg-pressure-heuristic): Remove it. * reload.c (ira.h): Include. (find_reloads): Add choosing reload on number of small spilled classes. * haifa-sched.c (ira.h): Include. (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure, saved_reg_pressure, curr_reg_live, saved_reg_live, region_ref_regs): New variables. (sched_init_region_reg_pressure_info, mark_regno_birth_or_death, initiate_reg_pressure_info, setup_ref_regs, initiate_bb_reg_pressure_info, save_reg_pressure, restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New functions. (setup_insn_reg_pressure_info): New function. (rank_for_schedule): Add pressure checking and insn issue time. Remove comparison of insn reg weights. (ready_sort): Set insn reg pressure info. (update_register_pressure, setup_insn_max_reg_pressure, update_reg_and_insn_max_reg_pressure, sched_setup_bb_reg_pressure_info): New functions. (schedule_insn): Add code for printing and updating reg pressure info. (find_set_reg_weight, find_insn_reg_weight): Remove. (ok_for_early_queue_removal): Do nothing if pressure_only_p. (debug_ready_list): Print reg pressure info. (schedule_block): Ditto. Check insn issue time. (sched_init): Set up sched_pressure_p. Allocate and set up some reg pressure related info. (sched_finish): Free some reg pressure related info. (fix_tick_ready): Make insn always ready if pressure_p. (init_h_i_d): Don't call find_insn_reg_weight. (haifa_finish_h_i_d): Free insn reg pressure info. * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move to ira.h. * ira-lives.c (single_reg_class): Check mode to find how many registers are necessary for operand. (ira_implicitly_set_insn_hard_regs): New. * common.opt (fsched-pressure): New options. (fsched-reg-pressure-heuristic): Remove. * ira.c (setup_eliminable_regset): Rename to ira_setup_eliminable_regset. Make it external. (expand_reg_info): Pass cover class to setup_reg_classes. (ira): Call resize_reg_info instead of allocate_reg_info. * sched-deps.c: Include ira.h. (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New. (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses, reg_pressure_info, insn_use_p, mark_insn_pseudo_birth, mark_insn_hard_regno_birth, mark_insn_reg_birth, mark_pseudo_death, mark_hard_regno_death, mark_reg_death, mark_insn_reg_store, mark_insn_reg_clobber, setup_insn_reg_pressure_info): New. (sched_analyze_1): Update implicit_reg_pending_uses. (sched_analyze_insn): Find implicit sets, uses, clobbers of regs. Use them to create dependencies. Set insn reg uses and pressure info. Process reg_pending_uses in one place. (free_deps): Free implicit sets. (remove_from_deps): Remove implicit sets if necessary. Check implicit sets when clearing reg_last_in_use. (init_deps_global): Clear implicit_reg_pending_clobbers and implicit_reg_pending_uses. * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move from ira-int.h. (ira_setup_eliminable_regset, ira_set_pseudo_classes, ira_implicitly_set_insn_hard_regs): New prototypes. * ira-costs.c (pseudo_classes_defined_p, allocno_p, cost_elements_num): New variables. (allocno_costs, total_costs): Rename to costs and total_allocno_costs. (COSTS_OF_ALLOCNO): Rename to COSTS. (allocno_pref): Rename to pref. (allocno_pref_buffer): Rename to pref_buffer. (common_classes): Rename to regno_cover_class. (COST_INDEX): New. (record_reg_classes): Set allocno attributes only if allocno_p. (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM. (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM and COSTS_OF_ALLOCNO. (print_costs): Rename to print_allocno_costs. (print_pseudo_costs): New. (process_bb_node_for_costs): Split into 2 functions with new function process_bb_for_costs. Pass BB to process_bb_for_costs. (find_allocno_class_costs): Rename to find_costs_and_classes. Add new parameter dump_file. Use cost_elements_num instead of ira_allocnos_num. Make one iteration if preferred classes were already calculated for scheduler. Make 2 versions of code depending on allocno_p. (setup_allocno_cover_class_and_costs): Check allocno_p. Use regno_cover_class and COSTS instead of common_classes and COSTS_OF_ALLOCNO. (init_costs, finish_costs): New. (ira_costs): Set up allocno_p and cost_elements_num. Call init_costs and finish_costs. (ira_set_pseudo_classes): New. * rtl.h (allocate_reg_info): Remove. (resize_reg_info): Change return type. (reg_cover_class): New. (setup_reg_classes): Add new parameter. * sched-int.h (struct deps_reg): New member implicit_sets. (sched_pressure_p, sched_regno_cover_class): New external definitions. (INCREASE_BITS): New macro. (struct reg_pressure_data, struct reg_use_data): New. (struct _haifa_insn_data): Remove reg_weight. Add members reg_pressure, reg_use_list, reg_set_list, and reg_pressure_excess_cost_change. (struct deps): New member implicit_sets. (pressure_p): New variable. (COVER_CLASS_BITS, INCREASE_BITS): New macros. (struct reg_pressure_data, struct reg_use_data): New. (INSN_REG_WEIGHT): Remove. (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST, INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros. (sched_init_region_reg_pressure_info, sched_setup_bb_reg_pressure_info): New prototypes. * reginfo.c (struct reg_pref): New member coverclass. (reg_cover_class): New function. (reginfo_init, pass_reginfo_init): Move after free_reg_info. (reg_info_size): New variable. (allocate_reg_info): Make static. Setup reg_info_size. (resize_reg_info): Use reg_info_size. Return flag of resizing. (setup_reg_classes): Add a new parameter. Setup cover class too. * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the dependencies. * sched-rgn.c (deps_join): Set up implicit_sets. (schedule_region): Set up region and basic blocks pressure relative info. * passes.c (init_optimization_passes): Move pass_subregs_of_mode_init before pass_sched. From-SVN: r151348
2009-09-02 20:54:25 +02:00
if (reg_pref == 0)
return NO_REGS;
gcc_assert (regno < reg_info_size);
[multiple changes] 2011-03-28 Vladimir Makarov <vmakarov@redhat.com> * ira-color.c (update_left_conflict_sizes_p): Don't assume that conflict object hard regset nodes have intersecting hard reg sets. * regmove.c (regmove_optimize): Move ira_set_pseudo_classes call after regstat_init_n_sets_and_refs. * ira.c: Add more comments at the top. (setup_stack_reg_pressure_class, setup_pressure_classes): Add comments how we compute the register pressure classes. (setup_allocno_and_important_classes): Add more comments. (setup_class_translate_array, reorder_important_classes) (setup_reg_class_relations): Add comments. * ira-emit.c: Add 2011 to the Copyright line. Add comments at the start of the file. * ira-color.c: Add 2011 to the Copyright line. (assign_hard_reg): Add more comments. (improve_allocation): Ditto. * ira-costs.c: Add 2011 to the Copyright line. (setup_cost_classes, setup_regno_cost_classes_by_aclass): Add more comments. (setup_regno_cost_classes_by_mode): Ditto. Initial patches from ira-improv branch: 2010-08-13 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c: (ira_create_object): Remove initialization of OBJECT_PROFITABLE_HARD_REGS. Initialize OBJECT_ADD_DATA. (ira_create_allocno): Remove initialization of ALLOCNO_MEM_OPTIMIZED_DEST, ALLOCNO_MEM_OPTIMIZED_DEST_P, ALLOCNO_SOMEWHERE_RENAMED_P, ALLOCNO_CHILD_RENAMED_P, ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P, ALLOCNO_COLORABLE_P, ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO, ALLOCNO_FIRST_COALESCED_ALLOCNO, ALLOCNO_NEXT_COALESCED_ALLOCNO. Initialize ALLOCNO_ADD_DATA. (copy_info_to_removed_store_destinations): Use ALLOCNO_EMIT_DATA and allocno_emit_reg instead of ALLOCNO_MEM_OPTIMIZED_DEST_P and ALLOCNO_REG. (ira_flattening): Ditto. Use ALLOCNO_EMIT_DATA instead of ALLOCNO_MEM_OPTIMIZED_DEST and ALLOCNO_SOMEWHERE_RENAMED_P. * ira.c (ira_reallocate): Remove. (setup_pressure_classes): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. (setup_allocno_assignment_flags): Use ALLOCNO_EMIT_DATA. (ira): Call ira_initiate_emit_data and ira_finish_emit_data. * ira-color.c: Use ALLOCNO_COLOR_DATA instead of ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P, ALLOCNO_COLORABLE_P, ALLOCNO_AVAILABLE_REGS_NUM, ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO. ALLOCNO_TEMP. Use OBJECT_COLOR_DATA instead of OBJECT_PROFITABLE_HARD_REGS, OBJECT_HARD_REGS_NODE, OBJECT_HARD_REGS_SUBNODES_START, OBJECT_HARD_REGS_SUBNODES_NUM. Fix formatting. (object_hard_regs_t, object_hard_regs_node_t): Move from ira-int.h. (struct object_hard_regs, struct object_hard_regs_node): Ditto. (struct allocno_color_data): New. (allocno_color_data_t): New typedef. (allocno_color_data): New definition. (ALLOCNO_COLOR_DATA): New macro. (struct object_color_data): New. (object_color_data_t): New typedef. (object_color_data): New definition. (OBJECT_COLOR_DATA): New macro. (update_copy_costs, calculate_allocno_spill_cost): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. (move_spill_restore, update_curr_costs): Ditto. (allocno_spill_priority): Make it inline. (color_pass): Allocate and free allocno_color_dat and object_color_data. (struct coalesce_data, coalesce_data_t): New. (allocno_coalesce_data): New definition. (ALLOCNO_COALESCE_DATA): New macro. (merge_allocnos, coalesced_allocno_conflict_p): Use ALLOCNO_COALESCED_DATA instead of ALLOCNO_FIRST_COALESCED_ALLOCNO, ALLOCNO_NEXT_COALESCED_ALLOCNO, ALLOCNO_TEMP. (coalesce_allocnos): Ditto. (setup_coalesced_allocno_costs_and_nums): Ditto. (collect_spilled_coalesced_allocnos): Ditto. (slot_coalesced_allocno_live_ranges_intersect_p): Ditto. (setup_slot_coalesced_allocno_live_ranges): Ditto. (coalesce_spill_slots): Ditto. (ira_sort_regnos_for_alter_reg): Ditto. Allocate, initialize and free allocno_coalesce_data. * ira-conflicts.c: Fix formatting. (process_regs_for_copy): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. (build_object_conflicts): Optimize. * ira-costs.c (record_reg_classes): Optimize. Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost, ira_may_move_in_cost, and ira_may_move_out_cost instead of ira_get_register_move_cost and ira_get_may_move_cost. (record_address_regs): Ditto. (scan_one_insn): Optimize. (find_costs_and_classes): Optimize. (process_bb_node_for_hard_reg_moves): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. * ira-emit.c: Use allocno_emit_reg, ALLOCNO_EMIT_DATA instead of ALLOCNO_REG, ALLOCNO_CHILD_RENAMED_P, ALLOCNO_MEM_OPTIMIZED_DEST, ALLOCNO_MEM_OPTIMIZED_DEST_P, and ALLOCNO_SOMEWHERE_RENAMED_P. (ira_allocno_emit_data, void_p, new_allocno_emit_data_vec): New definitions. (ira_initiate_emit_data, ira_finish_emit_data) (create_new_allocno): New functions. (modify_move_list): Call create_new_alloc instead of ira_create_allocno. (emit_move_list): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. * ira-int.h: Fix some comments. (object_hard_regs_t, object_hard_regs_node_t): Move to ira-color.c. (struct object_hard_regs, struct object_hard_regs_node): Ditto. (struct ira_object): Remove profitable_hard_regs, hard_regs_node, hard_regs_subnodes_start, hard_regs_subnodes_num. Add new member add_data. (struct ira_allocno): Make mode and aclass a bitfield. Move other bitfield after mode. Make hard_regno a short int. Make hard_regno short. Remove first_coalesced_allocno and next_coalesced_allocno. Move mem_optimized_dest_p, somewhere_renamed_p, child_renamed_p, reg, and mem_optimized_dest into struct ira_emit_data. Remove in_graph_p, may_be_spilled_p, available_regs_num, next_bucket_allocno, prev_bucket_allocno, temp, colorable_p. Add new member add_data. (ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P): Remove. (ALLOCNO_COLORABLE_P, ALLOCNO_AVAILABLE_REGS_NUM): Remove. (ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO): Remove. (ALLOCNO_TEMP, ALLOCNO_FIRST_COALESCED_ALLOCNO): Remove. (ALLOCNO_NEXT_COALESCED_ALLOCNO): Remove. (ALLOCNO_ADD_DATA): New macro. (ira_emit_data_t): New typedef. (struct ira_emit_data): New. Move mem_optimized_dest_p, somewhere_renamed_p, child_renamed_p, reg, mem_optimized_dest from struct ira_allocno. (ALLOCNO_EMIT_DATA): New macro. (ira_allocno_emit_data, allocno_emit_reg): New. (ALLOCNO_PROFITABLE_HARD_REGS, OBJECT_HARD_REGS_NODE): Remove. (OBJECT_HARD_REGS_SUBNODES_STAR, OBJECT_HARD_REGS_SUBNODES_NUM): Remove. (OBJECT_ADD_DATA): New macro. (ira_reallocate): Remove. (ira_initiate_emit_data, ira_finish_emit_data): New. (ira_get_register_move_cost, ira_get_may_move_cost): Remove. (ira_init_register_move_cost_if_necessary): New. (ira_object_conflict_iter_next): Merge into ira_object_conflict_iter_cond. (FOR_EACH_OBJECT_CONFLICT): Don't use ira_object_conflict_iter_next. * ira-live.c: (process_single_reg_class_operands): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. 2010-08-13 Vladimir Makarov <vmakarov@redhat.com> * ira-int.h (struct target_ira_int): Remove x_cost_classes. * ira-costs.c: Fix formatting. (cost_classes, cost_classes_num): Remove. (struct cost_classes, cost_classes_t, const_cost_classes_t): New. (regno_cost_classes, cost_classes_hash, cost_classes_eq): New. (cost_classes_del, cost_classes_htab): New. (cost_classes_aclass_cache, cost_classes_mode_cache): New. (initiate_regno_cost_classes, setup_cost_classes): New. (setup_regno_cost_classes_by_aclass): New. (setup_regno_cost_classes_by_mode, finish_regno_cost_classes): New. (record_reg_classes): Use regno_cost_classes instead of cost_classes. Move checking opposite operand up. (record_address_regs): Use regno_cost_classes instead of cost_classes. (scan_one_insn): Ditto. Use always general register. (print_allocno_costs): Use regno_cost_classes instead of cost_classes. (print_pseudo_costs): Ditto. Use Reg_N_REFS. (find_costs_and_classes): Set up cost classes for each registers. Use also their mode for this. Use regno_cost_classes instead of cost_classes. (setup_allocno_class_and_costs): Use regno_cost_classes instead of cost_classes. (free_ira_costs, ira_init_costs): Don't use cost_classes. (ira_costs, ira_set_pseudo_classes): Call initiate_regno_cost_classes and finish_regno_cost_classes. 2010-10-04 Vladimir Makarov <vmakarov@redhat.com> * target-def.h (TARGET_IRA_COVER_CLASSES): Remove. * target.def (ira_cover_classes): Remove. * doc/tm.texi: Remove TARGET_IRA_COVER_CLASSES and IRA_COVER_CLASSES. * doc/tm.texi.in: Ditto. * ira-conflicts.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Use ALLOCNO_COVER_CLASS_COST instead of ALLOCNO_CLASS_COST. Fix formatting. * targhooks.c (default_ira_cover_classes): Remove. * targhooks.h (default_ira_cover_classes): Ditto. * haifa-sched.c: Remove mentioning cover classes from the file. Use ira_reg_pressure_cover instead of ira_reg_class_cover. Use ira_pressure_classes and ira_pressure_classes_num instead of ira_reg_class_cover_size and ira_reg_class_cover. Use sched_regno_pressure_class instead of sched_regno_cover_class. (mark_regno_birth_or_death, setup_insn_reg_pressure_info): Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. * ira-int.h: Add 2010 to Copyright. Remove mentioning cover classes from the file. (object_hard_regs_t, object_hard_regs_node_t): New typedefs. (struct object_hard_regs, struct object_hard_regs_node): New. (struct ira_object): New members profitable_hard_regs, hard_regs_node, hard_regs_subnodes_start, hard_regs_subnodes_num. (struct ira_allocno): Rename cover_class to aclass. Rename cover_class_cost and updated_cover_class_cost to class_cost and updated_class_cost. Remove splay_removed_p and left_conflict_size. Add new members colorable_p. (ALLOCNO_SPLAY_REMOVED_P, ALLOCNO_LEFT_CONFLICTS_SIZE): Remove. (ALLOCNO_COLORABLE_P): New macro. (ALLOCNO_COVER_CLASS): Rename to ALLOCNO_CLASS. (ALLOCNO_COVER_CLASS_COST, ALLOCNO_UPDATED_COVER_CLASS_COST): Rename to ALLOCNO_CLASS_COST and ALLOCNO_UPDATED__CLASS_COST. (OBJECT_...): Rename parameter C to O. (OBJECT_PROFITABLE_HARD_REGS): New macro. (OBJECT_HARD_REGS_NODE, OBJECT_HARD_REGS_SUBNODES_START) (OBJECT_HARD_REGS_SUBNODES_NUM): New macros. (struct target_ira_int): New members x_ira_max_memory_move_cost, x_ira_max_register_move_cost, x_ira_max_may_move_in_cost, x_ira_max_may_move_out_cost, x_ira_reg_allocno_class_p, x_ira_reg_pressure_class_p, x_ira_important_class_nums, x_ira_reg_class_superunion. Rename x_prohibited_class_mode_reg to x_ira_prohibited_class_mode_reg. Rename x_ira_reg_class_union to x_ira_reg_class_subunion. (ira_max_memory_move_cost, ira_max_register_move_cost) (ira_max_may_move_in_cost, ira_max_may_move_out_cost) (ira_reg_allocno_class_p, ira_reg_pressure_class_p) (ira_important_class_nums, ira_reg_class_superunion): New macros. (prohibited_class_mode_regs): Rename to ira_prohibited_class_mode_regs. (ira_reg_class_union): Rename to ira_reg_class_subunion. (ira_debug_class_cover): Rename to ira_debug_allocno_classes. (ira_set_allocno_cover_class): Rename to ira_set_allocno_class. (ira_tune_allocno_costs_and_cover_classes): Rename to ira_tune_allocno_costs. (ira_debug_hard_regs_forest): New. (ira_object_conflict_iter_init, ira_object_conflict_iter_cond) (ira_object_conflict_iter_next): Fix comments. (ira_hard_reg_set_intersection_p, hard_reg_set_size): New functions. (ira_allocate_and_set_costs, ira_allocate_and_copy_costs): Rename cover_class to aclass. (ira_allocate_and_accumulate_costs): Ditto. (ira_allocate_and_set_or_copy_costs): Ditto. * opts.c (decode_options): Remove ira_cover_class check. * ira-color.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS, ALLOCNO_CLASS_COST, and ALLOCNO_UPDATED_CLASS_COST instead of ALLOCNO_COVER_CLASS, ALLOCNO_COVER_CLASS_COST, and ALLOCNO_UPDATED_COVER_CLASS_COST. Fix formatting. (splay-tree.h): Remove include. (allocno_coalesced_p, processed_coalesced_allocno_bitmap): Move before copy_freq_compare_func. (allocnos_for_spilling, removed_splay_allocno_vec): Remove. (object_hard_regs_vec, object_hard_regs_htab, node_check_tick): New definitions. (hard_regs_roots, hard_regs_node_vec): Ditto. (object_hard_regs_hash, object_hard_regs_eq, find_hard_regs): Ditto. (insert_hard_regs, init_object_hard_regs, add_object_hard_regs): Ditto. (finish_object_hard_regs, object_hard_regs_compare): Ditto. (create_new_object_hard_regs_node): Ditto. (add_new_object_hard_regs_node_to_forest): Ditto. (add_object_hard_regs_to_forest, collect_object_hard_regs_cover): Ditto. (setup_object_hard_regs_nodes_parent, first_common_ancestor_node): Ditto. (print_hard_reg_set, print_hard_regs_subforest): Ditto. (print_hard_regs_forest, ira_debug_hard_regs_forest): Ditto. (remove_unused_object_hard_regs_nodes): Ditto. (enumerate_object_hard_regs_nodes): Ditto. (object_hard_regs_nodes_num, object_hard_regs_nodes): Ditto. (object_hard_regs_subnode_t): Ditto. (struct object_hard_regs_subnode): Ditto. (object_hard_regs_subnodes, object_hard_regs_subnode_index): Ditto. (setup_object_hard_regs_subnode_index): Ditto. (get_object_hard_regs_subnodes_num): Ditto. (form_object_hard_regs_nodes_forest): Ditto. (finish_object_hard_regs_nodes_tree): Ditto. (finish_object_hard_regs_nodes_forest): Ditto. (allocnos_have_intersected_live_ranges_p): Rename to allocnos_conflict_by_live_ranges_p. Move before copy_freq_compare_func. (pseudos_have_intersected_live_ranges_p): Rename to conflict_by_live_ranges_p. Move before copy_freq_compare_func. (setup_left_conflict_sizes_p, update_left_conflict_sizes_p): Ditto. (empty_profitable_hard_regs, setup_profitable_hard_regs): Ditto. (update_copy_costs): Remove assert. Skip cost update if the hard reg does not belong the class. (assign_hard_reg): Process only profitable hard regs. (uncolorable_allocnos_num): Make it scalar. (allocno_spill_priority): Use ALLOCNO_EXCESS_PRESSURE_POINTS_NUM and ira_reg_class_max_nregs instead of ALLOCNO_LEFT_CONFLICTS_SIZE and ira_reg_class_max_nregs. (bucket_allocno_compare_func): Check frequency first. (sort_bucket): Add compare function as a parameter. (add_allocno_to_ordered_bucket): Assume no coalesced allocnos. (uncolorable_allocnos_splay_tree, USE_SPLAY_P): Remove. (push_allocno_to_stack): Rewrite for checking new allocno colorability. (remove_allocno_from_bucket_and_push): Print cost too. Remove assert. (push_only_colorable): Pass new parameter to sort_bucket. (push_allocno_to_spill): Remove. (allocno_spill_priority_compare): Make it inline and rewrite. (splay_tree_allocate, splay_tree_free): Remove. (allocno_spill_sort_compare): New function. (push_allocnos_to_stack): Sort allocnos for spilling once. Don't build and use splay tree. Choose first allocno in uncolorable allocno bucket to spill. Remove setting spill cost. (all_conflicting_hard_regs): Remove. (setup_allocno_available_regs_num): Check only profitable hard regs. Print info about hard regs nodes. (setup_allocno_left_conflicts_size): Remove. (put_allocno_into_bucket): Don't call setup_allocno_left_conflicts_size. Use setup_left_conflict_sizes_p. (improve_allocation): New. (color_allocnos): Call setup_profitable_hard_regs, form_object_hard_regs_nodes_forest, improve_allocation, finish_object_hard_regs_nodes_forest. Setup spill cost. (print_loop_title): Use pressure classes. (color_allocnso): Ditto. (do_coloring): Remove allocation and freeing splay_tree_node_pool and allocnos_for_spilling. (ira_sort_regnos_for_alter_reg): Don't setup members {first,next}_coalesced_allocno. (color): Remove allocating and freeing removed_splay_allocno_vec. (fast_allocation): Use ira_prohibited_class_mode_regs instead of prohibited_class_mode_regs. * ira-lives.c: Remove mentioning cover classes from the file. Fix formatting. (update_allocno_pressure_excess_length): Use pressure classes. (inc_register_pressure, dec_register_pressure): Check for pressure class. (mark_pseudo_regno_live, mark_pseudo_regno_subword_live): Use pressure class. Use ira_reg_class_nregs instead of ira_reg_class_max_nregs. (mark_pseudo_regno_dead, mark_pseudo_regno_subword_dead): Ditto. (mark_hard_reg_live, mark_hard_reg_dead): Use pressure class. (single_reg_class): Use ira_reg_class_nregs instead of ira_reg_class_max_nregs. (process_bb_node_lives): Use pressure classes. * ira-emit.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Fix formatting. (change_loop): Use pressure classes. (modify_move_list): Call ira_set_allocno_class instead of ira_set_allocno_cover_class. * ira-build.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS and ALLOCNO_CLASS_COST instead of ALLOCNO_COVER_CLASS and ALLOCNO_COVER_CLASS_COST. Use ALLOCNO_UPDATED_CLASS_COST instead of ALLOCNO_UPDATED_COVER_CLASS_COST. Fix formatting. (ira_create_object): Initiate OBJECT_PROFITABLE_HARD_REGS. (ira_create_allocno): Remove initialization of ALLOCNO_SPLAY_REMOVED_P, ALLOCNO_LEFT_CONFLICT_SIZE. Initialize ALLOCNO_COLORABLE_P. (ira_set_allocno_cover_class): Rename to ira_set_allocno_class. Update conflict regs for the objects. (create_cap_allocno): Remove assert. Don't propagate ALLOCNO_AVAILABLE_REGS_NUM. (ira_free_allocno_costs): New function. (finish_allocno): Change a part of code into call of ira_free_allocno_costs. (low_pressure_loop_node_p): Use pressure classes. (object_range_compare_func): Don't compare classes. (setup_min_max_conflict_allocno_ids): Ditto. * loop-invariant.c: Remove mentioning cover classes from the file. Use ira_pressure_classes and ira_pressure_classes_num instead of ira_reg_class_cover_size and ira_reg_class_cover. Fix formatting. (get_cover_class_and_nregs): Rename to get_cover_pressure_and_nregs. Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. Use reg_allocno_class instead of reg_cover_class. (get_inv_cost): Use instead ira_stack_reg_pressure_class of STACK_REG_COVER_CLASS. (get_regno_cover_class): Rename to get_regno_pressure_class. (move_loop_invariants): Initialize and finalize regstat. * ira.c: Remove mentioning cover classes from the file. Add comments about coloring without cover classes. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Fix formatting. (alloc_reg_class_subclasses, setup_reg_subclasses): Move it before setup_class_subset_and_memory_move_costs. (setup_stack_reg_pressure_class, setup_pressure_classes): New. (setup_cover_and_important_classes): Rename to setup_allocno_and_important_classes. (setup_class_translate_array): New. (setup_class_translate): Call it for allocno and pressure classes. (cover_class_order): Rename to allocno_class_order. (comp_reg_classes_func): Use ira_allocno_class_translate instead of ira_class_translate. (reorder_important_classes): Set up ira_important_class_nums. (setup_reg_class_relations): Set up ira_reg_class_superunion. (print_class_cover): Rename to print_classes. Add parameter. (ira_debug_class_cover): Rename to ira_debug_allocno_classes. Print pressure classes too. (find_reg_class_closure): Rename to find_reg_classes. Don't call setup_reg_subclasses. (ira_hard_regno_cover_class): Rename to ira_hard_regno_allocno_class. (ira_reg_class_nregs): Rename to ira_reg_class_max_nregs. (setup_prohibited_class_mode_regs): Use ira_prohibited_class_mode_regs instead of prohibited_class_mode_regs. (clarify_prohibited_class_mode_regs): New function. (ira_init_register_move_cost): Set up ira_max_register_move_cost, ira_max_may_move_in_cost, and ira_max_may_move_out_cost. (ira_init_once): Initialize them. (free_register_move_costs): Process them. (ira_init): Move calls of find_reg_classes and setup_hard_regno_aclass after setup_prohibited_class_mode_regs. Call clarify_prohibited_class_mode_regs. (ira_no_alloc_reg): Remove. (too_high_register_pressure_p): Use pressure classes. * sched-deps.c: Remove mentioning cover classes from the file. Use ira_reg_pressure_cover instead of ira_reg_class_cover. Use ira_pressure_classes and ira_pressure_classes_num instead of ira_reg_class_cover_size and ira_reg_class_cover. (mark_insn_hard_regno_birth, mark_hard_regno_death): Use sched_regno_pressure_class instead of sched_regno_cover_class. (mark_insn_pseudo_birth, mark_pseudo_death): Ditto. Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. * ira.h: Add 2010 to Copyright. (ira_no_alloc_reg): Remove external. (struct target_ira): Rename x_ira_hard_regno_cover_class, x_ira_reg_class_cover_size, x_ira_reg_class_cover, and x_ira_class_translate to x_ira_hard_regno_allocno_class, x_ira_allocno_classes_num, x_ira_allocno_classes, and x_ira_allocno_class_translate. Add x_ira_pressure_classes_num, x_ira_pressure_classes, x_ira_pressure_class_translate, and x_ira_stack_reg_pressure_class. Rename x_ira_reg_class_nregs to x_ira_reg_class_max_nregs. Add x_ira_reg_class_min_nregs and x_ira_no_alloc_regs. (ira_hard_regno_cover_class): Rename to ira_hard_regno_allocno_class. (ira_reg_class_cover_size, ira_reg_class_cover): Rename to ira_allocno_classes_num and ira_allocno_classes. (ira_class_translate): Rename to ira_allocno_class_translate. (ira_pressure_classes_num, ira_pressure_classes): New definitions. (ira_pressure_class_translate, ira_stack_reg_pressure_class): Ditto. (ira_reg_class_nregs): Rename to ira_reg_class_max_nregs. (ira_reg_class_min_nregs, ira_stack_reg_pressure_class): New (ira_no_alloc_regs): New. * ira-costs.c: Add 2010 to Copyright. Remove mentioning cover classes from the file. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Use ALLOCNO_CLASS_COST instead of ALLOCNO_COVER_CLASS_COST. (regno_cover_class): Rename to regno_aclass. (record_reg_classes): Use ira_reg_class_subunion instead of ira_reg_class_union. (record_address_regs): Check overflow. (scan_one_insn): Ditto. (print_allocno_costs): Print total mem cost fore regional allocation. (print_pseudo_costs): Use REG_N_REFS. (find_costs_and_classes): Use classes intersected with them on the 1st pass. Check overflow. Use ira_reg_class_subunion instead of ira_reg_class_union. Use ira_allocno_class_translate and regno_aclass instead of ira_class_translate and regno_cover_class. Modify code for finding regno_aclass. Setup preferred classes for the next pass. (setup_allocno_cover_class_and_costs): Rename to setup_allocno_class_and_costs. Use regno_aclass instead of regno_cover_class. Use ira_set_allocno_class instead of ira_set_allocno_cover_class. (init_costs, finish_costs): Use regno_aclass instead of regno_cover_class. (ira_costs): Use setup_allocno_class_and_costs instead of setup_allocno_cover_class_and_costs. (ira_tune_allocno_costs_and_cover_classes): Rename to ira_tune_allocno_costs. Check overflow. Skip conflict hard regs by processing objects. Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. * rtl.h (reg_cover_class): Rename to reg_allocno_class. * sched-int.h: Remove mentioning cover classes from the file. (sched_regno_cover_class): Rename to sched_regno_pressure_class. * reginfo.c: Add 2010 to Copyright. Remove mentioning cover classes from the file. (struct reg_pref): Rename coverclass into allocnoclass. (reg_cover_class): Rename to reg_allocno_class. * Makefile.in (ira-color.o): Remove SPLAY_TREE_H from dependencies. * config/alpha/alpha.h (IRA_COVER_CLASSES): Remove. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/avr/avr.h (IRA_COVER_CLASSES): Ditto. * config/bfin/bfin.h (IRA_COVER_CLASSES): Ditto. * config/cris/cris.h (IRA_COVER_CLASSES): Ditto. * config/fr30/fr30.h (IRA_COVER_CLASSES): Ditto. * config/frv/frv.h (IRA_COVER_CLASSES): Ditto. * config/h8300/h8300.h (IRA_COVER_CLASSES): Ditto. * config/i386/i386.h (STACK_REG_COVER_CLASS): Ditto. * config/i386/i386.c (TARGET_IRA_COVER_CLASSES) (i386_ira_cover_classes): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/iq2000/iq2000.h (IRA_COVER_CLASSES): Ditto. * config/m32r/m32r.h (IRA_COVER_CLASSES): Ditto. * config/m68k/m68k.h (IRA_COVER_CLASSES): Ditto. * config/mcore/mcore.h (IRA_COVER_CLASSES): Ditto. * config/mep/mep.h (IRA_COVER_CLASSES): Ditto. * config/mips/mips.c (TARGET_IRA_COVER_CLASSES) (mips_ira_cover_classes): Ditto. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): Ditto. * config/moxie/moxie.h (IRA_COVER_CLASSES): Ditto. * config/pa/pa64-regs.h (IRA_COVER_CLASSES): Ditto. * config/pa/pa32-regs.h (IRA_COVER_CLASSES): Ditto. * config/picochip/picochip.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES_PRE_VSX) (IRA_COVER_CLASSES_VSX): Ditto. * config/rs6000/rs6000.c (TARGET_IRA_COVER_CLASSES) (rs6000_ira_cover_classes): Ditto. * config/rx/rx.h (IRA_COVER_CLASSES): Ditto. * config/s390/s390.h (IRA_COVER_CLASSES): Ditto. * config/score/score.h (IRA_COVER_CLASSES): Ditto. * config/sh/sh.h (IRA_COVER_CLASSES): Ditto. * config/sparc/sparc.h (IRA_COVER_CLASSES): Ditto. * config/spu/spu.h (IRA_COVER_CLASSES): Ditto. * config/stormy16/stormy16.h (IRA_COVER_CLASSES): Ditto. * config/v850/v850.h (IRA_COVER_CLASSES): Ditto. * config/vax/vax.h (IRA_COVER_CLASSES): Ditto. * config/xtensa/xtensa.h (IRA_COVER_CLASSES): Ditto. From-SVN: r171649
2011-03-29 03:02:05 +02:00
return (enum reg_class) reg_pref[regno].allocnoclass;
1991-11-06 00:39:50 +01:00
}
[multiple changes] 2008-08-26 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c, ira-color.c, ira-costs.c, ira.h, ira-lives.c, ira.c, ira-conflicts.c, ira-emit.c, ira-int.h: New files. * doc/passes.texi: Describe IRA. * doc/tm.texi (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Describe the new macros. * doc/invoke.texi (ira-max-loops-num): Describe the new parameter. (-fira, -fira-algorithm, -fira-coalesce, -fno-ira-move-spills, -fira-propagate-cost, -fno-ira-share-save-slots, -fno-ira-share-spill-slots, -fira-verbose): Describe new options. * flags.h (ira_algorithm): New enumeration. (flag_ira_algorithm, flag_ira_verbose): New external variable declarations. * postreload.c (gate_handle_postreload): Don't do post reload optimizations unless the reload is completed. * reload.c (push_reload, find_dummy_reload): Use DF_LR_OUT for IRA. * tree-pass.h (pass_ira): New external variable declaration. * reload.h: Add 2008 to the Copyright. * cfgloopanal.c: Include params.h. (estimate_reg_pressure_cost): Decrease cost for IRA optimization mode. * params.h (IRA_MAX_LOOPS_NUM): New macro. * toplev.c (ira.h): New include. (flag_ira_algorithm, flag_ira_verbose): New external variables. (backend_init_target): Call ira_init. (backend_init): Call ira_init_once. (finalize): Call finish_ira_once. * toplev.h (flag_ira, flag_ira_coalesce, flag_ira_move_spills, flag_ira_share_save_slots, flag_ira_share_spill_slots): New external variables. * regs.h (contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): New external variable declarations. (move_table): New typedef. * caller-save.c: Include headers output.h and ira.h. (no_caller_save_reg_set): New global variable. (save_slots_num, save_slots): New variables. (reg_save_code, reg_restore_code, add_stored_regs): Add prototypes. (init_caller_save): Set up no_caller_save_reg_set. (init_save_areas): Reset save_slots_num. (saved_hard_reg): New structure. (hard_reg_map, saved_regs_num, all_saved_regs): New variables. (initiate_saved_hard_regs, new_saved_hard_reg, finish_saved_hard_regs, saved_hard_reg_compare_func): New functions. (setup_save_areas): Add code for sharing stack slots. (all_blocks): New variable. (save_call_clobbered_regs): Process pseudo-register too. (mark_set_regs): Process pseudo-register too. (insert_one_insn): Put the insn after bb note in a empty basic block. Add insn check. * global.c (eliminable_regset): Make it external. (mark_elimination): Use DF_LR_IN for IRA. (pseudo_for_reload_consideration_p): New. (build_insn_chain): Make it external. Don't ignore spilled pseudos for IRA. Use pseudo_for_reload_consideration_p. (gate_handle_global_alloc): New function. (pass_global_alloc): Add the gate function. * opts.c (decode_options): Set up flag_ira. Print the warning for -fira. (common_handle_option): Process -fira-algorithm and -fira-verbose. * timevar.def (TV_IRA, TV_RELOAD): New passes. * regmove.c (regmove_optimize): Don't do replacement of output for IRA. * hard-reg-set.h (no_caller_save_reg_set, reg_class_subclasses): New external variable declarations. * local-alloc.c (update_equiv_regs): Make it external. Return true if jump label rebuilding should be done. Rescan new_insn for notes. (gate_handle_local_alloc): New function. (pass_local_alloc): Add the gate function. * alias.c (value_addr_p, stack_addr_p): New functions. (nonoverlapping_memrefs_p): Use them for IRA. * common.opt (fira, fira-algorithm, fira-coalesce, fira-move-spills, fira-share-save-slots, fira-share-spill-slots, fira-verbose): New options. * regclass.c (reg_class_subclasses, contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): Make the variables external. (move_table): Remove typedef. (init_move_cost): Make it external. (allocate_reg_info, resize_reg_info, setup_reg_classes): New functions. * rtl.h (init_move_cost, allocate_reg_info, resize_reg_info, setup_reg_classes): New function prototypes. (eliminable_regset): New external variable declaration. (build_insn_chain, update_equiv_regs): New function prototypes. * Makefile.in (IRA_INT_H): New definition. (OBJS-common): Add ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, and ira-lives.o. (reload1.o, toplev.o): Add dependence on ira.h. (cfgloopanal.o): Add PARAMS_H. (caller-save.o): Add dependence on output.h and ira.h. (ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, ira-lives.o): New entries. * passes.c (pass_ira): New pass. * params.def (PARAM_IRA_MAX_LOOPS_NUM): New parameter. * reload1.c (ira.h): Include the header. (changed_allocation_pseudos): New bitmap. (init_reload): Initiate the bitmap. (compute_use_by_pseudos): Permits spilled registers in FROM. (temp_pseudo_reg_arr): New variable. (reload): Allocate and free temp_pseudo_reg_arr. Sort pseudos for IRA. Call alter_reg with the additional parameter. Don't clear spilled_pseudos for IRA. Restore original insn chain for IRA. Clear changed_allocation_pseudos at the end of reload. (calculate_needs_all_insns): Call IRA's mark_memory_move_deletion. (hard_regno_to_pseudo_regno): New variable. (count_pseudo): Check spilled pseudos. Set up hard_regno_to_pseudo_regno. (count_spilled_pseudo): Check spilled pseudos. Update hard_regno_to_pseudo_regno. (find_reg): Use better_spill_reload_regno_p. Check hard_regno_to_pseudo_regno. (alter_reg): Set up spilled_pseudos. Add a new parameter. Add code for IRA. (eliminate_regs_1): Use additional parameter for alter_reg. (finish_spills): Set up pseudo_previous_regs only for spilled pseudos. Call reassign_pseudos once for all spilled pseudos, pass more arguments. Don't clear live_throughout and dead_or_set for spilled pseudos. Use additional parameter for alter_reg. Call mark_allocation_change. Set up changed_allocation_pseudos. Remove sanity check. (emit_input_reload_insns, delete_output_reload): Use additional parameter for alter_reg. Call mark_allocation_change. (substitute, gen_reload_chain_without_interm_reg_p): New functions. (reloads_conflict): Use gen_reload_chain_without_interm_reg_p. * testsuite/gcc.dg/20080410-1.c: New file. * config/s390/s390.h (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Define. * config/sparc/sparc.h (IRA_COVER_CLASSES): New macro. * config/i386/i386.h (IRA_COVER_CLASSES): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES): Ditto. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/alpha/alpha.h (IRA_COVER_CLASSES): Ditto. 2008-08-24 Jeff Law <law@redhat.com> * ira.c (setup_reg_class_intersect_union): Prefer smallest class when ignoring unavailable registers. 2008-08-24 Jeff Law <law@redhat.com> * ira-color.c (coalesced_pseudo_reg_slot_compare): Check FRAME_GROWS_DOWNWARD and STACK_GROWS_DOWNWARD. * ira.c (setup_eliminable_regset): Check stack_realign_needed. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): New macro. 2008-06-03 Steve Chamberlain <steve.chamberlain@gmail.com> * ira-build.c (allocno_range_compare_func): Stabilize sort. 2008-05-29 Andy Hutchinson <hutchinsonandy@aim.com> * config/avr/avr.h (IRA_COVER_CLASSES): New macro. * reload1.c (find_reg): Process registers in register allocation order. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * toplev.c (backend_init_target): Move ira_init call from here... (lang_dependent_init_target): ...to here. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * ira.c (setup_class_subset_and_memory_move_costs): Don't calculate memory move costs for NO_REGS. 2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org> * ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if STACK_REGS is defined. 2008-04-08 Andrew Pinski <andrew_pinski@playstation.sony.com> * config/spu/spu.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Bernd Schmidt <bernd.schmidt@analog.com> * config/bfin/bfin.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Kaz Kojima <kkojima@gcc.gnu.org> * config/sh/sh.h (IRA_COVER_CLASSES): Define. * config/sh/sh.md (movsicc_true+3): Check if emit returns a barrier. From-SVN: r139590
2008-08-26 14:39:58 +02:00
/* Allocate space for reg info and initilize it. */
invoke.texi (-fsched-pressure): Document it. 2009-09-02 Vladimir Makarov <vmakarov@redhat.com> * doc/invoke.texi (-fsched-pressure): Document it. (-fsched-reg-pressure-heuristic): Remove it. * reload.c (ira.h): Include. (find_reloads): Add choosing reload on number of small spilled classes. * haifa-sched.c (ira.h): Include. (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure, saved_reg_pressure, curr_reg_live, saved_reg_live, region_ref_regs): New variables. (sched_init_region_reg_pressure_info, mark_regno_birth_or_death, initiate_reg_pressure_info, setup_ref_regs, initiate_bb_reg_pressure_info, save_reg_pressure, restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New functions. (setup_insn_reg_pressure_info): New function. (rank_for_schedule): Add pressure checking and insn issue time. Remove comparison of insn reg weights. (ready_sort): Set insn reg pressure info. (update_register_pressure, setup_insn_max_reg_pressure, update_reg_and_insn_max_reg_pressure, sched_setup_bb_reg_pressure_info): New functions. (schedule_insn): Add code for printing and updating reg pressure info. (find_set_reg_weight, find_insn_reg_weight): Remove. (ok_for_early_queue_removal): Do nothing if pressure_only_p. (debug_ready_list): Print reg pressure info. (schedule_block): Ditto. Check insn issue time. (sched_init): Set up sched_pressure_p. Allocate and set up some reg pressure related info. (sched_finish): Free some reg pressure related info. (fix_tick_ready): Make insn always ready if pressure_p. (init_h_i_d): Don't call find_insn_reg_weight. (haifa_finish_h_i_d): Free insn reg pressure info. * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move to ira.h. * ira-lives.c (single_reg_class): Check mode to find how many registers are necessary for operand. (ira_implicitly_set_insn_hard_regs): New. * common.opt (fsched-pressure): New options. (fsched-reg-pressure-heuristic): Remove. * ira.c (setup_eliminable_regset): Rename to ira_setup_eliminable_regset. Make it external. (expand_reg_info): Pass cover class to setup_reg_classes. (ira): Call resize_reg_info instead of allocate_reg_info. * sched-deps.c: Include ira.h. (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New. (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses, reg_pressure_info, insn_use_p, mark_insn_pseudo_birth, mark_insn_hard_regno_birth, mark_insn_reg_birth, mark_pseudo_death, mark_hard_regno_death, mark_reg_death, mark_insn_reg_store, mark_insn_reg_clobber, setup_insn_reg_pressure_info): New. (sched_analyze_1): Update implicit_reg_pending_uses. (sched_analyze_insn): Find implicit sets, uses, clobbers of regs. Use them to create dependencies. Set insn reg uses and pressure info. Process reg_pending_uses in one place. (free_deps): Free implicit sets. (remove_from_deps): Remove implicit sets if necessary. Check implicit sets when clearing reg_last_in_use. (init_deps_global): Clear implicit_reg_pending_clobbers and implicit_reg_pending_uses. * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move from ira-int.h. (ira_setup_eliminable_regset, ira_set_pseudo_classes, ira_implicitly_set_insn_hard_regs): New prototypes. * ira-costs.c (pseudo_classes_defined_p, allocno_p, cost_elements_num): New variables. (allocno_costs, total_costs): Rename to costs and total_allocno_costs. (COSTS_OF_ALLOCNO): Rename to COSTS. (allocno_pref): Rename to pref. (allocno_pref_buffer): Rename to pref_buffer. (common_classes): Rename to regno_cover_class. (COST_INDEX): New. (record_reg_classes): Set allocno attributes only if allocno_p. (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM. (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM and COSTS_OF_ALLOCNO. (print_costs): Rename to print_allocno_costs. (print_pseudo_costs): New. (process_bb_node_for_costs): Split into 2 functions with new function process_bb_for_costs. Pass BB to process_bb_for_costs. (find_allocno_class_costs): Rename to find_costs_and_classes. Add new parameter dump_file. Use cost_elements_num instead of ira_allocnos_num. Make one iteration if preferred classes were already calculated for scheduler. Make 2 versions of code depending on allocno_p. (setup_allocno_cover_class_and_costs): Check allocno_p. Use regno_cover_class and COSTS instead of common_classes and COSTS_OF_ALLOCNO. (init_costs, finish_costs): New. (ira_costs): Set up allocno_p and cost_elements_num. Call init_costs and finish_costs. (ira_set_pseudo_classes): New. * rtl.h (allocate_reg_info): Remove. (resize_reg_info): Change return type. (reg_cover_class): New. (setup_reg_classes): Add new parameter. * sched-int.h (struct deps_reg): New member implicit_sets. (sched_pressure_p, sched_regno_cover_class): New external definitions. (INCREASE_BITS): New macro. (struct reg_pressure_data, struct reg_use_data): New. (struct _haifa_insn_data): Remove reg_weight. Add members reg_pressure, reg_use_list, reg_set_list, and reg_pressure_excess_cost_change. (struct deps): New member implicit_sets. (pressure_p): New variable. (COVER_CLASS_BITS, INCREASE_BITS): New macros. (struct reg_pressure_data, struct reg_use_data): New. (INSN_REG_WEIGHT): Remove. (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST, INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros. (sched_init_region_reg_pressure_info, sched_setup_bb_reg_pressure_info): New prototypes. * reginfo.c (struct reg_pref): New member coverclass. (reg_cover_class): New function. (reginfo_init, pass_reginfo_init): Move after free_reg_info. (reg_info_size): New variable. (allocate_reg_info): Make static. Setup reg_info_size. (resize_reg_info): Use reg_info_size. Return flag of resizing. (setup_reg_classes): Add a new parameter. Setup cover class too. * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the dependencies. * sched-rgn.c (deps_join): Set up implicit_sets. (schedule_region): Set up region and basic blocks pressure relative info. * passes.c (init_optimization_passes): Move pass_subregs_of_mode_init before pass_sched. From-SVN: r151348
2009-09-02 20:54:25 +02:00
static void
[multiple changes] 2008-08-26 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c, ira-color.c, ira-costs.c, ira.h, ira-lives.c, ira.c, ira-conflicts.c, ira-emit.c, ira-int.h: New files. * doc/passes.texi: Describe IRA. * doc/tm.texi (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Describe the new macros. * doc/invoke.texi (ira-max-loops-num): Describe the new parameter. (-fira, -fira-algorithm, -fira-coalesce, -fno-ira-move-spills, -fira-propagate-cost, -fno-ira-share-save-slots, -fno-ira-share-spill-slots, -fira-verbose): Describe new options. * flags.h (ira_algorithm): New enumeration. (flag_ira_algorithm, flag_ira_verbose): New external variable declarations. * postreload.c (gate_handle_postreload): Don't do post reload optimizations unless the reload is completed. * reload.c (push_reload, find_dummy_reload): Use DF_LR_OUT for IRA. * tree-pass.h (pass_ira): New external variable declaration. * reload.h: Add 2008 to the Copyright. * cfgloopanal.c: Include params.h. (estimate_reg_pressure_cost): Decrease cost for IRA optimization mode. * params.h (IRA_MAX_LOOPS_NUM): New macro. * toplev.c (ira.h): New include. (flag_ira_algorithm, flag_ira_verbose): New external variables. (backend_init_target): Call ira_init. (backend_init): Call ira_init_once. (finalize): Call finish_ira_once. * toplev.h (flag_ira, flag_ira_coalesce, flag_ira_move_spills, flag_ira_share_save_slots, flag_ira_share_spill_slots): New external variables. * regs.h (contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): New external variable declarations. (move_table): New typedef. * caller-save.c: Include headers output.h and ira.h. (no_caller_save_reg_set): New global variable. (save_slots_num, save_slots): New variables. (reg_save_code, reg_restore_code, add_stored_regs): Add prototypes. (init_caller_save): Set up no_caller_save_reg_set. (init_save_areas): Reset save_slots_num. (saved_hard_reg): New structure. (hard_reg_map, saved_regs_num, all_saved_regs): New variables. (initiate_saved_hard_regs, new_saved_hard_reg, finish_saved_hard_regs, saved_hard_reg_compare_func): New functions. (setup_save_areas): Add code for sharing stack slots. (all_blocks): New variable. (save_call_clobbered_regs): Process pseudo-register too. (mark_set_regs): Process pseudo-register too. (insert_one_insn): Put the insn after bb note in a empty basic block. Add insn check. * global.c (eliminable_regset): Make it external. (mark_elimination): Use DF_LR_IN for IRA. (pseudo_for_reload_consideration_p): New. (build_insn_chain): Make it external. Don't ignore spilled pseudos for IRA. Use pseudo_for_reload_consideration_p. (gate_handle_global_alloc): New function. (pass_global_alloc): Add the gate function. * opts.c (decode_options): Set up flag_ira. Print the warning for -fira. (common_handle_option): Process -fira-algorithm and -fira-verbose. * timevar.def (TV_IRA, TV_RELOAD): New passes. * regmove.c (regmove_optimize): Don't do replacement of output for IRA. * hard-reg-set.h (no_caller_save_reg_set, reg_class_subclasses): New external variable declarations. * local-alloc.c (update_equiv_regs): Make it external. Return true if jump label rebuilding should be done. Rescan new_insn for notes. (gate_handle_local_alloc): New function. (pass_local_alloc): Add the gate function. * alias.c (value_addr_p, stack_addr_p): New functions. (nonoverlapping_memrefs_p): Use them for IRA. * common.opt (fira, fira-algorithm, fira-coalesce, fira-move-spills, fira-share-save-slots, fira-share-spill-slots, fira-verbose): New options. * regclass.c (reg_class_subclasses, contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): Make the variables external. (move_table): Remove typedef. (init_move_cost): Make it external. (allocate_reg_info, resize_reg_info, setup_reg_classes): New functions. * rtl.h (init_move_cost, allocate_reg_info, resize_reg_info, setup_reg_classes): New function prototypes. (eliminable_regset): New external variable declaration. (build_insn_chain, update_equiv_regs): New function prototypes. * Makefile.in (IRA_INT_H): New definition. (OBJS-common): Add ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, and ira-lives.o. (reload1.o, toplev.o): Add dependence on ira.h. (cfgloopanal.o): Add PARAMS_H. (caller-save.o): Add dependence on output.h and ira.h. (ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, ira-lives.o): New entries. * passes.c (pass_ira): New pass. * params.def (PARAM_IRA_MAX_LOOPS_NUM): New parameter. * reload1.c (ira.h): Include the header. (changed_allocation_pseudos): New bitmap. (init_reload): Initiate the bitmap. (compute_use_by_pseudos): Permits spilled registers in FROM. (temp_pseudo_reg_arr): New variable. (reload): Allocate and free temp_pseudo_reg_arr. Sort pseudos for IRA. Call alter_reg with the additional parameter. Don't clear spilled_pseudos for IRA. Restore original insn chain for IRA. Clear changed_allocation_pseudos at the end of reload. (calculate_needs_all_insns): Call IRA's mark_memory_move_deletion. (hard_regno_to_pseudo_regno): New variable. (count_pseudo): Check spilled pseudos. Set up hard_regno_to_pseudo_regno. (count_spilled_pseudo): Check spilled pseudos. Update hard_regno_to_pseudo_regno. (find_reg): Use better_spill_reload_regno_p. Check hard_regno_to_pseudo_regno. (alter_reg): Set up spilled_pseudos. Add a new parameter. Add code for IRA. (eliminate_regs_1): Use additional parameter for alter_reg. (finish_spills): Set up pseudo_previous_regs only for spilled pseudos. Call reassign_pseudos once for all spilled pseudos, pass more arguments. Don't clear live_throughout and dead_or_set for spilled pseudos. Use additional parameter for alter_reg. Call mark_allocation_change. Set up changed_allocation_pseudos. Remove sanity check. (emit_input_reload_insns, delete_output_reload): Use additional parameter for alter_reg. Call mark_allocation_change. (substitute, gen_reload_chain_without_interm_reg_p): New functions. (reloads_conflict): Use gen_reload_chain_without_interm_reg_p. * testsuite/gcc.dg/20080410-1.c: New file. * config/s390/s390.h (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Define. * config/sparc/sparc.h (IRA_COVER_CLASSES): New macro. * config/i386/i386.h (IRA_COVER_CLASSES): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES): Ditto. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/alpha/alpha.h (IRA_COVER_CLASSES): Ditto. 2008-08-24 Jeff Law <law@redhat.com> * ira.c (setup_reg_class_intersect_union): Prefer smallest class when ignoring unavailable registers. 2008-08-24 Jeff Law <law@redhat.com> * ira-color.c (coalesced_pseudo_reg_slot_compare): Check FRAME_GROWS_DOWNWARD and STACK_GROWS_DOWNWARD. * ira.c (setup_eliminable_regset): Check stack_realign_needed. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): New macro. 2008-06-03 Steve Chamberlain <steve.chamberlain@gmail.com> * ira-build.c (allocno_range_compare_func): Stabilize sort. 2008-05-29 Andy Hutchinson <hutchinsonandy@aim.com> * config/avr/avr.h (IRA_COVER_CLASSES): New macro. * reload1.c (find_reg): Process registers in register allocation order. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * toplev.c (backend_init_target): Move ira_init call from here... (lang_dependent_init_target): ...to here. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * ira.c (setup_class_subset_and_memory_move_costs): Don't calculate memory move costs for NO_REGS. 2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org> * ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if STACK_REGS is defined. 2008-04-08 Andrew Pinski <andrew_pinski@playstation.sony.com> * config/spu/spu.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Bernd Schmidt <bernd.schmidt@analog.com> * config/bfin/bfin.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Kaz Kojima <kkojima@gcc.gnu.org> * config/sh/sh.h (IRA_COVER_CLASSES): Define. * config/sh/sh.md (movsicc_true+3): Check if emit returns a barrier. From-SVN: r139590
2008-08-26 14:39:58 +02:00
allocate_reg_info (void)
{
int i;
max_regno_since_last_resize = max_reg_num ();
reg_info_size = max_regno_since_last_resize * 3 / 2 + 1;
[multiple changes] 2008-08-26 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c, ira-color.c, ira-costs.c, ira.h, ira-lives.c, ira.c, ira-conflicts.c, ira-emit.c, ira-int.h: New files. * doc/passes.texi: Describe IRA. * doc/tm.texi (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Describe the new macros. * doc/invoke.texi (ira-max-loops-num): Describe the new parameter. (-fira, -fira-algorithm, -fira-coalesce, -fno-ira-move-spills, -fira-propagate-cost, -fno-ira-share-save-slots, -fno-ira-share-spill-slots, -fira-verbose): Describe new options. * flags.h (ira_algorithm): New enumeration. (flag_ira_algorithm, flag_ira_verbose): New external variable declarations. * postreload.c (gate_handle_postreload): Don't do post reload optimizations unless the reload is completed. * reload.c (push_reload, find_dummy_reload): Use DF_LR_OUT for IRA. * tree-pass.h (pass_ira): New external variable declaration. * reload.h: Add 2008 to the Copyright. * cfgloopanal.c: Include params.h. (estimate_reg_pressure_cost): Decrease cost for IRA optimization mode. * params.h (IRA_MAX_LOOPS_NUM): New macro. * toplev.c (ira.h): New include. (flag_ira_algorithm, flag_ira_verbose): New external variables. (backend_init_target): Call ira_init. (backend_init): Call ira_init_once. (finalize): Call finish_ira_once. * toplev.h (flag_ira, flag_ira_coalesce, flag_ira_move_spills, flag_ira_share_save_slots, flag_ira_share_spill_slots): New external variables. * regs.h (contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): New external variable declarations. (move_table): New typedef. * caller-save.c: Include headers output.h and ira.h. (no_caller_save_reg_set): New global variable. (save_slots_num, save_slots): New variables. (reg_save_code, reg_restore_code, add_stored_regs): Add prototypes. (init_caller_save): Set up no_caller_save_reg_set. (init_save_areas): Reset save_slots_num. (saved_hard_reg): New structure. (hard_reg_map, saved_regs_num, all_saved_regs): New variables. (initiate_saved_hard_regs, new_saved_hard_reg, finish_saved_hard_regs, saved_hard_reg_compare_func): New functions. (setup_save_areas): Add code for sharing stack slots. (all_blocks): New variable. (save_call_clobbered_regs): Process pseudo-register too. (mark_set_regs): Process pseudo-register too. (insert_one_insn): Put the insn after bb note in a empty basic block. Add insn check. * global.c (eliminable_regset): Make it external. (mark_elimination): Use DF_LR_IN for IRA. (pseudo_for_reload_consideration_p): New. (build_insn_chain): Make it external. Don't ignore spilled pseudos for IRA. Use pseudo_for_reload_consideration_p. (gate_handle_global_alloc): New function. (pass_global_alloc): Add the gate function. * opts.c (decode_options): Set up flag_ira. Print the warning for -fira. (common_handle_option): Process -fira-algorithm and -fira-verbose. * timevar.def (TV_IRA, TV_RELOAD): New passes. * regmove.c (regmove_optimize): Don't do replacement of output for IRA. * hard-reg-set.h (no_caller_save_reg_set, reg_class_subclasses): New external variable declarations. * local-alloc.c (update_equiv_regs): Make it external. Return true if jump label rebuilding should be done. Rescan new_insn for notes. (gate_handle_local_alloc): New function. (pass_local_alloc): Add the gate function. * alias.c (value_addr_p, stack_addr_p): New functions. (nonoverlapping_memrefs_p): Use them for IRA. * common.opt (fira, fira-algorithm, fira-coalesce, fira-move-spills, fira-share-save-slots, fira-share-spill-slots, fira-verbose): New options. * regclass.c (reg_class_subclasses, contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): Make the variables external. (move_table): Remove typedef. (init_move_cost): Make it external. (allocate_reg_info, resize_reg_info, setup_reg_classes): New functions. * rtl.h (init_move_cost, allocate_reg_info, resize_reg_info, setup_reg_classes): New function prototypes. (eliminable_regset): New external variable declaration. (build_insn_chain, update_equiv_regs): New function prototypes. * Makefile.in (IRA_INT_H): New definition. (OBJS-common): Add ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, and ira-lives.o. (reload1.o, toplev.o): Add dependence on ira.h. (cfgloopanal.o): Add PARAMS_H. (caller-save.o): Add dependence on output.h and ira.h. (ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, ira-lives.o): New entries. * passes.c (pass_ira): New pass. * params.def (PARAM_IRA_MAX_LOOPS_NUM): New parameter. * reload1.c (ira.h): Include the header. (changed_allocation_pseudos): New bitmap. (init_reload): Initiate the bitmap. (compute_use_by_pseudos): Permits spilled registers in FROM. (temp_pseudo_reg_arr): New variable. (reload): Allocate and free temp_pseudo_reg_arr. Sort pseudos for IRA. Call alter_reg with the additional parameter. Don't clear spilled_pseudos for IRA. Restore original insn chain for IRA. Clear changed_allocation_pseudos at the end of reload. (calculate_needs_all_insns): Call IRA's mark_memory_move_deletion. (hard_regno_to_pseudo_regno): New variable. (count_pseudo): Check spilled pseudos. Set up hard_regno_to_pseudo_regno. (count_spilled_pseudo): Check spilled pseudos. Update hard_regno_to_pseudo_regno. (find_reg): Use better_spill_reload_regno_p. Check hard_regno_to_pseudo_regno. (alter_reg): Set up spilled_pseudos. Add a new parameter. Add code for IRA. (eliminate_regs_1): Use additional parameter for alter_reg. (finish_spills): Set up pseudo_previous_regs only for spilled pseudos. Call reassign_pseudos once for all spilled pseudos, pass more arguments. Don't clear live_throughout and dead_or_set for spilled pseudos. Use additional parameter for alter_reg. Call mark_allocation_change. Set up changed_allocation_pseudos. Remove sanity check. (emit_input_reload_insns, delete_output_reload): Use additional parameter for alter_reg. Call mark_allocation_change. (substitute, gen_reload_chain_without_interm_reg_p): New functions. (reloads_conflict): Use gen_reload_chain_without_interm_reg_p. * testsuite/gcc.dg/20080410-1.c: New file. * config/s390/s390.h (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Define. * config/sparc/sparc.h (IRA_COVER_CLASSES): New macro. * config/i386/i386.h (IRA_COVER_CLASSES): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES): Ditto. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/alpha/alpha.h (IRA_COVER_CLASSES): Ditto. 2008-08-24 Jeff Law <law@redhat.com> * ira.c (setup_reg_class_intersect_union): Prefer smallest class when ignoring unavailable registers. 2008-08-24 Jeff Law <law@redhat.com> * ira-color.c (coalesced_pseudo_reg_slot_compare): Check FRAME_GROWS_DOWNWARD and STACK_GROWS_DOWNWARD. * ira.c (setup_eliminable_regset): Check stack_realign_needed. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): New macro. 2008-06-03 Steve Chamberlain <steve.chamberlain@gmail.com> * ira-build.c (allocno_range_compare_func): Stabilize sort. 2008-05-29 Andy Hutchinson <hutchinsonandy@aim.com> * config/avr/avr.h (IRA_COVER_CLASSES): New macro. * reload1.c (find_reg): Process registers in register allocation order. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * toplev.c (backend_init_target): Move ira_init call from here... (lang_dependent_init_target): ...to here. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * ira.c (setup_class_subset_and_memory_move_costs): Don't calculate memory move costs for NO_REGS. 2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org> * ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if STACK_REGS is defined. 2008-04-08 Andrew Pinski <andrew_pinski@playstation.sony.com> * config/spu/spu.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Bernd Schmidt <bernd.schmidt@analog.com> * config/bfin/bfin.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Kaz Kojima <kkojima@gcc.gnu.org> * config/sh/sh.h (IRA_COVER_CLASSES): Define. * config/sh/sh.md (movsicc_true+3): Check if emit returns a barrier. From-SVN: r139590
2008-08-26 14:39:58 +02:00
gcc_assert (! reg_pref && ! reg_renumber);
invoke.texi (-fsched-pressure): Document it. 2009-09-02 Vladimir Makarov <vmakarov@redhat.com> * doc/invoke.texi (-fsched-pressure): Document it. (-fsched-reg-pressure-heuristic): Remove it. * reload.c (ira.h): Include. (find_reloads): Add choosing reload on number of small spilled classes. * haifa-sched.c (ira.h): Include. (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure, saved_reg_pressure, curr_reg_live, saved_reg_live, region_ref_regs): New variables. (sched_init_region_reg_pressure_info, mark_regno_birth_or_death, initiate_reg_pressure_info, setup_ref_regs, initiate_bb_reg_pressure_info, save_reg_pressure, restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New functions. (setup_insn_reg_pressure_info): New function. (rank_for_schedule): Add pressure checking and insn issue time. Remove comparison of insn reg weights. (ready_sort): Set insn reg pressure info. (update_register_pressure, setup_insn_max_reg_pressure, update_reg_and_insn_max_reg_pressure, sched_setup_bb_reg_pressure_info): New functions. (schedule_insn): Add code for printing and updating reg pressure info. (find_set_reg_weight, find_insn_reg_weight): Remove. (ok_for_early_queue_removal): Do nothing if pressure_only_p. (debug_ready_list): Print reg pressure info. (schedule_block): Ditto. Check insn issue time. (sched_init): Set up sched_pressure_p. Allocate and set up some reg pressure related info. (sched_finish): Free some reg pressure related info. (fix_tick_ready): Make insn always ready if pressure_p. (init_h_i_d): Don't call find_insn_reg_weight. (haifa_finish_h_i_d): Free insn reg pressure info. * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move to ira.h. * ira-lives.c (single_reg_class): Check mode to find how many registers are necessary for operand. (ira_implicitly_set_insn_hard_regs): New. * common.opt (fsched-pressure): New options. (fsched-reg-pressure-heuristic): Remove. * ira.c (setup_eliminable_regset): Rename to ira_setup_eliminable_regset. Make it external. (expand_reg_info): Pass cover class to setup_reg_classes. (ira): Call resize_reg_info instead of allocate_reg_info. * sched-deps.c: Include ira.h. (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New. (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses, reg_pressure_info, insn_use_p, mark_insn_pseudo_birth, mark_insn_hard_regno_birth, mark_insn_reg_birth, mark_pseudo_death, mark_hard_regno_death, mark_reg_death, mark_insn_reg_store, mark_insn_reg_clobber, setup_insn_reg_pressure_info): New. (sched_analyze_1): Update implicit_reg_pending_uses. (sched_analyze_insn): Find implicit sets, uses, clobbers of regs. Use them to create dependencies. Set insn reg uses and pressure info. Process reg_pending_uses in one place. (free_deps): Free implicit sets. (remove_from_deps): Remove implicit sets if necessary. Check implicit sets when clearing reg_last_in_use. (init_deps_global): Clear implicit_reg_pending_clobbers and implicit_reg_pending_uses. * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move from ira-int.h. (ira_setup_eliminable_regset, ira_set_pseudo_classes, ira_implicitly_set_insn_hard_regs): New prototypes. * ira-costs.c (pseudo_classes_defined_p, allocno_p, cost_elements_num): New variables. (allocno_costs, total_costs): Rename to costs and total_allocno_costs. (COSTS_OF_ALLOCNO): Rename to COSTS. (allocno_pref): Rename to pref. (allocno_pref_buffer): Rename to pref_buffer. (common_classes): Rename to regno_cover_class. (COST_INDEX): New. (record_reg_classes): Set allocno attributes only if allocno_p. (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM. (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM and COSTS_OF_ALLOCNO. (print_costs): Rename to print_allocno_costs. (print_pseudo_costs): New. (process_bb_node_for_costs): Split into 2 functions with new function process_bb_for_costs. Pass BB to process_bb_for_costs. (find_allocno_class_costs): Rename to find_costs_and_classes. Add new parameter dump_file. Use cost_elements_num instead of ira_allocnos_num. Make one iteration if preferred classes were already calculated for scheduler. Make 2 versions of code depending on allocno_p. (setup_allocno_cover_class_and_costs): Check allocno_p. Use regno_cover_class and COSTS instead of common_classes and COSTS_OF_ALLOCNO. (init_costs, finish_costs): New. (ira_costs): Set up allocno_p and cost_elements_num. Call init_costs and finish_costs. (ira_set_pseudo_classes): New. * rtl.h (allocate_reg_info): Remove. (resize_reg_info): Change return type. (reg_cover_class): New. (setup_reg_classes): Add new parameter. * sched-int.h (struct deps_reg): New member implicit_sets. (sched_pressure_p, sched_regno_cover_class): New external definitions. (INCREASE_BITS): New macro. (struct reg_pressure_data, struct reg_use_data): New. (struct _haifa_insn_data): Remove reg_weight. Add members reg_pressure, reg_use_list, reg_set_list, and reg_pressure_excess_cost_change. (struct deps): New member implicit_sets. (pressure_p): New variable. (COVER_CLASS_BITS, INCREASE_BITS): New macros. (struct reg_pressure_data, struct reg_use_data): New. (INSN_REG_WEIGHT): Remove. (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST, INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros. (sched_init_region_reg_pressure_info, sched_setup_bb_reg_pressure_info): New prototypes. * reginfo.c (struct reg_pref): New member coverclass. (reg_cover_class): New function. (reginfo_init, pass_reginfo_init): Move after free_reg_info. (reg_info_size): New variable. (allocate_reg_info): Make static. Setup reg_info_size. (resize_reg_info): Use reg_info_size. Return flag of resizing. (setup_reg_classes): Add a new parameter. Setup cover class too. * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the dependencies. * sched-rgn.c (deps_join): Set up implicit_sets. (schedule_region): Set up region and basic blocks pressure relative info. * passes.c (init_optimization_passes): Move pass_subregs_of_mode_init before pass_sched. From-SVN: r151348
2009-09-02 20:54:25 +02:00
reg_renumber = XNEWVEC (short, reg_info_size);
reg_pref = XCNEWVEC (struct reg_pref, reg_info_size);
memset (reg_renumber, -1, reg_info_size * sizeof (short));
for (i = 0; i < reg_info_size; i++)
{
reg_pref[i].prefclass = GENERAL_REGS;
reg_pref[i].altclass = ALL_REGS;
reg_pref[i].allocnoclass = GENERAL_REGS;
}
[multiple changes] 2008-08-26 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c, ira-color.c, ira-costs.c, ira.h, ira-lives.c, ira.c, ira-conflicts.c, ira-emit.c, ira-int.h: New files. * doc/passes.texi: Describe IRA. * doc/tm.texi (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Describe the new macros. * doc/invoke.texi (ira-max-loops-num): Describe the new parameter. (-fira, -fira-algorithm, -fira-coalesce, -fno-ira-move-spills, -fira-propagate-cost, -fno-ira-share-save-slots, -fno-ira-share-spill-slots, -fira-verbose): Describe new options. * flags.h (ira_algorithm): New enumeration. (flag_ira_algorithm, flag_ira_verbose): New external variable declarations. * postreload.c (gate_handle_postreload): Don't do post reload optimizations unless the reload is completed. * reload.c (push_reload, find_dummy_reload): Use DF_LR_OUT for IRA. * tree-pass.h (pass_ira): New external variable declaration. * reload.h: Add 2008 to the Copyright. * cfgloopanal.c: Include params.h. (estimate_reg_pressure_cost): Decrease cost for IRA optimization mode. * params.h (IRA_MAX_LOOPS_NUM): New macro. * toplev.c (ira.h): New include. (flag_ira_algorithm, flag_ira_verbose): New external variables. (backend_init_target): Call ira_init. (backend_init): Call ira_init_once. (finalize): Call finish_ira_once. * toplev.h (flag_ira, flag_ira_coalesce, flag_ira_move_spills, flag_ira_share_save_slots, flag_ira_share_spill_slots): New external variables. * regs.h (contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): New external variable declarations. (move_table): New typedef. * caller-save.c: Include headers output.h and ira.h. (no_caller_save_reg_set): New global variable. (save_slots_num, save_slots): New variables. (reg_save_code, reg_restore_code, add_stored_regs): Add prototypes. (init_caller_save): Set up no_caller_save_reg_set. (init_save_areas): Reset save_slots_num. (saved_hard_reg): New structure. (hard_reg_map, saved_regs_num, all_saved_regs): New variables. (initiate_saved_hard_regs, new_saved_hard_reg, finish_saved_hard_regs, saved_hard_reg_compare_func): New functions. (setup_save_areas): Add code for sharing stack slots. (all_blocks): New variable. (save_call_clobbered_regs): Process pseudo-register too. (mark_set_regs): Process pseudo-register too. (insert_one_insn): Put the insn after bb note in a empty basic block. Add insn check. * global.c (eliminable_regset): Make it external. (mark_elimination): Use DF_LR_IN for IRA. (pseudo_for_reload_consideration_p): New. (build_insn_chain): Make it external. Don't ignore spilled pseudos for IRA. Use pseudo_for_reload_consideration_p. (gate_handle_global_alloc): New function. (pass_global_alloc): Add the gate function. * opts.c (decode_options): Set up flag_ira. Print the warning for -fira. (common_handle_option): Process -fira-algorithm and -fira-verbose. * timevar.def (TV_IRA, TV_RELOAD): New passes. * regmove.c (regmove_optimize): Don't do replacement of output for IRA. * hard-reg-set.h (no_caller_save_reg_set, reg_class_subclasses): New external variable declarations. * local-alloc.c (update_equiv_regs): Make it external. Return true if jump label rebuilding should be done. Rescan new_insn for notes. (gate_handle_local_alloc): New function. (pass_local_alloc): Add the gate function. * alias.c (value_addr_p, stack_addr_p): New functions. (nonoverlapping_memrefs_p): Use them for IRA. * common.opt (fira, fira-algorithm, fira-coalesce, fira-move-spills, fira-share-save-slots, fira-share-spill-slots, fira-verbose): New options. * regclass.c (reg_class_subclasses, contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): Make the variables external. (move_table): Remove typedef. (init_move_cost): Make it external. (allocate_reg_info, resize_reg_info, setup_reg_classes): New functions. * rtl.h (init_move_cost, allocate_reg_info, resize_reg_info, setup_reg_classes): New function prototypes. (eliminable_regset): New external variable declaration. (build_insn_chain, update_equiv_regs): New function prototypes. * Makefile.in (IRA_INT_H): New definition. (OBJS-common): Add ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, and ira-lives.o. (reload1.o, toplev.o): Add dependence on ira.h. (cfgloopanal.o): Add PARAMS_H. (caller-save.o): Add dependence on output.h and ira.h. (ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, ira-lives.o): New entries. * passes.c (pass_ira): New pass. * params.def (PARAM_IRA_MAX_LOOPS_NUM): New parameter. * reload1.c (ira.h): Include the header. (changed_allocation_pseudos): New bitmap. (init_reload): Initiate the bitmap. (compute_use_by_pseudos): Permits spilled registers in FROM. (temp_pseudo_reg_arr): New variable. (reload): Allocate and free temp_pseudo_reg_arr. Sort pseudos for IRA. Call alter_reg with the additional parameter. Don't clear spilled_pseudos for IRA. Restore original insn chain for IRA. Clear changed_allocation_pseudos at the end of reload. (calculate_needs_all_insns): Call IRA's mark_memory_move_deletion. (hard_regno_to_pseudo_regno): New variable. (count_pseudo): Check spilled pseudos. Set up hard_regno_to_pseudo_regno. (count_spilled_pseudo): Check spilled pseudos. Update hard_regno_to_pseudo_regno. (find_reg): Use better_spill_reload_regno_p. Check hard_regno_to_pseudo_regno. (alter_reg): Set up spilled_pseudos. Add a new parameter. Add code for IRA. (eliminate_regs_1): Use additional parameter for alter_reg. (finish_spills): Set up pseudo_previous_regs only for spilled pseudos. Call reassign_pseudos once for all spilled pseudos, pass more arguments. Don't clear live_throughout and dead_or_set for spilled pseudos. Use additional parameter for alter_reg. Call mark_allocation_change. Set up changed_allocation_pseudos. Remove sanity check. (emit_input_reload_insns, delete_output_reload): Use additional parameter for alter_reg. Call mark_allocation_change. (substitute, gen_reload_chain_without_interm_reg_p): New functions. (reloads_conflict): Use gen_reload_chain_without_interm_reg_p. * testsuite/gcc.dg/20080410-1.c: New file. * config/s390/s390.h (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Define. * config/sparc/sparc.h (IRA_COVER_CLASSES): New macro. * config/i386/i386.h (IRA_COVER_CLASSES): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES): Ditto. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/alpha/alpha.h (IRA_COVER_CLASSES): Ditto. 2008-08-24 Jeff Law <law@redhat.com> * ira.c (setup_reg_class_intersect_union): Prefer smallest class when ignoring unavailable registers. 2008-08-24 Jeff Law <law@redhat.com> * ira-color.c (coalesced_pseudo_reg_slot_compare): Check FRAME_GROWS_DOWNWARD and STACK_GROWS_DOWNWARD. * ira.c (setup_eliminable_regset): Check stack_realign_needed. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): New macro. 2008-06-03 Steve Chamberlain <steve.chamberlain@gmail.com> * ira-build.c (allocno_range_compare_func): Stabilize sort. 2008-05-29 Andy Hutchinson <hutchinsonandy@aim.com> * config/avr/avr.h (IRA_COVER_CLASSES): New macro. * reload1.c (find_reg): Process registers in register allocation order. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * toplev.c (backend_init_target): Move ira_init call from here... (lang_dependent_init_target): ...to here. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * ira.c (setup_class_subset_and_memory_move_costs): Don't calculate memory move costs for NO_REGS. 2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org> * ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if STACK_REGS is defined. 2008-04-08 Andrew Pinski <andrew_pinski@playstation.sony.com> * config/spu/spu.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Bernd Schmidt <bernd.schmidt@analog.com> * config/bfin/bfin.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Kaz Kojima <kkojima@gcc.gnu.org> * config/sh/sh.h (IRA_COVER_CLASSES): Define. * config/sh/sh.md (movsicc_true+3): Check if emit returns a barrier. From-SVN: r139590
2008-08-26 14:39:58 +02:00
}
/* Resize reg info. The new elements will be initialized. Return TRUE
if new pseudos were added since the last call. */
invoke.texi (-fsched-pressure): Document it. 2009-09-02 Vladimir Makarov <vmakarov@redhat.com> * doc/invoke.texi (-fsched-pressure): Document it. (-fsched-reg-pressure-heuristic): Remove it. * reload.c (ira.h): Include. (find_reloads): Add choosing reload on number of small spilled classes. * haifa-sched.c (ira.h): Include. (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure, saved_reg_pressure, curr_reg_live, saved_reg_live, region_ref_regs): New variables. (sched_init_region_reg_pressure_info, mark_regno_birth_or_death, initiate_reg_pressure_info, setup_ref_regs, initiate_bb_reg_pressure_info, save_reg_pressure, restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New functions. (setup_insn_reg_pressure_info): New function. (rank_for_schedule): Add pressure checking and insn issue time. Remove comparison of insn reg weights. (ready_sort): Set insn reg pressure info. (update_register_pressure, setup_insn_max_reg_pressure, update_reg_and_insn_max_reg_pressure, sched_setup_bb_reg_pressure_info): New functions. (schedule_insn): Add code for printing and updating reg pressure info. (find_set_reg_weight, find_insn_reg_weight): Remove. (ok_for_early_queue_removal): Do nothing if pressure_only_p. (debug_ready_list): Print reg pressure info. (schedule_block): Ditto. Check insn issue time. (sched_init): Set up sched_pressure_p. Allocate and set up some reg pressure related info. (sched_finish): Free some reg pressure related info. (fix_tick_ready): Make insn always ready if pressure_p. (init_h_i_d): Don't call find_insn_reg_weight. (haifa_finish_h_i_d): Free insn reg pressure info. * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move to ira.h. * ira-lives.c (single_reg_class): Check mode to find how many registers are necessary for operand. (ira_implicitly_set_insn_hard_regs): New. * common.opt (fsched-pressure): New options. (fsched-reg-pressure-heuristic): Remove. * ira.c (setup_eliminable_regset): Rename to ira_setup_eliminable_regset. Make it external. (expand_reg_info): Pass cover class to setup_reg_classes. (ira): Call resize_reg_info instead of allocate_reg_info. * sched-deps.c: Include ira.h. (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New. (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses, reg_pressure_info, insn_use_p, mark_insn_pseudo_birth, mark_insn_hard_regno_birth, mark_insn_reg_birth, mark_pseudo_death, mark_hard_regno_death, mark_reg_death, mark_insn_reg_store, mark_insn_reg_clobber, setup_insn_reg_pressure_info): New. (sched_analyze_1): Update implicit_reg_pending_uses. (sched_analyze_insn): Find implicit sets, uses, clobbers of regs. Use them to create dependencies. Set insn reg uses and pressure info. Process reg_pending_uses in one place. (free_deps): Free implicit sets. (remove_from_deps): Remove implicit sets if necessary. Check implicit sets when clearing reg_last_in_use. (init_deps_global): Clear implicit_reg_pending_clobbers and implicit_reg_pending_uses. * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move from ira-int.h. (ira_setup_eliminable_regset, ira_set_pseudo_classes, ira_implicitly_set_insn_hard_regs): New prototypes. * ira-costs.c (pseudo_classes_defined_p, allocno_p, cost_elements_num): New variables. (allocno_costs, total_costs): Rename to costs and total_allocno_costs. (COSTS_OF_ALLOCNO): Rename to COSTS. (allocno_pref): Rename to pref. (allocno_pref_buffer): Rename to pref_buffer. (common_classes): Rename to regno_cover_class. (COST_INDEX): New. (record_reg_classes): Set allocno attributes only if allocno_p. (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM. (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM and COSTS_OF_ALLOCNO. (print_costs): Rename to print_allocno_costs. (print_pseudo_costs): New. (process_bb_node_for_costs): Split into 2 functions with new function process_bb_for_costs. Pass BB to process_bb_for_costs. (find_allocno_class_costs): Rename to find_costs_and_classes. Add new parameter dump_file. Use cost_elements_num instead of ira_allocnos_num. Make one iteration if preferred classes were already calculated for scheduler. Make 2 versions of code depending on allocno_p. (setup_allocno_cover_class_and_costs): Check allocno_p. Use regno_cover_class and COSTS instead of common_classes and COSTS_OF_ALLOCNO. (init_costs, finish_costs): New. (ira_costs): Set up allocno_p and cost_elements_num. Call init_costs and finish_costs. (ira_set_pseudo_classes): New. * rtl.h (allocate_reg_info): Remove. (resize_reg_info): Change return type. (reg_cover_class): New. (setup_reg_classes): Add new parameter. * sched-int.h (struct deps_reg): New member implicit_sets. (sched_pressure_p, sched_regno_cover_class): New external definitions. (INCREASE_BITS): New macro. (struct reg_pressure_data, struct reg_use_data): New. (struct _haifa_insn_data): Remove reg_weight. Add members reg_pressure, reg_use_list, reg_set_list, and reg_pressure_excess_cost_change. (struct deps): New member implicit_sets. (pressure_p): New variable. (COVER_CLASS_BITS, INCREASE_BITS): New macros. (struct reg_pressure_data, struct reg_use_data): New. (INSN_REG_WEIGHT): Remove. (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST, INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros. (sched_init_region_reg_pressure_info, sched_setup_bb_reg_pressure_info): New prototypes. * reginfo.c (struct reg_pref): New member coverclass. (reg_cover_class): New function. (reginfo_init, pass_reginfo_init): Move after free_reg_info. (reg_info_size): New variable. (allocate_reg_info): Make static. Setup reg_info_size. (resize_reg_info): Use reg_info_size. Return flag of resizing. (setup_reg_classes): Add a new parameter. Setup cover class too. * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the dependencies. * sched-rgn.c (deps_join): Set up implicit_sets. (schedule_region): Set up region and basic blocks pressure relative info. * passes.c (init_optimization_passes): Move pass_subregs_of_mode_init before pass_sched. From-SVN: r151348
2009-09-02 20:54:25 +02:00
bool
[multiple changes] 2008-08-26 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c, ira-color.c, ira-costs.c, ira.h, ira-lives.c, ira.c, ira-conflicts.c, ira-emit.c, ira-int.h: New files. * doc/passes.texi: Describe IRA. * doc/tm.texi (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Describe the new macros. * doc/invoke.texi (ira-max-loops-num): Describe the new parameter. (-fira, -fira-algorithm, -fira-coalesce, -fno-ira-move-spills, -fira-propagate-cost, -fno-ira-share-save-slots, -fno-ira-share-spill-slots, -fira-verbose): Describe new options. * flags.h (ira_algorithm): New enumeration. (flag_ira_algorithm, flag_ira_verbose): New external variable declarations. * postreload.c (gate_handle_postreload): Don't do post reload optimizations unless the reload is completed. * reload.c (push_reload, find_dummy_reload): Use DF_LR_OUT for IRA. * tree-pass.h (pass_ira): New external variable declaration. * reload.h: Add 2008 to the Copyright. * cfgloopanal.c: Include params.h. (estimate_reg_pressure_cost): Decrease cost for IRA optimization mode. * params.h (IRA_MAX_LOOPS_NUM): New macro. * toplev.c (ira.h): New include. (flag_ira_algorithm, flag_ira_verbose): New external variables. (backend_init_target): Call ira_init. (backend_init): Call ira_init_once. (finalize): Call finish_ira_once. * toplev.h (flag_ira, flag_ira_coalesce, flag_ira_move_spills, flag_ira_share_save_slots, flag_ira_share_spill_slots): New external variables. * regs.h (contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): New external variable declarations. (move_table): New typedef. * caller-save.c: Include headers output.h and ira.h. (no_caller_save_reg_set): New global variable. (save_slots_num, save_slots): New variables. (reg_save_code, reg_restore_code, add_stored_regs): Add prototypes. (init_caller_save): Set up no_caller_save_reg_set. (init_save_areas): Reset save_slots_num. (saved_hard_reg): New structure. (hard_reg_map, saved_regs_num, all_saved_regs): New variables. (initiate_saved_hard_regs, new_saved_hard_reg, finish_saved_hard_regs, saved_hard_reg_compare_func): New functions. (setup_save_areas): Add code for sharing stack slots. (all_blocks): New variable. (save_call_clobbered_regs): Process pseudo-register too. (mark_set_regs): Process pseudo-register too. (insert_one_insn): Put the insn after bb note in a empty basic block. Add insn check. * global.c (eliminable_regset): Make it external. (mark_elimination): Use DF_LR_IN for IRA. (pseudo_for_reload_consideration_p): New. (build_insn_chain): Make it external. Don't ignore spilled pseudos for IRA. Use pseudo_for_reload_consideration_p. (gate_handle_global_alloc): New function. (pass_global_alloc): Add the gate function. * opts.c (decode_options): Set up flag_ira. Print the warning for -fira. (common_handle_option): Process -fira-algorithm and -fira-verbose. * timevar.def (TV_IRA, TV_RELOAD): New passes. * regmove.c (regmove_optimize): Don't do replacement of output for IRA. * hard-reg-set.h (no_caller_save_reg_set, reg_class_subclasses): New external variable declarations. * local-alloc.c (update_equiv_regs): Make it external. Return true if jump label rebuilding should be done. Rescan new_insn for notes. (gate_handle_local_alloc): New function. (pass_local_alloc): Add the gate function. * alias.c (value_addr_p, stack_addr_p): New functions. (nonoverlapping_memrefs_p): Use them for IRA. * common.opt (fira, fira-algorithm, fira-coalesce, fira-move-spills, fira-share-save-slots, fira-share-spill-slots, fira-verbose): New options. * regclass.c (reg_class_subclasses, contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): Make the variables external. (move_table): Remove typedef. (init_move_cost): Make it external. (allocate_reg_info, resize_reg_info, setup_reg_classes): New functions. * rtl.h (init_move_cost, allocate_reg_info, resize_reg_info, setup_reg_classes): New function prototypes. (eliminable_regset): New external variable declaration. (build_insn_chain, update_equiv_regs): New function prototypes. * Makefile.in (IRA_INT_H): New definition. (OBJS-common): Add ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, and ira-lives.o. (reload1.o, toplev.o): Add dependence on ira.h. (cfgloopanal.o): Add PARAMS_H. (caller-save.o): Add dependence on output.h and ira.h. (ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, ira-lives.o): New entries. * passes.c (pass_ira): New pass. * params.def (PARAM_IRA_MAX_LOOPS_NUM): New parameter. * reload1.c (ira.h): Include the header. (changed_allocation_pseudos): New bitmap. (init_reload): Initiate the bitmap. (compute_use_by_pseudos): Permits spilled registers in FROM. (temp_pseudo_reg_arr): New variable. (reload): Allocate and free temp_pseudo_reg_arr. Sort pseudos for IRA. Call alter_reg with the additional parameter. Don't clear spilled_pseudos for IRA. Restore original insn chain for IRA. Clear changed_allocation_pseudos at the end of reload. (calculate_needs_all_insns): Call IRA's mark_memory_move_deletion. (hard_regno_to_pseudo_regno): New variable. (count_pseudo): Check spilled pseudos. Set up hard_regno_to_pseudo_regno. (count_spilled_pseudo): Check spilled pseudos. Update hard_regno_to_pseudo_regno. (find_reg): Use better_spill_reload_regno_p. Check hard_regno_to_pseudo_regno. (alter_reg): Set up spilled_pseudos. Add a new parameter. Add code for IRA. (eliminate_regs_1): Use additional parameter for alter_reg. (finish_spills): Set up pseudo_previous_regs only for spilled pseudos. Call reassign_pseudos once for all spilled pseudos, pass more arguments. Don't clear live_throughout and dead_or_set for spilled pseudos. Use additional parameter for alter_reg. Call mark_allocation_change. Set up changed_allocation_pseudos. Remove sanity check. (emit_input_reload_insns, delete_output_reload): Use additional parameter for alter_reg. Call mark_allocation_change. (substitute, gen_reload_chain_without_interm_reg_p): New functions. (reloads_conflict): Use gen_reload_chain_without_interm_reg_p. * testsuite/gcc.dg/20080410-1.c: New file. * config/s390/s390.h (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Define. * config/sparc/sparc.h (IRA_COVER_CLASSES): New macro. * config/i386/i386.h (IRA_COVER_CLASSES): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES): Ditto. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/alpha/alpha.h (IRA_COVER_CLASSES): Ditto. 2008-08-24 Jeff Law <law@redhat.com> * ira.c (setup_reg_class_intersect_union): Prefer smallest class when ignoring unavailable registers. 2008-08-24 Jeff Law <law@redhat.com> * ira-color.c (coalesced_pseudo_reg_slot_compare): Check FRAME_GROWS_DOWNWARD and STACK_GROWS_DOWNWARD. * ira.c (setup_eliminable_regset): Check stack_realign_needed. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): New macro. 2008-06-03 Steve Chamberlain <steve.chamberlain@gmail.com> * ira-build.c (allocno_range_compare_func): Stabilize sort. 2008-05-29 Andy Hutchinson <hutchinsonandy@aim.com> * config/avr/avr.h (IRA_COVER_CLASSES): New macro. * reload1.c (find_reg): Process registers in register allocation order. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * toplev.c (backend_init_target): Move ira_init call from here... (lang_dependent_init_target): ...to here. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * ira.c (setup_class_subset_and_memory_move_costs): Don't calculate memory move costs for NO_REGS. 2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org> * ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if STACK_REGS is defined. 2008-04-08 Andrew Pinski <andrew_pinski@playstation.sony.com> * config/spu/spu.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Bernd Schmidt <bernd.schmidt@analog.com> * config/bfin/bfin.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Kaz Kojima <kkojima@gcc.gnu.org> * config/sh/sh.h (IRA_COVER_CLASSES): Define. * config/sh/sh.md (movsicc_true+3): Check if emit returns a barrier. From-SVN: r139590
2008-08-26 14:39:58 +02:00
resize_reg_info (void)
{
int old, i;
bool change_p;
[multiple changes] 2008-08-26 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c, ira-color.c, ira-costs.c, ira.h, ira-lives.c, ira.c, ira-conflicts.c, ira-emit.c, ira-int.h: New files. * doc/passes.texi: Describe IRA. * doc/tm.texi (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Describe the new macros. * doc/invoke.texi (ira-max-loops-num): Describe the new parameter. (-fira, -fira-algorithm, -fira-coalesce, -fno-ira-move-spills, -fira-propagate-cost, -fno-ira-share-save-slots, -fno-ira-share-spill-slots, -fira-verbose): Describe new options. * flags.h (ira_algorithm): New enumeration. (flag_ira_algorithm, flag_ira_verbose): New external variable declarations. * postreload.c (gate_handle_postreload): Don't do post reload optimizations unless the reload is completed. * reload.c (push_reload, find_dummy_reload): Use DF_LR_OUT for IRA. * tree-pass.h (pass_ira): New external variable declaration. * reload.h: Add 2008 to the Copyright. * cfgloopanal.c: Include params.h. (estimate_reg_pressure_cost): Decrease cost for IRA optimization mode. * params.h (IRA_MAX_LOOPS_NUM): New macro. * toplev.c (ira.h): New include. (flag_ira_algorithm, flag_ira_verbose): New external variables. (backend_init_target): Call ira_init. (backend_init): Call ira_init_once. (finalize): Call finish_ira_once. * toplev.h (flag_ira, flag_ira_coalesce, flag_ira_move_spills, flag_ira_share_save_slots, flag_ira_share_spill_slots): New external variables. * regs.h (contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): New external variable declarations. (move_table): New typedef. * caller-save.c: Include headers output.h and ira.h. (no_caller_save_reg_set): New global variable. (save_slots_num, save_slots): New variables. (reg_save_code, reg_restore_code, add_stored_regs): Add prototypes. (init_caller_save): Set up no_caller_save_reg_set. (init_save_areas): Reset save_slots_num. (saved_hard_reg): New structure. (hard_reg_map, saved_regs_num, all_saved_regs): New variables. (initiate_saved_hard_regs, new_saved_hard_reg, finish_saved_hard_regs, saved_hard_reg_compare_func): New functions. (setup_save_areas): Add code for sharing stack slots. (all_blocks): New variable. (save_call_clobbered_regs): Process pseudo-register too. (mark_set_regs): Process pseudo-register too. (insert_one_insn): Put the insn after bb note in a empty basic block. Add insn check. * global.c (eliminable_regset): Make it external. (mark_elimination): Use DF_LR_IN for IRA. (pseudo_for_reload_consideration_p): New. (build_insn_chain): Make it external. Don't ignore spilled pseudos for IRA. Use pseudo_for_reload_consideration_p. (gate_handle_global_alloc): New function. (pass_global_alloc): Add the gate function. * opts.c (decode_options): Set up flag_ira. Print the warning for -fira. (common_handle_option): Process -fira-algorithm and -fira-verbose. * timevar.def (TV_IRA, TV_RELOAD): New passes. * regmove.c (regmove_optimize): Don't do replacement of output for IRA. * hard-reg-set.h (no_caller_save_reg_set, reg_class_subclasses): New external variable declarations. * local-alloc.c (update_equiv_regs): Make it external. Return true if jump label rebuilding should be done. Rescan new_insn for notes. (gate_handle_local_alloc): New function. (pass_local_alloc): Add the gate function. * alias.c (value_addr_p, stack_addr_p): New functions. (nonoverlapping_memrefs_p): Use them for IRA. * common.opt (fira, fira-algorithm, fira-coalesce, fira-move-spills, fira-share-save-slots, fira-share-spill-slots, fira-verbose): New options. * regclass.c (reg_class_subclasses, contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): Make the variables external. (move_table): Remove typedef. (init_move_cost): Make it external. (allocate_reg_info, resize_reg_info, setup_reg_classes): New functions. * rtl.h (init_move_cost, allocate_reg_info, resize_reg_info, setup_reg_classes): New function prototypes. (eliminable_regset): New external variable declaration. (build_insn_chain, update_equiv_regs): New function prototypes. * Makefile.in (IRA_INT_H): New definition. (OBJS-common): Add ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, and ira-lives.o. (reload1.o, toplev.o): Add dependence on ira.h. (cfgloopanal.o): Add PARAMS_H. (caller-save.o): Add dependence on output.h and ira.h. (ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, ira-lives.o): New entries. * passes.c (pass_ira): New pass. * params.def (PARAM_IRA_MAX_LOOPS_NUM): New parameter. * reload1.c (ira.h): Include the header. (changed_allocation_pseudos): New bitmap. (init_reload): Initiate the bitmap. (compute_use_by_pseudos): Permits spilled registers in FROM. (temp_pseudo_reg_arr): New variable. (reload): Allocate and free temp_pseudo_reg_arr. Sort pseudos for IRA. Call alter_reg with the additional parameter. Don't clear spilled_pseudos for IRA. Restore original insn chain for IRA. Clear changed_allocation_pseudos at the end of reload. (calculate_needs_all_insns): Call IRA's mark_memory_move_deletion. (hard_regno_to_pseudo_regno): New variable. (count_pseudo): Check spilled pseudos. Set up hard_regno_to_pseudo_regno. (count_spilled_pseudo): Check spilled pseudos. Update hard_regno_to_pseudo_regno. (find_reg): Use better_spill_reload_regno_p. Check hard_regno_to_pseudo_regno. (alter_reg): Set up spilled_pseudos. Add a new parameter. Add code for IRA. (eliminate_regs_1): Use additional parameter for alter_reg. (finish_spills): Set up pseudo_previous_regs only for spilled pseudos. Call reassign_pseudos once for all spilled pseudos, pass more arguments. Don't clear live_throughout and dead_or_set for spilled pseudos. Use additional parameter for alter_reg. Call mark_allocation_change. Set up changed_allocation_pseudos. Remove sanity check. (emit_input_reload_insns, delete_output_reload): Use additional parameter for alter_reg. Call mark_allocation_change. (substitute, gen_reload_chain_without_interm_reg_p): New functions. (reloads_conflict): Use gen_reload_chain_without_interm_reg_p. * testsuite/gcc.dg/20080410-1.c: New file. * config/s390/s390.h (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Define. * config/sparc/sparc.h (IRA_COVER_CLASSES): New macro. * config/i386/i386.h (IRA_COVER_CLASSES): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES): Ditto. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/alpha/alpha.h (IRA_COVER_CLASSES): Ditto. 2008-08-24 Jeff Law <law@redhat.com> * ira.c (setup_reg_class_intersect_union): Prefer smallest class when ignoring unavailable registers. 2008-08-24 Jeff Law <law@redhat.com> * ira-color.c (coalesced_pseudo_reg_slot_compare): Check FRAME_GROWS_DOWNWARD and STACK_GROWS_DOWNWARD. * ira.c (setup_eliminable_regset): Check stack_realign_needed. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): New macro. 2008-06-03 Steve Chamberlain <steve.chamberlain@gmail.com> * ira-build.c (allocno_range_compare_func): Stabilize sort. 2008-05-29 Andy Hutchinson <hutchinsonandy@aim.com> * config/avr/avr.h (IRA_COVER_CLASSES): New macro. * reload1.c (find_reg): Process registers in register allocation order. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * toplev.c (backend_init_target): Move ira_init call from here... (lang_dependent_init_target): ...to here. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * ira.c (setup_class_subset_and_memory_move_costs): Don't calculate memory move costs for NO_REGS. 2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org> * ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if STACK_REGS is defined. 2008-04-08 Andrew Pinski <andrew_pinski@playstation.sony.com> * config/spu/spu.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Bernd Schmidt <bernd.schmidt@analog.com> * config/bfin/bfin.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Kaz Kojima <kkojima@gcc.gnu.org> * config/sh/sh.h (IRA_COVER_CLASSES): Define. * config/sh/sh.md (movsicc_true+3): Check if emit returns a barrier. From-SVN: r139590
2008-08-26 14:39:58 +02:00
if (reg_pref == NULL)
{
allocate_reg_info ();
return true;
}
change_p = max_regno_since_last_resize != max_reg_num ();
max_regno_since_last_resize = max_reg_num ();
if (reg_info_size >= max_reg_num ())
return change_p;
invoke.texi (-fsched-pressure): Document it. 2009-09-02 Vladimir Makarov <vmakarov@redhat.com> * doc/invoke.texi (-fsched-pressure): Document it. (-fsched-reg-pressure-heuristic): Remove it. * reload.c (ira.h): Include. (find_reloads): Add choosing reload on number of small spilled classes. * haifa-sched.c (ira.h): Include. (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure, saved_reg_pressure, curr_reg_live, saved_reg_live, region_ref_regs): New variables. (sched_init_region_reg_pressure_info, mark_regno_birth_or_death, initiate_reg_pressure_info, setup_ref_regs, initiate_bb_reg_pressure_info, save_reg_pressure, restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New functions. (setup_insn_reg_pressure_info): New function. (rank_for_schedule): Add pressure checking and insn issue time. Remove comparison of insn reg weights. (ready_sort): Set insn reg pressure info. (update_register_pressure, setup_insn_max_reg_pressure, update_reg_and_insn_max_reg_pressure, sched_setup_bb_reg_pressure_info): New functions. (schedule_insn): Add code for printing and updating reg pressure info. (find_set_reg_weight, find_insn_reg_weight): Remove. (ok_for_early_queue_removal): Do nothing if pressure_only_p. (debug_ready_list): Print reg pressure info. (schedule_block): Ditto. Check insn issue time. (sched_init): Set up sched_pressure_p. Allocate and set up some reg pressure related info. (sched_finish): Free some reg pressure related info. (fix_tick_ready): Make insn always ready if pressure_p. (init_h_i_d): Don't call find_insn_reg_weight. (haifa_finish_h_i_d): Free insn reg pressure info. * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move to ira.h. * ira-lives.c (single_reg_class): Check mode to find how many registers are necessary for operand. (ira_implicitly_set_insn_hard_regs): New. * common.opt (fsched-pressure): New options. (fsched-reg-pressure-heuristic): Remove. * ira.c (setup_eliminable_regset): Rename to ira_setup_eliminable_regset. Make it external. (expand_reg_info): Pass cover class to setup_reg_classes. (ira): Call resize_reg_info instead of allocate_reg_info. * sched-deps.c: Include ira.h. (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New. (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses, reg_pressure_info, insn_use_p, mark_insn_pseudo_birth, mark_insn_hard_regno_birth, mark_insn_reg_birth, mark_pseudo_death, mark_hard_regno_death, mark_reg_death, mark_insn_reg_store, mark_insn_reg_clobber, setup_insn_reg_pressure_info): New. (sched_analyze_1): Update implicit_reg_pending_uses. (sched_analyze_insn): Find implicit sets, uses, clobbers of regs. Use them to create dependencies. Set insn reg uses and pressure info. Process reg_pending_uses in one place. (free_deps): Free implicit sets. (remove_from_deps): Remove implicit sets if necessary. Check implicit sets when clearing reg_last_in_use. (init_deps_global): Clear implicit_reg_pending_clobbers and implicit_reg_pending_uses. * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move from ira-int.h. (ira_setup_eliminable_regset, ira_set_pseudo_classes, ira_implicitly_set_insn_hard_regs): New prototypes. * ira-costs.c (pseudo_classes_defined_p, allocno_p, cost_elements_num): New variables. (allocno_costs, total_costs): Rename to costs and total_allocno_costs. (COSTS_OF_ALLOCNO): Rename to COSTS. (allocno_pref): Rename to pref. (allocno_pref_buffer): Rename to pref_buffer. (common_classes): Rename to regno_cover_class. (COST_INDEX): New. (record_reg_classes): Set allocno attributes only if allocno_p. (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM. (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM and COSTS_OF_ALLOCNO. (print_costs): Rename to print_allocno_costs. (print_pseudo_costs): New. (process_bb_node_for_costs): Split into 2 functions with new function process_bb_for_costs. Pass BB to process_bb_for_costs. (find_allocno_class_costs): Rename to find_costs_and_classes. Add new parameter dump_file. Use cost_elements_num instead of ira_allocnos_num. Make one iteration if preferred classes were already calculated for scheduler. Make 2 versions of code depending on allocno_p. (setup_allocno_cover_class_and_costs): Check allocno_p. Use regno_cover_class and COSTS instead of common_classes and COSTS_OF_ALLOCNO. (init_costs, finish_costs): New. (ira_costs): Set up allocno_p and cost_elements_num. Call init_costs and finish_costs. (ira_set_pseudo_classes): New. * rtl.h (allocate_reg_info): Remove. (resize_reg_info): Change return type. (reg_cover_class): New. (setup_reg_classes): Add new parameter. * sched-int.h (struct deps_reg): New member implicit_sets. (sched_pressure_p, sched_regno_cover_class): New external definitions. (INCREASE_BITS): New macro. (struct reg_pressure_data, struct reg_use_data): New. (struct _haifa_insn_data): Remove reg_weight. Add members reg_pressure, reg_use_list, reg_set_list, and reg_pressure_excess_cost_change. (struct deps): New member implicit_sets. (pressure_p): New variable. (COVER_CLASS_BITS, INCREASE_BITS): New macros. (struct reg_pressure_data, struct reg_use_data): New. (INSN_REG_WEIGHT): Remove. (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST, INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros. (sched_init_region_reg_pressure_info, sched_setup_bb_reg_pressure_info): New prototypes. * reginfo.c (struct reg_pref): New member coverclass. (reg_cover_class): New function. (reginfo_init, pass_reginfo_init): Move after free_reg_info. (reg_info_size): New variable. (allocate_reg_info): Make static. Setup reg_info_size. (resize_reg_info): Use reg_info_size. Return flag of resizing. (setup_reg_classes): Add a new parameter. Setup cover class too. * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the dependencies. * sched-rgn.c (deps_join): Set up implicit_sets. (schedule_region): Set up region and basic blocks pressure relative info. * passes.c (init_optimization_passes): Move pass_subregs_of_mode_init before pass_sched. From-SVN: r151348
2009-09-02 20:54:25 +02:00
old = reg_info_size;
reg_info_size = max_reg_num () * 3 / 2 + 1;
[multiple changes] 2008-08-26 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c, ira-color.c, ira-costs.c, ira.h, ira-lives.c, ira.c, ira-conflicts.c, ira-emit.c, ira-int.h: New files. * doc/passes.texi: Describe IRA. * doc/tm.texi (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Describe the new macros. * doc/invoke.texi (ira-max-loops-num): Describe the new parameter. (-fira, -fira-algorithm, -fira-coalesce, -fno-ira-move-spills, -fira-propagate-cost, -fno-ira-share-save-slots, -fno-ira-share-spill-slots, -fira-verbose): Describe new options. * flags.h (ira_algorithm): New enumeration. (flag_ira_algorithm, flag_ira_verbose): New external variable declarations. * postreload.c (gate_handle_postreload): Don't do post reload optimizations unless the reload is completed. * reload.c (push_reload, find_dummy_reload): Use DF_LR_OUT for IRA. * tree-pass.h (pass_ira): New external variable declaration. * reload.h: Add 2008 to the Copyright. * cfgloopanal.c: Include params.h. (estimate_reg_pressure_cost): Decrease cost for IRA optimization mode. * params.h (IRA_MAX_LOOPS_NUM): New macro. * toplev.c (ira.h): New include. (flag_ira_algorithm, flag_ira_verbose): New external variables. (backend_init_target): Call ira_init. (backend_init): Call ira_init_once. (finalize): Call finish_ira_once. * toplev.h (flag_ira, flag_ira_coalesce, flag_ira_move_spills, flag_ira_share_save_slots, flag_ira_share_spill_slots): New external variables. * regs.h (contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): New external variable declarations. (move_table): New typedef. * caller-save.c: Include headers output.h and ira.h. (no_caller_save_reg_set): New global variable. (save_slots_num, save_slots): New variables. (reg_save_code, reg_restore_code, add_stored_regs): Add prototypes. (init_caller_save): Set up no_caller_save_reg_set. (init_save_areas): Reset save_slots_num. (saved_hard_reg): New structure. (hard_reg_map, saved_regs_num, all_saved_regs): New variables. (initiate_saved_hard_regs, new_saved_hard_reg, finish_saved_hard_regs, saved_hard_reg_compare_func): New functions. (setup_save_areas): Add code for sharing stack slots. (all_blocks): New variable. (save_call_clobbered_regs): Process pseudo-register too. (mark_set_regs): Process pseudo-register too. (insert_one_insn): Put the insn after bb note in a empty basic block. Add insn check. * global.c (eliminable_regset): Make it external. (mark_elimination): Use DF_LR_IN for IRA. (pseudo_for_reload_consideration_p): New. (build_insn_chain): Make it external. Don't ignore spilled pseudos for IRA. Use pseudo_for_reload_consideration_p. (gate_handle_global_alloc): New function. (pass_global_alloc): Add the gate function. * opts.c (decode_options): Set up flag_ira. Print the warning for -fira. (common_handle_option): Process -fira-algorithm and -fira-verbose. * timevar.def (TV_IRA, TV_RELOAD): New passes. * regmove.c (regmove_optimize): Don't do replacement of output for IRA. * hard-reg-set.h (no_caller_save_reg_set, reg_class_subclasses): New external variable declarations. * local-alloc.c (update_equiv_regs): Make it external. Return true if jump label rebuilding should be done. Rescan new_insn for notes. (gate_handle_local_alloc): New function. (pass_local_alloc): Add the gate function. * alias.c (value_addr_p, stack_addr_p): New functions. (nonoverlapping_memrefs_p): Use them for IRA. * common.opt (fira, fira-algorithm, fira-coalesce, fira-move-spills, fira-share-save-slots, fira-share-spill-slots, fira-verbose): New options. * regclass.c (reg_class_subclasses, contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): Make the variables external. (move_table): Remove typedef. (init_move_cost): Make it external. (allocate_reg_info, resize_reg_info, setup_reg_classes): New functions. * rtl.h (init_move_cost, allocate_reg_info, resize_reg_info, setup_reg_classes): New function prototypes. (eliminable_regset): New external variable declaration. (build_insn_chain, update_equiv_regs): New function prototypes. * Makefile.in (IRA_INT_H): New definition. (OBJS-common): Add ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, and ira-lives.o. (reload1.o, toplev.o): Add dependence on ira.h. (cfgloopanal.o): Add PARAMS_H. (caller-save.o): Add dependence on output.h and ira.h. (ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, ira-lives.o): New entries. * passes.c (pass_ira): New pass. * params.def (PARAM_IRA_MAX_LOOPS_NUM): New parameter. * reload1.c (ira.h): Include the header. (changed_allocation_pseudos): New bitmap. (init_reload): Initiate the bitmap. (compute_use_by_pseudos): Permits spilled registers in FROM. (temp_pseudo_reg_arr): New variable. (reload): Allocate and free temp_pseudo_reg_arr. Sort pseudos for IRA. Call alter_reg with the additional parameter. Don't clear spilled_pseudos for IRA. Restore original insn chain for IRA. Clear changed_allocation_pseudos at the end of reload. (calculate_needs_all_insns): Call IRA's mark_memory_move_deletion. (hard_regno_to_pseudo_regno): New variable. (count_pseudo): Check spilled pseudos. Set up hard_regno_to_pseudo_regno. (count_spilled_pseudo): Check spilled pseudos. Update hard_regno_to_pseudo_regno. (find_reg): Use better_spill_reload_regno_p. Check hard_regno_to_pseudo_regno. (alter_reg): Set up spilled_pseudos. Add a new parameter. Add code for IRA. (eliminate_regs_1): Use additional parameter for alter_reg. (finish_spills): Set up pseudo_previous_regs only for spilled pseudos. Call reassign_pseudos once for all spilled pseudos, pass more arguments. Don't clear live_throughout and dead_or_set for spilled pseudos. Use additional parameter for alter_reg. Call mark_allocation_change. Set up changed_allocation_pseudos. Remove sanity check. (emit_input_reload_insns, delete_output_reload): Use additional parameter for alter_reg. Call mark_allocation_change. (substitute, gen_reload_chain_without_interm_reg_p): New functions. (reloads_conflict): Use gen_reload_chain_without_interm_reg_p. * testsuite/gcc.dg/20080410-1.c: New file. * config/s390/s390.h (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Define. * config/sparc/sparc.h (IRA_COVER_CLASSES): New macro. * config/i386/i386.h (IRA_COVER_CLASSES): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES): Ditto. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/alpha/alpha.h (IRA_COVER_CLASSES): Ditto. 2008-08-24 Jeff Law <law@redhat.com> * ira.c (setup_reg_class_intersect_union): Prefer smallest class when ignoring unavailable registers. 2008-08-24 Jeff Law <law@redhat.com> * ira-color.c (coalesced_pseudo_reg_slot_compare): Check FRAME_GROWS_DOWNWARD and STACK_GROWS_DOWNWARD. * ira.c (setup_eliminable_regset): Check stack_realign_needed. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): New macro. 2008-06-03 Steve Chamberlain <steve.chamberlain@gmail.com> * ira-build.c (allocno_range_compare_func): Stabilize sort. 2008-05-29 Andy Hutchinson <hutchinsonandy@aim.com> * config/avr/avr.h (IRA_COVER_CLASSES): New macro. * reload1.c (find_reg): Process registers in register allocation order. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * toplev.c (backend_init_target): Move ira_init call from here... (lang_dependent_init_target): ...to here. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * ira.c (setup_class_subset_and_memory_move_costs): Don't calculate memory move costs for NO_REGS. 2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org> * ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if STACK_REGS is defined. 2008-04-08 Andrew Pinski <andrew_pinski@playstation.sony.com> * config/spu/spu.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Bernd Schmidt <bernd.schmidt@analog.com> * config/bfin/bfin.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Kaz Kojima <kkojima@gcc.gnu.org> * config/sh/sh.h (IRA_COVER_CLASSES): Define. * config/sh/sh.md (movsicc_true+3): Check if emit returns a barrier. From-SVN: r139590
2008-08-26 14:39:58 +02:00
gcc_assert (reg_pref && reg_renumber);
invoke.texi (-fsched-pressure): Document it. 2009-09-02 Vladimir Makarov <vmakarov@redhat.com> * doc/invoke.texi (-fsched-pressure): Document it. (-fsched-reg-pressure-heuristic): Remove it. * reload.c (ira.h): Include. (find_reloads): Add choosing reload on number of small spilled classes. * haifa-sched.c (ira.h): Include. (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure, saved_reg_pressure, curr_reg_live, saved_reg_live, region_ref_regs): New variables. (sched_init_region_reg_pressure_info, mark_regno_birth_or_death, initiate_reg_pressure_info, setup_ref_regs, initiate_bb_reg_pressure_info, save_reg_pressure, restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New functions. (setup_insn_reg_pressure_info): New function. (rank_for_schedule): Add pressure checking and insn issue time. Remove comparison of insn reg weights. (ready_sort): Set insn reg pressure info. (update_register_pressure, setup_insn_max_reg_pressure, update_reg_and_insn_max_reg_pressure, sched_setup_bb_reg_pressure_info): New functions. (schedule_insn): Add code for printing and updating reg pressure info. (find_set_reg_weight, find_insn_reg_weight): Remove. (ok_for_early_queue_removal): Do nothing if pressure_only_p. (debug_ready_list): Print reg pressure info. (schedule_block): Ditto. Check insn issue time. (sched_init): Set up sched_pressure_p. Allocate and set up some reg pressure related info. (sched_finish): Free some reg pressure related info. (fix_tick_ready): Make insn always ready if pressure_p. (init_h_i_d): Don't call find_insn_reg_weight. (haifa_finish_h_i_d): Free insn reg pressure info. * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move to ira.h. * ira-lives.c (single_reg_class): Check mode to find how many registers are necessary for operand. (ira_implicitly_set_insn_hard_regs): New. * common.opt (fsched-pressure): New options. (fsched-reg-pressure-heuristic): Remove. * ira.c (setup_eliminable_regset): Rename to ira_setup_eliminable_regset. Make it external. (expand_reg_info): Pass cover class to setup_reg_classes. (ira): Call resize_reg_info instead of allocate_reg_info. * sched-deps.c: Include ira.h. (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New. (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses, reg_pressure_info, insn_use_p, mark_insn_pseudo_birth, mark_insn_hard_regno_birth, mark_insn_reg_birth, mark_pseudo_death, mark_hard_regno_death, mark_reg_death, mark_insn_reg_store, mark_insn_reg_clobber, setup_insn_reg_pressure_info): New. (sched_analyze_1): Update implicit_reg_pending_uses. (sched_analyze_insn): Find implicit sets, uses, clobbers of regs. Use them to create dependencies. Set insn reg uses and pressure info. Process reg_pending_uses in one place. (free_deps): Free implicit sets. (remove_from_deps): Remove implicit sets if necessary. Check implicit sets when clearing reg_last_in_use. (init_deps_global): Clear implicit_reg_pending_clobbers and implicit_reg_pending_uses. * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move from ira-int.h. (ira_setup_eliminable_regset, ira_set_pseudo_classes, ira_implicitly_set_insn_hard_regs): New prototypes. * ira-costs.c (pseudo_classes_defined_p, allocno_p, cost_elements_num): New variables. (allocno_costs, total_costs): Rename to costs and total_allocno_costs. (COSTS_OF_ALLOCNO): Rename to COSTS. (allocno_pref): Rename to pref. (allocno_pref_buffer): Rename to pref_buffer. (common_classes): Rename to regno_cover_class. (COST_INDEX): New. (record_reg_classes): Set allocno attributes only if allocno_p. (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM. (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM and COSTS_OF_ALLOCNO. (print_costs): Rename to print_allocno_costs. (print_pseudo_costs): New. (process_bb_node_for_costs): Split into 2 functions with new function process_bb_for_costs. Pass BB to process_bb_for_costs. (find_allocno_class_costs): Rename to find_costs_and_classes. Add new parameter dump_file. Use cost_elements_num instead of ira_allocnos_num. Make one iteration if preferred classes were already calculated for scheduler. Make 2 versions of code depending on allocno_p. (setup_allocno_cover_class_and_costs): Check allocno_p. Use regno_cover_class and COSTS instead of common_classes and COSTS_OF_ALLOCNO. (init_costs, finish_costs): New. (ira_costs): Set up allocno_p and cost_elements_num. Call init_costs and finish_costs. (ira_set_pseudo_classes): New. * rtl.h (allocate_reg_info): Remove. (resize_reg_info): Change return type. (reg_cover_class): New. (setup_reg_classes): Add new parameter. * sched-int.h (struct deps_reg): New member implicit_sets. (sched_pressure_p, sched_regno_cover_class): New external definitions. (INCREASE_BITS): New macro. (struct reg_pressure_data, struct reg_use_data): New. (struct _haifa_insn_data): Remove reg_weight. Add members reg_pressure, reg_use_list, reg_set_list, and reg_pressure_excess_cost_change. (struct deps): New member implicit_sets. (pressure_p): New variable. (COVER_CLASS_BITS, INCREASE_BITS): New macros. (struct reg_pressure_data, struct reg_use_data): New. (INSN_REG_WEIGHT): Remove. (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST, INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros. (sched_init_region_reg_pressure_info, sched_setup_bb_reg_pressure_info): New prototypes. * reginfo.c (struct reg_pref): New member coverclass. (reg_cover_class): New function. (reginfo_init, pass_reginfo_init): Move after free_reg_info. (reg_info_size): New variable. (allocate_reg_info): Make static. Setup reg_info_size. (resize_reg_info): Use reg_info_size. Return flag of resizing. (setup_reg_classes): Add a new parameter. Setup cover class too. * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the dependencies. * sched-rgn.c (deps_join): Set up implicit_sets. (schedule_region): Set up region and basic blocks pressure relative info. * passes.c (init_optimization_passes): Move pass_subregs_of_mode_init before pass_sched. From-SVN: r151348
2009-09-02 20:54:25 +02:00
reg_renumber = XRESIZEVEC (short, reg_renumber, reg_info_size);
reg_pref = XRESIZEVEC (struct reg_pref, reg_pref, reg_info_size);
memset (reg_pref + old, -1,
(reg_info_size - old) * sizeof (struct reg_pref));
memset (reg_renumber + old, -1, (reg_info_size - old) * sizeof (short));
for (i = old; i < reg_info_size; i++)
{
reg_pref[i].prefclass = GENERAL_REGS;
reg_pref[i].altclass = ALL_REGS;
reg_pref[i].allocnoclass = GENERAL_REGS;
}
invoke.texi (-fsched-pressure): Document it. 2009-09-02 Vladimir Makarov <vmakarov@redhat.com> * doc/invoke.texi (-fsched-pressure): Document it. (-fsched-reg-pressure-heuristic): Remove it. * reload.c (ira.h): Include. (find_reloads): Add choosing reload on number of small spilled classes. * haifa-sched.c (ira.h): Include. (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure, saved_reg_pressure, curr_reg_live, saved_reg_live, region_ref_regs): New variables. (sched_init_region_reg_pressure_info, mark_regno_birth_or_death, initiate_reg_pressure_info, setup_ref_regs, initiate_bb_reg_pressure_info, save_reg_pressure, restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New functions. (setup_insn_reg_pressure_info): New function. (rank_for_schedule): Add pressure checking and insn issue time. Remove comparison of insn reg weights. (ready_sort): Set insn reg pressure info. (update_register_pressure, setup_insn_max_reg_pressure, update_reg_and_insn_max_reg_pressure, sched_setup_bb_reg_pressure_info): New functions. (schedule_insn): Add code for printing and updating reg pressure info. (find_set_reg_weight, find_insn_reg_weight): Remove. (ok_for_early_queue_removal): Do nothing if pressure_only_p. (debug_ready_list): Print reg pressure info. (schedule_block): Ditto. Check insn issue time. (sched_init): Set up sched_pressure_p. Allocate and set up some reg pressure related info. (sched_finish): Free some reg pressure related info. (fix_tick_ready): Make insn always ready if pressure_p. (init_h_i_d): Don't call find_insn_reg_weight. (haifa_finish_h_i_d): Free insn reg pressure info. * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move to ira.h. * ira-lives.c (single_reg_class): Check mode to find how many registers are necessary for operand. (ira_implicitly_set_insn_hard_regs): New. * common.opt (fsched-pressure): New options. (fsched-reg-pressure-heuristic): Remove. * ira.c (setup_eliminable_regset): Rename to ira_setup_eliminable_regset. Make it external. (expand_reg_info): Pass cover class to setup_reg_classes. (ira): Call resize_reg_info instead of allocate_reg_info. * sched-deps.c: Include ira.h. (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New. (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses, reg_pressure_info, insn_use_p, mark_insn_pseudo_birth, mark_insn_hard_regno_birth, mark_insn_reg_birth, mark_pseudo_death, mark_hard_regno_death, mark_reg_death, mark_insn_reg_store, mark_insn_reg_clobber, setup_insn_reg_pressure_info): New. (sched_analyze_1): Update implicit_reg_pending_uses. (sched_analyze_insn): Find implicit sets, uses, clobbers of regs. Use them to create dependencies. Set insn reg uses and pressure info. Process reg_pending_uses in one place. (free_deps): Free implicit sets. (remove_from_deps): Remove implicit sets if necessary. Check implicit sets when clearing reg_last_in_use. (init_deps_global): Clear implicit_reg_pending_clobbers and implicit_reg_pending_uses. * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move from ira-int.h. (ira_setup_eliminable_regset, ira_set_pseudo_classes, ira_implicitly_set_insn_hard_regs): New prototypes. * ira-costs.c (pseudo_classes_defined_p, allocno_p, cost_elements_num): New variables. (allocno_costs, total_costs): Rename to costs and total_allocno_costs. (COSTS_OF_ALLOCNO): Rename to COSTS. (allocno_pref): Rename to pref. (allocno_pref_buffer): Rename to pref_buffer. (common_classes): Rename to regno_cover_class. (COST_INDEX): New. (record_reg_classes): Set allocno attributes only if allocno_p. (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM. (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM and COSTS_OF_ALLOCNO. (print_costs): Rename to print_allocno_costs. (print_pseudo_costs): New. (process_bb_node_for_costs): Split into 2 functions with new function process_bb_for_costs. Pass BB to process_bb_for_costs. (find_allocno_class_costs): Rename to find_costs_and_classes. Add new parameter dump_file. Use cost_elements_num instead of ira_allocnos_num. Make one iteration if preferred classes were already calculated for scheduler. Make 2 versions of code depending on allocno_p. (setup_allocno_cover_class_and_costs): Check allocno_p. Use regno_cover_class and COSTS instead of common_classes and COSTS_OF_ALLOCNO. (init_costs, finish_costs): New. (ira_costs): Set up allocno_p and cost_elements_num. Call init_costs and finish_costs. (ira_set_pseudo_classes): New. * rtl.h (allocate_reg_info): Remove. (resize_reg_info): Change return type. (reg_cover_class): New. (setup_reg_classes): Add new parameter. * sched-int.h (struct deps_reg): New member implicit_sets. (sched_pressure_p, sched_regno_cover_class): New external definitions. (INCREASE_BITS): New macro. (struct reg_pressure_data, struct reg_use_data): New. (struct _haifa_insn_data): Remove reg_weight. Add members reg_pressure, reg_use_list, reg_set_list, and reg_pressure_excess_cost_change. (struct deps): New member implicit_sets. (pressure_p): New variable. (COVER_CLASS_BITS, INCREASE_BITS): New macros. (struct reg_pressure_data, struct reg_use_data): New. (INSN_REG_WEIGHT): Remove. (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST, INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros. (sched_init_region_reg_pressure_info, sched_setup_bb_reg_pressure_info): New prototypes. * reginfo.c (struct reg_pref): New member coverclass. (reg_cover_class): New function. (reginfo_init, pass_reginfo_init): Move after free_reg_info. (reg_info_size): New variable. (allocate_reg_info): Make static. Setup reg_info_size. (resize_reg_info): Use reg_info_size. Return flag of resizing. (setup_reg_classes): Add a new parameter. Setup cover class too. * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the dependencies. * sched-rgn.c (deps_join): Set up implicit_sets. (schedule_region): Set up region and basic blocks pressure relative info. * passes.c (init_optimization_passes): Move pass_subregs_of_mode_init before pass_sched. From-SVN: r151348
2009-09-02 20:54:25 +02:00
return true;
[multiple changes] 2008-08-26 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c, ira-color.c, ira-costs.c, ira.h, ira-lives.c, ira.c, ira-conflicts.c, ira-emit.c, ira-int.h: New files. * doc/passes.texi: Describe IRA. * doc/tm.texi (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Describe the new macros. * doc/invoke.texi (ira-max-loops-num): Describe the new parameter. (-fira, -fira-algorithm, -fira-coalesce, -fno-ira-move-spills, -fira-propagate-cost, -fno-ira-share-save-slots, -fno-ira-share-spill-slots, -fira-verbose): Describe new options. * flags.h (ira_algorithm): New enumeration. (flag_ira_algorithm, flag_ira_verbose): New external variable declarations. * postreload.c (gate_handle_postreload): Don't do post reload optimizations unless the reload is completed. * reload.c (push_reload, find_dummy_reload): Use DF_LR_OUT for IRA. * tree-pass.h (pass_ira): New external variable declaration. * reload.h: Add 2008 to the Copyright. * cfgloopanal.c: Include params.h. (estimate_reg_pressure_cost): Decrease cost for IRA optimization mode. * params.h (IRA_MAX_LOOPS_NUM): New macro. * toplev.c (ira.h): New include. (flag_ira_algorithm, flag_ira_verbose): New external variables. (backend_init_target): Call ira_init. (backend_init): Call ira_init_once. (finalize): Call finish_ira_once. * toplev.h (flag_ira, flag_ira_coalesce, flag_ira_move_spills, flag_ira_share_save_slots, flag_ira_share_spill_slots): New external variables. * regs.h (contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): New external variable declarations. (move_table): New typedef. * caller-save.c: Include headers output.h and ira.h. (no_caller_save_reg_set): New global variable. (save_slots_num, save_slots): New variables. (reg_save_code, reg_restore_code, add_stored_regs): Add prototypes. (init_caller_save): Set up no_caller_save_reg_set. (init_save_areas): Reset save_slots_num. (saved_hard_reg): New structure. (hard_reg_map, saved_regs_num, all_saved_regs): New variables. (initiate_saved_hard_regs, new_saved_hard_reg, finish_saved_hard_regs, saved_hard_reg_compare_func): New functions. (setup_save_areas): Add code for sharing stack slots. (all_blocks): New variable. (save_call_clobbered_regs): Process pseudo-register too. (mark_set_regs): Process pseudo-register too. (insert_one_insn): Put the insn after bb note in a empty basic block. Add insn check. * global.c (eliminable_regset): Make it external. (mark_elimination): Use DF_LR_IN for IRA. (pseudo_for_reload_consideration_p): New. (build_insn_chain): Make it external. Don't ignore spilled pseudos for IRA. Use pseudo_for_reload_consideration_p. (gate_handle_global_alloc): New function. (pass_global_alloc): Add the gate function. * opts.c (decode_options): Set up flag_ira. Print the warning for -fira. (common_handle_option): Process -fira-algorithm and -fira-verbose. * timevar.def (TV_IRA, TV_RELOAD): New passes. * regmove.c (regmove_optimize): Don't do replacement of output for IRA. * hard-reg-set.h (no_caller_save_reg_set, reg_class_subclasses): New external variable declarations. * local-alloc.c (update_equiv_regs): Make it external. Return true if jump label rebuilding should be done. Rescan new_insn for notes. (gate_handle_local_alloc): New function. (pass_local_alloc): Add the gate function. * alias.c (value_addr_p, stack_addr_p): New functions. (nonoverlapping_memrefs_p): Use them for IRA. * common.opt (fira, fira-algorithm, fira-coalesce, fira-move-spills, fira-share-save-slots, fira-share-spill-slots, fira-verbose): New options. * regclass.c (reg_class_subclasses, contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): Make the variables external. (move_table): Remove typedef. (init_move_cost): Make it external. (allocate_reg_info, resize_reg_info, setup_reg_classes): New functions. * rtl.h (init_move_cost, allocate_reg_info, resize_reg_info, setup_reg_classes): New function prototypes. (eliminable_regset): New external variable declaration. (build_insn_chain, update_equiv_regs): New function prototypes. * Makefile.in (IRA_INT_H): New definition. (OBJS-common): Add ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, and ira-lives.o. (reload1.o, toplev.o): Add dependence on ira.h. (cfgloopanal.o): Add PARAMS_H. (caller-save.o): Add dependence on output.h and ira.h. (ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, ira-lives.o): New entries. * passes.c (pass_ira): New pass. * params.def (PARAM_IRA_MAX_LOOPS_NUM): New parameter. * reload1.c (ira.h): Include the header. (changed_allocation_pseudos): New bitmap. (init_reload): Initiate the bitmap. (compute_use_by_pseudos): Permits spilled registers in FROM. (temp_pseudo_reg_arr): New variable. (reload): Allocate and free temp_pseudo_reg_arr. Sort pseudos for IRA. Call alter_reg with the additional parameter. Don't clear spilled_pseudos for IRA. Restore original insn chain for IRA. Clear changed_allocation_pseudos at the end of reload. (calculate_needs_all_insns): Call IRA's mark_memory_move_deletion. (hard_regno_to_pseudo_regno): New variable. (count_pseudo): Check spilled pseudos. Set up hard_regno_to_pseudo_regno. (count_spilled_pseudo): Check spilled pseudos. Update hard_regno_to_pseudo_regno. (find_reg): Use better_spill_reload_regno_p. Check hard_regno_to_pseudo_regno. (alter_reg): Set up spilled_pseudos. Add a new parameter. Add code for IRA. (eliminate_regs_1): Use additional parameter for alter_reg. (finish_spills): Set up pseudo_previous_regs only for spilled pseudos. Call reassign_pseudos once for all spilled pseudos, pass more arguments. Don't clear live_throughout and dead_or_set for spilled pseudos. Use additional parameter for alter_reg. Call mark_allocation_change. Set up changed_allocation_pseudos. Remove sanity check. (emit_input_reload_insns, delete_output_reload): Use additional parameter for alter_reg. Call mark_allocation_change. (substitute, gen_reload_chain_without_interm_reg_p): New functions. (reloads_conflict): Use gen_reload_chain_without_interm_reg_p. * testsuite/gcc.dg/20080410-1.c: New file. * config/s390/s390.h (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Define. * config/sparc/sparc.h (IRA_COVER_CLASSES): New macro. * config/i386/i386.h (IRA_COVER_CLASSES): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES): Ditto. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/alpha/alpha.h (IRA_COVER_CLASSES): Ditto. 2008-08-24 Jeff Law <law@redhat.com> * ira.c (setup_reg_class_intersect_union): Prefer smallest class when ignoring unavailable registers. 2008-08-24 Jeff Law <law@redhat.com> * ira-color.c (coalesced_pseudo_reg_slot_compare): Check FRAME_GROWS_DOWNWARD and STACK_GROWS_DOWNWARD. * ira.c (setup_eliminable_regset): Check stack_realign_needed. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): New macro. 2008-06-03 Steve Chamberlain <steve.chamberlain@gmail.com> * ira-build.c (allocno_range_compare_func): Stabilize sort. 2008-05-29 Andy Hutchinson <hutchinsonandy@aim.com> * config/avr/avr.h (IRA_COVER_CLASSES): New macro. * reload1.c (find_reg): Process registers in register allocation order. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * toplev.c (backend_init_target): Move ira_init call from here... (lang_dependent_init_target): ...to here. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * ira.c (setup_class_subset_and_memory_move_costs): Don't calculate memory move costs for NO_REGS. 2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org> * ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if STACK_REGS is defined. 2008-04-08 Andrew Pinski <andrew_pinski@playstation.sony.com> * config/spu/spu.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Bernd Schmidt <bernd.schmidt@analog.com> * config/bfin/bfin.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Kaz Kojima <kkojima@gcc.gnu.org> * config/sh/sh.h (IRA_COVER_CLASSES): Define. * config/sh/sh.md (movsicc_true+3): Check if emit returns a barrier. From-SVN: r139590
2008-08-26 14:39:58 +02:00
}
/* Free up the space allocated by allocate_reg_info. */
void
free_reg_info (void)
{
if (reg_pref)
{
free (reg_pref);
reg_pref = NULL;
}
if (reg_renumber)
{
free (reg_renumber);
reg_renumber = NULL;
}
}
invoke.texi (-fsched-pressure): Document it. 2009-09-02 Vladimir Makarov <vmakarov@redhat.com> * doc/invoke.texi (-fsched-pressure): Document it. (-fsched-reg-pressure-heuristic): Remove it. * reload.c (ira.h): Include. (find_reloads): Add choosing reload on number of small spilled classes. * haifa-sched.c (ira.h): Include. (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure, saved_reg_pressure, curr_reg_live, saved_reg_live, region_ref_regs): New variables. (sched_init_region_reg_pressure_info, mark_regno_birth_or_death, initiate_reg_pressure_info, setup_ref_regs, initiate_bb_reg_pressure_info, save_reg_pressure, restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New functions. (setup_insn_reg_pressure_info): New function. (rank_for_schedule): Add pressure checking and insn issue time. Remove comparison of insn reg weights. (ready_sort): Set insn reg pressure info. (update_register_pressure, setup_insn_max_reg_pressure, update_reg_and_insn_max_reg_pressure, sched_setup_bb_reg_pressure_info): New functions. (schedule_insn): Add code for printing and updating reg pressure info. (find_set_reg_weight, find_insn_reg_weight): Remove. (ok_for_early_queue_removal): Do nothing if pressure_only_p. (debug_ready_list): Print reg pressure info. (schedule_block): Ditto. Check insn issue time. (sched_init): Set up sched_pressure_p. Allocate and set up some reg pressure related info. (sched_finish): Free some reg pressure related info. (fix_tick_ready): Make insn always ready if pressure_p. (init_h_i_d): Don't call find_insn_reg_weight. (haifa_finish_h_i_d): Free insn reg pressure info. * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move to ira.h. * ira-lives.c (single_reg_class): Check mode to find how many registers are necessary for operand. (ira_implicitly_set_insn_hard_regs): New. * common.opt (fsched-pressure): New options. (fsched-reg-pressure-heuristic): Remove. * ira.c (setup_eliminable_regset): Rename to ira_setup_eliminable_regset. Make it external. (expand_reg_info): Pass cover class to setup_reg_classes. (ira): Call resize_reg_info instead of allocate_reg_info. * sched-deps.c: Include ira.h. (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New. (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses, reg_pressure_info, insn_use_p, mark_insn_pseudo_birth, mark_insn_hard_regno_birth, mark_insn_reg_birth, mark_pseudo_death, mark_hard_regno_death, mark_reg_death, mark_insn_reg_store, mark_insn_reg_clobber, setup_insn_reg_pressure_info): New. (sched_analyze_1): Update implicit_reg_pending_uses. (sched_analyze_insn): Find implicit sets, uses, clobbers of regs. Use them to create dependencies. Set insn reg uses and pressure info. Process reg_pending_uses in one place. (free_deps): Free implicit sets. (remove_from_deps): Remove implicit sets if necessary. Check implicit sets when clearing reg_last_in_use. (init_deps_global): Clear implicit_reg_pending_clobbers and implicit_reg_pending_uses. * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move from ira-int.h. (ira_setup_eliminable_regset, ira_set_pseudo_classes, ira_implicitly_set_insn_hard_regs): New prototypes. * ira-costs.c (pseudo_classes_defined_p, allocno_p, cost_elements_num): New variables. (allocno_costs, total_costs): Rename to costs and total_allocno_costs. (COSTS_OF_ALLOCNO): Rename to COSTS. (allocno_pref): Rename to pref. (allocno_pref_buffer): Rename to pref_buffer. (common_classes): Rename to regno_cover_class. (COST_INDEX): New. (record_reg_classes): Set allocno attributes only if allocno_p. (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM. (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM and COSTS_OF_ALLOCNO. (print_costs): Rename to print_allocno_costs. (print_pseudo_costs): New. (process_bb_node_for_costs): Split into 2 functions with new function process_bb_for_costs. Pass BB to process_bb_for_costs. (find_allocno_class_costs): Rename to find_costs_and_classes. Add new parameter dump_file. Use cost_elements_num instead of ira_allocnos_num. Make one iteration if preferred classes were already calculated for scheduler. Make 2 versions of code depending on allocno_p. (setup_allocno_cover_class_and_costs): Check allocno_p. Use regno_cover_class and COSTS instead of common_classes and COSTS_OF_ALLOCNO. (init_costs, finish_costs): New. (ira_costs): Set up allocno_p and cost_elements_num. Call init_costs and finish_costs. (ira_set_pseudo_classes): New. * rtl.h (allocate_reg_info): Remove. (resize_reg_info): Change return type. (reg_cover_class): New. (setup_reg_classes): Add new parameter. * sched-int.h (struct deps_reg): New member implicit_sets. (sched_pressure_p, sched_regno_cover_class): New external definitions. (INCREASE_BITS): New macro. (struct reg_pressure_data, struct reg_use_data): New. (struct _haifa_insn_data): Remove reg_weight. Add members reg_pressure, reg_use_list, reg_set_list, and reg_pressure_excess_cost_change. (struct deps): New member implicit_sets. (pressure_p): New variable. (COVER_CLASS_BITS, INCREASE_BITS): New macros. (struct reg_pressure_data, struct reg_use_data): New. (INSN_REG_WEIGHT): Remove. (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST, INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros. (sched_init_region_reg_pressure_info, sched_setup_bb_reg_pressure_info): New prototypes. * reginfo.c (struct reg_pref): New member coverclass. (reg_cover_class): New function. (reginfo_init, pass_reginfo_init): Move after free_reg_info. (reg_info_size): New variable. (allocate_reg_info): Make static. Setup reg_info_size. (resize_reg_info): Use reg_info_size. Return flag of resizing. (setup_reg_classes): Add a new parameter. Setup cover class too. * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the dependencies. * sched-rgn.c (deps_join): Set up implicit_sets. (schedule_region): Set up region and basic blocks pressure relative info. * passes.c (init_optimization_passes): Move pass_subregs_of_mode_init before pass_sched. From-SVN: r151348
2009-09-02 20:54:25 +02:00
/* Initialize some global data for this pass. */
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
static unsigned int
invoke.texi (-fsched-pressure): Document it. 2009-09-02 Vladimir Makarov <vmakarov@redhat.com> * doc/invoke.texi (-fsched-pressure): Document it. (-fsched-reg-pressure-heuristic): Remove it. * reload.c (ira.h): Include. (find_reloads): Add choosing reload on number of small spilled classes. * haifa-sched.c (ira.h): Include. (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure, saved_reg_pressure, curr_reg_live, saved_reg_live, region_ref_regs): New variables. (sched_init_region_reg_pressure_info, mark_regno_birth_or_death, initiate_reg_pressure_info, setup_ref_regs, initiate_bb_reg_pressure_info, save_reg_pressure, restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New functions. (setup_insn_reg_pressure_info): New function. (rank_for_schedule): Add pressure checking and insn issue time. Remove comparison of insn reg weights. (ready_sort): Set insn reg pressure info. (update_register_pressure, setup_insn_max_reg_pressure, update_reg_and_insn_max_reg_pressure, sched_setup_bb_reg_pressure_info): New functions. (schedule_insn): Add code for printing and updating reg pressure info. (find_set_reg_weight, find_insn_reg_weight): Remove. (ok_for_early_queue_removal): Do nothing if pressure_only_p. (debug_ready_list): Print reg pressure info. (schedule_block): Ditto. Check insn issue time. (sched_init): Set up sched_pressure_p. Allocate and set up some reg pressure related info. (sched_finish): Free some reg pressure related info. (fix_tick_ready): Make insn always ready if pressure_p. (init_h_i_d): Don't call find_insn_reg_weight. (haifa_finish_h_i_d): Free insn reg pressure info. * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move to ira.h. * ira-lives.c (single_reg_class): Check mode to find how many registers are necessary for operand. (ira_implicitly_set_insn_hard_regs): New. * common.opt (fsched-pressure): New options. (fsched-reg-pressure-heuristic): Remove. * ira.c (setup_eliminable_regset): Rename to ira_setup_eliminable_regset. Make it external. (expand_reg_info): Pass cover class to setup_reg_classes. (ira): Call resize_reg_info instead of allocate_reg_info. * sched-deps.c: Include ira.h. (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New. (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses, reg_pressure_info, insn_use_p, mark_insn_pseudo_birth, mark_insn_hard_regno_birth, mark_insn_reg_birth, mark_pseudo_death, mark_hard_regno_death, mark_reg_death, mark_insn_reg_store, mark_insn_reg_clobber, setup_insn_reg_pressure_info): New. (sched_analyze_1): Update implicit_reg_pending_uses. (sched_analyze_insn): Find implicit sets, uses, clobbers of regs. Use them to create dependencies. Set insn reg uses and pressure info. Process reg_pending_uses in one place. (free_deps): Free implicit sets. (remove_from_deps): Remove implicit sets if necessary. Check implicit sets when clearing reg_last_in_use. (init_deps_global): Clear implicit_reg_pending_clobbers and implicit_reg_pending_uses. * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move from ira-int.h. (ira_setup_eliminable_regset, ira_set_pseudo_classes, ira_implicitly_set_insn_hard_regs): New prototypes. * ira-costs.c (pseudo_classes_defined_p, allocno_p, cost_elements_num): New variables. (allocno_costs, total_costs): Rename to costs and total_allocno_costs. (COSTS_OF_ALLOCNO): Rename to COSTS. (allocno_pref): Rename to pref. (allocno_pref_buffer): Rename to pref_buffer. (common_classes): Rename to regno_cover_class. (COST_INDEX): New. (record_reg_classes): Set allocno attributes only if allocno_p. (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM. (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM and COSTS_OF_ALLOCNO. (print_costs): Rename to print_allocno_costs. (print_pseudo_costs): New. (process_bb_node_for_costs): Split into 2 functions with new function process_bb_for_costs. Pass BB to process_bb_for_costs. (find_allocno_class_costs): Rename to find_costs_and_classes. Add new parameter dump_file. Use cost_elements_num instead of ira_allocnos_num. Make one iteration if preferred classes were already calculated for scheduler. Make 2 versions of code depending on allocno_p. (setup_allocno_cover_class_and_costs): Check allocno_p. Use regno_cover_class and COSTS instead of common_classes and COSTS_OF_ALLOCNO. (init_costs, finish_costs): New. (ira_costs): Set up allocno_p and cost_elements_num. Call init_costs and finish_costs. (ira_set_pseudo_classes): New. * rtl.h (allocate_reg_info): Remove. (resize_reg_info): Change return type. (reg_cover_class): New. (setup_reg_classes): Add new parameter. * sched-int.h (struct deps_reg): New member implicit_sets. (sched_pressure_p, sched_regno_cover_class): New external definitions. (INCREASE_BITS): New macro. (struct reg_pressure_data, struct reg_use_data): New. (struct _haifa_insn_data): Remove reg_weight. Add members reg_pressure, reg_use_list, reg_set_list, and reg_pressure_excess_cost_change. (struct deps): New member implicit_sets. (pressure_p): New variable. (COVER_CLASS_BITS, INCREASE_BITS): New macros. (struct reg_pressure_data, struct reg_use_data): New. (INSN_REG_WEIGHT): Remove. (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST, INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros. (sched_init_region_reg_pressure_info, sched_setup_bb_reg_pressure_info): New prototypes. * reginfo.c (struct reg_pref): New member coverclass. (reg_cover_class): New function. (reginfo_init, pass_reginfo_init): Move after free_reg_info. (reg_info_size): New variable. (allocate_reg_info): Make static. Setup reg_info_size. (resize_reg_info): Use reg_info_size. Return flag of resizing. (setup_reg_classes): Add a new parameter. Setup cover class too. * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the dependencies. * sched-rgn.c (deps_join): Set up implicit_sets. (schedule_region): Set up region and basic blocks pressure relative info. * passes.c (init_optimization_passes): Move pass_subregs_of_mode_init before pass_sched. From-SVN: r151348
2009-09-02 20:54:25 +02:00
reginfo_init (void)
{
if (df)
df_compute_regs_ever_live (true);
basic-block.h: Re-group most prototypes per file. gcc/ * basic-block.h: Re-group most prototypes per file. (struct edge_list): Remove num_blocks field. (dump_bb_info): Adjust prototypes. (dump_reg_info): Move prototype to regs.h. * function.h: Do not include tree.h. Include vec.h, vecir.h, input.h and machmode.h to compensate. (function_name): New prototype. * gimple.h: Include tree.h to compensate for basic-block.h change. * langhooks.h: Note that tree.h is only necessary for enum tree_code. * regs.h (dump_reg_info): Prototype here. * regset.h: Adjust file reference in comment. (debug_regset): Remove prototype. * rtl.h: Include flags.h for flag_var_tracking_assignments. (MAY_HAVE_DEBUG_INSNS): Define as flag_var_tracking_assignments instead of no-longer-available tree.h's MAY_HAVE_DEBUG_STMTS. (dump_reg_info, dump_flow_info): Remove prototypes. * bb-reorder.c (set_edge_can_fallthru_flag): Move from cfganal.c to here, the only user. Make static. (reorder_basic_blocks): Call dump_reg_info before dump_flow_info. * cfg.c: Do not include tm.h, tree.h, rtl.h, hard-reg-set.h, regs.h, flags.h, function.h, except.h, diagnostic-core.h, tm_p.h, timevar.h, tree-pass.h, cfgloop.h, and tree-flow.h. Include basic-block.h, the first header I'd expect to be included. (reg_obstack): Move to df-core.c. (free_edge): Remove bogus ATTRIBUTE_UNUSED. (remove_edge_raw): Do not call tree-ssa's redirect_edge_var_map_clear. (redirect_edge_succ_nodup): Move to cfghooks.c. (dump_regset, debug_regset): Move to df-core.c. (dump_bb_info): Move to cfgrtl.c. (dump_reg_info): Move to regstat.c. (dump_flow_info): Move to cfgrtl.c. (debug_flow_info): Likewise. (dump_edge_info): Do not look at cfun, a CFG without cfun is nonsense. * cfganal.c: Do not include tm.h, rtl.h, obstack.h, hard-reg-set.h, insn-config.h, recog.h, diagnostic-core.h, tm_p.h, and cfgloop.h. (flow_active_insn_p, forwarder_block_p, can_fallthru, could_fall_through): Move to cfgrtl.c. (set_edge_can_fallthru_flag): Moved to bb-reorder.c. (create_edge_list): Do not set edge_list's removed num_blocks. (print_edge_list): Look at n_basic_blocks instead of num_blocks. (flow_nodes_print): Remove. (flow_edge_list_print): Remove. (inverted_post_order_compute): Use FOR_ALL_BB. *cfgrtl.c (dump_flow_info): Moved from cfg.c. Do not call dump_reg_info. (debug_flow_info): Moved from cfg.c (dump_bb_info): Moved from cfg.c. Take 'verbose' argument to avoid looking at TDF_* flags from tree-pass.h. (flow_active_insn_p, forwarder_block_p, can_fallthru, could_fall_through): Moved from cfganal.c. (print_rtl_with_bb): Adjust dump_bb_info calls. * cfghooks.c (redirect_edge_succ_nodup): Moved from cfg.c. (remove_edge): Call redirect_edge_var_map_clear if IR_GIMPLE. (cfgcleanup.c): Look at MAY_HAVE_DEBUG_INSNS, not MAY_HAVE_DEBUG_STMTS. * cselib.c: Include tree.h with a FIXME. * df-core.c (reg_obstack): Moved from cfg.c. (dump_regset): Likewise. (debug_regset): Likewise. Make a DEBUG_FUNCTION. * final.c (compute_alignments): Call dump_reg_info before dump_flow_info. * function.c (function_name): New function. (current_function_name): Use it. * ifcvt.c (rest_of_handle_if_conversion): Call dump_reg_info before dump_flow_info. * ira-conflicts.c: Include tree.h with a note. * regstat.c (dump_reg_info): Moved here from cfg.c. * loop-init.c: Include regs.h instead of hard-reg-set.h. (rtl_loop_init): Call dump_reg_info before dump_flow_info. (rtl_loop_done): Likewise. * mcf.c: Include tree.h before langhooks.h. * predict.c (maybe_hot_count_p): Assert we have cfun. (probably_never_executed_bb_p): Likewise. * profile.c (compute_branch_probabilities): Use gimple_dump_cfg instead of dump_flow_info. * sched-deps.c: Include tree.h with a FIXME. (call_may_noreturn_p): Add FIXME note why this function has to look at function decls instead of function decl flags. * sched-vis.c: Include tree.h with a FIXME. (print_rtl_slim): Adjust dump_bb_info uses. * statistics.c (statistics_fini_pass_2): Use current_function_name to avoid including tree.h. (statistics_counter_event): Use function_name for the same reason. (statistics_histogram_event): Likewise. * tracer.c (tracer): Remove bogus gcc_assert. Use brief_dump_cfg instead of dump_flow_info. * var-tracking.c (variable_tracking_main_1): Call dump_reg_info before dump_flow_info. * doc/cfg.texi: Update CFG documentation. * Makefile.in (RTL_H): Depend on FLAGS_H. (GIMPLE_H): Depend on TREE_H. (FUNCTION_H): Depend on VEC_H, vecir.h, INPUT_H and MACHMODE_H, but no longer on TREE_H. (C_COMMON_H): Depend on TREE_H. (cselib.o, cse.o, cfganal.o, loop-init.o, ira-conflicts.o, sched-deps.o, sched-vis.o): Fixup dependencies. c-family/ * c-common.h: Include tree.h. cp/ * decl.c (cp_finish_decl): Add FIXME at add_local_decl call site. From-SVN: r189359
2012-07-08 12:06:14 +02:00
/* This prevents dump_reg_info from losing if called
invoke.texi (-fsched-pressure): Document it. 2009-09-02 Vladimir Makarov <vmakarov@redhat.com> * doc/invoke.texi (-fsched-pressure): Document it. (-fsched-reg-pressure-heuristic): Remove it. * reload.c (ira.h): Include. (find_reloads): Add choosing reload on number of small spilled classes. * haifa-sched.c (ira.h): Include. (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure, saved_reg_pressure, curr_reg_live, saved_reg_live, region_ref_regs): New variables. (sched_init_region_reg_pressure_info, mark_regno_birth_or_death, initiate_reg_pressure_info, setup_ref_regs, initiate_bb_reg_pressure_info, save_reg_pressure, restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New functions. (setup_insn_reg_pressure_info): New function. (rank_for_schedule): Add pressure checking and insn issue time. Remove comparison of insn reg weights. (ready_sort): Set insn reg pressure info. (update_register_pressure, setup_insn_max_reg_pressure, update_reg_and_insn_max_reg_pressure, sched_setup_bb_reg_pressure_info): New functions. (schedule_insn): Add code for printing and updating reg pressure info. (find_set_reg_weight, find_insn_reg_weight): Remove. (ok_for_early_queue_removal): Do nothing if pressure_only_p. (debug_ready_list): Print reg pressure info. (schedule_block): Ditto. Check insn issue time. (sched_init): Set up sched_pressure_p. Allocate and set up some reg pressure related info. (sched_finish): Free some reg pressure related info. (fix_tick_ready): Make insn always ready if pressure_p. (init_h_i_d): Don't call find_insn_reg_weight. (haifa_finish_h_i_d): Free insn reg pressure info. * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move to ira.h. * ira-lives.c (single_reg_class): Check mode to find how many registers are necessary for operand. (ira_implicitly_set_insn_hard_regs): New. * common.opt (fsched-pressure): New options. (fsched-reg-pressure-heuristic): Remove. * ira.c (setup_eliminable_regset): Rename to ira_setup_eliminable_regset. Make it external. (expand_reg_info): Pass cover class to setup_reg_classes. (ira): Call resize_reg_info instead of allocate_reg_info. * sched-deps.c: Include ira.h. (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New. (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses, reg_pressure_info, insn_use_p, mark_insn_pseudo_birth, mark_insn_hard_regno_birth, mark_insn_reg_birth, mark_pseudo_death, mark_hard_regno_death, mark_reg_death, mark_insn_reg_store, mark_insn_reg_clobber, setup_insn_reg_pressure_info): New. (sched_analyze_1): Update implicit_reg_pending_uses. (sched_analyze_insn): Find implicit sets, uses, clobbers of regs. Use them to create dependencies. Set insn reg uses and pressure info. Process reg_pending_uses in one place. (free_deps): Free implicit sets. (remove_from_deps): Remove implicit sets if necessary. Check implicit sets when clearing reg_last_in_use. (init_deps_global): Clear implicit_reg_pending_clobbers and implicit_reg_pending_uses. * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move from ira-int.h. (ira_setup_eliminable_regset, ira_set_pseudo_classes, ira_implicitly_set_insn_hard_regs): New prototypes. * ira-costs.c (pseudo_classes_defined_p, allocno_p, cost_elements_num): New variables. (allocno_costs, total_costs): Rename to costs and total_allocno_costs. (COSTS_OF_ALLOCNO): Rename to COSTS. (allocno_pref): Rename to pref. (allocno_pref_buffer): Rename to pref_buffer. (common_classes): Rename to regno_cover_class. (COST_INDEX): New. (record_reg_classes): Set allocno attributes only if allocno_p. (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM. (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM and COSTS_OF_ALLOCNO. (print_costs): Rename to print_allocno_costs. (print_pseudo_costs): New. (process_bb_node_for_costs): Split into 2 functions with new function process_bb_for_costs. Pass BB to process_bb_for_costs. (find_allocno_class_costs): Rename to find_costs_and_classes. Add new parameter dump_file. Use cost_elements_num instead of ira_allocnos_num. Make one iteration if preferred classes were already calculated for scheduler. Make 2 versions of code depending on allocno_p. (setup_allocno_cover_class_and_costs): Check allocno_p. Use regno_cover_class and COSTS instead of common_classes and COSTS_OF_ALLOCNO. (init_costs, finish_costs): New. (ira_costs): Set up allocno_p and cost_elements_num. Call init_costs and finish_costs. (ira_set_pseudo_classes): New. * rtl.h (allocate_reg_info): Remove. (resize_reg_info): Change return type. (reg_cover_class): New. (setup_reg_classes): Add new parameter. * sched-int.h (struct deps_reg): New member implicit_sets. (sched_pressure_p, sched_regno_cover_class): New external definitions. (INCREASE_BITS): New macro. (struct reg_pressure_data, struct reg_use_data): New. (struct _haifa_insn_data): Remove reg_weight. Add members reg_pressure, reg_use_list, reg_set_list, and reg_pressure_excess_cost_change. (struct deps): New member implicit_sets. (pressure_p): New variable. (COVER_CLASS_BITS, INCREASE_BITS): New macros. (struct reg_pressure_data, struct reg_use_data): New. (INSN_REG_WEIGHT): Remove. (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST, INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros. (sched_init_region_reg_pressure_info, sched_setup_bb_reg_pressure_info): New prototypes. * reginfo.c (struct reg_pref): New member coverclass. (reg_cover_class): New function. (reginfo_init, pass_reginfo_init): Move after free_reg_info. (reg_info_size): New variable. (allocate_reg_info): Make static. Setup reg_info_size. (resize_reg_info): Use reg_info_size. Return flag of resizing. (setup_reg_classes): Add a new parameter. Setup cover class too. * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the dependencies. * sched-rgn.c (deps_join): Set up implicit_sets. (schedule_region): Set up region and basic blocks pressure relative info. * passes.c (init_optimization_passes): Move pass_subregs_of_mode_init before pass_sched. From-SVN: r151348
2009-09-02 20:54:25 +02:00
before reginfo is run. */
reg_pref = NULL;
reg_info_size = max_regno_since_last_resize = 0;
invoke.texi (-fsched-pressure): Document it. 2009-09-02 Vladimir Makarov <vmakarov@redhat.com> * doc/invoke.texi (-fsched-pressure): Document it. (-fsched-reg-pressure-heuristic): Remove it. * reload.c (ira.h): Include. (find_reloads): Add choosing reload on number of small spilled classes. * haifa-sched.c (ira.h): Include. (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure, saved_reg_pressure, curr_reg_live, saved_reg_live, region_ref_regs): New variables. (sched_init_region_reg_pressure_info, mark_regno_birth_or_death, initiate_reg_pressure_info, setup_ref_regs, initiate_bb_reg_pressure_info, save_reg_pressure, restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New functions. (setup_insn_reg_pressure_info): New function. (rank_for_schedule): Add pressure checking and insn issue time. Remove comparison of insn reg weights. (ready_sort): Set insn reg pressure info. (update_register_pressure, setup_insn_max_reg_pressure, update_reg_and_insn_max_reg_pressure, sched_setup_bb_reg_pressure_info): New functions. (schedule_insn): Add code for printing and updating reg pressure info. (find_set_reg_weight, find_insn_reg_weight): Remove. (ok_for_early_queue_removal): Do nothing if pressure_only_p. (debug_ready_list): Print reg pressure info. (schedule_block): Ditto. Check insn issue time. (sched_init): Set up sched_pressure_p. Allocate and set up some reg pressure related info. (sched_finish): Free some reg pressure related info. (fix_tick_ready): Make insn always ready if pressure_p. (init_h_i_d): Don't call find_insn_reg_weight. (haifa_finish_h_i_d): Free insn reg pressure info. * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move to ira.h. * ira-lives.c (single_reg_class): Check mode to find how many registers are necessary for operand. (ira_implicitly_set_insn_hard_regs): New. * common.opt (fsched-pressure): New options. (fsched-reg-pressure-heuristic): Remove. * ira.c (setup_eliminable_regset): Rename to ira_setup_eliminable_regset. Make it external. (expand_reg_info): Pass cover class to setup_reg_classes. (ira): Call resize_reg_info instead of allocate_reg_info. * sched-deps.c: Include ira.h. (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New. (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses, reg_pressure_info, insn_use_p, mark_insn_pseudo_birth, mark_insn_hard_regno_birth, mark_insn_reg_birth, mark_pseudo_death, mark_hard_regno_death, mark_reg_death, mark_insn_reg_store, mark_insn_reg_clobber, setup_insn_reg_pressure_info): New. (sched_analyze_1): Update implicit_reg_pending_uses. (sched_analyze_insn): Find implicit sets, uses, clobbers of regs. Use them to create dependencies. Set insn reg uses and pressure info. Process reg_pending_uses in one place. (free_deps): Free implicit sets. (remove_from_deps): Remove implicit sets if necessary. Check implicit sets when clearing reg_last_in_use. (init_deps_global): Clear implicit_reg_pending_clobbers and implicit_reg_pending_uses. * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move from ira-int.h. (ira_setup_eliminable_regset, ira_set_pseudo_classes, ira_implicitly_set_insn_hard_regs): New prototypes. * ira-costs.c (pseudo_classes_defined_p, allocno_p, cost_elements_num): New variables. (allocno_costs, total_costs): Rename to costs and total_allocno_costs. (COSTS_OF_ALLOCNO): Rename to COSTS. (allocno_pref): Rename to pref. (allocno_pref_buffer): Rename to pref_buffer. (common_classes): Rename to regno_cover_class. (COST_INDEX): New. (record_reg_classes): Set allocno attributes only if allocno_p. (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM. (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM and COSTS_OF_ALLOCNO. (print_costs): Rename to print_allocno_costs. (print_pseudo_costs): New. (process_bb_node_for_costs): Split into 2 functions with new function process_bb_for_costs. Pass BB to process_bb_for_costs. (find_allocno_class_costs): Rename to find_costs_and_classes. Add new parameter dump_file. Use cost_elements_num instead of ira_allocnos_num. Make one iteration if preferred classes were already calculated for scheduler. Make 2 versions of code depending on allocno_p. (setup_allocno_cover_class_and_costs): Check allocno_p. Use regno_cover_class and COSTS instead of common_classes and COSTS_OF_ALLOCNO. (init_costs, finish_costs): New. (ira_costs): Set up allocno_p and cost_elements_num. Call init_costs and finish_costs. (ira_set_pseudo_classes): New. * rtl.h (allocate_reg_info): Remove. (resize_reg_info): Change return type. (reg_cover_class): New. (setup_reg_classes): Add new parameter. * sched-int.h (struct deps_reg): New member implicit_sets. (sched_pressure_p, sched_regno_cover_class): New external definitions. (INCREASE_BITS): New macro. (struct reg_pressure_data, struct reg_use_data): New. (struct _haifa_insn_data): Remove reg_weight. Add members reg_pressure, reg_use_list, reg_set_list, and reg_pressure_excess_cost_change. (struct deps): New member implicit_sets. (pressure_p): New variable. (COVER_CLASS_BITS, INCREASE_BITS): New macros. (struct reg_pressure_data, struct reg_use_data): New. (INSN_REG_WEIGHT): Remove. (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST, INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros. (sched_init_region_reg_pressure_info, sched_setup_bb_reg_pressure_info): New prototypes. * reginfo.c (struct reg_pref): New member coverclass. (reg_cover_class): New function. (reginfo_init, pass_reginfo_init): Move after free_reg_info. (reg_info_size): New variable. (allocate_reg_info): Make static. Setup reg_info_size. (resize_reg_info): Use reg_info_size. Return flag of resizing. (setup_reg_classes): Add a new parameter. Setup cover class too. * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the dependencies. * sched-rgn.c (deps_join): Set up implicit_sets. (schedule_region): Set up region and basic blocks pressure relative info. * passes.c (init_optimization_passes): Move pass_subregs_of_mode_init before pass_sched. From-SVN: r151348
2009-09-02 20:54:25 +02:00
/* No more global register variables may be declared. */
no_global_reg_vars = 1;
return 1;
}
Automated conversion of passes to C++ classes gcc/ Patch autogenerated by refactor_passes.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 03fe39476a4c4ea450b49e087cfa817b5f92021e * asan.c (pass_asan): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_asan): ...new pass_data instance and... (make_pass_asan): ...new function. (pass_asan_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_asan_O0): ...new pass_data instance and... (make_pass_asan_O0): ...new function. * auto-inc-dec.c (pass_inc_dec): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_inc_dec): ...new pass_data instance and... (make_pass_inc_dec): ...new function. * bb-reorder.c (pass_reorder_blocks): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reorder_blocks): ...new pass_data instance and... (make_pass_reorder_blocks): ...new function. (pass_duplicate_computed_gotos): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_duplicate_computed_gotos): ...new pass_data instance and... (make_pass_duplicate_computed_gotos): ...new function. (pass_partition_blocks): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_partition_blocks): ...new pass_data instance and... (make_pass_partition_blocks): ...new function. * bt-load.c (pass_branch_target_load_optimize1): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_branch_target_load_optimize1): ...new pass_data instance and... (make_pass_branch_target_load_optimize1): ...new function. (pass_branch_target_load_optimize2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_branch_target_load_optimize2): ...new pass_data instance and... (make_pass_branch_target_load_optimize2): ...new function. * cfgcleanup.c (pass_jump): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_jump): ...new pass_data instance and... (make_pass_jump): ...new function. (pass_jump2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_jump2): ...new pass_data instance and... (make_pass_jump2): ...new function. * cfgexpand.c (pass_expand): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_expand): ...new pass_data instance and... (make_pass_expand): ...new function. * cfgrtl.c (pass_free_cfg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_free_cfg): ...new pass_data instance and... (make_pass_free_cfg): ...new function. (pass_into_cfg_layout_mode): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_into_cfg_layout_mode): ...new pass_data instance and... (make_pass_into_cfg_layout_mode): ...new function. (pass_outof_cfg_layout_mode): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_outof_cfg_layout_mode): ...new pass_data instance and... (make_pass_outof_cfg_layout_mode): ...new function. * cgraphbuild.c (pass_build_cgraph_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_cgraph_edges): ...new pass_data instance and... (make_pass_build_cgraph_edges): ...new function. (pass_rebuild_cgraph_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_rebuild_cgraph_edges): ...new pass_data instance and... (make_pass_rebuild_cgraph_edges): ...new function. (pass_remove_cgraph_callee_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_remove_cgraph_callee_edges): ...new pass_data instance and... (make_pass_remove_cgraph_callee_edges): ...new function. * combine-stack-adj.c (pass_stack_adjustments): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_adjustments): ...new pass_data instance and... (make_pass_stack_adjustments): ...new function. * combine.c (pass_combine): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_combine): ...new pass_data instance and... (make_pass_combine): ...new function. * compare-elim.c (pass_compare_elim_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_compare_elim_after_reload): ...new pass_data instance and... (make_pass_compare_elim_after_reload): ...new function. * cprop.c (pass_rtl_cprop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_cprop): ...new pass_data instance and... (make_pass_rtl_cprop): ...new function. * cse.c (pass_cse): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse): ...new pass_data instance and... (make_pass_cse): ...new function. (pass_cse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse2): ...new pass_data instance and... (make_pass_cse2): ...new function. (pass_cse_after_global_opts): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse_after_global_opts): ...new pass_data instance and... (make_pass_cse_after_global_opts): ...new function. * dce.c (pass_ud_rtl_dce): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ud_rtl_dce): ...new pass_data instance and... (make_pass_ud_rtl_dce): ...new function. (pass_fast_rtl_dce): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_fast_rtl_dce): ...new pass_data instance and... (make_pass_fast_rtl_dce): ...new function. * df-core.c (pass_df_initialize_opt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_initialize_opt): ...new pass_data instance and... (make_pass_df_initialize_opt): ...new function. (pass_df_initialize_no_opt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_initialize_no_opt): ...new pass_data instance and... (make_pass_df_initialize_no_opt): ...new function. (pass_df_finish): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_finish): ...new pass_data instance and... (make_pass_df_finish): ...new function. * dse.c (pass_rtl_dse1): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_dse1): ...new pass_data instance and... (make_pass_rtl_dse1): ...new function. (pass_rtl_dse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_dse2): ...new pass_data instance and... (make_pass_rtl_dse2): ...new function. * dwarf2cfi.c (pass_dwarf2_frame): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_dwarf2_frame): ...new pass_data instance and... (make_pass_dwarf2_frame): ...new function. * except.c (pass_set_nothrow_function_flags): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_set_nothrow_function_flags): ...new pass_data instance and... (make_pass_set_nothrow_function_flags): ...new function. (pass_convert_to_eh_region_ranges): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_convert_to_eh_region_ranges): ...new pass_data instance and... (make_pass_convert_to_eh_region_ranges): ...new function. * final.c (pass_compute_alignments): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_compute_alignments): ...new pass_data instance and... (make_pass_compute_alignments): ...new function. (pass_final): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_final): ...new pass_data instance and... (make_pass_final): ...new function. (pass_shorten_branches): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_shorten_branches): ...new pass_data instance and... (make_pass_shorten_branches): ...new function. (pass_clean_state): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_clean_state): ...new pass_data instance and... (make_pass_clean_state): ...new function. * function.c (pass_instantiate_virtual_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_instantiate_virtual_regs): ...new pass_data instance and... (make_pass_instantiate_virtual_regs): ...new function. (pass_leaf_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_leaf_regs): ...new pass_data instance and... (make_pass_leaf_regs): ...new function. (pass_thread_prologue_and_epilogue): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_thread_prologue_and_epilogue): ...new pass_data instance and... (make_pass_thread_prologue_and_epilogue): ...new function. (pass_match_asm_constraints): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_match_asm_constraints): ...new pass_data instance and... (make_pass_match_asm_constraints): ...new function. * fwprop.c (pass_rtl_fwprop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_fwprop): ...new pass_data instance and... (make_pass_rtl_fwprop): ...new function. (pass_rtl_fwprop_addr): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_fwprop_addr): ...new pass_data instance and... (make_pass_rtl_fwprop_addr): ...new function. * gcse.c (pass_rtl_pre): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_pre): ...new pass_data instance and... (make_pass_rtl_pre): ...new function. (pass_rtl_hoist): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_hoist): ...new pass_data instance and... (make_pass_rtl_hoist): ...new function. * gimple-low.c (pass_lower_cf): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_cf): ...new pass_data instance and... (make_pass_lower_cf): ...new function. * gimple-ssa-strength-reduction.c (pass_strength_reduction): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strength_reduction): ...new pass_data instance and... (make_pass_strength_reduction): ...new function. * ifcvt.c (pass_rtl_ifcvt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_ifcvt): ...new pass_data instance and... (make_pass_rtl_ifcvt): ...new function. (pass_if_after_combine): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_if_after_combine): ...new pass_data instance and... (make_pass_if_after_combine): ...new function. (pass_if_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_if_after_reload): ...new pass_data instance and... (make_pass_if_after_reload): ...new function. * init-regs.c (pass_initialize_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_initialize_regs): ...new pass_data instance and... (make_pass_initialize_regs): ...new function. * ipa-cp.c (pass_ipa_cp): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_cp): ...new pass_data instance and... (make_pass_ipa_cp): ...new function. * ipa-inline-analysis.c (pass_inline_parameters): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_inline_parameters): ...new pass_data instance and... (make_pass_inline_parameters): ...new function. * ipa-inline.c (pass_early_inline): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_inline): ...new pass_data instance and... (make_pass_early_inline): ...new function. (pass_ipa_inline): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_inline): ...new pass_data instance and... (make_pass_ipa_inline): ...new function. * ipa-pure-const.c (pass_local_pure_const): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_local_pure_const): ...new pass_data instance and... (make_pass_local_pure_const): ...new function. (pass_ipa_pure_const): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_pure_const): ...new pass_data instance and... (make_pass_ipa_pure_const): ...new function. * ipa-reference.c (pass_ipa_reference): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_reference): ...new pass_data instance and... (make_pass_ipa_reference): ...new function. * ipa-split.c (pass_split_functions): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_split_functions): ...new pass_data instance and... (make_pass_split_functions): ...new function. (pass_feedback_split_functions): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_feedback_split_functions): ...new pass_data instance and... (make_pass_feedback_split_functions): ...new function. * ipa.c (pass_ipa_function_and_variable_visibility): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_function_and_variable_visibility): ...new pass_data instance and... (make_pass_ipa_function_and_variable_visibility): ...new function. (pass_ipa_free_inline_summary): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_free_inline_summary): ...new pass_data instance and... (make_pass_ipa_free_inline_summary): ...new function. (pass_ipa_whole_program_visibility): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_whole_program_visibility): ...new pass_data instance and... (make_pass_ipa_whole_program_visibility): ...new function. (pass_ipa_profile): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_profile): ...new pass_data instance and... (make_pass_ipa_profile): ...new function. (pass_ipa_cdtor_merge): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_cdtor_merge): ...new pass_data instance and... (make_pass_ipa_cdtor_merge): ...new function. * ira.c (pass_ira): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ira): ...new pass_data instance and... (make_pass_ira): ...new function. (pass_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reload): ...new pass_data instance and... (make_pass_reload): ...new function. * jump.c (pass_cleanup_barriers): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cleanup_barriers): ...new pass_data instance and... (make_pass_cleanup_barriers): ...new function. * loop-init.c (pass_loop2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_loop2): ...new pass_data instance and... (make_pass_loop2): ...new function. (pass_rtl_loop_init): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_loop_init): ...new pass_data instance and... (make_pass_rtl_loop_init): ...new function. (pass_rtl_loop_done): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_loop_done): ...new pass_data instance and... (make_pass_rtl_loop_done): ...new function. (pass_rtl_move_loop_invariants): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_move_loop_invariants): ...new pass_data instance and... (make_pass_rtl_move_loop_invariants): ...new function. (pass_rtl_unswitch): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_unswitch): ...new pass_data instance and... (make_pass_rtl_unswitch): ...new function. (pass_rtl_unroll_and_peel_loops): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_unroll_and_peel_loops): ...new pass_data instance and... (make_pass_rtl_unroll_and_peel_loops): ...new function. (pass_rtl_doloop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_doloop): ...new pass_data instance and... (make_pass_rtl_doloop): ...new function. * lower-subreg.c (pass_lower_subreg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_lower_subreg): ...new pass_data instance and... (make_pass_lower_subreg): ...new function. (pass_lower_subreg2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_lower_subreg2): ...new pass_data instance and... (make_pass_lower_subreg2): ...new function. * lto-streamer-out.c (pass_ipa_lto_gimple_out): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_lto_gimple_out): ...new pass_data instance and... (make_pass_ipa_lto_gimple_out): ...new function. (pass_ipa_lto_finish_out): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_lto_finish_out): ...new pass_data instance and... (make_pass_ipa_lto_finish_out): ...new function. * mode-switching.c (pass_mode_switching): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mode_switching): ...new pass_data instance and... (make_pass_mode_switching): ...new function. * modulo-sched.c (pass_sms): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sms): ...new pass_data instance and... (make_pass_sms): ...new function. * omp-low.c (pass_expand_omp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_expand_omp): ...new pass_data instance and... (make_pass_expand_omp): ...new function. (pass_lower_omp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_omp): ...new pass_data instance and... (make_pass_lower_omp): ...new function. (pass_diagnose_omp_blocks): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_diagnose_omp_blocks): ...new pass_data instance and... (make_pass_diagnose_omp_blocks): ...new function. * passes.c (pass_early_local_passes): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_early_local_passes): ...new pass_data instance and... (make_pass_early_local_passes): ...new function. (pass_all_early_optimizations): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_early_optimizations): ...new pass_data instance and... (make_pass_all_early_optimizations): ...new function. (pass_all_optimizations): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_optimizations): ...new pass_data instance and... (make_pass_all_optimizations): ...new function. (pass_all_optimizations_g): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_optimizations_g): ...new pass_data instance and... (make_pass_all_optimizations_g): ...new function. (pass_rest_of_compilation): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rest_of_compilation): ...new pass_data instance and... (make_pass_rest_of_compilation): ...new function. (pass_postreload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_postreload): ...new pass_data instance and... (make_pass_postreload): ...new function. * postreload-gcse.c (pass_gcse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_gcse2): ...new pass_data instance and... (make_pass_gcse2): ...new function. * postreload.c (pass_postreload_cse): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_postreload_cse): ...new pass_data instance and... (make_pass_postreload_cse): ...new function. * predict.c (pass_profile): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_profile): ...new pass_data instance and... (make_pass_profile): ...new function. (pass_strip_predict_hints): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strip_predict_hints): ...new pass_data instance and... (make_pass_strip_predict_hints): ...new function. * recog.c (pass_peephole2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_peephole2): ...new pass_data instance and... (make_pass_peephole2): ...new function. (pass_split_all_insns): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_all_insns): ...new pass_data instance and... (make_pass_split_all_insns): ...new function. (pass_split_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_after_reload): ...new pass_data instance and... (make_pass_split_after_reload): ...new function. (pass_split_before_regstack): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_before_regstack): ...new pass_data instance and... (make_pass_split_before_regstack): ...new function. (pass_split_before_sched2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_before_sched2): ...new pass_data instance and... (make_pass_split_before_sched2): ...new function. (pass_split_for_shorten_branches): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_for_shorten_branches): ...new pass_data instance and... (make_pass_split_for_shorten_branches): ...new function. * ree.c (pass_ree): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ree): ...new pass_data instance and... (make_pass_ree): ...new function. * reg-stack.c (pass_stack_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_regs): ...new pass_data instance and... (make_pass_stack_regs): ...new function. (pass_stack_regs_run): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_regs_run): ...new pass_data instance and... (make_pass_stack_regs_run): ...new function. * regcprop.c (pass_cprop_hardreg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cprop_hardreg): ...new pass_data instance and... (make_pass_cprop_hardreg): ...new function. * reginfo.c (pass_reginfo_init): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reginfo_init): ...new pass_data instance and... (make_pass_reginfo_init): ...new function. * regmove.c (pass_regmove): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_regmove): ...new pass_data instance and... (make_pass_regmove): ...new function. * regrename.c (pass_regrename): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_regrename): ...new pass_data instance and... (make_pass_regrename): ...new function. * reorg.c (pass_delay_slots): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_delay_slots): ...new pass_data instance and... (make_pass_delay_slots): ...new function. (pass_machine_reorg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_machine_reorg): ...new pass_data instance and... (make_pass_machine_reorg): ...new function. * sched-rgn.c (pass_sched): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sched): ...new pass_data instance and... (make_pass_sched): ...new function. (pass_sched2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sched2): ...new pass_data instance and... (make_pass_sched2): ...new function. * stack-ptr-mod.c (pass_stack_ptr_mod): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_ptr_mod): ...new pass_data instance and... (make_pass_stack_ptr_mod): ...new function. * store-motion.c (pass_rtl_store_motion): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_store_motion): ...new pass_data instance and... (make_pass_rtl_store_motion): ...new function. * tracer.c (pass_tracer): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tracer): ...new pass_data instance and... (make_pass_tracer): ...new function. * trans-mem.c (pass_diagnose_tm_blocks): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_diagnose_tm_blocks): ...new pass_data instance and... (make_pass_diagnose_tm_blocks): ...new function. (pass_lower_tm): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_tm): ...new pass_data instance and... (make_pass_lower_tm): ...new function. (pass_tm_init): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_init): ...new pass_data instance and... (make_pass_tm_init): ...new function. (pass_tm_mark): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_mark): ...new pass_data instance and... (make_pass_tm_mark): ...new function. (pass_tm_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_edges): ...new pass_data instance and... (make_pass_tm_edges): ...new function. (pass_tm_memopt): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_memopt): ...new pass_data instance and... (make_pass_tm_memopt): ...new function. (pass_ipa_tm): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_tm): ...new pass_data instance and... (make_pass_ipa_tm): ...new function. * tree-call-cdce.c (pass_call_cdce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_call_cdce): ...new pass_data instance and... (make_pass_call_cdce): ...new function. * tree-cfg.c (pass_build_cfg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_cfg): ...new pass_data instance and... (make_pass_build_cfg): ...new function. (pass_split_crit_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_split_crit_edges): ...new pass_data instance and... (make_pass_split_crit_edges): ...new function. (pass_warn_function_return): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_function_return): ...new pass_data instance and... (make_pass_warn_function_return): ...new function. (pass_warn_function_noreturn): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_function_noreturn): ...new pass_data instance and... (make_pass_warn_function_noreturn): ...new function. (pass_warn_unused_result): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_unused_result): ...new pass_data instance and... (make_pass_warn_unused_result): ...new function. * tree-cfgcleanup.c (pass_merge_phi): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_merge_phi): ...new pass_data instance and... (make_pass_merge_phi): ...new function. * tree-complex.c (pass_lower_complex): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_complex): ...new pass_data instance and... (make_pass_lower_complex): ...new function. (pass_lower_complex_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_complex_O0): ...new pass_data instance and... (make_pass_lower_complex_O0): ...new function. * tree-eh.c (pass_lower_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_eh): ...new pass_data instance and... (make_pass_lower_eh): ...new function. (pass_refactor_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_refactor_eh): ...new pass_data instance and... (make_pass_refactor_eh): ...new function. (pass_lower_resx): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_resx): ...new pass_data instance and... (make_pass_lower_resx): ...new function. (pass_lower_eh_dispatch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_eh_dispatch): ...new pass_data instance and... (make_pass_lower_eh_dispatch): ...new function. (pass_cleanup_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cleanup_eh): ...new pass_data instance and... (make_pass_cleanup_eh): ...new function. * tree-emutls.c (pass_ipa_lower_emutls): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_lower_emutls): ...new pass_data instance and... (make_pass_ipa_lower_emutls): ...new function. * tree-if-conv.c (pass_if_conversion): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_if_conversion): ...new pass_data instance and... (make_pass_if_conversion): ...new function. * tree-into-ssa.c (pass_build_ssa): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_ssa): ...new pass_data instance and... (make_pass_build_ssa): ...new function. * tree-loop-distribution.c (pass_loop_distribution): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_loop_distribution): ...new pass_data instance and... (make_pass_loop_distribution): ...new function. * tree-mudflap.c (pass_mudflap_1): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_1): ...new pass_data instance and... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_2): ...new pass_data instance and... (make_pass_mudflap_2): ...new function. * tree-nomudflap.c (pass_mudflap_1): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_1): ...new pass_data instance and... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_2): ...new pass_data instance and... (make_pass_mudflap_2): ...new function. * tree-nrv.c (pass_nrv): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_nrv): ...new pass_data instance and... (make_pass_nrv): ...new function. (pass_return_slot): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_return_slot): ...new pass_data instance and... (make_pass_return_slot): ...new function. * tree-object-size.c (pass_object_sizes): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_object_sizes): ...new pass_data instance and... (make_pass_object_sizes): ...new function. * tree-optimize.c (pass_cleanup_cfg_post_optimizing): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cleanup_cfg_post_optimizing): ...new pass_data instance and... (make_pass_cleanup_cfg_post_optimizing): ...new function. (pass_fixup_cfg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fixup_cfg): ...new pass_data instance and... (make_pass_fixup_cfg): ...new function. * tree-pass.h (pass_mudflap_1): Replace declaration with that of... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Replace declaration with that of... (make_pass_mudflap_2): ...new function. (pass_asan): Replace declaration with that of... (make_pass_asan): ...new function. (pass_asan_O0): Replace declaration with that of... (make_pass_asan_O0): ...new function. (pass_tsan): Replace declaration with that of... (make_pass_tsan): ...new function. (pass_tsan_O0): Replace declaration with that of... (make_pass_tsan_O0): ...new function. (pass_lower_cf): Replace declaration with that of... (make_pass_lower_cf): ...new function. (pass_refactor_eh): Replace declaration with that of... (make_pass_refactor_eh): ...new function. (pass_lower_eh): Replace declaration with that of... (make_pass_lower_eh): ...new function. (pass_lower_eh_dispatch): Replace declaration with that of... (make_pass_lower_eh_dispatch): ...new function. (pass_lower_resx): Replace declaration with that of... (make_pass_lower_resx): ...new function. (pass_build_cfg): Replace declaration with that of... (make_pass_build_cfg): ...new function. (pass_early_tree_profile): Replace declaration with that of... (make_pass_early_tree_profile): ...new function. (pass_cleanup_eh): Replace declaration with that of... (make_pass_cleanup_eh): ...new function. (pass_sra): Replace declaration with that of... (make_pass_sra): ...new function. (pass_sra_early): Replace declaration with that of... (make_pass_sra_early): ...new function. (pass_early_ipa_sra): Replace declaration with that of... (make_pass_early_ipa_sra): ...new function. (pass_tail_recursion): Replace declaration with that of... (make_pass_tail_recursion): ...new function. (pass_tail_calls): Replace declaration with that of... (make_pass_tail_calls): ...new function. (pass_tree_loop): Replace declaration with that of... (make_pass_tree_loop): ...new function. (pass_tree_loop_init): Replace declaration with that of... (make_pass_tree_loop_init): ...new function. (pass_lim): Replace declaration with that of... (make_pass_lim): ...new function. (pass_tree_unswitch): Replace declaration with that of... (make_pass_tree_unswitch): ...new function. (pass_predcom): Replace declaration with that of... (make_pass_predcom): ...new function. (pass_iv_canon): Replace declaration with that of... (make_pass_iv_canon): ...new function. (pass_scev_cprop): Replace declaration with that of... (make_pass_scev_cprop): ...new function. (pass_empty_loop): Replace declaration with that of... (make_pass_empty_loop): ...new function. (pass_record_bounds): Replace declaration with that of... (make_pass_record_bounds): ...new function. (pass_graphite): Replace declaration with that of... (make_pass_graphite): ...new function. (pass_graphite_transforms): Replace declaration with that of... (make_pass_graphite_transforms): ...new function. (pass_if_conversion): Replace declaration with that of... (make_pass_if_conversion): ...new function. (pass_loop_distribution): Replace declaration with that of... (make_pass_loop_distribution): ...new function. (pass_vectorize): Replace declaration with that of... (make_pass_vectorize): ...new function. (pass_slp_vectorize): Replace declaration with that of... (make_pass_slp_vectorize): ...new function. (pass_complete_unroll): Replace declaration with that of... (make_pass_complete_unroll): ...new function. (pass_complete_unrolli): Replace declaration with that of... (make_pass_complete_unrolli): ...new function. (pass_parallelize_loops): Replace declaration with that of... (make_pass_parallelize_loops): ...new function. (pass_loop_prefetch): Replace declaration with that of... (make_pass_loop_prefetch): ...new function. (pass_iv_optimize): Replace declaration with that of... (make_pass_iv_optimize): ...new function. (pass_tree_loop_done): Replace declaration with that of... (make_pass_tree_loop_done): ...new function. (pass_ch): Replace declaration with that of... (make_pass_ch): ...new function. (pass_ccp): Replace declaration with that of... (make_pass_ccp): ...new function. (pass_phi_only_cprop): Replace declaration with that of... (make_pass_phi_only_cprop): ...new function. (pass_build_ssa): Replace declaration with that of... (make_pass_build_ssa): ...new function. (pass_build_alias): Replace declaration with that of... (make_pass_build_alias): ...new function. (pass_build_ealias): Replace declaration with that of... (make_pass_build_ealias): ...new function. (pass_dominator): Replace declaration with that of... (make_pass_dominator): ...new function. (pass_dce): Replace declaration with that of... (make_pass_dce): ...new function. (pass_dce_loop): Replace declaration with that of... (make_pass_dce_loop): ...new function. (pass_cd_dce): Replace declaration with that of... (make_pass_cd_dce): ...new function. (pass_call_cdce): Replace declaration with that of... (make_pass_call_cdce): ...new function. (pass_merge_phi): Replace declaration with that of... (make_pass_merge_phi): ...new function. (pass_split_crit_edges): Replace declaration with that of... (make_pass_split_crit_edges): ...new function. (pass_pre): Replace declaration with that of... (make_pass_pre): ...new function. (pass_profile): Replace declaration with that of... (make_pass_profile): ...new function. (pass_strip_predict_hints): Replace declaration with that of... (make_pass_strip_predict_hints): ...new function. (pass_lower_complex_O0): Replace declaration with that of... (make_pass_lower_complex_O0): ...new function. (pass_lower_complex): Replace declaration with that of... (make_pass_lower_complex): ...new function. (pass_lower_vector): Replace declaration with that of... (make_pass_lower_vector): ...new function. (pass_lower_vector_ssa): Replace declaration with that of... (make_pass_lower_vector_ssa): ...new function. (pass_lower_omp): Replace declaration with that of... (make_pass_lower_omp): ...new function. (pass_diagnose_omp_blocks): Replace declaration with that of... (make_pass_diagnose_omp_blocks): ...new function. (pass_expand_omp): Replace declaration with that of... (make_pass_expand_omp): ...new function. (pass_expand_omp_ssa): Replace declaration with that of... (make_pass_expand_omp_ssa): ...new function. (pass_object_sizes): Replace declaration with that of... (make_pass_object_sizes): ...new function. (pass_strlen): Replace declaration with that of... (make_pass_strlen): ...new function. (pass_fold_builtins): Replace declaration with that of... (make_pass_fold_builtins): ...new function. (pass_stdarg): Replace declaration with that of... (make_pass_stdarg): ...new function. (pass_early_warn_uninitialized): Replace declaration with that of... (make_pass_early_warn_uninitialized): ...new function. (pass_late_warn_uninitialized): Replace declaration with that of... (make_pass_late_warn_uninitialized): ...new function. (pass_cse_reciprocals): Replace declaration with that of... (make_pass_cse_reciprocals): ...new function. (pass_cse_sincos): Replace declaration with that of... (make_pass_cse_sincos): ...new function. (pass_optimize_bswap): Replace declaration with that of... (make_pass_optimize_bswap): ...new function. (pass_optimize_widening_mul): Replace declaration with that of... (make_pass_optimize_widening_mul): ...new function. (pass_warn_function_return): Replace declaration with that of... (make_pass_warn_function_return): ...new function. (pass_warn_function_noreturn): Replace declaration with that of... (make_pass_warn_function_noreturn): ...new function. (pass_cselim): Replace declaration with that of... (make_pass_cselim): ...new function. (pass_phiopt): Replace declaration with that of... (make_pass_phiopt): ...new function. (pass_forwprop): Replace declaration with that of... (make_pass_forwprop): ...new function. (pass_phiprop): Replace declaration with that of... (make_pass_phiprop): ...new function. (pass_tree_ifcombine): Replace declaration with that of... (make_pass_tree_ifcombine): ...new function. (pass_dse): Replace declaration with that of... (make_pass_dse): ...new function. (pass_nrv): Replace declaration with that of... (make_pass_nrv): ...new function. (pass_rename_ssa_copies): Replace declaration with that of... (make_pass_rename_ssa_copies): ...new function. (pass_sink_code): Replace declaration with that of... (make_pass_sink_code): ...new function. (pass_fre): Replace declaration with that of... (make_pass_fre): ...new function. (pass_check_data_deps): Replace declaration with that of... (make_pass_check_data_deps): ...new function. (pass_copy_prop): Replace declaration with that of... (make_pass_copy_prop): ...new function. (pass_vrp): Replace declaration with that of... (make_pass_vrp): ...new function. (pass_uncprop): Replace declaration with that of... (make_pass_uncprop): ...new function. (pass_return_slot): Replace declaration with that of... (make_pass_return_slot): ...new function. (pass_reassoc): Replace declaration with that of... (make_pass_reassoc): ...new function. (pass_rebuild_cgraph_edges): Replace declaration with that of... (make_pass_rebuild_cgraph_edges): ...new function. (pass_remove_cgraph_callee_edges): Replace declaration with that of... (make_pass_remove_cgraph_callee_edges): ...new function. (pass_build_cgraph_edges): Replace declaration with that of... (make_pass_build_cgraph_edges): ...new function. (pass_local_pure_const): Replace declaration with that of... (make_pass_local_pure_const): ...new function. (pass_tracer): Replace declaration with that of... (make_pass_tracer): ...new function. (pass_warn_unused_result): Replace declaration with that of... (make_pass_warn_unused_result): ...new function. (pass_diagnose_tm_blocks): Replace declaration with that of... (make_pass_diagnose_tm_blocks): ...new function. (pass_lower_tm): Replace declaration with that of... (make_pass_lower_tm): ...new function. (pass_tm_init): Replace declaration with that of... (make_pass_tm_init): ...new function. (pass_tm_mark): Replace declaration with that of... (make_pass_tm_mark): ...new function. (pass_tm_memopt): Replace declaration with that of... (make_pass_tm_memopt): ...new function. (pass_tm_edges): Replace declaration with that of... (make_pass_tm_edges): ...new function. (pass_split_functions): Replace declaration with that of... (make_pass_split_functions): ...new function. (pass_feedback_split_functions): Replace declaration with that of... (make_pass_feedback_split_functions): ...new function. (pass_strength_reduction): Replace declaration with that of... (make_pass_strength_reduction): ...new function. (pass_ipa_lower_emutls): Replace declaration with that of... (make_pass_ipa_lower_emutls): ...new function. (pass_ipa_function_and_variable_visibility): Replace declaration with that of... (make_pass_ipa_function_and_variable_visibility): ...new function. (pass_ipa_tree_profile): Replace declaration with that of... (make_pass_ipa_tree_profile): ...new function. (pass_early_local_passes): Replace declaration with that of... (make_pass_early_local_passes): ...new function. (pass_ipa_whole_program_visibility): Replace declaration with that of... (make_pass_ipa_whole_program_visibility): ...new function. (pass_ipa_lto_gimple_out): Replace declaration with that of... (make_pass_ipa_lto_gimple_out): ...new function. (pass_ipa_increase_alignment): Replace declaration with that of... (make_pass_ipa_increase_alignment): ...new function. (pass_ipa_inline): Replace declaration with that of... (make_pass_ipa_inline): ...new function. (pass_ipa_free_lang_data): Replace declaration with that of... (make_pass_ipa_free_lang_data): ...new function. (pass_ipa_free_inline_summary): Replace declaration with that of... (make_pass_ipa_free_inline_summary): ...new function. (pass_ipa_cp): Replace declaration with that of... (make_pass_ipa_cp): ...new function. (pass_ipa_reference): Replace declaration with that of... (make_pass_ipa_reference): ...new function. (pass_ipa_pure_const): Replace declaration with that of... (make_pass_ipa_pure_const): ...new function. (pass_ipa_pta): Replace declaration with that of... (make_pass_ipa_pta): ...new function. (pass_ipa_lto_finish_out): Replace declaration with that of... (make_pass_ipa_lto_finish_out): ...new function. (pass_ipa_tm): Replace declaration with that of... (make_pass_ipa_tm): ...new function. (pass_ipa_profile): Replace declaration with that of... (make_pass_ipa_profile): ...new function. (pass_ipa_cdtor_merge): Replace declaration with that of... (make_pass_ipa_cdtor_merge): ...new function. (pass_cleanup_cfg_post_optimizing): Replace declaration with that of... (make_pass_cleanup_cfg_post_optimizing): ...new function. (pass_init_datastructures): Replace declaration with that of... (make_pass_init_datastructures): ...new function. (pass_fixup_cfg): Replace declaration with that of... (make_pass_fixup_cfg): ...new function. (pass_expand): Replace declaration with that of... (make_pass_expand): ...new function. (pass_instantiate_virtual_regs): Replace declaration with that of... (make_pass_instantiate_virtual_regs): ...new function. (pass_rtl_fwprop): Replace declaration with that of... (make_pass_rtl_fwprop): ...new function. (pass_rtl_fwprop_addr): Replace declaration with that of... (make_pass_rtl_fwprop_addr): ...new function. (pass_jump): Replace declaration with that of... (make_pass_jump): ...new function. (pass_jump2): Replace declaration with that of... (make_pass_jump2): ...new function. (pass_lower_subreg): Replace declaration with that of... (make_pass_lower_subreg): ...new function. (pass_cse): Replace declaration with that of... (make_pass_cse): ...new function. (pass_fast_rtl_dce): Replace declaration with that of... (make_pass_fast_rtl_dce): ...new function. (pass_ud_rtl_dce): Replace declaration with that of... (make_pass_ud_rtl_dce): ...new function. (pass_rtl_dce): Replace declaration with that of... (make_pass_rtl_dce): ...new function. (pass_rtl_dse1): Replace declaration with that of... (make_pass_rtl_dse1): ...new function. (pass_rtl_dse2): Replace declaration with that of... (make_pass_rtl_dse2): ...new function. (pass_rtl_dse3): Replace declaration with that of... (make_pass_rtl_dse3): ...new function. (pass_rtl_cprop): Replace declaration with that of... (make_pass_rtl_cprop): ...new function. (pass_rtl_pre): Replace declaration with that of... (make_pass_rtl_pre): ...new function. (pass_rtl_hoist): Replace declaration with that of... (make_pass_rtl_hoist): ...new function. (pass_rtl_store_motion): Replace declaration with that of... (make_pass_rtl_store_motion): ...new function. (pass_cse_after_global_opts): Replace declaration with that of... (make_pass_cse_after_global_opts): ...new function. (pass_rtl_ifcvt): Replace declaration with that of... (make_pass_rtl_ifcvt): ...new function. (pass_into_cfg_layout_mode): Replace declaration with that of... (make_pass_into_cfg_layout_mode): ...new function. (pass_outof_cfg_layout_mode): Replace declaration with that of... (make_pass_outof_cfg_layout_mode): ...new function. (pass_loop2): Replace declaration with that of... (make_pass_loop2): ...new function. (pass_rtl_loop_init): Replace declaration with that of... (make_pass_rtl_loop_init): ...new function. (pass_rtl_move_loop_invariants): Replace declaration with that of... (make_pass_rtl_move_loop_invariants): ...new function. (pass_rtl_unswitch): Replace declaration with that of... (make_pass_rtl_unswitch): ...new function. (pass_rtl_unroll_and_peel_loops): Replace declaration with that of... (make_pass_rtl_unroll_and_peel_loops): ...new function. (pass_rtl_doloop): Replace declaration with that of... (make_pass_rtl_doloop): ...new function. (pass_rtl_loop_done): Replace declaration with that of... (make_pass_rtl_loop_done): ...new function. (pass_web): Replace declaration with that of... (make_pass_web): ...new function. (pass_cse2): Replace declaration with that of... (make_pass_cse2): ...new function. (pass_df_initialize_opt): Replace declaration with that of... (make_pass_df_initialize_opt): ...new function. (pass_df_initialize_no_opt): Replace declaration with that of... (make_pass_df_initialize_no_opt): ...new function. (pass_reginfo_init): Replace declaration with that of... (make_pass_reginfo_init): ...new function. (pass_inc_dec): Replace declaration with that of... (make_pass_inc_dec): ...new function. (pass_stack_ptr_mod): Replace declaration with that of... (make_pass_stack_ptr_mod): ...new function. (pass_initialize_regs): Replace declaration with that of... (make_pass_initialize_regs): ...new function. (pass_combine): Replace declaration with that of... (make_pass_combine): ...new function. (pass_if_after_combine): Replace declaration with that of... (make_pass_if_after_combine): ...new function. (pass_ree): Replace declaration with that of... (make_pass_ree): ...new function. (pass_partition_blocks): Replace declaration with that of... (make_pass_partition_blocks): ...new function. (pass_match_asm_constraints): Replace declaration with that of... (make_pass_match_asm_constraints): ...new function. (pass_regmove): Replace declaration with that of... (make_pass_regmove): ...new function. (pass_split_all_insns): Replace declaration with that of... (make_pass_split_all_insns): ...new function. (pass_fast_rtl_byte_dce): Replace declaration with that of... (make_pass_fast_rtl_byte_dce): ...new function. (pass_lower_subreg2): Replace declaration with that of... (make_pass_lower_subreg2): ...new function. (pass_mode_switching): Replace declaration with that of... (make_pass_mode_switching): ...new function. (pass_sms): Replace declaration with that of... (make_pass_sms): ...new function. (pass_sched): Replace declaration with that of... (make_pass_sched): ...new function. (pass_ira): Replace declaration with that of... (make_pass_ira): ...new function. (pass_reload): Replace declaration with that of... (make_pass_reload): ...new function. (pass_clean_state): Replace declaration with that of... (make_pass_clean_state): ...new function. (pass_branch_prob): Replace declaration with that of... (make_pass_branch_prob): ...new function. (pass_value_profile_transformations): Replace declaration with that of... (make_pass_value_profile_transformations): ...new function. (pass_postreload_cse): Replace declaration with that of... (make_pass_postreload_cse): ...new function. (pass_gcse2): Replace declaration with that of... (make_pass_gcse2): ...new function. (pass_split_after_reload): Replace declaration with that of... (make_pass_split_after_reload): ...new function. (pass_branch_target_load_optimize1): Replace declaration with that of... (make_pass_branch_target_load_optimize1): ...new function. (pass_thread_prologue_and_epilogue): Replace declaration with that of... (make_pass_thread_prologue_and_epilogue): ...new function. (pass_stack_adjustments): Replace declaration with that of... (make_pass_stack_adjustments): ...new function. (pass_peephole2): Replace declaration with that of... (make_pass_peephole2): ...new function. (pass_if_after_reload): Replace declaration with that of... (make_pass_if_after_reload): ...new function. (pass_regrename): Replace declaration with that of... (make_pass_regrename): ...new function. (pass_cprop_hardreg): Replace declaration with that of... (make_pass_cprop_hardreg): ...new function. (pass_reorder_blocks): Replace declaration with that of... (make_pass_reorder_blocks): ...new function. (pass_branch_target_load_optimize2): Replace declaration with that of... (make_pass_branch_target_load_optimize2): ...new function. (pass_leaf_regs): Replace declaration with that of... (make_pass_leaf_regs): ...new function. (pass_split_before_sched2): Replace declaration with that of... (make_pass_split_before_sched2): ...new function. (pass_compare_elim_after_reload): Replace declaration with that of... (make_pass_compare_elim_after_reload): ...new function. (pass_sched2): Replace declaration with that of... (make_pass_sched2): ...new function. (pass_stack_regs): Replace declaration with that of... (make_pass_stack_regs): ...new function. (pass_stack_regs_run): Replace declaration with that of... (make_pass_stack_regs_run): ...new function. (pass_df_finish): Replace declaration with that of... (make_pass_df_finish): ...new function. (pass_compute_alignments): Replace declaration with that of... (make_pass_compute_alignments): ...new function. (pass_duplicate_computed_gotos): Replace declaration with that of... (make_pass_duplicate_computed_gotos): ...new function. (pass_variable_tracking): Replace declaration with that of... (make_pass_variable_tracking): ...new function. (pass_free_cfg): Replace declaration with that of... (make_pass_free_cfg): ...new function. (pass_machine_reorg): Replace declaration with that of... (make_pass_machine_reorg): ...new function. (pass_cleanup_barriers): Replace declaration with that of... (make_pass_cleanup_barriers): ...new function. (pass_delay_slots): Replace declaration with that of... (make_pass_delay_slots): ...new function. (pass_split_for_shorten_branches): Replace declaration with that of... (make_pass_split_for_shorten_branches): ...new function. (pass_split_before_regstack): Replace declaration with that of... (make_pass_split_before_regstack): ...new function. (pass_convert_to_eh_region_ranges): Replace declaration with that of... (make_pass_convert_to_eh_region_ranges): ...new function. (pass_shorten_branches): Replace declaration with that of... (make_pass_shorten_branches): ...new function. (pass_set_nothrow_function_flags): Replace declaration with that of... (make_pass_set_nothrow_function_flags): ...new function. (pass_dwarf2_frame): Replace declaration with that of... (make_pass_dwarf2_frame): ...new function. (pass_final): Replace declaration with that of... (make_pass_final): ...new function. (pass_rtl_seqabstr): Replace declaration with that of... (make_pass_rtl_seqabstr): ...new function. (pass_release_ssa_names): Replace declaration with that of... (make_pass_release_ssa_names): ...new function. (pass_early_inline): Replace declaration with that of... (make_pass_early_inline): ...new function. (pass_inline_parameters): Replace declaration with that of... (make_pass_inline_parameters): ...new function. (pass_update_address_taken): Replace declaration with that of... (make_pass_update_address_taken): ...new function. (pass_convert_switch): Replace declaration with that of... (make_pass_convert_switch): ...new function. * tree-profile.c (pass_ipa_tree_profile): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_tree_profile): ...new pass_data instance and... (make_pass_ipa_tree_profile): ...new function. * tree-sra.c (pass_sra_early): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sra_early): ...new pass_data instance and... (make_pass_sra_early): ...new function. (pass_sra): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sra): ...new pass_data instance and... (make_pass_sra): ...new function. (pass_early_ipa_sra): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_ipa_sra): ...new pass_data instance and... (make_pass_early_ipa_sra): ...new function. * tree-ssa-ccp.c (pass_ccp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_ccp): ...new pass_data instance and... (make_pass_ccp): ...new function. (pass_fold_builtins): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fold_builtins): ...new pass_data instance and... (make_pass_fold_builtins): ...new function. * tree-ssa-copy.c (pass_copy_prop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_copy_prop): ...new pass_data instance and... (make_pass_copy_prop): ...new function. * tree-ssa-copyrename.c (pass_rename_ssa_copies): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_rename_ssa_copies): ...new pass_data instance and... (make_pass_rename_ssa_copies): ...new function. * tree-ssa-dce.c (pass_dce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dce): ...new pass_data instance and... (make_pass_dce): ...new function. (pass_dce_loop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dce_loop): ...new pass_data instance and... (make_pass_dce_loop): ...new function. (pass_cd_dce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cd_dce): ...new pass_data instance and... (make_pass_cd_dce): ...new function. * tree-ssa-dom.c (pass_dominator): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dominator): ...new pass_data instance and... (make_pass_dominator): ...new function. (pass_phi_only_cprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phi_only_cprop): ...new pass_data instance and... (make_pass_phi_only_cprop): ...new function. * tree-ssa-dse.c (pass_dse): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dse): ...new pass_data instance and... (make_pass_dse): ...new function. * tree-ssa-forwprop.c (pass_forwprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_forwprop): ...new pass_data instance and... (make_pass_forwprop): ...new function. * tree-ssa-ifcombine.c (pass_tree_ifcombine): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_ifcombine): ...new pass_data instance and... (make_pass_tree_ifcombine): ...new function. * tree-ssa-loop-ch.c (pass_ch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_ch): ...new pass_data instance and... (make_pass_ch): ...new function. * tree-ssa-loop.c (pass_tree_loop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop): ...new pass_data instance and... (make_pass_tree_loop): ...new function. (pass_tree_loop_init): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop_init): ...new pass_data instance and... (make_pass_tree_loop_init): ...new function. (pass_lim): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lim): ...new pass_data instance and... (make_pass_lim): ...new function. (pass_tree_unswitch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_unswitch): ...new pass_data instance and... (make_pass_tree_unswitch): ...new function. (pass_predcom): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_predcom): ...new pass_data instance and... (make_pass_predcom): ...new function. (pass_vectorize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_vectorize): ...new pass_data instance and... (make_pass_vectorize): ...new function. (pass_graphite): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_graphite): ...new pass_data instance and... (make_pass_graphite): ...new function. (pass_graphite_transforms): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_graphite_transforms): ...new pass_data instance and... (make_pass_graphite_transforms): ...new function. (pass_check_data_deps): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_check_data_deps): ...new pass_data instance and... (make_pass_check_data_deps): ...new function. (pass_iv_canon): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_iv_canon): ...new pass_data instance and... (make_pass_iv_canon): ...new function. (pass_scev_cprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_scev_cprop): ...new pass_data instance and... (make_pass_scev_cprop): ...new function. (pass_record_bounds): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_record_bounds): ...new pass_data instance and... (make_pass_record_bounds): ...new function. (pass_complete_unroll): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_complete_unroll): ...new pass_data instance and... (make_pass_complete_unroll): ...new function. (pass_complete_unrolli): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_complete_unrolli): ...new pass_data instance and... (make_pass_complete_unrolli): ...new function. (pass_parallelize_loops): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_parallelize_loops): ...new pass_data instance and... (make_pass_parallelize_loops): ...new function. (pass_loop_prefetch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_loop_prefetch): ...new pass_data instance and... (make_pass_loop_prefetch): ...new function. (pass_iv_optimize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_iv_optimize): ...new pass_data instance and... (make_pass_iv_optimize): ...new function. (pass_tree_loop_done): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop_done): ...new pass_data instance and... (make_pass_tree_loop_done): ...new function. * tree-ssa-math-opts.c (pass_cse_reciprocals): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cse_reciprocals): ...new pass_data instance and... (make_pass_cse_reciprocals): ...new function. (pass_cse_sincos): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cse_sincos): ...new pass_data instance and... (make_pass_cse_sincos): ...new function. (pass_optimize_bswap): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_optimize_bswap): ...new pass_data instance and... (make_pass_optimize_bswap): ...new function. (pass_optimize_widening_mul): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_optimize_widening_mul): ...new pass_data instance and... (make_pass_optimize_widening_mul): ...new function. * tree-ssa-phiopt.c (pass_phiopt): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phiopt): ...new pass_data instance and... (make_pass_phiopt): ...new function. (pass_cselim): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cselim): ...new pass_data instance and... (make_pass_cselim): ...new function. * tree-ssa-phiprop.c (pass_phiprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phiprop): ...new pass_data instance and... (make_pass_phiprop): ...new function. * tree-ssa-pre.c (pass_pre): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_pre): ...new pass_data instance and... (make_pass_pre): ...new function. (pass_fre): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fre): ...new pass_data instance and... (make_pass_fre): ...new function. * tree-ssa-reassoc.c (pass_reassoc): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_reassoc): ...new pass_data instance and... (make_pass_reassoc): ...new function. * tree-ssa-sink.c (pass_sink_code): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sink_code): ...new pass_data instance and... (make_pass_sink_code): ...new function. * tree-ssa-strlen.c (pass_strlen): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strlen): ...new pass_data instance and... (make_pass_strlen): ...new function. * tree-ssa-structalias.c (pass_build_alias): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_alias): ...new pass_data instance and... (make_pass_build_alias): ...new function. (pass_build_ealias): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_ealias): ...new pass_data instance and... (make_pass_build_ealias): ...new function. (pass_ipa_pta): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_pta): ...new pass_data instance and... (make_pass_ipa_pta): ...new function. * tree-ssa-uncprop.c (pass_uncprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_uncprop): ...new pass_data instance and... (make_pass_uncprop): ...new function. * tree-ssa-uninit.c (pass_late_warn_uninitialized): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_late_warn_uninitialized): ...new pass_data instance and... (make_pass_late_warn_uninitialized): ...new function. * tree-ssa.c (pass_init_datastructures): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_init_datastructures): ...new pass_data instance and... (make_pass_init_datastructures): ...new function. (pass_early_warn_uninitialized): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_warn_uninitialized): ...new pass_data instance and... (make_pass_early_warn_uninitialized): ...new function. (pass_update_address_taken): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_update_address_taken): ...new pass_data instance and... (make_pass_update_address_taken): ...new function. * tree-ssanames.c (pass_release_ssa_names): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_release_ssa_names): ...new pass_data instance and... (make_pass_release_ssa_names): ...new function. * tree-stdarg.c (pass_stdarg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_stdarg): ...new pass_data instance and... (make_pass_stdarg): ...new function. * tree-switch-conversion.c (pass_convert_switch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_convert_switch): ...new pass_data instance and... (make_pass_convert_switch): ...new function. * tree-tailcall.c (pass_tail_recursion): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tail_recursion): ...new pass_data instance and... (make_pass_tail_recursion): ...new function. (pass_tail_calls): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tail_calls): ...new pass_data instance and... (make_pass_tail_calls): ...new function. * tree-vect-generic.c (pass_lower_vector): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_vector): ...new pass_data instance and... (make_pass_lower_vector): ...new function. (pass_lower_vector_ssa): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_vector_ssa): ...new pass_data instance and... (make_pass_lower_vector_ssa): ...new function. * tree-vectorizer.c (pass_slp_vectorize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_slp_vectorize): ...new pass_data instance and... (make_pass_slp_vectorize): ...new function. (pass_ipa_increase_alignment): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_increase_alignment): ...new pass_data instance and... (make_pass_ipa_increase_alignment): ...new function. * tree-vrp.c (pass_vrp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_vrp): ...new pass_data instance and... (make_pass_vrp): ...new function. * tree.c (pass_ipa_free_lang_data): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_free_lang_data): ...new pass_data instance and... (make_pass_ipa_free_lang_data): ...new function. * tsan.c (pass_tsan): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tsan): ...new pass_data instance and... (make_pass_tsan): ...new function. (pass_tsan_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tsan_O0): ...new pass_data instance and... (make_pass_tsan_O0): ...new function. * var-tracking.c (pass_variable_tracking): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_variable_tracking): ...new pass_data instance and... (make_pass_variable_tracking): ...new function. * web.c (pass_web): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_web): ...new pass_data instance and... (make_pass_web): ...new function. * config/epiphany/epiphany.h (pass_mode_switch_use): Replace declaration with that of... (make_pass_mode_switch_use): ...new function. (pass_resolve_sw_modes): Replace declaration with that of... (make_pass_resolve_sw_modes): ...new function. * config/epiphany/mode-switch-use.c (pass_mode_switch_use): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mode_switch_use): ...new pass_data instance and... (make_pass_mode_switch_use): ...new function. * config/epiphany/resolve-sw-modes.c (pass_resolve_sw_modes): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_resolve_sw_modes): ...new pass_data instance and... (make_pass_resolve_sw_modes): ...new function. * config/i386/i386.c (pass_insert_vzeroupper): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_insert_vzeroupper): ...new pass_data instance and... (make_pass_insert_vzeroupper): ...new function. * config/sparc/sparc.c (pass_work_around_errata): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_work_around_errata): ...new pass_data instance and... (make_pass_work_around_errata): ...new function. * config/mips/mips.c (pass_mips_machine_reorg2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mips_machine_reorg2): ...new pass_data instance and... (make_pass_mips_machine_reorg2): ...new function. gcc/testsuite/ Patch autogenerated by refactor_passes.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 03fe39476a4c4ea450b49e087cfa817b5f92021e * gcc.dg/plugin/one_time_plugin.c (one_pass): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_one_pass): ...new pass_data instance and... (make_one_pass): ...new function. * gcc.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_self_assign): ...new pass_data instance and... (make_pass_warn_self_assign): ...new function. * g++.dg/plugin/dumb_plugin.c (pass_dumb_plugin_example): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dumb_plugin_example): ...new pass_data instance and... (make_pass_dumb_plugin_example): ...new function. * g++.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_self_assign): ...new pass_data instance and... (make_pass_warn_self_assign): ...new function. From-SVN: r201508
2013-08-05 22:16:05 +02:00
namespace {
const pass_data pass_data_reginfo_init =
invoke.texi (-fsched-pressure): Document it. 2009-09-02 Vladimir Makarov <vmakarov@redhat.com> * doc/invoke.texi (-fsched-pressure): Document it. (-fsched-reg-pressure-heuristic): Remove it. * reload.c (ira.h): Include. (find_reloads): Add choosing reload on number of small spilled classes. * haifa-sched.c (ira.h): Include. (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure, saved_reg_pressure, curr_reg_live, saved_reg_live, region_ref_regs): New variables. (sched_init_region_reg_pressure_info, mark_regno_birth_or_death, initiate_reg_pressure_info, setup_ref_regs, initiate_bb_reg_pressure_info, save_reg_pressure, restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New functions. (setup_insn_reg_pressure_info): New function. (rank_for_schedule): Add pressure checking and insn issue time. Remove comparison of insn reg weights. (ready_sort): Set insn reg pressure info. (update_register_pressure, setup_insn_max_reg_pressure, update_reg_and_insn_max_reg_pressure, sched_setup_bb_reg_pressure_info): New functions. (schedule_insn): Add code for printing and updating reg pressure info. (find_set_reg_weight, find_insn_reg_weight): Remove. (ok_for_early_queue_removal): Do nothing if pressure_only_p. (debug_ready_list): Print reg pressure info. (schedule_block): Ditto. Check insn issue time. (sched_init): Set up sched_pressure_p. Allocate and set up some reg pressure related info. (sched_finish): Free some reg pressure related info. (fix_tick_ready): Make insn always ready if pressure_p. (init_h_i_d): Don't call find_insn_reg_weight. (haifa_finish_h_i_d): Free insn reg pressure info. * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move to ira.h. * ira-lives.c (single_reg_class): Check mode to find how many registers are necessary for operand. (ira_implicitly_set_insn_hard_regs): New. * common.opt (fsched-pressure): New options. (fsched-reg-pressure-heuristic): Remove. * ira.c (setup_eliminable_regset): Rename to ira_setup_eliminable_regset. Make it external. (expand_reg_info): Pass cover class to setup_reg_classes. (ira): Call resize_reg_info instead of allocate_reg_info. * sched-deps.c: Include ira.h. (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New. (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses, reg_pressure_info, insn_use_p, mark_insn_pseudo_birth, mark_insn_hard_regno_birth, mark_insn_reg_birth, mark_pseudo_death, mark_hard_regno_death, mark_reg_death, mark_insn_reg_store, mark_insn_reg_clobber, setup_insn_reg_pressure_info): New. (sched_analyze_1): Update implicit_reg_pending_uses. (sched_analyze_insn): Find implicit sets, uses, clobbers of regs. Use them to create dependencies. Set insn reg uses and pressure info. Process reg_pending_uses in one place. (free_deps): Free implicit sets. (remove_from_deps): Remove implicit sets if necessary. Check implicit sets when clearing reg_last_in_use. (init_deps_global): Clear implicit_reg_pending_clobbers and implicit_reg_pending_uses. * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move from ira-int.h. (ira_setup_eliminable_regset, ira_set_pseudo_classes, ira_implicitly_set_insn_hard_regs): New prototypes. * ira-costs.c (pseudo_classes_defined_p, allocno_p, cost_elements_num): New variables. (allocno_costs, total_costs): Rename to costs and total_allocno_costs. (COSTS_OF_ALLOCNO): Rename to COSTS. (allocno_pref): Rename to pref. (allocno_pref_buffer): Rename to pref_buffer. (common_classes): Rename to regno_cover_class. (COST_INDEX): New. (record_reg_classes): Set allocno attributes only if allocno_p. (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM. (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM and COSTS_OF_ALLOCNO. (print_costs): Rename to print_allocno_costs. (print_pseudo_costs): New. (process_bb_node_for_costs): Split into 2 functions with new function process_bb_for_costs. Pass BB to process_bb_for_costs. (find_allocno_class_costs): Rename to find_costs_and_classes. Add new parameter dump_file. Use cost_elements_num instead of ira_allocnos_num. Make one iteration if preferred classes were already calculated for scheduler. Make 2 versions of code depending on allocno_p. (setup_allocno_cover_class_and_costs): Check allocno_p. Use regno_cover_class and COSTS instead of common_classes and COSTS_OF_ALLOCNO. (init_costs, finish_costs): New. (ira_costs): Set up allocno_p and cost_elements_num. Call init_costs and finish_costs. (ira_set_pseudo_classes): New. * rtl.h (allocate_reg_info): Remove. (resize_reg_info): Change return type. (reg_cover_class): New. (setup_reg_classes): Add new parameter. * sched-int.h (struct deps_reg): New member implicit_sets. (sched_pressure_p, sched_regno_cover_class): New external definitions. (INCREASE_BITS): New macro. (struct reg_pressure_data, struct reg_use_data): New. (struct _haifa_insn_data): Remove reg_weight. Add members reg_pressure, reg_use_list, reg_set_list, and reg_pressure_excess_cost_change. (struct deps): New member implicit_sets. (pressure_p): New variable. (COVER_CLASS_BITS, INCREASE_BITS): New macros. (struct reg_pressure_data, struct reg_use_data): New. (INSN_REG_WEIGHT): Remove. (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST, INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros. (sched_init_region_reg_pressure_info, sched_setup_bb_reg_pressure_info): New prototypes. * reginfo.c (struct reg_pref): New member coverclass. (reg_cover_class): New function. (reginfo_init, pass_reginfo_init): Move after free_reg_info. (reg_info_size): New variable. (allocate_reg_info): Make static. Setup reg_info_size. (resize_reg_info): Use reg_info_size. Return flag of resizing. (setup_reg_classes): Add a new parameter. Setup cover class too. * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the dependencies. * sched-rgn.c (deps_join): Set up implicit_sets. (schedule_region): Set up region and basic blocks pressure relative info. * passes.c (init_optimization_passes): Move pass_subregs_of_mode_init before pass_sched. From-SVN: r151348
2009-09-02 20:54:25 +02:00
{
Automated conversion of passes to C++ classes gcc/ Patch autogenerated by refactor_passes.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 03fe39476a4c4ea450b49e087cfa817b5f92021e * asan.c (pass_asan): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_asan): ...new pass_data instance and... (make_pass_asan): ...new function. (pass_asan_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_asan_O0): ...new pass_data instance and... (make_pass_asan_O0): ...new function. * auto-inc-dec.c (pass_inc_dec): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_inc_dec): ...new pass_data instance and... (make_pass_inc_dec): ...new function. * bb-reorder.c (pass_reorder_blocks): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reorder_blocks): ...new pass_data instance and... (make_pass_reorder_blocks): ...new function. (pass_duplicate_computed_gotos): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_duplicate_computed_gotos): ...new pass_data instance and... (make_pass_duplicate_computed_gotos): ...new function. (pass_partition_blocks): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_partition_blocks): ...new pass_data instance and... (make_pass_partition_blocks): ...new function. * bt-load.c (pass_branch_target_load_optimize1): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_branch_target_load_optimize1): ...new pass_data instance and... (make_pass_branch_target_load_optimize1): ...new function. (pass_branch_target_load_optimize2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_branch_target_load_optimize2): ...new pass_data instance and... (make_pass_branch_target_load_optimize2): ...new function. * cfgcleanup.c (pass_jump): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_jump): ...new pass_data instance and... (make_pass_jump): ...new function. (pass_jump2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_jump2): ...new pass_data instance and... (make_pass_jump2): ...new function. * cfgexpand.c (pass_expand): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_expand): ...new pass_data instance and... (make_pass_expand): ...new function. * cfgrtl.c (pass_free_cfg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_free_cfg): ...new pass_data instance and... (make_pass_free_cfg): ...new function. (pass_into_cfg_layout_mode): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_into_cfg_layout_mode): ...new pass_data instance and... (make_pass_into_cfg_layout_mode): ...new function. (pass_outof_cfg_layout_mode): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_outof_cfg_layout_mode): ...new pass_data instance and... (make_pass_outof_cfg_layout_mode): ...new function. * cgraphbuild.c (pass_build_cgraph_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_cgraph_edges): ...new pass_data instance and... (make_pass_build_cgraph_edges): ...new function. (pass_rebuild_cgraph_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_rebuild_cgraph_edges): ...new pass_data instance and... (make_pass_rebuild_cgraph_edges): ...new function. (pass_remove_cgraph_callee_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_remove_cgraph_callee_edges): ...new pass_data instance and... (make_pass_remove_cgraph_callee_edges): ...new function. * combine-stack-adj.c (pass_stack_adjustments): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_adjustments): ...new pass_data instance and... (make_pass_stack_adjustments): ...new function. * combine.c (pass_combine): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_combine): ...new pass_data instance and... (make_pass_combine): ...new function. * compare-elim.c (pass_compare_elim_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_compare_elim_after_reload): ...new pass_data instance and... (make_pass_compare_elim_after_reload): ...new function. * cprop.c (pass_rtl_cprop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_cprop): ...new pass_data instance and... (make_pass_rtl_cprop): ...new function. * cse.c (pass_cse): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse): ...new pass_data instance and... (make_pass_cse): ...new function. (pass_cse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse2): ...new pass_data instance and... (make_pass_cse2): ...new function. (pass_cse_after_global_opts): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse_after_global_opts): ...new pass_data instance and... (make_pass_cse_after_global_opts): ...new function. * dce.c (pass_ud_rtl_dce): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ud_rtl_dce): ...new pass_data instance and... (make_pass_ud_rtl_dce): ...new function. (pass_fast_rtl_dce): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_fast_rtl_dce): ...new pass_data instance and... (make_pass_fast_rtl_dce): ...new function. * df-core.c (pass_df_initialize_opt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_initialize_opt): ...new pass_data instance and... (make_pass_df_initialize_opt): ...new function. (pass_df_initialize_no_opt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_initialize_no_opt): ...new pass_data instance and... (make_pass_df_initialize_no_opt): ...new function. (pass_df_finish): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_finish): ...new pass_data instance and... (make_pass_df_finish): ...new function. * dse.c (pass_rtl_dse1): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_dse1): ...new pass_data instance and... (make_pass_rtl_dse1): ...new function. (pass_rtl_dse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_dse2): ...new pass_data instance and... (make_pass_rtl_dse2): ...new function. * dwarf2cfi.c (pass_dwarf2_frame): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_dwarf2_frame): ...new pass_data instance and... (make_pass_dwarf2_frame): ...new function. * except.c (pass_set_nothrow_function_flags): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_set_nothrow_function_flags): ...new pass_data instance and... (make_pass_set_nothrow_function_flags): ...new function. (pass_convert_to_eh_region_ranges): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_convert_to_eh_region_ranges): ...new pass_data instance and... (make_pass_convert_to_eh_region_ranges): ...new function. * final.c (pass_compute_alignments): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_compute_alignments): ...new pass_data instance and... (make_pass_compute_alignments): ...new function. (pass_final): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_final): ...new pass_data instance and... (make_pass_final): ...new function. (pass_shorten_branches): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_shorten_branches): ...new pass_data instance and... (make_pass_shorten_branches): ...new function. (pass_clean_state): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_clean_state): ...new pass_data instance and... (make_pass_clean_state): ...new function. * function.c (pass_instantiate_virtual_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_instantiate_virtual_regs): ...new pass_data instance and... (make_pass_instantiate_virtual_regs): ...new function. (pass_leaf_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_leaf_regs): ...new pass_data instance and... (make_pass_leaf_regs): ...new function. (pass_thread_prologue_and_epilogue): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_thread_prologue_and_epilogue): ...new pass_data instance and... (make_pass_thread_prologue_and_epilogue): ...new function. (pass_match_asm_constraints): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_match_asm_constraints): ...new pass_data instance and... (make_pass_match_asm_constraints): ...new function. * fwprop.c (pass_rtl_fwprop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_fwprop): ...new pass_data instance and... (make_pass_rtl_fwprop): ...new function. (pass_rtl_fwprop_addr): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_fwprop_addr): ...new pass_data instance and... (make_pass_rtl_fwprop_addr): ...new function. * gcse.c (pass_rtl_pre): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_pre): ...new pass_data instance and... (make_pass_rtl_pre): ...new function. (pass_rtl_hoist): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_hoist): ...new pass_data instance and... (make_pass_rtl_hoist): ...new function. * gimple-low.c (pass_lower_cf): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_cf): ...new pass_data instance and... (make_pass_lower_cf): ...new function. * gimple-ssa-strength-reduction.c (pass_strength_reduction): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strength_reduction): ...new pass_data instance and... (make_pass_strength_reduction): ...new function. * ifcvt.c (pass_rtl_ifcvt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_ifcvt): ...new pass_data instance and... (make_pass_rtl_ifcvt): ...new function. (pass_if_after_combine): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_if_after_combine): ...new pass_data instance and... (make_pass_if_after_combine): ...new function. (pass_if_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_if_after_reload): ...new pass_data instance and... (make_pass_if_after_reload): ...new function. * init-regs.c (pass_initialize_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_initialize_regs): ...new pass_data instance and... (make_pass_initialize_regs): ...new function. * ipa-cp.c (pass_ipa_cp): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_cp): ...new pass_data instance and... (make_pass_ipa_cp): ...new function. * ipa-inline-analysis.c (pass_inline_parameters): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_inline_parameters): ...new pass_data instance and... (make_pass_inline_parameters): ...new function. * ipa-inline.c (pass_early_inline): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_inline): ...new pass_data instance and... (make_pass_early_inline): ...new function. (pass_ipa_inline): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_inline): ...new pass_data instance and... (make_pass_ipa_inline): ...new function. * ipa-pure-const.c (pass_local_pure_const): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_local_pure_const): ...new pass_data instance and... (make_pass_local_pure_const): ...new function. (pass_ipa_pure_const): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_pure_const): ...new pass_data instance and... (make_pass_ipa_pure_const): ...new function. * ipa-reference.c (pass_ipa_reference): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_reference): ...new pass_data instance and... (make_pass_ipa_reference): ...new function. * ipa-split.c (pass_split_functions): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_split_functions): ...new pass_data instance and... (make_pass_split_functions): ...new function. (pass_feedback_split_functions): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_feedback_split_functions): ...new pass_data instance and... (make_pass_feedback_split_functions): ...new function. * ipa.c (pass_ipa_function_and_variable_visibility): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_function_and_variable_visibility): ...new pass_data instance and... (make_pass_ipa_function_and_variable_visibility): ...new function. (pass_ipa_free_inline_summary): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_free_inline_summary): ...new pass_data instance and... (make_pass_ipa_free_inline_summary): ...new function. (pass_ipa_whole_program_visibility): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_whole_program_visibility): ...new pass_data instance and... (make_pass_ipa_whole_program_visibility): ...new function. (pass_ipa_profile): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_profile): ...new pass_data instance and... (make_pass_ipa_profile): ...new function. (pass_ipa_cdtor_merge): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_cdtor_merge): ...new pass_data instance and... (make_pass_ipa_cdtor_merge): ...new function. * ira.c (pass_ira): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ira): ...new pass_data instance and... (make_pass_ira): ...new function. (pass_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reload): ...new pass_data instance and... (make_pass_reload): ...new function. * jump.c (pass_cleanup_barriers): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cleanup_barriers): ...new pass_data instance and... (make_pass_cleanup_barriers): ...new function. * loop-init.c (pass_loop2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_loop2): ...new pass_data instance and... (make_pass_loop2): ...new function. (pass_rtl_loop_init): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_loop_init): ...new pass_data instance and... (make_pass_rtl_loop_init): ...new function. (pass_rtl_loop_done): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_loop_done): ...new pass_data instance and... (make_pass_rtl_loop_done): ...new function. (pass_rtl_move_loop_invariants): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_move_loop_invariants): ...new pass_data instance and... (make_pass_rtl_move_loop_invariants): ...new function. (pass_rtl_unswitch): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_unswitch): ...new pass_data instance and... (make_pass_rtl_unswitch): ...new function. (pass_rtl_unroll_and_peel_loops): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_unroll_and_peel_loops): ...new pass_data instance and... (make_pass_rtl_unroll_and_peel_loops): ...new function. (pass_rtl_doloop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_doloop): ...new pass_data instance and... (make_pass_rtl_doloop): ...new function. * lower-subreg.c (pass_lower_subreg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_lower_subreg): ...new pass_data instance and... (make_pass_lower_subreg): ...new function. (pass_lower_subreg2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_lower_subreg2): ...new pass_data instance and... (make_pass_lower_subreg2): ...new function. * lto-streamer-out.c (pass_ipa_lto_gimple_out): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_lto_gimple_out): ...new pass_data instance and... (make_pass_ipa_lto_gimple_out): ...new function. (pass_ipa_lto_finish_out): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_lto_finish_out): ...new pass_data instance and... (make_pass_ipa_lto_finish_out): ...new function. * mode-switching.c (pass_mode_switching): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mode_switching): ...new pass_data instance and... (make_pass_mode_switching): ...new function. * modulo-sched.c (pass_sms): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sms): ...new pass_data instance and... (make_pass_sms): ...new function. * omp-low.c (pass_expand_omp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_expand_omp): ...new pass_data instance and... (make_pass_expand_omp): ...new function. (pass_lower_omp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_omp): ...new pass_data instance and... (make_pass_lower_omp): ...new function. (pass_diagnose_omp_blocks): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_diagnose_omp_blocks): ...new pass_data instance and... (make_pass_diagnose_omp_blocks): ...new function. * passes.c (pass_early_local_passes): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_early_local_passes): ...new pass_data instance and... (make_pass_early_local_passes): ...new function. (pass_all_early_optimizations): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_early_optimizations): ...new pass_data instance and... (make_pass_all_early_optimizations): ...new function. (pass_all_optimizations): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_optimizations): ...new pass_data instance and... (make_pass_all_optimizations): ...new function. (pass_all_optimizations_g): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_optimizations_g): ...new pass_data instance and... (make_pass_all_optimizations_g): ...new function. (pass_rest_of_compilation): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rest_of_compilation): ...new pass_data instance and... (make_pass_rest_of_compilation): ...new function. (pass_postreload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_postreload): ...new pass_data instance and... (make_pass_postreload): ...new function. * postreload-gcse.c (pass_gcse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_gcse2): ...new pass_data instance and... (make_pass_gcse2): ...new function. * postreload.c (pass_postreload_cse): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_postreload_cse): ...new pass_data instance and... (make_pass_postreload_cse): ...new function. * predict.c (pass_profile): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_profile): ...new pass_data instance and... (make_pass_profile): ...new function. (pass_strip_predict_hints): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strip_predict_hints): ...new pass_data instance and... (make_pass_strip_predict_hints): ...new function. * recog.c (pass_peephole2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_peephole2): ...new pass_data instance and... (make_pass_peephole2): ...new function. (pass_split_all_insns): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_all_insns): ...new pass_data instance and... (make_pass_split_all_insns): ...new function. (pass_split_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_after_reload): ...new pass_data instance and... (make_pass_split_after_reload): ...new function. (pass_split_before_regstack): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_before_regstack): ...new pass_data instance and... (make_pass_split_before_regstack): ...new function. (pass_split_before_sched2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_before_sched2): ...new pass_data instance and... (make_pass_split_before_sched2): ...new function. (pass_split_for_shorten_branches): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_for_shorten_branches): ...new pass_data instance and... (make_pass_split_for_shorten_branches): ...new function. * ree.c (pass_ree): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ree): ...new pass_data instance and... (make_pass_ree): ...new function. * reg-stack.c (pass_stack_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_regs): ...new pass_data instance and... (make_pass_stack_regs): ...new function. (pass_stack_regs_run): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_regs_run): ...new pass_data instance and... (make_pass_stack_regs_run): ...new function. * regcprop.c (pass_cprop_hardreg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cprop_hardreg): ...new pass_data instance and... (make_pass_cprop_hardreg): ...new function. * reginfo.c (pass_reginfo_init): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reginfo_init): ...new pass_data instance and... (make_pass_reginfo_init): ...new function. * regmove.c (pass_regmove): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_regmove): ...new pass_data instance and... (make_pass_regmove): ...new function. * regrename.c (pass_regrename): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_regrename): ...new pass_data instance and... (make_pass_regrename): ...new function. * reorg.c (pass_delay_slots): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_delay_slots): ...new pass_data instance and... (make_pass_delay_slots): ...new function. (pass_machine_reorg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_machine_reorg): ...new pass_data instance and... (make_pass_machine_reorg): ...new function. * sched-rgn.c (pass_sched): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sched): ...new pass_data instance and... (make_pass_sched): ...new function. (pass_sched2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sched2): ...new pass_data instance and... (make_pass_sched2): ...new function. * stack-ptr-mod.c (pass_stack_ptr_mod): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_ptr_mod): ...new pass_data instance and... (make_pass_stack_ptr_mod): ...new function. * store-motion.c (pass_rtl_store_motion): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_store_motion): ...new pass_data instance and... (make_pass_rtl_store_motion): ...new function. * tracer.c (pass_tracer): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tracer): ...new pass_data instance and... (make_pass_tracer): ...new function. * trans-mem.c (pass_diagnose_tm_blocks): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_diagnose_tm_blocks): ...new pass_data instance and... (make_pass_diagnose_tm_blocks): ...new function. (pass_lower_tm): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_tm): ...new pass_data instance and... (make_pass_lower_tm): ...new function. (pass_tm_init): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_init): ...new pass_data instance and... (make_pass_tm_init): ...new function. (pass_tm_mark): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_mark): ...new pass_data instance and... (make_pass_tm_mark): ...new function. (pass_tm_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_edges): ...new pass_data instance and... (make_pass_tm_edges): ...new function. (pass_tm_memopt): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_memopt): ...new pass_data instance and... (make_pass_tm_memopt): ...new function. (pass_ipa_tm): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_tm): ...new pass_data instance and... (make_pass_ipa_tm): ...new function. * tree-call-cdce.c (pass_call_cdce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_call_cdce): ...new pass_data instance and... (make_pass_call_cdce): ...new function. * tree-cfg.c (pass_build_cfg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_cfg): ...new pass_data instance and... (make_pass_build_cfg): ...new function. (pass_split_crit_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_split_crit_edges): ...new pass_data instance and... (make_pass_split_crit_edges): ...new function. (pass_warn_function_return): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_function_return): ...new pass_data instance and... (make_pass_warn_function_return): ...new function. (pass_warn_function_noreturn): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_function_noreturn): ...new pass_data instance and... (make_pass_warn_function_noreturn): ...new function. (pass_warn_unused_result): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_unused_result): ...new pass_data instance and... (make_pass_warn_unused_result): ...new function. * tree-cfgcleanup.c (pass_merge_phi): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_merge_phi): ...new pass_data instance and... (make_pass_merge_phi): ...new function. * tree-complex.c (pass_lower_complex): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_complex): ...new pass_data instance and... (make_pass_lower_complex): ...new function. (pass_lower_complex_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_complex_O0): ...new pass_data instance and... (make_pass_lower_complex_O0): ...new function. * tree-eh.c (pass_lower_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_eh): ...new pass_data instance and... (make_pass_lower_eh): ...new function. (pass_refactor_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_refactor_eh): ...new pass_data instance and... (make_pass_refactor_eh): ...new function. (pass_lower_resx): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_resx): ...new pass_data instance and... (make_pass_lower_resx): ...new function. (pass_lower_eh_dispatch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_eh_dispatch): ...new pass_data instance and... (make_pass_lower_eh_dispatch): ...new function. (pass_cleanup_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cleanup_eh): ...new pass_data instance and... (make_pass_cleanup_eh): ...new function. * tree-emutls.c (pass_ipa_lower_emutls): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_lower_emutls): ...new pass_data instance and... (make_pass_ipa_lower_emutls): ...new function. * tree-if-conv.c (pass_if_conversion): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_if_conversion): ...new pass_data instance and... (make_pass_if_conversion): ...new function. * tree-into-ssa.c (pass_build_ssa): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_ssa): ...new pass_data instance and... (make_pass_build_ssa): ...new function. * tree-loop-distribution.c (pass_loop_distribution): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_loop_distribution): ...new pass_data instance and... (make_pass_loop_distribution): ...new function. * tree-mudflap.c (pass_mudflap_1): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_1): ...new pass_data instance and... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_2): ...new pass_data instance and... (make_pass_mudflap_2): ...new function. * tree-nomudflap.c (pass_mudflap_1): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_1): ...new pass_data instance and... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_2): ...new pass_data instance and... (make_pass_mudflap_2): ...new function. * tree-nrv.c (pass_nrv): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_nrv): ...new pass_data instance and... (make_pass_nrv): ...new function. (pass_return_slot): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_return_slot): ...new pass_data instance and... (make_pass_return_slot): ...new function. * tree-object-size.c (pass_object_sizes): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_object_sizes): ...new pass_data instance and... (make_pass_object_sizes): ...new function. * tree-optimize.c (pass_cleanup_cfg_post_optimizing): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cleanup_cfg_post_optimizing): ...new pass_data instance and... (make_pass_cleanup_cfg_post_optimizing): ...new function. (pass_fixup_cfg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fixup_cfg): ...new pass_data instance and... (make_pass_fixup_cfg): ...new function. * tree-pass.h (pass_mudflap_1): Replace declaration with that of... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Replace declaration with that of... (make_pass_mudflap_2): ...new function. (pass_asan): Replace declaration with that of... (make_pass_asan): ...new function. (pass_asan_O0): Replace declaration with that of... (make_pass_asan_O0): ...new function. (pass_tsan): Replace declaration with that of... (make_pass_tsan): ...new function. (pass_tsan_O0): Replace declaration with that of... (make_pass_tsan_O0): ...new function. (pass_lower_cf): Replace declaration with that of... (make_pass_lower_cf): ...new function. (pass_refactor_eh): Replace declaration with that of... (make_pass_refactor_eh): ...new function. (pass_lower_eh): Replace declaration with that of... (make_pass_lower_eh): ...new function. (pass_lower_eh_dispatch): Replace declaration with that of... (make_pass_lower_eh_dispatch): ...new function. (pass_lower_resx): Replace declaration with that of... (make_pass_lower_resx): ...new function. (pass_build_cfg): Replace declaration with that of... (make_pass_build_cfg): ...new function. (pass_early_tree_profile): Replace declaration with that of... (make_pass_early_tree_profile): ...new function. (pass_cleanup_eh): Replace declaration with that of... (make_pass_cleanup_eh): ...new function. (pass_sra): Replace declaration with that of... (make_pass_sra): ...new function. (pass_sra_early): Replace declaration with that of... (make_pass_sra_early): ...new function. (pass_early_ipa_sra): Replace declaration with that of... (make_pass_early_ipa_sra): ...new function. (pass_tail_recursion): Replace declaration with that of... (make_pass_tail_recursion): ...new function. (pass_tail_calls): Replace declaration with that of... (make_pass_tail_calls): ...new function. (pass_tree_loop): Replace declaration with that of... (make_pass_tree_loop): ...new function. (pass_tree_loop_init): Replace declaration with that of... (make_pass_tree_loop_init): ...new function. (pass_lim): Replace declaration with that of... (make_pass_lim): ...new function. (pass_tree_unswitch): Replace declaration with that of... (make_pass_tree_unswitch): ...new function. (pass_predcom): Replace declaration with that of... (make_pass_predcom): ...new function. (pass_iv_canon): Replace declaration with that of... (make_pass_iv_canon): ...new function. (pass_scev_cprop): Replace declaration with that of... (make_pass_scev_cprop): ...new function. (pass_empty_loop): Replace declaration with that of... (make_pass_empty_loop): ...new function. (pass_record_bounds): Replace declaration with that of... (make_pass_record_bounds): ...new function. (pass_graphite): Replace declaration with that of... (make_pass_graphite): ...new function. (pass_graphite_transforms): Replace declaration with that of... (make_pass_graphite_transforms): ...new function. (pass_if_conversion): Replace declaration with that of... (make_pass_if_conversion): ...new function. (pass_loop_distribution): Replace declaration with that of... (make_pass_loop_distribution): ...new function. (pass_vectorize): Replace declaration with that of... (make_pass_vectorize): ...new function. (pass_slp_vectorize): Replace declaration with that of... (make_pass_slp_vectorize): ...new function. (pass_complete_unroll): Replace declaration with that of... (make_pass_complete_unroll): ...new function. (pass_complete_unrolli): Replace declaration with that of... (make_pass_complete_unrolli): ...new function. (pass_parallelize_loops): Replace declaration with that of... (make_pass_parallelize_loops): ...new function. (pass_loop_prefetch): Replace declaration with that of... (make_pass_loop_prefetch): ...new function. (pass_iv_optimize): Replace declaration with that of... (make_pass_iv_optimize): ...new function. (pass_tree_loop_done): Replace declaration with that of... (make_pass_tree_loop_done): ...new function. (pass_ch): Replace declaration with that of... (make_pass_ch): ...new function. (pass_ccp): Replace declaration with that of... (make_pass_ccp): ...new function. (pass_phi_only_cprop): Replace declaration with that of... (make_pass_phi_only_cprop): ...new function. (pass_build_ssa): Replace declaration with that of... (make_pass_build_ssa): ...new function. (pass_build_alias): Replace declaration with that of... (make_pass_build_alias): ...new function. (pass_build_ealias): Replace declaration with that of... (make_pass_build_ealias): ...new function. (pass_dominator): Replace declaration with that of... (make_pass_dominator): ...new function. (pass_dce): Replace declaration with that of... (make_pass_dce): ...new function. (pass_dce_loop): Replace declaration with that of... (make_pass_dce_loop): ...new function. (pass_cd_dce): Replace declaration with that of... (make_pass_cd_dce): ...new function. (pass_call_cdce): Replace declaration with that of... (make_pass_call_cdce): ...new function. (pass_merge_phi): Replace declaration with that of... (make_pass_merge_phi): ...new function. (pass_split_crit_edges): Replace declaration with that of... (make_pass_split_crit_edges): ...new function. (pass_pre): Replace declaration with that of... (make_pass_pre): ...new function. (pass_profile): Replace declaration with that of... (make_pass_profile): ...new function. (pass_strip_predict_hints): Replace declaration with that of... (make_pass_strip_predict_hints): ...new function. (pass_lower_complex_O0): Replace declaration with that of... (make_pass_lower_complex_O0): ...new function. (pass_lower_complex): Replace declaration with that of... (make_pass_lower_complex): ...new function. (pass_lower_vector): Replace declaration with that of... (make_pass_lower_vector): ...new function. (pass_lower_vector_ssa): Replace declaration with that of... (make_pass_lower_vector_ssa): ...new function. (pass_lower_omp): Replace declaration with that of... (make_pass_lower_omp): ...new function. (pass_diagnose_omp_blocks): Replace declaration with that of... (make_pass_diagnose_omp_blocks): ...new function. (pass_expand_omp): Replace declaration with that of... (make_pass_expand_omp): ...new function. (pass_expand_omp_ssa): Replace declaration with that of... (make_pass_expand_omp_ssa): ...new function. (pass_object_sizes): Replace declaration with that of... (make_pass_object_sizes): ...new function. (pass_strlen): Replace declaration with that of... (make_pass_strlen): ...new function. (pass_fold_builtins): Replace declaration with that of... (make_pass_fold_builtins): ...new function. (pass_stdarg): Replace declaration with that of... (make_pass_stdarg): ...new function. (pass_early_warn_uninitialized): Replace declaration with that of... (make_pass_early_warn_uninitialized): ...new function. (pass_late_warn_uninitialized): Replace declaration with that of... (make_pass_late_warn_uninitialized): ...new function. (pass_cse_reciprocals): Replace declaration with that of... (make_pass_cse_reciprocals): ...new function. (pass_cse_sincos): Replace declaration with that of... (make_pass_cse_sincos): ...new function. (pass_optimize_bswap): Replace declaration with that of... (make_pass_optimize_bswap): ...new function. (pass_optimize_widening_mul): Replace declaration with that of... (make_pass_optimize_widening_mul): ...new function. (pass_warn_function_return): Replace declaration with that of... (make_pass_warn_function_return): ...new function. (pass_warn_function_noreturn): Replace declaration with that of... (make_pass_warn_function_noreturn): ...new function. (pass_cselim): Replace declaration with that of... (make_pass_cselim): ...new function. (pass_phiopt): Replace declaration with that of... (make_pass_phiopt): ...new function. (pass_forwprop): Replace declaration with that of... (make_pass_forwprop): ...new function. (pass_phiprop): Replace declaration with that of... (make_pass_phiprop): ...new function. (pass_tree_ifcombine): Replace declaration with that of... (make_pass_tree_ifcombine): ...new function. (pass_dse): Replace declaration with that of... (make_pass_dse): ...new function. (pass_nrv): Replace declaration with that of... (make_pass_nrv): ...new function. (pass_rename_ssa_copies): Replace declaration with that of... (make_pass_rename_ssa_copies): ...new function. (pass_sink_code): Replace declaration with that of... (make_pass_sink_code): ...new function. (pass_fre): Replace declaration with that of... (make_pass_fre): ...new function. (pass_check_data_deps): Replace declaration with that of... (make_pass_check_data_deps): ...new function. (pass_copy_prop): Replace declaration with that of... (make_pass_copy_prop): ...new function. (pass_vrp): Replace declaration with that of... (make_pass_vrp): ...new function. (pass_uncprop): Replace declaration with that of... (make_pass_uncprop): ...new function. (pass_return_slot): Replace declaration with that of... (make_pass_return_slot): ...new function. (pass_reassoc): Replace declaration with that of... (make_pass_reassoc): ...new function. (pass_rebuild_cgraph_edges): Replace declaration with that of... (make_pass_rebuild_cgraph_edges): ...new function. (pass_remove_cgraph_callee_edges): Replace declaration with that of... (make_pass_remove_cgraph_callee_edges): ...new function. (pass_build_cgraph_edges): Replace declaration with that of... (make_pass_build_cgraph_edges): ...new function. (pass_local_pure_const): Replace declaration with that of... (make_pass_local_pure_const): ...new function. (pass_tracer): Replace declaration with that of... (make_pass_tracer): ...new function. (pass_warn_unused_result): Replace declaration with that of... (make_pass_warn_unused_result): ...new function. (pass_diagnose_tm_blocks): Replace declaration with that of... (make_pass_diagnose_tm_blocks): ...new function. (pass_lower_tm): Replace declaration with that of... (make_pass_lower_tm): ...new function. (pass_tm_init): Replace declaration with that of... (make_pass_tm_init): ...new function. (pass_tm_mark): Replace declaration with that of... (make_pass_tm_mark): ...new function. (pass_tm_memopt): Replace declaration with that of... (make_pass_tm_memopt): ...new function. (pass_tm_edges): Replace declaration with that of... (make_pass_tm_edges): ...new function. (pass_split_functions): Replace declaration with that of... (make_pass_split_functions): ...new function. (pass_feedback_split_functions): Replace declaration with that of... (make_pass_feedback_split_functions): ...new function. (pass_strength_reduction): Replace declaration with that of... (make_pass_strength_reduction): ...new function. (pass_ipa_lower_emutls): Replace declaration with that of... (make_pass_ipa_lower_emutls): ...new function. (pass_ipa_function_and_variable_visibility): Replace declaration with that of... (make_pass_ipa_function_and_variable_visibility): ...new function. (pass_ipa_tree_profile): Replace declaration with that of... (make_pass_ipa_tree_profile): ...new function. (pass_early_local_passes): Replace declaration with that of... (make_pass_early_local_passes): ...new function. (pass_ipa_whole_program_visibility): Replace declaration with that of... (make_pass_ipa_whole_program_visibility): ...new function. (pass_ipa_lto_gimple_out): Replace declaration with that of... (make_pass_ipa_lto_gimple_out): ...new function. (pass_ipa_increase_alignment): Replace declaration with that of... (make_pass_ipa_increase_alignment): ...new function. (pass_ipa_inline): Replace declaration with that of... (make_pass_ipa_inline): ...new function. (pass_ipa_free_lang_data): Replace declaration with that of... (make_pass_ipa_free_lang_data): ...new function. (pass_ipa_free_inline_summary): Replace declaration with that of... (make_pass_ipa_free_inline_summary): ...new function. (pass_ipa_cp): Replace declaration with that of... (make_pass_ipa_cp): ...new function. (pass_ipa_reference): Replace declaration with that of... (make_pass_ipa_reference): ...new function. (pass_ipa_pure_const): Replace declaration with that of... (make_pass_ipa_pure_const): ...new function. (pass_ipa_pta): Replace declaration with that of... (make_pass_ipa_pta): ...new function. (pass_ipa_lto_finish_out): Replace declaration with that of... (make_pass_ipa_lto_finish_out): ...new function. (pass_ipa_tm): Replace declaration with that of... (make_pass_ipa_tm): ...new function. (pass_ipa_profile): Replace declaration with that of... (make_pass_ipa_profile): ...new function. (pass_ipa_cdtor_merge): Replace declaration with that of... (make_pass_ipa_cdtor_merge): ...new function. (pass_cleanup_cfg_post_optimizing): Replace declaration with that of... (make_pass_cleanup_cfg_post_optimizing): ...new function. (pass_init_datastructures): Replace declaration with that of... (make_pass_init_datastructures): ...new function. (pass_fixup_cfg): Replace declaration with that of... (make_pass_fixup_cfg): ...new function. (pass_expand): Replace declaration with that of... (make_pass_expand): ...new function. (pass_instantiate_virtual_regs): Replace declaration with that of... (make_pass_instantiate_virtual_regs): ...new function. (pass_rtl_fwprop): Replace declaration with that of... (make_pass_rtl_fwprop): ...new function. (pass_rtl_fwprop_addr): Replace declaration with that of... (make_pass_rtl_fwprop_addr): ...new function. (pass_jump): Replace declaration with that of... (make_pass_jump): ...new function. (pass_jump2): Replace declaration with that of... (make_pass_jump2): ...new function. (pass_lower_subreg): Replace declaration with that of... (make_pass_lower_subreg): ...new function. (pass_cse): Replace declaration with that of... (make_pass_cse): ...new function. (pass_fast_rtl_dce): Replace declaration with that of... (make_pass_fast_rtl_dce): ...new function. (pass_ud_rtl_dce): Replace declaration with that of... (make_pass_ud_rtl_dce): ...new function. (pass_rtl_dce): Replace declaration with that of... (make_pass_rtl_dce): ...new function. (pass_rtl_dse1): Replace declaration with that of... (make_pass_rtl_dse1): ...new function. (pass_rtl_dse2): Replace declaration with that of... (make_pass_rtl_dse2): ...new function. (pass_rtl_dse3): Replace declaration with that of... (make_pass_rtl_dse3): ...new function. (pass_rtl_cprop): Replace declaration with that of... (make_pass_rtl_cprop): ...new function. (pass_rtl_pre): Replace declaration with that of... (make_pass_rtl_pre): ...new function. (pass_rtl_hoist): Replace declaration with that of... (make_pass_rtl_hoist): ...new function. (pass_rtl_store_motion): Replace declaration with that of... (make_pass_rtl_store_motion): ...new function. (pass_cse_after_global_opts): Replace declaration with that of... (make_pass_cse_after_global_opts): ...new function. (pass_rtl_ifcvt): Replace declaration with that of... (make_pass_rtl_ifcvt): ...new function. (pass_into_cfg_layout_mode): Replace declaration with that of... (make_pass_into_cfg_layout_mode): ...new function. (pass_outof_cfg_layout_mode): Replace declaration with that of... (make_pass_outof_cfg_layout_mode): ...new function. (pass_loop2): Replace declaration with that of... (make_pass_loop2): ...new function. (pass_rtl_loop_init): Replace declaration with that of... (make_pass_rtl_loop_init): ...new function. (pass_rtl_move_loop_invariants): Replace declaration with that of... (make_pass_rtl_move_loop_invariants): ...new function. (pass_rtl_unswitch): Replace declaration with that of... (make_pass_rtl_unswitch): ...new function. (pass_rtl_unroll_and_peel_loops): Replace declaration with that of... (make_pass_rtl_unroll_and_peel_loops): ...new function. (pass_rtl_doloop): Replace declaration with that of... (make_pass_rtl_doloop): ...new function. (pass_rtl_loop_done): Replace declaration with that of... (make_pass_rtl_loop_done): ...new function. (pass_web): Replace declaration with that of... (make_pass_web): ...new function. (pass_cse2): Replace declaration with that of... (make_pass_cse2): ...new function. (pass_df_initialize_opt): Replace declaration with that of... (make_pass_df_initialize_opt): ...new function. (pass_df_initialize_no_opt): Replace declaration with that of... (make_pass_df_initialize_no_opt): ...new function. (pass_reginfo_init): Replace declaration with that of... (make_pass_reginfo_init): ...new function. (pass_inc_dec): Replace declaration with that of... (make_pass_inc_dec): ...new function. (pass_stack_ptr_mod): Replace declaration with that of... (make_pass_stack_ptr_mod): ...new function. (pass_initialize_regs): Replace declaration with that of... (make_pass_initialize_regs): ...new function. (pass_combine): Replace declaration with that of... (make_pass_combine): ...new function. (pass_if_after_combine): Replace declaration with that of... (make_pass_if_after_combine): ...new function. (pass_ree): Replace declaration with that of... (make_pass_ree): ...new function. (pass_partition_blocks): Replace declaration with that of... (make_pass_partition_blocks): ...new function. (pass_match_asm_constraints): Replace declaration with that of... (make_pass_match_asm_constraints): ...new function. (pass_regmove): Replace declaration with that of... (make_pass_regmove): ...new function. (pass_split_all_insns): Replace declaration with that of... (make_pass_split_all_insns): ...new function. (pass_fast_rtl_byte_dce): Replace declaration with that of... (make_pass_fast_rtl_byte_dce): ...new function. (pass_lower_subreg2): Replace declaration with that of... (make_pass_lower_subreg2): ...new function. (pass_mode_switching): Replace declaration with that of... (make_pass_mode_switching): ...new function. (pass_sms): Replace declaration with that of... (make_pass_sms): ...new function. (pass_sched): Replace declaration with that of... (make_pass_sched): ...new function. (pass_ira): Replace declaration with that of... (make_pass_ira): ...new function. (pass_reload): Replace declaration with that of... (make_pass_reload): ...new function. (pass_clean_state): Replace declaration with that of... (make_pass_clean_state): ...new function. (pass_branch_prob): Replace declaration with that of... (make_pass_branch_prob): ...new function. (pass_value_profile_transformations): Replace declaration with that of... (make_pass_value_profile_transformations): ...new function. (pass_postreload_cse): Replace declaration with that of... (make_pass_postreload_cse): ...new function. (pass_gcse2): Replace declaration with that of... (make_pass_gcse2): ...new function. (pass_split_after_reload): Replace declaration with that of... (make_pass_split_after_reload): ...new function. (pass_branch_target_load_optimize1): Replace declaration with that of... (make_pass_branch_target_load_optimize1): ...new function. (pass_thread_prologue_and_epilogue): Replace declaration with that of... (make_pass_thread_prologue_and_epilogue): ...new function. (pass_stack_adjustments): Replace declaration with that of... (make_pass_stack_adjustments): ...new function. (pass_peephole2): Replace declaration with that of... (make_pass_peephole2): ...new function. (pass_if_after_reload): Replace declaration with that of... (make_pass_if_after_reload): ...new function. (pass_regrename): Replace declaration with that of... (make_pass_regrename): ...new function. (pass_cprop_hardreg): Replace declaration with that of... (make_pass_cprop_hardreg): ...new function. (pass_reorder_blocks): Replace declaration with that of... (make_pass_reorder_blocks): ...new function. (pass_branch_target_load_optimize2): Replace declaration with that of... (make_pass_branch_target_load_optimize2): ...new function. (pass_leaf_regs): Replace declaration with that of... (make_pass_leaf_regs): ...new function. (pass_split_before_sched2): Replace declaration with that of... (make_pass_split_before_sched2): ...new function. (pass_compare_elim_after_reload): Replace declaration with that of... (make_pass_compare_elim_after_reload): ...new function. (pass_sched2): Replace declaration with that of... (make_pass_sched2): ...new function. (pass_stack_regs): Replace declaration with that of... (make_pass_stack_regs): ...new function. (pass_stack_regs_run): Replace declaration with that of... (make_pass_stack_regs_run): ...new function. (pass_df_finish): Replace declaration with that of... (make_pass_df_finish): ...new function. (pass_compute_alignments): Replace declaration with that of... (make_pass_compute_alignments): ...new function. (pass_duplicate_computed_gotos): Replace declaration with that of... (make_pass_duplicate_computed_gotos): ...new function. (pass_variable_tracking): Replace declaration with that of... (make_pass_variable_tracking): ...new function. (pass_free_cfg): Replace declaration with that of... (make_pass_free_cfg): ...new function. (pass_machine_reorg): Replace declaration with that of... (make_pass_machine_reorg): ...new function. (pass_cleanup_barriers): Replace declaration with that of... (make_pass_cleanup_barriers): ...new function. (pass_delay_slots): Replace declaration with that of... (make_pass_delay_slots): ...new function. (pass_split_for_shorten_branches): Replace declaration with that of... (make_pass_split_for_shorten_branches): ...new function. (pass_split_before_regstack): Replace declaration with that of... (make_pass_split_before_regstack): ...new function. (pass_convert_to_eh_region_ranges): Replace declaration with that of... (make_pass_convert_to_eh_region_ranges): ...new function. (pass_shorten_branches): Replace declaration with that of... (make_pass_shorten_branches): ...new function. (pass_set_nothrow_function_flags): Replace declaration with that of... (make_pass_set_nothrow_function_flags): ...new function. (pass_dwarf2_frame): Replace declaration with that of... (make_pass_dwarf2_frame): ...new function. (pass_final): Replace declaration with that of... (make_pass_final): ...new function. (pass_rtl_seqabstr): Replace declaration with that of... (make_pass_rtl_seqabstr): ...new function. (pass_release_ssa_names): Replace declaration with that of... (make_pass_release_ssa_names): ...new function. (pass_early_inline): Replace declaration with that of... (make_pass_early_inline): ...new function. (pass_inline_parameters): Replace declaration with that of... (make_pass_inline_parameters): ...new function. (pass_update_address_taken): Replace declaration with that of... (make_pass_update_address_taken): ...new function. (pass_convert_switch): Replace declaration with that of... (make_pass_convert_switch): ...new function. * tree-profile.c (pass_ipa_tree_profile): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_tree_profile): ...new pass_data instance and... (make_pass_ipa_tree_profile): ...new function. * tree-sra.c (pass_sra_early): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sra_early): ...new pass_data instance and... (make_pass_sra_early): ...new function. (pass_sra): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sra): ...new pass_data instance and... (make_pass_sra): ...new function. (pass_early_ipa_sra): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_ipa_sra): ...new pass_data instance and... (make_pass_early_ipa_sra): ...new function. * tree-ssa-ccp.c (pass_ccp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_ccp): ...new pass_data instance and... (make_pass_ccp): ...new function. (pass_fold_builtins): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fold_builtins): ...new pass_data instance and... (make_pass_fold_builtins): ...new function. * tree-ssa-copy.c (pass_copy_prop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_copy_prop): ...new pass_data instance and... (make_pass_copy_prop): ...new function. * tree-ssa-copyrename.c (pass_rename_ssa_copies): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_rename_ssa_copies): ...new pass_data instance and... (make_pass_rename_ssa_copies): ...new function. * tree-ssa-dce.c (pass_dce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dce): ...new pass_data instance and... (make_pass_dce): ...new function. (pass_dce_loop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dce_loop): ...new pass_data instance and... (make_pass_dce_loop): ...new function. (pass_cd_dce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cd_dce): ...new pass_data instance and... (make_pass_cd_dce): ...new function. * tree-ssa-dom.c (pass_dominator): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dominator): ...new pass_data instance and... (make_pass_dominator): ...new function. (pass_phi_only_cprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phi_only_cprop): ...new pass_data instance and... (make_pass_phi_only_cprop): ...new function. * tree-ssa-dse.c (pass_dse): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dse): ...new pass_data instance and... (make_pass_dse): ...new function. * tree-ssa-forwprop.c (pass_forwprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_forwprop): ...new pass_data instance and... (make_pass_forwprop): ...new function. * tree-ssa-ifcombine.c (pass_tree_ifcombine): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_ifcombine): ...new pass_data instance and... (make_pass_tree_ifcombine): ...new function. * tree-ssa-loop-ch.c (pass_ch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_ch): ...new pass_data instance and... (make_pass_ch): ...new function. * tree-ssa-loop.c (pass_tree_loop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop): ...new pass_data instance and... (make_pass_tree_loop): ...new function. (pass_tree_loop_init): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop_init): ...new pass_data instance and... (make_pass_tree_loop_init): ...new function. (pass_lim): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lim): ...new pass_data instance and... (make_pass_lim): ...new function. (pass_tree_unswitch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_unswitch): ...new pass_data instance and... (make_pass_tree_unswitch): ...new function. (pass_predcom): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_predcom): ...new pass_data instance and... (make_pass_predcom): ...new function. (pass_vectorize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_vectorize): ...new pass_data instance and... (make_pass_vectorize): ...new function. (pass_graphite): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_graphite): ...new pass_data instance and... (make_pass_graphite): ...new function. (pass_graphite_transforms): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_graphite_transforms): ...new pass_data instance and... (make_pass_graphite_transforms): ...new function. (pass_check_data_deps): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_check_data_deps): ...new pass_data instance and... (make_pass_check_data_deps): ...new function. (pass_iv_canon): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_iv_canon): ...new pass_data instance and... (make_pass_iv_canon): ...new function. (pass_scev_cprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_scev_cprop): ...new pass_data instance and... (make_pass_scev_cprop): ...new function. (pass_record_bounds): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_record_bounds): ...new pass_data instance and... (make_pass_record_bounds): ...new function. (pass_complete_unroll): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_complete_unroll): ...new pass_data instance and... (make_pass_complete_unroll): ...new function. (pass_complete_unrolli): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_complete_unrolli): ...new pass_data instance and... (make_pass_complete_unrolli): ...new function. (pass_parallelize_loops): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_parallelize_loops): ...new pass_data instance and... (make_pass_parallelize_loops): ...new function. (pass_loop_prefetch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_loop_prefetch): ...new pass_data instance and... (make_pass_loop_prefetch): ...new function. (pass_iv_optimize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_iv_optimize): ...new pass_data instance and... (make_pass_iv_optimize): ...new function. (pass_tree_loop_done): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop_done): ...new pass_data instance and... (make_pass_tree_loop_done): ...new function. * tree-ssa-math-opts.c (pass_cse_reciprocals): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cse_reciprocals): ...new pass_data instance and... (make_pass_cse_reciprocals): ...new function. (pass_cse_sincos): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cse_sincos): ...new pass_data instance and... (make_pass_cse_sincos): ...new function. (pass_optimize_bswap): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_optimize_bswap): ...new pass_data instance and... (make_pass_optimize_bswap): ...new function. (pass_optimize_widening_mul): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_optimize_widening_mul): ...new pass_data instance and... (make_pass_optimize_widening_mul): ...new function. * tree-ssa-phiopt.c (pass_phiopt): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phiopt): ...new pass_data instance and... (make_pass_phiopt): ...new function. (pass_cselim): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cselim): ...new pass_data instance and... (make_pass_cselim): ...new function. * tree-ssa-phiprop.c (pass_phiprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phiprop): ...new pass_data instance and... (make_pass_phiprop): ...new function. * tree-ssa-pre.c (pass_pre): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_pre): ...new pass_data instance and... (make_pass_pre): ...new function. (pass_fre): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fre): ...new pass_data instance and... (make_pass_fre): ...new function. * tree-ssa-reassoc.c (pass_reassoc): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_reassoc): ...new pass_data instance and... (make_pass_reassoc): ...new function. * tree-ssa-sink.c (pass_sink_code): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sink_code): ...new pass_data instance and... (make_pass_sink_code): ...new function. * tree-ssa-strlen.c (pass_strlen): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strlen): ...new pass_data instance and... (make_pass_strlen): ...new function. * tree-ssa-structalias.c (pass_build_alias): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_alias): ...new pass_data instance and... (make_pass_build_alias): ...new function. (pass_build_ealias): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_ealias): ...new pass_data instance and... (make_pass_build_ealias): ...new function. (pass_ipa_pta): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_pta): ...new pass_data instance and... (make_pass_ipa_pta): ...new function. * tree-ssa-uncprop.c (pass_uncprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_uncprop): ...new pass_data instance and... (make_pass_uncprop): ...new function. * tree-ssa-uninit.c (pass_late_warn_uninitialized): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_late_warn_uninitialized): ...new pass_data instance and... (make_pass_late_warn_uninitialized): ...new function. * tree-ssa.c (pass_init_datastructures): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_init_datastructures): ...new pass_data instance and... (make_pass_init_datastructures): ...new function. (pass_early_warn_uninitialized): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_warn_uninitialized): ...new pass_data instance and... (make_pass_early_warn_uninitialized): ...new function. (pass_update_address_taken): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_update_address_taken): ...new pass_data instance and... (make_pass_update_address_taken): ...new function. * tree-ssanames.c (pass_release_ssa_names): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_release_ssa_names): ...new pass_data instance and... (make_pass_release_ssa_names): ...new function. * tree-stdarg.c (pass_stdarg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_stdarg): ...new pass_data instance and... (make_pass_stdarg): ...new function. * tree-switch-conversion.c (pass_convert_switch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_convert_switch): ...new pass_data instance and... (make_pass_convert_switch): ...new function. * tree-tailcall.c (pass_tail_recursion): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tail_recursion): ...new pass_data instance and... (make_pass_tail_recursion): ...new function. (pass_tail_calls): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tail_calls): ...new pass_data instance and... (make_pass_tail_calls): ...new function. * tree-vect-generic.c (pass_lower_vector): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_vector): ...new pass_data instance and... (make_pass_lower_vector): ...new function. (pass_lower_vector_ssa): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_vector_ssa): ...new pass_data instance and... (make_pass_lower_vector_ssa): ...new function. * tree-vectorizer.c (pass_slp_vectorize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_slp_vectorize): ...new pass_data instance and... (make_pass_slp_vectorize): ...new function. (pass_ipa_increase_alignment): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_increase_alignment): ...new pass_data instance and... (make_pass_ipa_increase_alignment): ...new function. * tree-vrp.c (pass_vrp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_vrp): ...new pass_data instance and... (make_pass_vrp): ...new function. * tree.c (pass_ipa_free_lang_data): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_free_lang_data): ...new pass_data instance and... (make_pass_ipa_free_lang_data): ...new function. * tsan.c (pass_tsan): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tsan): ...new pass_data instance and... (make_pass_tsan): ...new function. (pass_tsan_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tsan_O0): ...new pass_data instance and... (make_pass_tsan_O0): ...new function. * var-tracking.c (pass_variable_tracking): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_variable_tracking): ...new pass_data instance and... (make_pass_variable_tracking): ...new function. * web.c (pass_web): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_web): ...new pass_data instance and... (make_pass_web): ...new function. * config/epiphany/epiphany.h (pass_mode_switch_use): Replace declaration with that of... (make_pass_mode_switch_use): ...new function. (pass_resolve_sw_modes): Replace declaration with that of... (make_pass_resolve_sw_modes): ...new function. * config/epiphany/mode-switch-use.c (pass_mode_switch_use): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mode_switch_use): ...new pass_data instance and... (make_pass_mode_switch_use): ...new function. * config/epiphany/resolve-sw-modes.c (pass_resolve_sw_modes): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_resolve_sw_modes): ...new pass_data instance and... (make_pass_resolve_sw_modes): ...new function. * config/i386/i386.c (pass_insert_vzeroupper): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_insert_vzeroupper): ...new pass_data instance and... (make_pass_insert_vzeroupper): ...new function. * config/sparc/sparc.c (pass_work_around_errata): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_work_around_errata): ...new pass_data instance and... (make_pass_work_around_errata): ...new function. * config/mips/mips.c (pass_mips_machine_reorg2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mips_machine_reorg2): ...new pass_data instance and... (make_pass_mips_machine_reorg2): ...new function. gcc/testsuite/ Patch autogenerated by refactor_passes.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 03fe39476a4c4ea450b49e087cfa817b5f92021e * gcc.dg/plugin/one_time_plugin.c (one_pass): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_one_pass): ...new pass_data instance and... (make_one_pass): ...new function. * gcc.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_self_assign): ...new pass_data instance and... (make_pass_warn_self_assign): ...new function. * g++.dg/plugin/dumb_plugin.c (pass_dumb_plugin_example): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dumb_plugin_example): ...new pass_data instance and... (make_pass_dumb_plugin_example): ...new function. * g++.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_self_assign): ...new pass_data instance and... (make_pass_warn_self_assign): ...new function. From-SVN: r201508
2013-08-05 22:16:05 +02:00
RTL_PASS, /* type */
"reginfo", /* name */
OPTGROUP_NONE, /* optinfo_flags */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
invoke.texi (-fsched-pressure): Document it. 2009-09-02 Vladimir Makarov <vmakarov@redhat.com> * doc/invoke.texi (-fsched-pressure): Document it. (-fsched-reg-pressure-heuristic): Remove it. * reload.c (ira.h): Include. (find_reloads): Add choosing reload on number of small spilled classes. * haifa-sched.c (ira.h): Include. (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure, saved_reg_pressure, curr_reg_live, saved_reg_live, region_ref_regs): New variables. (sched_init_region_reg_pressure_info, mark_regno_birth_or_death, initiate_reg_pressure_info, setup_ref_regs, initiate_bb_reg_pressure_info, save_reg_pressure, restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New functions. (setup_insn_reg_pressure_info): New function. (rank_for_schedule): Add pressure checking and insn issue time. Remove comparison of insn reg weights. (ready_sort): Set insn reg pressure info. (update_register_pressure, setup_insn_max_reg_pressure, update_reg_and_insn_max_reg_pressure, sched_setup_bb_reg_pressure_info): New functions. (schedule_insn): Add code for printing and updating reg pressure info. (find_set_reg_weight, find_insn_reg_weight): Remove. (ok_for_early_queue_removal): Do nothing if pressure_only_p. (debug_ready_list): Print reg pressure info. (schedule_block): Ditto. Check insn issue time. (sched_init): Set up sched_pressure_p. Allocate and set up some reg pressure related info. (sched_finish): Free some reg pressure related info. (fix_tick_ready): Make insn always ready if pressure_p. (init_h_i_d): Don't call find_insn_reg_weight. (haifa_finish_h_i_d): Free insn reg pressure info. * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move to ira.h. * ira-lives.c (single_reg_class): Check mode to find how many registers are necessary for operand. (ira_implicitly_set_insn_hard_regs): New. * common.opt (fsched-pressure): New options. (fsched-reg-pressure-heuristic): Remove. * ira.c (setup_eliminable_regset): Rename to ira_setup_eliminable_regset. Make it external. (expand_reg_info): Pass cover class to setup_reg_classes. (ira): Call resize_reg_info instead of allocate_reg_info. * sched-deps.c: Include ira.h. (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New. (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses, reg_pressure_info, insn_use_p, mark_insn_pseudo_birth, mark_insn_hard_regno_birth, mark_insn_reg_birth, mark_pseudo_death, mark_hard_regno_death, mark_reg_death, mark_insn_reg_store, mark_insn_reg_clobber, setup_insn_reg_pressure_info): New. (sched_analyze_1): Update implicit_reg_pending_uses. (sched_analyze_insn): Find implicit sets, uses, clobbers of regs. Use them to create dependencies. Set insn reg uses and pressure info. Process reg_pending_uses in one place. (free_deps): Free implicit sets. (remove_from_deps): Remove implicit sets if necessary. Check implicit sets when clearing reg_last_in_use. (init_deps_global): Clear implicit_reg_pending_clobbers and implicit_reg_pending_uses. * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move from ira-int.h. (ira_setup_eliminable_regset, ira_set_pseudo_classes, ira_implicitly_set_insn_hard_regs): New prototypes. * ira-costs.c (pseudo_classes_defined_p, allocno_p, cost_elements_num): New variables. (allocno_costs, total_costs): Rename to costs and total_allocno_costs. (COSTS_OF_ALLOCNO): Rename to COSTS. (allocno_pref): Rename to pref. (allocno_pref_buffer): Rename to pref_buffer. (common_classes): Rename to regno_cover_class. (COST_INDEX): New. (record_reg_classes): Set allocno attributes only if allocno_p. (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM. (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM and COSTS_OF_ALLOCNO. (print_costs): Rename to print_allocno_costs. (print_pseudo_costs): New. (process_bb_node_for_costs): Split into 2 functions with new function process_bb_for_costs. Pass BB to process_bb_for_costs. (find_allocno_class_costs): Rename to find_costs_and_classes. Add new parameter dump_file. Use cost_elements_num instead of ira_allocnos_num. Make one iteration if preferred classes were already calculated for scheduler. Make 2 versions of code depending on allocno_p. (setup_allocno_cover_class_and_costs): Check allocno_p. Use regno_cover_class and COSTS instead of common_classes and COSTS_OF_ALLOCNO. (init_costs, finish_costs): New. (ira_costs): Set up allocno_p and cost_elements_num. Call init_costs and finish_costs. (ira_set_pseudo_classes): New. * rtl.h (allocate_reg_info): Remove. (resize_reg_info): Change return type. (reg_cover_class): New. (setup_reg_classes): Add new parameter. * sched-int.h (struct deps_reg): New member implicit_sets. (sched_pressure_p, sched_regno_cover_class): New external definitions. (INCREASE_BITS): New macro. (struct reg_pressure_data, struct reg_use_data): New. (struct _haifa_insn_data): Remove reg_weight. Add members reg_pressure, reg_use_list, reg_set_list, and reg_pressure_excess_cost_change. (struct deps): New member implicit_sets. (pressure_p): New variable. (COVER_CLASS_BITS, INCREASE_BITS): New macros. (struct reg_pressure_data, struct reg_use_data): New. (INSN_REG_WEIGHT): Remove. (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST, INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros. (sched_init_region_reg_pressure_info, sched_setup_bb_reg_pressure_info): New prototypes. * reginfo.c (struct reg_pref): New member coverclass. (reg_cover_class): New function. (reginfo_init, pass_reginfo_init): Move after free_reg_info. (reg_info_size): New variable. (allocate_reg_info): Make static. Setup reg_info_size. (resize_reg_info): Use reg_info_size. Return flag of resizing. (setup_reg_classes): Add a new parameter. Setup cover class too. * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the dependencies. * sched-rgn.c (deps_join): Set up implicit_sets. (schedule_region): Set up region and basic blocks pressure relative info. * passes.c (init_optimization_passes): Move pass_subregs_of_mode_init before pass_sched. From-SVN: r151348
2009-09-02 20:54:25 +02:00
};
[multiple changes] 2008-08-26 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c, ira-color.c, ira-costs.c, ira.h, ira-lives.c, ira.c, ira-conflicts.c, ira-emit.c, ira-int.h: New files. * doc/passes.texi: Describe IRA. * doc/tm.texi (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Describe the new macros. * doc/invoke.texi (ira-max-loops-num): Describe the new parameter. (-fira, -fira-algorithm, -fira-coalesce, -fno-ira-move-spills, -fira-propagate-cost, -fno-ira-share-save-slots, -fno-ira-share-spill-slots, -fira-verbose): Describe new options. * flags.h (ira_algorithm): New enumeration. (flag_ira_algorithm, flag_ira_verbose): New external variable declarations. * postreload.c (gate_handle_postreload): Don't do post reload optimizations unless the reload is completed. * reload.c (push_reload, find_dummy_reload): Use DF_LR_OUT for IRA. * tree-pass.h (pass_ira): New external variable declaration. * reload.h: Add 2008 to the Copyright. * cfgloopanal.c: Include params.h. (estimate_reg_pressure_cost): Decrease cost for IRA optimization mode. * params.h (IRA_MAX_LOOPS_NUM): New macro. * toplev.c (ira.h): New include. (flag_ira_algorithm, flag_ira_verbose): New external variables. (backend_init_target): Call ira_init. (backend_init): Call ira_init_once. (finalize): Call finish_ira_once. * toplev.h (flag_ira, flag_ira_coalesce, flag_ira_move_spills, flag_ira_share_save_slots, flag_ira_share_spill_slots): New external variables. * regs.h (contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): New external variable declarations. (move_table): New typedef. * caller-save.c: Include headers output.h and ira.h. (no_caller_save_reg_set): New global variable. (save_slots_num, save_slots): New variables. (reg_save_code, reg_restore_code, add_stored_regs): Add prototypes. (init_caller_save): Set up no_caller_save_reg_set. (init_save_areas): Reset save_slots_num. (saved_hard_reg): New structure. (hard_reg_map, saved_regs_num, all_saved_regs): New variables. (initiate_saved_hard_regs, new_saved_hard_reg, finish_saved_hard_regs, saved_hard_reg_compare_func): New functions. (setup_save_areas): Add code for sharing stack slots. (all_blocks): New variable. (save_call_clobbered_regs): Process pseudo-register too. (mark_set_regs): Process pseudo-register too. (insert_one_insn): Put the insn after bb note in a empty basic block. Add insn check. * global.c (eliminable_regset): Make it external. (mark_elimination): Use DF_LR_IN for IRA. (pseudo_for_reload_consideration_p): New. (build_insn_chain): Make it external. Don't ignore spilled pseudos for IRA. Use pseudo_for_reload_consideration_p. (gate_handle_global_alloc): New function. (pass_global_alloc): Add the gate function. * opts.c (decode_options): Set up flag_ira. Print the warning for -fira. (common_handle_option): Process -fira-algorithm and -fira-verbose. * timevar.def (TV_IRA, TV_RELOAD): New passes. * regmove.c (regmove_optimize): Don't do replacement of output for IRA. * hard-reg-set.h (no_caller_save_reg_set, reg_class_subclasses): New external variable declarations. * local-alloc.c (update_equiv_regs): Make it external. Return true if jump label rebuilding should be done. Rescan new_insn for notes. (gate_handle_local_alloc): New function. (pass_local_alloc): Add the gate function. * alias.c (value_addr_p, stack_addr_p): New functions. (nonoverlapping_memrefs_p): Use them for IRA. * common.opt (fira, fira-algorithm, fira-coalesce, fira-move-spills, fira-share-save-slots, fira-share-spill-slots, fira-verbose): New options. * regclass.c (reg_class_subclasses, contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): Make the variables external. (move_table): Remove typedef. (init_move_cost): Make it external. (allocate_reg_info, resize_reg_info, setup_reg_classes): New functions. * rtl.h (init_move_cost, allocate_reg_info, resize_reg_info, setup_reg_classes): New function prototypes. (eliminable_regset): New external variable declaration. (build_insn_chain, update_equiv_regs): New function prototypes. * Makefile.in (IRA_INT_H): New definition. (OBJS-common): Add ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, and ira-lives.o. (reload1.o, toplev.o): Add dependence on ira.h. (cfgloopanal.o): Add PARAMS_H. (caller-save.o): Add dependence on output.h and ira.h. (ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, ira-lives.o): New entries. * passes.c (pass_ira): New pass. * params.def (PARAM_IRA_MAX_LOOPS_NUM): New parameter. * reload1.c (ira.h): Include the header. (changed_allocation_pseudos): New bitmap. (init_reload): Initiate the bitmap. (compute_use_by_pseudos): Permits spilled registers in FROM. (temp_pseudo_reg_arr): New variable. (reload): Allocate and free temp_pseudo_reg_arr. Sort pseudos for IRA. Call alter_reg with the additional parameter. Don't clear spilled_pseudos for IRA. Restore original insn chain for IRA. Clear changed_allocation_pseudos at the end of reload. (calculate_needs_all_insns): Call IRA's mark_memory_move_deletion. (hard_regno_to_pseudo_regno): New variable. (count_pseudo): Check spilled pseudos. Set up hard_regno_to_pseudo_regno. (count_spilled_pseudo): Check spilled pseudos. Update hard_regno_to_pseudo_regno. (find_reg): Use better_spill_reload_regno_p. Check hard_regno_to_pseudo_regno. (alter_reg): Set up spilled_pseudos. Add a new parameter. Add code for IRA. (eliminate_regs_1): Use additional parameter for alter_reg. (finish_spills): Set up pseudo_previous_regs only for spilled pseudos. Call reassign_pseudos once for all spilled pseudos, pass more arguments. Don't clear live_throughout and dead_or_set for spilled pseudos. Use additional parameter for alter_reg. Call mark_allocation_change. Set up changed_allocation_pseudos. Remove sanity check. (emit_input_reload_insns, delete_output_reload): Use additional parameter for alter_reg. Call mark_allocation_change. (substitute, gen_reload_chain_without_interm_reg_p): New functions. (reloads_conflict): Use gen_reload_chain_without_interm_reg_p. * testsuite/gcc.dg/20080410-1.c: New file. * config/s390/s390.h (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Define. * config/sparc/sparc.h (IRA_COVER_CLASSES): New macro. * config/i386/i386.h (IRA_COVER_CLASSES): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES): Ditto. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/alpha/alpha.h (IRA_COVER_CLASSES): Ditto. 2008-08-24 Jeff Law <law@redhat.com> * ira.c (setup_reg_class_intersect_union): Prefer smallest class when ignoring unavailable registers. 2008-08-24 Jeff Law <law@redhat.com> * ira-color.c (coalesced_pseudo_reg_slot_compare): Check FRAME_GROWS_DOWNWARD and STACK_GROWS_DOWNWARD. * ira.c (setup_eliminable_regset): Check stack_realign_needed. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): New macro. 2008-06-03 Steve Chamberlain <steve.chamberlain@gmail.com> * ira-build.c (allocno_range_compare_func): Stabilize sort. 2008-05-29 Andy Hutchinson <hutchinsonandy@aim.com> * config/avr/avr.h (IRA_COVER_CLASSES): New macro. * reload1.c (find_reg): Process registers in register allocation order. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * toplev.c (backend_init_target): Move ira_init call from here... (lang_dependent_init_target): ...to here. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * ira.c (setup_class_subset_and_memory_move_costs): Don't calculate memory move costs for NO_REGS. 2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org> * ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if STACK_REGS is defined. 2008-04-08 Andrew Pinski <andrew_pinski@playstation.sony.com> * config/spu/spu.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Bernd Schmidt <bernd.schmidt@analog.com> * config/bfin/bfin.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Kaz Kojima <kkojima@gcc.gnu.org> * config/sh/sh.h (IRA_COVER_CLASSES): Define. * config/sh/sh.md (movsicc_true+3): Check if emit returns a barrier. From-SVN: r139590
2008-08-26 14:39:58 +02:00
Automated conversion of passes to C++ classes gcc/ Patch autogenerated by refactor_passes.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 03fe39476a4c4ea450b49e087cfa817b5f92021e * asan.c (pass_asan): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_asan): ...new pass_data instance and... (make_pass_asan): ...new function. (pass_asan_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_asan_O0): ...new pass_data instance and... (make_pass_asan_O0): ...new function. * auto-inc-dec.c (pass_inc_dec): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_inc_dec): ...new pass_data instance and... (make_pass_inc_dec): ...new function. * bb-reorder.c (pass_reorder_blocks): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reorder_blocks): ...new pass_data instance and... (make_pass_reorder_blocks): ...new function. (pass_duplicate_computed_gotos): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_duplicate_computed_gotos): ...new pass_data instance and... (make_pass_duplicate_computed_gotos): ...new function. (pass_partition_blocks): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_partition_blocks): ...new pass_data instance and... (make_pass_partition_blocks): ...new function. * bt-load.c (pass_branch_target_load_optimize1): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_branch_target_load_optimize1): ...new pass_data instance and... (make_pass_branch_target_load_optimize1): ...new function. (pass_branch_target_load_optimize2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_branch_target_load_optimize2): ...new pass_data instance and... (make_pass_branch_target_load_optimize2): ...new function. * cfgcleanup.c (pass_jump): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_jump): ...new pass_data instance and... (make_pass_jump): ...new function. (pass_jump2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_jump2): ...new pass_data instance and... (make_pass_jump2): ...new function. * cfgexpand.c (pass_expand): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_expand): ...new pass_data instance and... (make_pass_expand): ...new function. * cfgrtl.c (pass_free_cfg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_free_cfg): ...new pass_data instance and... (make_pass_free_cfg): ...new function. (pass_into_cfg_layout_mode): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_into_cfg_layout_mode): ...new pass_data instance and... (make_pass_into_cfg_layout_mode): ...new function. (pass_outof_cfg_layout_mode): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_outof_cfg_layout_mode): ...new pass_data instance and... (make_pass_outof_cfg_layout_mode): ...new function. * cgraphbuild.c (pass_build_cgraph_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_cgraph_edges): ...new pass_data instance and... (make_pass_build_cgraph_edges): ...new function. (pass_rebuild_cgraph_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_rebuild_cgraph_edges): ...new pass_data instance and... (make_pass_rebuild_cgraph_edges): ...new function. (pass_remove_cgraph_callee_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_remove_cgraph_callee_edges): ...new pass_data instance and... (make_pass_remove_cgraph_callee_edges): ...new function. * combine-stack-adj.c (pass_stack_adjustments): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_adjustments): ...new pass_data instance and... (make_pass_stack_adjustments): ...new function. * combine.c (pass_combine): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_combine): ...new pass_data instance and... (make_pass_combine): ...new function. * compare-elim.c (pass_compare_elim_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_compare_elim_after_reload): ...new pass_data instance and... (make_pass_compare_elim_after_reload): ...new function. * cprop.c (pass_rtl_cprop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_cprop): ...new pass_data instance and... (make_pass_rtl_cprop): ...new function. * cse.c (pass_cse): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse): ...new pass_data instance and... (make_pass_cse): ...new function. (pass_cse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse2): ...new pass_data instance and... (make_pass_cse2): ...new function. (pass_cse_after_global_opts): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse_after_global_opts): ...new pass_data instance and... (make_pass_cse_after_global_opts): ...new function. * dce.c (pass_ud_rtl_dce): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ud_rtl_dce): ...new pass_data instance and... (make_pass_ud_rtl_dce): ...new function. (pass_fast_rtl_dce): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_fast_rtl_dce): ...new pass_data instance and... (make_pass_fast_rtl_dce): ...new function. * df-core.c (pass_df_initialize_opt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_initialize_opt): ...new pass_data instance and... (make_pass_df_initialize_opt): ...new function. (pass_df_initialize_no_opt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_initialize_no_opt): ...new pass_data instance and... (make_pass_df_initialize_no_opt): ...new function. (pass_df_finish): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_finish): ...new pass_data instance and... (make_pass_df_finish): ...new function. * dse.c (pass_rtl_dse1): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_dse1): ...new pass_data instance and... (make_pass_rtl_dse1): ...new function. (pass_rtl_dse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_dse2): ...new pass_data instance and... (make_pass_rtl_dse2): ...new function. * dwarf2cfi.c (pass_dwarf2_frame): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_dwarf2_frame): ...new pass_data instance and... (make_pass_dwarf2_frame): ...new function. * except.c (pass_set_nothrow_function_flags): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_set_nothrow_function_flags): ...new pass_data instance and... (make_pass_set_nothrow_function_flags): ...new function. (pass_convert_to_eh_region_ranges): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_convert_to_eh_region_ranges): ...new pass_data instance and... (make_pass_convert_to_eh_region_ranges): ...new function. * final.c (pass_compute_alignments): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_compute_alignments): ...new pass_data instance and... (make_pass_compute_alignments): ...new function. (pass_final): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_final): ...new pass_data instance and... (make_pass_final): ...new function. (pass_shorten_branches): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_shorten_branches): ...new pass_data instance and... (make_pass_shorten_branches): ...new function. (pass_clean_state): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_clean_state): ...new pass_data instance and... (make_pass_clean_state): ...new function. * function.c (pass_instantiate_virtual_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_instantiate_virtual_regs): ...new pass_data instance and... (make_pass_instantiate_virtual_regs): ...new function. (pass_leaf_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_leaf_regs): ...new pass_data instance and... (make_pass_leaf_regs): ...new function. (pass_thread_prologue_and_epilogue): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_thread_prologue_and_epilogue): ...new pass_data instance and... (make_pass_thread_prologue_and_epilogue): ...new function. (pass_match_asm_constraints): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_match_asm_constraints): ...new pass_data instance and... (make_pass_match_asm_constraints): ...new function. * fwprop.c (pass_rtl_fwprop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_fwprop): ...new pass_data instance and... (make_pass_rtl_fwprop): ...new function. (pass_rtl_fwprop_addr): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_fwprop_addr): ...new pass_data instance and... (make_pass_rtl_fwprop_addr): ...new function. * gcse.c (pass_rtl_pre): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_pre): ...new pass_data instance and... (make_pass_rtl_pre): ...new function. (pass_rtl_hoist): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_hoist): ...new pass_data instance and... (make_pass_rtl_hoist): ...new function. * gimple-low.c (pass_lower_cf): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_cf): ...new pass_data instance and... (make_pass_lower_cf): ...new function. * gimple-ssa-strength-reduction.c (pass_strength_reduction): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strength_reduction): ...new pass_data instance and... (make_pass_strength_reduction): ...new function. * ifcvt.c (pass_rtl_ifcvt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_ifcvt): ...new pass_data instance and... (make_pass_rtl_ifcvt): ...new function. (pass_if_after_combine): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_if_after_combine): ...new pass_data instance and... (make_pass_if_after_combine): ...new function. (pass_if_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_if_after_reload): ...new pass_data instance and... (make_pass_if_after_reload): ...new function. * init-regs.c (pass_initialize_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_initialize_regs): ...new pass_data instance and... (make_pass_initialize_regs): ...new function. * ipa-cp.c (pass_ipa_cp): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_cp): ...new pass_data instance and... (make_pass_ipa_cp): ...new function. * ipa-inline-analysis.c (pass_inline_parameters): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_inline_parameters): ...new pass_data instance and... (make_pass_inline_parameters): ...new function. * ipa-inline.c (pass_early_inline): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_inline): ...new pass_data instance and... (make_pass_early_inline): ...new function. (pass_ipa_inline): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_inline): ...new pass_data instance and... (make_pass_ipa_inline): ...new function. * ipa-pure-const.c (pass_local_pure_const): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_local_pure_const): ...new pass_data instance and... (make_pass_local_pure_const): ...new function. (pass_ipa_pure_const): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_pure_const): ...new pass_data instance and... (make_pass_ipa_pure_const): ...new function. * ipa-reference.c (pass_ipa_reference): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_reference): ...new pass_data instance and... (make_pass_ipa_reference): ...new function. * ipa-split.c (pass_split_functions): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_split_functions): ...new pass_data instance and... (make_pass_split_functions): ...new function. (pass_feedback_split_functions): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_feedback_split_functions): ...new pass_data instance and... (make_pass_feedback_split_functions): ...new function. * ipa.c (pass_ipa_function_and_variable_visibility): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_function_and_variable_visibility): ...new pass_data instance and... (make_pass_ipa_function_and_variable_visibility): ...new function. (pass_ipa_free_inline_summary): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_free_inline_summary): ...new pass_data instance and... (make_pass_ipa_free_inline_summary): ...new function. (pass_ipa_whole_program_visibility): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_whole_program_visibility): ...new pass_data instance and... (make_pass_ipa_whole_program_visibility): ...new function. (pass_ipa_profile): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_profile): ...new pass_data instance and... (make_pass_ipa_profile): ...new function. (pass_ipa_cdtor_merge): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_cdtor_merge): ...new pass_data instance and... (make_pass_ipa_cdtor_merge): ...new function. * ira.c (pass_ira): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ira): ...new pass_data instance and... (make_pass_ira): ...new function. (pass_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reload): ...new pass_data instance and... (make_pass_reload): ...new function. * jump.c (pass_cleanup_barriers): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cleanup_barriers): ...new pass_data instance and... (make_pass_cleanup_barriers): ...new function. * loop-init.c (pass_loop2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_loop2): ...new pass_data instance and... (make_pass_loop2): ...new function. (pass_rtl_loop_init): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_loop_init): ...new pass_data instance and... (make_pass_rtl_loop_init): ...new function. (pass_rtl_loop_done): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_loop_done): ...new pass_data instance and... (make_pass_rtl_loop_done): ...new function. (pass_rtl_move_loop_invariants): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_move_loop_invariants): ...new pass_data instance and... (make_pass_rtl_move_loop_invariants): ...new function. (pass_rtl_unswitch): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_unswitch): ...new pass_data instance and... (make_pass_rtl_unswitch): ...new function. (pass_rtl_unroll_and_peel_loops): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_unroll_and_peel_loops): ...new pass_data instance and... (make_pass_rtl_unroll_and_peel_loops): ...new function. (pass_rtl_doloop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_doloop): ...new pass_data instance and... (make_pass_rtl_doloop): ...new function. * lower-subreg.c (pass_lower_subreg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_lower_subreg): ...new pass_data instance and... (make_pass_lower_subreg): ...new function. (pass_lower_subreg2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_lower_subreg2): ...new pass_data instance and... (make_pass_lower_subreg2): ...new function. * lto-streamer-out.c (pass_ipa_lto_gimple_out): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_lto_gimple_out): ...new pass_data instance and... (make_pass_ipa_lto_gimple_out): ...new function. (pass_ipa_lto_finish_out): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_lto_finish_out): ...new pass_data instance and... (make_pass_ipa_lto_finish_out): ...new function. * mode-switching.c (pass_mode_switching): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mode_switching): ...new pass_data instance and... (make_pass_mode_switching): ...new function. * modulo-sched.c (pass_sms): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sms): ...new pass_data instance and... (make_pass_sms): ...new function. * omp-low.c (pass_expand_omp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_expand_omp): ...new pass_data instance and... (make_pass_expand_omp): ...new function. (pass_lower_omp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_omp): ...new pass_data instance and... (make_pass_lower_omp): ...new function. (pass_diagnose_omp_blocks): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_diagnose_omp_blocks): ...new pass_data instance and... (make_pass_diagnose_omp_blocks): ...new function. * passes.c (pass_early_local_passes): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_early_local_passes): ...new pass_data instance and... (make_pass_early_local_passes): ...new function. (pass_all_early_optimizations): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_early_optimizations): ...new pass_data instance and... (make_pass_all_early_optimizations): ...new function. (pass_all_optimizations): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_optimizations): ...new pass_data instance and... (make_pass_all_optimizations): ...new function. (pass_all_optimizations_g): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_optimizations_g): ...new pass_data instance and... (make_pass_all_optimizations_g): ...new function. (pass_rest_of_compilation): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rest_of_compilation): ...new pass_data instance and... (make_pass_rest_of_compilation): ...new function. (pass_postreload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_postreload): ...new pass_data instance and... (make_pass_postreload): ...new function. * postreload-gcse.c (pass_gcse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_gcse2): ...new pass_data instance and... (make_pass_gcse2): ...new function. * postreload.c (pass_postreload_cse): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_postreload_cse): ...new pass_data instance and... (make_pass_postreload_cse): ...new function. * predict.c (pass_profile): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_profile): ...new pass_data instance and... (make_pass_profile): ...new function. (pass_strip_predict_hints): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strip_predict_hints): ...new pass_data instance and... (make_pass_strip_predict_hints): ...new function. * recog.c (pass_peephole2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_peephole2): ...new pass_data instance and... (make_pass_peephole2): ...new function. (pass_split_all_insns): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_all_insns): ...new pass_data instance and... (make_pass_split_all_insns): ...new function. (pass_split_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_after_reload): ...new pass_data instance and... (make_pass_split_after_reload): ...new function. (pass_split_before_regstack): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_before_regstack): ...new pass_data instance and... (make_pass_split_before_regstack): ...new function. (pass_split_before_sched2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_before_sched2): ...new pass_data instance and... (make_pass_split_before_sched2): ...new function. (pass_split_for_shorten_branches): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_for_shorten_branches): ...new pass_data instance and... (make_pass_split_for_shorten_branches): ...new function. * ree.c (pass_ree): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ree): ...new pass_data instance and... (make_pass_ree): ...new function. * reg-stack.c (pass_stack_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_regs): ...new pass_data instance and... (make_pass_stack_regs): ...new function. (pass_stack_regs_run): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_regs_run): ...new pass_data instance and... (make_pass_stack_regs_run): ...new function. * regcprop.c (pass_cprop_hardreg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cprop_hardreg): ...new pass_data instance and... (make_pass_cprop_hardreg): ...new function. * reginfo.c (pass_reginfo_init): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reginfo_init): ...new pass_data instance and... (make_pass_reginfo_init): ...new function. * regmove.c (pass_regmove): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_regmove): ...new pass_data instance and... (make_pass_regmove): ...new function. * regrename.c (pass_regrename): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_regrename): ...new pass_data instance and... (make_pass_regrename): ...new function. * reorg.c (pass_delay_slots): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_delay_slots): ...new pass_data instance and... (make_pass_delay_slots): ...new function. (pass_machine_reorg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_machine_reorg): ...new pass_data instance and... (make_pass_machine_reorg): ...new function. * sched-rgn.c (pass_sched): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sched): ...new pass_data instance and... (make_pass_sched): ...new function. (pass_sched2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sched2): ...new pass_data instance and... (make_pass_sched2): ...new function. * stack-ptr-mod.c (pass_stack_ptr_mod): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_ptr_mod): ...new pass_data instance and... (make_pass_stack_ptr_mod): ...new function. * store-motion.c (pass_rtl_store_motion): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_store_motion): ...new pass_data instance and... (make_pass_rtl_store_motion): ...new function. * tracer.c (pass_tracer): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tracer): ...new pass_data instance and... (make_pass_tracer): ...new function. * trans-mem.c (pass_diagnose_tm_blocks): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_diagnose_tm_blocks): ...new pass_data instance and... (make_pass_diagnose_tm_blocks): ...new function. (pass_lower_tm): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_tm): ...new pass_data instance and... (make_pass_lower_tm): ...new function. (pass_tm_init): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_init): ...new pass_data instance and... (make_pass_tm_init): ...new function. (pass_tm_mark): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_mark): ...new pass_data instance and... (make_pass_tm_mark): ...new function. (pass_tm_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_edges): ...new pass_data instance and... (make_pass_tm_edges): ...new function. (pass_tm_memopt): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_memopt): ...new pass_data instance and... (make_pass_tm_memopt): ...new function. (pass_ipa_tm): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_tm): ...new pass_data instance and... (make_pass_ipa_tm): ...new function. * tree-call-cdce.c (pass_call_cdce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_call_cdce): ...new pass_data instance and... (make_pass_call_cdce): ...new function. * tree-cfg.c (pass_build_cfg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_cfg): ...new pass_data instance and... (make_pass_build_cfg): ...new function. (pass_split_crit_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_split_crit_edges): ...new pass_data instance and... (make_pass_split_crit_edges): ...new function. (pass_warn_function_return): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_function_return): ...new pass_data instance and... (make_pass_warn_function_return): ...new function. (pass_warn_function_noreturn): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_function_noreturn): ...new pass_data instance and... (make_pass_warn_function_noreturn): ...new function. (pass_warn_unused_result): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_unused_result): ...new pass_data instance and... (make_pass_warn_unused_result): ...new function. * tree-cfgcleanup.c (pass_merge_phi): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_merge_phi): ...new pass_data instance and... (make_pass_merge_phi): ...new function. * tree-complex.c (pass_lower_complex): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_complex): ...new pass_data instance and... (make_pass_lower_complex): ...new function. (pass_lower_complex_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_complex_O0): ...new pass_data instance and... (make_pass_lower_complex_O0): ...new function. * tree-eh.c (pass_lower_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_eh): ...new pass_data instance and... (make_pass_lower_eh): ...new function. (pass_refactor_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_refactor_eh): ...new pass_data instance and... (make_pass_refactor_eh): ...new function. (pass_lower_resx): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_resx): ...new pass_data instance and... (make_pass_lower_resx): ...new function. (pass_lower_eh_dispatch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_eh_dispatch): ...new pass_data instance and... (make_pass_lower_eh_dispatch): ...new function. (pass_cleanup_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cleanup_eh): ...new pass_data instance and... (make_pass_cleanup_eh): ...new function. * tree-emutls.c (pass_ipa_lower_emutls): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_lower_emutls): ...new pass_data instance and... (make_pass_ipa_lower_emutls): ...new function. * tree-if-conv.c (pass_if_conversion): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_if_conversion): ...new pass_data instance and... (make_pass_if_conversion): ...new function. * tree-into-ssa.c (pass_build_ssa): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_ssa): ...new pass_data instance and... (make_pass_build_ssa): ...new function. * tree-loop-distribution.c (pass_loop_distribution): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_loop_distribution): ...new pass_data instance and... (make_pass_loop_distribution): ...new function. * tree-mudflap.c (pass_mudflap_1): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_1): ...new pass_data instance and... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_2): ...new pass_data instance and... (make_pass_mudflap_2): ...new function. * tree-nomudflap.c (pass_mudflap_1): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_1): ...new pass_data instance and... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_2): ...new pass_data instance and... (make_pass_mudflap_2): ...new function. * tree-nrv.c (pass_nrv): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_nrv): ...new pass_data instance and... (make_pass_nrv): ...new function. (pass_return_slot): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_return_slot): ...new pass_data instance and... (make_pass_return_slot): ...new function. * tree-object-size.c (pass_object_sizes): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_object_sizes): ...new pass_data instance and... (make_pass_object_sizes): ...new function. * tree-optimize.c (pass_cleanup_cfg_post_optimizing): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cleanup_cfg_post_optimizing): ...new pass_data instance and... (make_pass_cleanup_cfg_post_optimizing): ...new function. (pass_fixup_cfg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fixup_cfg): ...new pass_data instance and... (make_pass_fixup_cfg): ...new function. * tree-pass.h (pass_mudflap_1): Replace declaration with that of... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Replace declaration with that of... (make_pass_mudflap_2): ...new function. (pass_asan): Replace declaration with that of... (make_pass_asan): ...new function. (pass_asan_O0): Replace declaration with that of... (make_pass_asan_O0): ...new function. (pass_tsan): Replace declaration with that of... (make_pass_tsan): ...new function. (pass_tsan_O0): Replace declaration with that of... (make_pass_tsan_O0): ...new function. (pass_lower_cf): Replace declaration with that of... (make_pass_lower_cf): ...new function. (pass_refactor_eh): Replace declaration with that of... (make_pass_refactor_eh): ...new function. (pass_lower_eh): Replace declaration with that of... (make_pass_lower_eh): ...new function. (pass_lower_eh_dispatch): Replace declaration with that of... (make_pass_lower_eh_dispatch): ...new function. (pass_lower_resx): Replace declaration with that of... (make_pass_lower_resx): ...new function. (pass_build_cfg): Replace declaration with that of... (make_pass_build_cfg): ...new function. (pass_early_tree_profile): Replace declaration with that of... (make_pass_early_tree_profile): ...new function. (pass_cleanup_eh): Replace declaration with that of... (make_pass_cleanup_eh): ...new function. (pass_sra): Replace declaration with that of... (make_pass_sra): ...new function. (pass_sra_early): Replace declaration with that of... (make_pass_sra_early): ...new function. (pass_early_ipa_sra): Replace declaration with that of... (make_pass_early_ipa_sra): ...new function. (pass_tail_recursion): Replace declaration with that of... (make_pass_tail_recursion): ...new function. (pass_tail_calls): Replace declaration with that of... (make_pass_tail_calls): ...new function. (pass_tree_loop): Replace declaration with that of... (make_pass_tree_loop): ...new function. (pass_tree_loop_init): Replace declaration with that of... (make_pass_tree_loop_init): ...new function. (pass_lim): Replace declaration with that of... (make_pass_lim): ...new function. (pass_tree_unswitch): Replace declaration with that of... (make_pass_tree_unswitch): ...new function. (pass_predcom): Replace declaration with that of... (make_pass_predcom): ...new function. (pass_iv_canon): Replace declaration with that of... (make_pass_iv_canon): ...new function. (pass_scev_cprop): Replace declaration with that of... (make_pass_scev_cprop): ...new function. (pass_empty_loop): Replace declaration with that of... (make_pass_empty_loop): ...new function. (pass_record_bounds): Replace declaration with that of... (make_pass_record_bounds): ...new function. (pass_graphite): Replace declaration with that of... (make_pass_graphite): ...new function. (pass_graphite_transforms): Replace declaration with that of... (make_pass_graphite_transforms): ...new function. (pass_if_conversion): Replace declaration with that of... (make_pass_if_conversion): ...new function. (pass_loop_distribution): Replace declaration with that of... (make_pass_loop_distribution): ...new function. (pass_vectorize): Replace declaration with that of... (make_pass_vectorize): ...new function. (pass_slp_vectorize): Replace declaration with that of... (make_pass_slp_vectorize): ...new function. (pass_complete_unroll): Replace declaration with that of... (make_pass_complete_unroll): ...new function. (pass_complete_unrolli): Replace declaration with that of... (make_pass_complete_unrolli): ...new function. (pass_parallelize_loops): Replace declaration with that of... (make_pass_parallelize_loops): ...new function. (pass_loop_prefetch): Replace declaration with that of... (make_pass_loop_prefetch): ...new function. (pass_iv_optimize): Replace declaration with that of... (make_pass_iv_optimize): ...new function. (pass_tree_loop_done): Replace declaration with that of... (make_pass_tree_loop_done): ...new function. (pass_ch): Replace declaration with that of... (make_pass_ch): ...new function. (pass_ccp): Replace declaration with that of... (make_pass_ccp): ...new function. (pass_phi_only_cprop): Replace declaration with that of... (make_pass_phi_only_cprop): ...new function. (pass_build_ssa): Replace declaration with that of... (make_pass_build_ssa): ...new function. (pass_build_alias): Replace declaration with that of... (make_pass_build_alias): ...new function. (pass_build_ealias): Replace declaration with that of... (make_pass_build_ealias): ...new function. (pass_dominator): Replace declaration with that of... (make_pass_dominator): ...new function. (pass_dce): Replace declaration with that of... (make_pass_dce): ...new function. (pass_dce_loop): Replace declaration with that of... (make_pass_dce_loop): ...new function. (pass_cd_dce): Replace declaration with that of... (make_pass_cd_dce): ...new function. (pass_call_cdce): Replace declaration with that of... (make_pass_call_cdce): ...new function. (pass_merge_phi): Replace declaration with that of... (make_pass_merge_phi): ...new function. (pass_split_crit_edges): Replace declaration with that of... (make_pass_split_crit_edges): ...new function. (pass_pre): Replace declaration with that of... (make_pass_pre): ...new function. (pass_profile): Replace declaration with that of... (make_pass_profile): ...new function. (pass_strip_predict_hints): Replace declaration with that of... (make_pass_strip_predict_hints): ...new function. (pass_lower_complex_O0): Replace declaration with that of... (make_pass_lower_complex_O0): ...new function. (pass_lower_complex): Replace declaration with that of... (make_pass_lower_complex): ...new function. (pass_lower_vector): Replace declaration with that of... (make_pass_lower_vector): ...new function. (pass_lower_vector_ssa): Replace declaration with that of... (make_pass_lower_vector_ssa): ...new function. (pass_lower_omp): Replace declaration with that of... (make_pass_lower_omp): ...new function. (pass_diagnose_omp_blocks): Replace declaration with that of... (make_pass_diagnose_omp_blocks): ...new function. (pass_expand_omp): Replace declaration with that of... (make_pass_expand_omp): ...new function. (pass_expand_omp_ssa): Replace declaration with that of... (make_pass_expand_omp_ssa): ...new function. (pass_object_sizes): Replace declaration with that of... (make_pass_object_sizes): ...new function. (pass_strlen): Replace declaration with that of... (make_pass_strlen): ...new function. (pass_fold_builtins): Replace declaration with that of... (make_pass_fold_builtins): ...new function. (pass_stdarg): Replace declaration with that of... (make_pass_stdarg): ...new function. (pass_early_warn_uninitialized): Replace declaration with that of... (make_pass_early_warn_uninitialized): ...new function. (pass_late_warn_uninitialized): Replace declaration with that of... (make_pass_late_warn_uninitialized): ...new function. (pass_cse_reciprocals): Replace declaration with that of... (make_pass_cse_reciprocals): ...new function. (pass_cse_sincos): Replace declaration with that of... (make_pass_cse_sincos): ...new function. (pass_optimize_bswap): Replace declaration with that of... (make_pass_optimize_bswap): ...new function. (pass_optimize_widening_mul): Replace declaration with that of... (make_pass_optimize_widening_mul): ...new function. (pass_warn_function_return): Replace declaration with that of... (make_pass_warn_function_return): ...new function. (pass_warn_function_noreturn): Replace declaration with that of... (make_pass_warn_function_noreturn): ...new function. (pass_cselim): Replace declaration with that of... (make_pass_cselim): ...new function. (pass_phiopt): Replace declaration with that of... (make_pass_phiopt): ...new function. (pass_forwprop): Replace declaration with that of... (make_pass_forwprop): ...new function. (pass_phiprop): Replace declaration with that of... (make_pass_phiprop): ...new function. (pass_tree_ifcombine): Replace declaration with that of... (make_pass_tree_ifcombine): ...new function. (pass_dse): Replace declaration with that of... (make_pass_dse): ...new function. (pass_nrv): Replace declaration with that of... (make_pass_nrv): ...new function. (pass_rename_ssa_copies): Replace declaration with that of... (make_pass_rename_ssa_copies): ...new function. (pass_sink_code): Replace declaration with that of... (make_pass_sink_code): ...new function. (pass_fre): Replace declaration with that of... (make_pass_fre): ...new function. (pass_check_data_deps): Replace declaration with that of... (make_pass_check_data_deps): ...new function. (pass_copy_prop): Replace declaration with that of... (make_pass_copy_prop): ...new function. (pass_vrp): Replace declaration with that of... (make_pass_vrp): ...new function. (pass_uncprop): Replace declaration with that of... (make_pass_uncprop): ...new function. (pass_return_slot): Replace declaration with that of... (make_pass_return_slot): ...new function. (pass_reassoc): Replace declaration with that of... (make_pass_reassoc): ...new function. (pass_rebuild_cgraph_edges): Replace declaration with that of... (make_pass_rebuild_cgraph_edges): ...new function. (pass_remove_cgraph_callee_edges): Replace declaration with that of... (make_pass_remove_cgraph_callee_edges): ...new function. (pass_build_cgraph_edges): Replace declaration with that of... (make_pass_build_cgraph_edges): ...new function. (pass_local_pure_const): Replace declaration with that of... (make_pass_local_pure_const): ...new function. (pass_tracer): Replace declaration with that of... (make_pass_tracer): ...new function. (pass_warn_unused_result): Replace declaration with that of... (make_pass_warn_unused_result): ...new function. (pass_diagnose_tm_blocks): Replace declaration with that of... (make_pass_diagnose_tm_blocks): ...new function. (pass_lower_tm): Replace declaration with that of... (make_pass_lower_tm): ...new function. (pass_tm_init): Replace declaration with that of... (make_pass_tm_init): ...new function. (pass_tm_mark): Replace declaration with that of... (make_pass_tm_mark): ...new function. (pass_tm_memopt): Replace declaration with that of... (make_pass_tm_memopt): ...new function. (pass_tm_edges): Replace declaration with that of... (make_pass_tm_edges): ...new function. (pass_split_functions): Replace declaration with that of... (make_pass_split_functions): ...new function. (pass_feedback_split_functions): Replace declaration with that of... (make_pass_feedback_split_functions): ...new function. (pass_strength_reduction): Replace declaration with that of... (make_pass_strength_reduction): ...new function. (pass_ipa_lower_emutls): Replace declaration with that of... (make_pass_ipa_lower_emutls): ...new function. (pass_ipa_function_and_variable_visibility): Replace declaration with that of... (make_pass_ipa_function_and_variable_visibility): ...new function. (pass_ipa_tree_profile): Replace declaration with that of... (make_pass_ipa_tree_profile): ...new function. (pass_early_local_passes): Replace declaration with that of... (make_pass_early_local_passes): ...new function. (pass_ipa_whole_program_visibility): Replace declaration with that of... (make_pass_ipa_whole_program_visibility): ...new function. (pass_ipa_lto_gimple_out): Replace declaration with that of... (make_pass_ipa_lto_gimple_out): ...new function. (pass_ipa_increase_alignment): Replace declaration with that of... (make_pass_ipa_increase_alignment): ...new function. (pass_ipa_inline): Replace declaration with that of... (make_pass_ipa_inline): ...new function. (pass_ipa_free_lang_data): Replace declaration with that of... (make_pass_ipa_free_lang_data): ...new function. (pass_ipa_free_inline_summary): Replace declaration with that of... (make_pass_ipa_free_inline_summary): ...new function. (pass_ipa_cp): Replace declaration with that of... (make_pass_ipa_cp): ...new function. (pass_ipa_reference): Replace declaration with that of... (make_pass_ipa_reference): ...new function. (pass_ipa_pure_const): Replace declaration with that of... (make_pass_ipa_pure_const): ...new function. (pass_ipa_pta): Replace declaration with that of... (make_pass_ipa_pta): ...new function. (pass_ipa_lto_finish_out): Replace declaration with that of... (make_pass_ipa_lto_finish_out): ...new function. (pass_ipa_tm): Replace declaration with that of... (make_pass_ipa_tm): ...new function. (pass_ipa_profile): Replace declaration with that of... (make_pass_ipa_profile): ...new function. (pass_ipa_cdtor_merge): Replace declaration with that of... (make_pass_ipa_cdtor_merge): ...new function. (pass_cleanup_cfg_post_optimizing): Replace declaration with that of... (make_pass_cleanup_cfg_post_optimizing): ...new function. (pass_init_datastructures): Replace declaration with that of... (make_pass_init_datastructures): ...new function. (pass_fixup_cfg): Replace declaration with that of... (make_pass_fixup_cfg): ...new function. (pass_expand): Replace declaration with that of... (make_pass_expand): ...new function. (pass_instantiate_virtual_regs): Replace declaration with that of... (make_pass_instantiate_virtual_regs): ...new function. (pass_rtl_fwprop): Replace declaration with that of... (make_pass_rtl_fwprop): ...new function. (pass_rtl_fwprop_addr): Replace declaration with that of... (make_pass_rtl_fwprop_addr): ...new function. (pass_jump): Replace declaration with that of... (make_pass_jump): ...new function. (pass_jump2): Replace declaration with that of... (make_pass_jump2): ...new function. (pass_lower_subreg): Replace declaration with that of... (make_pass_lower_subreg): ...new function. (pass_cse): Replace declaration with that of... (make_pass_cse): ...new function. (pass_fast_rtl_dce): Replace declaration with that of... (make_pass_fast_rtl_dce): ...new function. (pass_ud_rtl_dce): Replace declaration with that of... (make_pass_ud_rtl_dce): ...new function. (pass_rtl_dce): Replace declaration with that of... (make_pass_rtl_dce): ...new function. (pass_rtl_dse1): Replace declaration with that of... (make_pass_rtl_dse1): ...new function. (pass_rtl_dse2): Replace declaration with that of... (make_pass_rtl_dse2): ...new function. (pass_rtl_dse3): Replace declaration with that of... (make_pass_rtl_dse3): ...new function. (pass_rtl_cprop): Replace declaration with that of... (make_pass_rtl_cprop): ...new function. (pass_rtl_pre): Replace declaration with that of... (make_pass_rtl_pre): ...new function. (pass_rtl_hoist): Replace declaration with that of... (make_pass_rtl_hoist): ...new function. (pass_rtl_store_motion): Replace declaration with that of... (make_pass_rtl_store_motion): ...new function. (pass_cse_after_global_opts): Replace declaration with that of... (make_pass_cse_after_global_opts): ...new function. (pass_rtl_ifcvt): Replace declaration with that of... (make_pass_rtl_ifcvt): ...new function. (pass_into_cfg_layout_mode): Replace declaration with that of... (make_pass_into_cfg_layout_mode): ...new function. (pass_outof_cfg_layout_mode): Replace declaration with that of... (make_pass_outof_cfg_layout_mode): ...new function. (pass_loop2): Replace declaration with that of... (make_pass_loop2): ...new function. (pass_rtl_loop_init): Replace declaration with that of... (make_pass_rtl_loop_init): ...new function. (pass_rtl_move_loop_invariants): Replace declaration with that of... (make_pass_rtl_move_loop_invariants): ...new function. (pass_rtl_unswitch): Replace declaration with that of... (make_pass_rtl_unswitch): ...new function. (pass_rtl_unroll_and_peel_loops): Replace declaration with that of... (make_pass_rtl_unroll_and_peel_loops): ...new function. (pass_rtl_doloop): Replace declaration with that of... (make_pass_rtl_doloop): ...new function. (pass_rtl_loop_done): Replace declaration with that of... (make_pass_rtl_loop_done): ...new function. (pass_web): Replace declaration with that of... (make_pass_web): ...new function. (pass_cse2): Replace declaration with that of... (make_pass_cse2): ...new function. (pass_df_initialize_opt): Replace declaration with that of... (make_pass_df_initialize_opt): ...new function. (pass_df_initialize_no_opt): Replace declaration with that of... (make_pass_df_initialize_no_opt): ...new function. (pass_reginfo_init): Replace declaration with that of... (make_pass_reginfo_init): ...new function. (pass_inc_dec): Replace declaration with that of... (make_pass_inc_dec): ...new function. (pass_stack_ptr_mod): Replace declaration with that of... (make_pass_stack_ptr_mod): ...new function. (pass_initialize_regs): Replace declaration with that of... (make_pass_initialize_regs): ...new function. (pass_combine): Replace declaration with that of... (make_pass_combine): ...new function. (pass_if_after_combine): Replace declaration with that of... (make_pass_if_after_combine): ...new function. (pass_ree): Replace declaration with that of... (make_pass_ree): ...new function. (pass_partition_blocks): Replace declaration with that of... (make_pass_partition_blocks): ...new function. (pass_match_asm_constraints): Replace declaration with that of... (make_pass_match_asm_constraints): ...new function. (pass_regmove): Replace declaration with that of... (make_pass_regmove): ...new function. (pass_split_all_insns): Replace declaration with that of... (make_pass_split_all_insns): ...new function. (pass_fast_rtl_byte_dce): Replace declaration with that of... (make_pass_fast_rtl_byte_dce): ...new function. (pass_lower_subreg2): Replace declaration with that of... (make_pass_lower_subreg2): ...new function. (pass_mode_switching): Replace declaration with that of... (make_pass_mode_switching): ...new function. (pass_sms): Replace declaration with that of... (make_pass_sms): ...new function. (pass_sched): Replace declaration with that of... (make_pass_sched): ...new function. (pass_ira): Replace declaration with that of... (make_pass_ira): ...new function. (pass_reload): Replace declaration with that of... (make_pass_reload): ...new function. (pass_clean_state): Replace declaration with that of... (make_pass_clean_state): ...new function. (pass_branch_prob): Replace declaration with that of... (make_pass_branch_prob): ...new function. (pass_value_profile_transformations): Replace declaration with that of... (make_pass_value_profile_transformations): ...new function. (pass_postreload_cse): Replace declaration with that of... (make_pass_postreload_cse): ...new function. (pass_gcse2): Replace declaration with that of... (make_pass_gcse2): ...new function. (pass_split_after_reload): Replace declaration with that of... (make_pass_split_after_reload): ...new function. (pass_branch_target_load_optimize1): Replace declaration with that of... (make_pass_branch_target_load_optimize1): ...new function. (pass_thread_prologue_and_epilogue): Replace declaration with that of... (make_pass_thread_prologue_and_epilogue): ...new function. (pass_stack_adjustments): Replace declaration with that of... (make_pass_stack_adjustments): ...new function. (pass_peephole2): Replace declaration with that of... (make_pass_peephole2): ...new function. (pass_if_after_reload): Replace declaration with that of... (make_pass_if_after_reload): ...new function. (pass_regrename): Replace declaration with that of... (make_pass_regrename): ...new function. (pass_cprop_hardreg): Replace declaration with that of... (make_pass_cprop_hardreg): ...new function. (pass_reorder_blocks): Replace declaration with that of... (make_pass_reorder_blocks): ...new function. (pass_branch_target_load_optimize2): Replace declaration with that of... (make_pass_branch_target_load_optimize2): ...new function. (pass_leaf_regs): Replace declaration with that of... (make_pass_leaf_regs): ...new function. (pass_split_before_sched2): Replace declaration with that of... (make_pass_split_before_sched2): ...new function. (pass_compare_elim_after_reload): Replace declaration with that of... (make_pass_compare_elim_after_reload): ...new function. (pass_sched2): Replace declaration with that of... (make_pass_sched2): ...new function. (pass_stack_regs): Replace declaration with that of... (make_pass_stack_regs): ...new function. (pass_stack_regs_run): Replace declaration with that of... (make_pass_stack_regs_run): ...new function. (pass_df_finish): Replace declaration with that of... (make_pass_df_finish): ...new function. (pass_compute_alignments): Replace declaration with that of... (make_pass_compute_alignments): ...new function. (pass_duplicate_computed_gotos): Replace declaration with that of... (make_pass_duplicate_computed_gotos): ...new function. (pass_variable_tracking): Replace declaration with that of... (make_pass_variable_tracking): ...new function. (pass_free_cfg): Replace declaration with that of... (make_pass_free_cfg): ...new function. (pass_machine_reorg): Replace declaration with that of... (make_pass_machine_reorg): ...new function. (pass_cleanup_barriers): Replace declaration with that of... (make_pass_cleanup_barriers): ...new function. (pass_delay_slots): Replace declaration with that of... (make_pass_delay_slots): ...new function. (pass_split_for_shorten_branches): Replace declaration with that of... (make_pass_split_for_shorten_branches): ...new function. (pass_split_before_regstack): Replace declaration with that of... (make_pass_split_before_regstack): ...new function. (pass_convert_to_eh_region_ranges): Replace declaration with that of... (make_pass_convert_to_eh_region_ranges): ...new function. (pass_shorten_branches): Replace declaration with that of... (make_pass_shorten_branches): ...new function. (pass_set_nothrow_function_flags): Replace declaration with that of... (make_pass_set_nothrow_function_flags): ...new function. (pass_dwarf2_frame): Replace declaration with that of... (make_pass_dwarf2_frame): ...new function. (pass_final): Replace declaration with that of... (make_pass_final): ...new function. (pass_rtl_seqabstr): Replace declaration with that of... (make_pass_rtl_seqabstr): ...new function. (pass_release_ssa_names): Replace declaration with that of... (make_pass_release_ssa_names): ...new function. (pass_early_inline): Replace declaration with that of... (make_pass_early_inline): ...new function. (pass_inline_parameters): Replace declaration with that of... (make_pass_inline_parameters): ...new function. (pass_update_address_taken): Replace declaration with that of... (make_pass_update_address_taken): ...new function. (pass_convert_switch): Replace declaration with that of... (make_pass_convert_switch): ...new function. * tree-profile.c (pass_ipa_tree_profile): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_tree_profile): ...new pass_data instance and... (make_pass_ipa_tree_profile): ...new function. * tree-sra.c (pass_sra_early): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sra_early): ...new pass_data instance and... (make_pass_sra_early): ...new function. (pass_sra): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sra): ...new pass_data instance and... (make_pass_sra): ...new function. (pass_early_ipa_sra): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_ipa_sra): ...new pass_data instance and... (make_pass_early_ipa_sra): ...new function. * tree-ssa-ccp.c (pass_ccp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_ccp): ...new pass_data instance and... (make_pass_ccp): ...new function. (pass_fold_builtins): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fold_builtins): ...new pass_data instance and... (make_pass_fold_builtins): ...new function. * tree-ssa-copy.c (pass_copy_prop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_copy_prop): ...new pass_data instance and... (make_pass_copy_prop): ...new function. * tree-ssa-copyrename.c (pass_rename_ssa_copies): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_rename_ssa_copies): ...new pass_data instance and... (make_pass_rename_ssa_copies): ...new function. * tree-ssa-dce.c (pass_dce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dce): ...new pass_data instance and... (make_pass_dce): ...new function. (pass_dce_loop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dce_loop): ...new pass_data instance and... (make_pass_dce_loop): ...new function. (pass_cd_dce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cd_dce): ...new pass_data instance and... (make_pass_cd_dce): ...new function. * tree-ssa-dom.c (pass_dominator): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dominator): ...new pass_data instance and... (make_pass_dominator): ...new function. (pass_phi_only_cprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phi_only_cprop): ...new pass_data instance and... (make_pass_phi_only_cprop): ...new function. * tree-ssa-dse.c (pass_dse): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dse): ...new pass_data instance and... (make_pass_dse): ...new function. * tree-ssa-forwprop.c (pass_forwprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_forwprop): ...new pass_data instance and... (make_pass_forwprop): ...new function. * tree-ssa-ifcombine.c (pass_tree_ifcombine): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_ifcombine): ...new pass_data instance and... (make_pass_tree_ifcombine): ...new function. * tree-ssa-loop-ch.c (pass_ch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_ch): ...new pass_data instance and... (make_pass_ch): ...new function. * tree-ssa-loop.c (pass_tree_loop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop): ...new pass_data instance and... (make_pass_tree_loop): ...new function. (pass_tree_loop_init): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop_init): ...new pass_data instance and... (make_pass_tree_loop_init): ...new function. (pass_lim): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lim): ...new pass_data instance and... (make_pass_lim): ...new function. (pass_tree_unswitch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_unswitch): ...new pass_data instance and... (make_pass_tree_unswitch): ...new function. (pass_predcom): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_predcom): ...new pass_data instance and... (make_pass_predcom): ...new function. (pass_vectorize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_vectorize): ...new pass_data instance and... (make_pass_vectorize): ...new function. (pass_graphite): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_graphite): ...new pass_data instance and... (make_pass_graphite): ...new function. (pass_graphite_transforms): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_graphite_transforms): ...new pass_data instance and... (make_pass_graphite_transforms): ...new function. (pass_check_data_deps): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_check_data_deps): ...new pass_data instance and... (make_pass_check_data_deps): ...new function. (pass_iv_canon): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_iv_canon): ...new pass_data instance and... (make_pass_iv_canon): ...new function. (pass_scev_cprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_scev_cprop): ...new pass_data instance and... (make_pass_scev_cprop): ...new function. (pass_record_bounds): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_record_bounds): ...new pass_data instance and... (make_pass_record_bounds): ...new function. (pass_complete_unroll): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_complete_unroll): ...new pass_data instance and... (make_pass_complete_unroll): ...new function. (pass_complete_unrolli): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_complete_unrolli): ...new pass_data instance and... (make_pass_complete_unrolli): ...new function. (pass_parallelize_loops): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_parallelize_loops): ...new pass_data instance and... (make_pass_parallelize_loops): ...new function. (pass_loop_prefetch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_loop_prefetch): ...new pass_data instance and... (make_pass_loop_prefetch): ...new function. (pass_iv_optimize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_iv_optimize): ...new pass_data instance and... (make_pass_iv_optimize): ...new function. (pass_tree_loop_done): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop_done): ...new pass_data instance and... (make_pass_tree_loop_done): ...new function. * tree-ssa-math-opts.c (pass_cse_reciprocals): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cse_reciprocals): ...new pass_data instance and... (make_pass_cse_reciprocals): ...new function. (pass_cse_sincos): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cse_sincos): ...new pass_data instance and... (make_pass_cse_sincos): ...new function. (pass_optimize_bswap): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_optimize_bswap): ...new pass_data instance and... (make_pass_optimize_bswap): ...new function. (pass_optimize_widening_mul): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_optimize_widening_mul): ...new pass_data instance and... (make_pass_optimize_widening_mul): ...new function. * tree-ssa-phiopt.c (pass_phiopt): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phiopt): ...new pass_data instance and... (make_pass_phiopt): ...new function. (pass_cselim): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cselim): ...new pass_data instance and... (make_pass_cselim): ...new function. * tree-ssa-phiprop.c (pass_phiprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phiprop): ...new pass_data instance and... (make_pass_phiprop): ...new function. * tree-ssa-pre.c (pass_pre): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_pre): ...new pass_data instance and... (make_pass_pre): ...new function. (pass_fre): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fre): ...new pass_data instance and... (make_pass_fre): ...new function. * tree-ssa-reassoc.c (pass_reassoc): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_reassoc): ...new pass_data instance and... (make_pass_reassoc): ...new function. * tree-ssa-sink.c (pass_sink_code): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sink_code): ...new pass_data instance and... (make_pass_sink_code): ...new function. * tree-ssa-strlen.c (pass_strlen): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strlen): ...new pass_data instance and... (make_pass_strlen): ...new function. * tree-ssa-structalias.c (pass_build_alias): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_alias): ...new pass_data instance and... (make_pass_build_alias): ...new function. (pass_build_ealias): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_ealias): ...new pass_data instance and... (make_pass_build_ealias): ...new function. (pass_ipa_pta): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_pta): ...new pass_data instance and... (make_pass_ipa_pta): ...new function. * tree-ssa-uncprop.c (pass_uncprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_uncprop): ...new pass_data instance and... (make_pass_uncprop): ...new function. * tree-ssa-uninit.c (pass_late_warn_uninitialized): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_late_warn_uninitialized): ...new pass_data instance and... (make_pass_late_warn_uninitialized): ...new function. * tree-ssa.c (pass_init_datastructures): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_init_datastructures): ...new pass_data instance and... (make_pass_init_datastructures): ...new function. (pass_early_warn_uninitialized): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_warn_uninitialized): ...new pass_data instance and... (make_pass_early_warn_uninitialized): ...new function. (pass_update_address_taken): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_update_address_taken): ...new pass_data instance and... (make_pass_update_address_taken): ...new function. * tree-ssanames.c (pass_release_ssa_names): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_release_ssa_names): ...new pass_data instance and... (make_pass_release_ssa_names): ...new function. * tree-stdarg.c (pass_stdarg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_stdarg): ...new pass_data instance and... (make_pass_stdarg): ...new function. * tree-switch-conversion.c (pass_convert_switch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_convert_switch): ...new pass_data instance and... (make_pass_convert_switch): ...new function. * tree-tailcall.c (pass_tail_recursion): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tail_recursion): ...new pass_data instance and... (make_pass_tail_recursion): ...new function. (pass_tail_calls): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tail_calls): ...new pass_data instance and... (make_pass_tail_calls): ...new function. * tree-vect-generic.c (pass_lower_vector): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_vector): ...new pass_data instance and... (make_pass_lower_vector): ...new function. (pass_lower_vector_ssa): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_vector_ssa): ...new pass_data instance and... (make_pass_lower_vector_ssa): ...new function. * tree-vectorizer.c (pass_slp_vectorize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_slp_vectorize): ...new pass_data instance and... (make_pass_slp_vectorize): ...new function. (pass_ipa_increase_alignment): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_increase_alignment): ...new pass_data instance and... (make_pass_ipa_increase_alignment): ...new function. * tree-vrp.c (pass_vrp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_vrp): ...new pass_data instance and... (make_pass_vrp): ...new function. * tree.c (pass_ipa_free_lang_data): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_free_lang_data): ...new pass_data instance and... (make_pass_ipa_free_lang_data): ...new function. * tsan.c (pass_tsan): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tsan): ...new pass_data instance and... (make_pass_tsan): ...new function. (pass_tsan_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tsan_O0): ...new pass_data instance and... (make_pass_tsan_O0): ...new function. * var-tracking.c (pass_variable_tracking): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_variable_tracking): ...new pass_data instance and... (make_pass_variable_tracking): ...new function. * web.c (pass_web): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_web): ...new pass_data instance and... (make_pass_web): ...new function. * config/epiphany/epiphany.h (pass_mode_switch_use): Replace declaration with that of... (make_pass_mode_switch_use): ...new function. (pass_resolve_sw_modes): Replace declaration with that of... (make_pass_resolve_sw_modes): ...new function. * config/epiphany/mode-switch-use.c (pass_mode_switch_use): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mode_switch_use): ...new pass_data instance and... (make_pass_mode_switch_use): ...new function. * config/epiphany/resolve-sw-modes.c (pass_resolve_sw_modes): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_resolve_sw_modes): ...new pass_data instance and... (make_pass_resolve_sw_modes): ...new function. * config/i386/i386.c (pass_insert_vzeroupper): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_insert_vzeroupper): ...new pass_data instance and... (make_pass_insert_vzeroupper): ...new function. * config/sparc/sparc.c (pass_work_around_errata): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_work_around_errata): ...new pass_data instance and... (make_pass_work_around_errata): ...new function. * config/mips/mips.c (pass_mips_machine_reorg2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mips_machine_reorg2): ...new pass_data instance and... (make_pass_mips_machine_reorg2): ...new function. gcc/testsuite/ Patch autogenerated by refactor_passes.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 03fe39476a4c4ea450b49e087cfa817b5f92021e * gcc.dg/plugin/one_time_plugin.c (one_pass): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_one_pass): ...new pass_data instance and... (make_one_pass): ...new function. * gcc.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_self_assign): ...new pass_data instance and... (make_pass_warn_self_assign): ...new function. * g++.dg/plugin/dumb_plugin.c (pass_dumb_plugin_example): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dumb_plugin_example): ...new pass_data instance and... (make_pass_dumb_plugin_example): ...new function. * g++.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_self_assign): ...new pass_data instance and... (make_pass_warn_self_assign): ...new function. From-SVN: r201508
2013-08-05 22:16:05 +02:00
class pass_reginfo_init : public rtl_opt_pass
{
public:
alloc-pool.c, [...]: Add missing whitespace before "(". gcc/ * alloc-pool.c, asan.c, auto-inc-dec.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, bt-load.c, builtins.c, calls.c, cfgcleanup.c, cfgexpand.c, cfghooks.c, cfgloop.c, cfgloopmanip.c, cfgrtl.c, cgraph.c, cgraph.h, cgraphbuild.c, cgraphclones.c, cgraphunit.c, collect2.c, combine-stack-adj.c, combine.c, compare-elim.c, context.c, context.h, cprop.c, cse.c, cselib.c, dbxout.c, dce.c, defaults.h, df-core.c, df-problems.c, df-scan.c, df.h, diagnostic.c, double-int.c, dse.c, dumpfile.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c, errors.c, except.c, expmed.c, expr.c, file-find.c, final.c, fixed-value.c, fold-const.c, function.c, fwprop.c, gcc-ar.c, gcc.c, gcov-io.c, gcov-io.h, gcov.c, gcse.c, genattr-common.c, genattr.c, genattrtab.c, genautomata.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, gengtype-state.c, gengtype.c, genmodes.c, genopinit.c, genoutput.c, genpeep.c, genpreds.c, genrecog.c, gensupport.c, ggc-common.c, ggc-page.c, gimple-fold.c, gimple-low.c, gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimple.c, gimple.h, godump.c, graphite-clast-to-gimple.c, graphite-optimize-isl.c, graphite-poly.h, graphite-sese-to-poly.c, graphite.c, haifa-sched.c, hash-table.c, hash-table.h, hwint.c, hwint.h, ifcvt.c, incpath.c, init-regs.c, input.h, intl.c, intl.h, ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c, ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c, ipa-utils.c, ipa.c, ira-build.c, ira.c, jump.c, loop-doloop.c, loop-init.c, loop-invariant.c, loop-iv.c, lower-subreg.c, lto-cgraph.c, lto-streamer-in.c, lto-streamer-out.c, lto-wrapper.c, mcf.c, mode-switching.c, modulo-sched.c, omp-low.c, optabs.c, opts.c, pass_manager.h, passes.c, plugin.c, postreload-gcse.c, postreload.c, predict.c, prefix.c, pretty-print.c, print-rtl.c, print-tree.c, profile.c, read-md.c, real.c, real.h, recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regmove.c, regrename.c, regs.h, regstat.c, reload1.c, reorg.c, rtl.c, rtl.h, rtlanal.c, sbitmap.c, sched-rgn.c, sdbout.c, sel-sched-ir.c, sel-sched.c, sparseset.c, stack-ptr-mod.c, statistics.c, stmt.c, stor-layout.c, store-motion.c, streamer-hooks.h, system.h, target-hooks-macros.h, targhooks.c, targhooks.h, toplev.c, tracer.c, trans-mem.c, tree-browser.c, tree-call-cdce.c, tree-cfg.c, tree-cfgcleanup.c, tree-complex.c, tree-data-ref.c, tree-data-ref.h, tree-eh.c, tree-emutls.c, tree-flow.h, tree-if-conv.c, tree-into-ssa.c, tree-iterator.c, tree-loop-distribution.c, tree-mudflap.c, tree-nested.c, tree-nomudflap.c, tree-nrv.c, tree-object-size.c, tree-optimize.c, tree-pass.h, tree-pretty-print.c, tree-profile.c, tree-scalar-evolution.c, tree-sra.c, tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-copyrename.c, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c, tree-ssa-live.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c, tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c, tree-ssa-structalias.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c, tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-ssanames.c, tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop-manip.c, tree-vect-stmts.c, tree-vectorizer.c, tree-vectorizer.h, tree-vrp.c, tree.c, tree.h, tsan.c, tsystem.h, value-prof.c, var-tracking.c, varasm.c, vec.h, vmsdbgout.c, vtable-verify.c, web.c: Add missing whitespace before "(". From-SVN: r203004
2013-09-28 10:42:34 +02:00
pass_reginfo_init (gcc::context *ctxt)
: rtl_opt_pass (pass_data_reginfo_init, ctxt)
Automated conversion of passes to C++ classes gcc/ Patch autogenerated by refactor_passes.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 03fe39476a4c4ea450b49e087cfa817b5f92021e * asan.c (pass_asan): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_asan): ...new pass_data instance and... (make_pass_asan): ...new function. (pass_asan_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_asan_O0): ...new pass_data instance and... (make_pass_asan_O0): ...new function. * auto-inc-dec.c (pass_inc_dec): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_inc_dec): ...new pass_data instance and... (make_pass_inc_dec): ...new function. * bb-reorder.c (pass_reorder_blocks): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reorder_blocks): ...new pass_data instance and... (make_pass_reorder_blocks): ...new function. (pass_duplicate_computed_gotos): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_duplicate_computed_gotos): ...new pass_data instance and... (make_pass_duplicate_computed_gotos): ...new function. (pass_partition_blocks): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_partition_blocks): ...new pass_data instance and... (make_pass_partition_blocks): ...new function. * bt-load.c (pass_branch_target_load_optimize1): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_branch_target_load_optimize1): ...new pass_data instance and... (make_pass_branch_target_load_optimize1): ...new function. (pass_branch_target_load_optimize2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_branch_target_load_optimize2): ...new pass_data instance and... (make_pass_branch_target_load_optimize2): ...new function. * cfgcleanup.c (pass_jump): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_jump): ...new pass_data instance and... (make_pass_jump): ...new function. (pass_jump2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_jump2): ...new pass_data instance and... (make_pass_jump2): ...new function. * cfgexpand.c (pass_expand): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_expand): ...new pass_data instance and... (make_pass_expand): ...new function. * cfgrtl.c (pass_free_cfg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_free_cfg): ...new pass_data instance and... (make_pass_free_cfg): ...new function. (pass_into_cfg_layout_mode): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_into_cfg_layout_mode): ...new pass_data instance and... (make_pass_into_cfg_layout_mode): ...new function. (pass_outof_cfg_layout_mode): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_outof_cfg_layout_mode): ...new pass_data instance and... (make_pass_outof_cfg_layout_mode): ...new function. * cgraphbuild.c (pass_build_cgraph_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_cgraph_edges): ...new pass_data instance and... (make_pass_build_cgraph_edges): ...new function. (pass_rebuild_cgraph_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_rebuild_cgraph_edges): ...new pass_data instance and... (make_pass_rebuild_cgraph_edges): ...new function. (pass_remove_cgraph_callee_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_remove_cgraph_callee_edges): ...new pass_data instance and... (make_pass_remove_cgraph_callee_edges): ...new function. * combine-stack-adj.c (pass_stack_adjustments): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_adjustments): ...new pass_data instance and... (make_pass_stack_adjustments): ...new function. * combine.c (pass_combine): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_combine): ...new pass_data instance and... (make_pass_combine): ...new function. * compare-elim.c (pass_compare_elim_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_compare_elim_after_reload): ...new pass_data instance and... (make_pass_compare_elim_after_reload): ...new function. * cprop.c (pass_rtl_cprop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_cprop): ...new pass_data instance and... (make_pass_rtl_cprop): ...new function. * cse.c (pass_cse): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse): ...new pass_data instance and... (make_pass_cse): ...new function. (pass_cse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse2): ...new pass_data instance and... (make_pass_cse2): ...new function. (pass_cse_after_global_opts): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse_after_global_opts): ...new pass_data instance and... (make_pass_cse_after_global_opts): ...new function. * dce.c (pass_ud_rtl_dce): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ud_rtl_dce): ...new pass_data instance and... (make_pass_ud_rtl_dce): ...new function. (pass_fast_rtl_dce): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_fast_rtl_dce): ...new pass_data instance and... (make_pass_fast_rtl_dce): ...new function. * df-core.c (pass_df_initialize_opt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_initialize_opt): ...new pass_data instance and... (make_pass_df_initialize_opt): ...new function. (pass_df_initialize_no_opt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_initialize_no_opt): ...new pass_data instance and... (make_pass_df_initialize_no_opt): ...new function. (pass_df_finish): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_finish): ...new pass_data instance and... (make_pass_df_finish): ...new function. * dse.c (pass_rtl_dse1): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_dse1): ...new pass_data instance and... (make_pass_rtl_dse1): ...new function. (pass_rtl_dse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_dse2): ...new pass_data instance and... (make_pass_rtl_dse2): ...new function. * dwarf2cfi.c (pass_dwarf2_frame): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_dwarf2_frame): ...new pass_data instance and... (make_pass_dwarf2_frame): ...new function. * except.c (pass_set_nothrow_function_flags): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_set_nothrow_function_flags): ...new pass_data instance and... (make_pass_set_nothrow_function_flags): ...new function. (pass_convert_to_eh_region_ranges): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_convert_to_eh_region_ranges): ...new pass_data instance and... (make_pass_convert_to_eh_region_ranges): ...new function. * final.c (pass_compute_alignments): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_compute_alignments): ...new pass_data instance and... (make_pass_compute_alignments): ...new function. (pass_final): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_final): ...new pass_data instance and... (make_pass_final): ...new function. (pass_shorten_branches): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_shorten_branches): ...new pass_data instance and... (make_pass_shorten_branches): ...new function. (pass_clean_state): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_clean_state): ...new pass_data instance and... (make_pass_clean_state): ...new function. * function.c (pass_instantiate_virtual_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_instantiate_virtual_regs): ...new pass_data instance and... (make_pass_instantiate_virtual_regs): ...new function. (pass_leaf_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_leaf_regs): ...new pass_data instance and... (make_pass_leaf_regs): ...new function. (pass_thread_prologue_and_epilogue): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_thread_prologue_and_epilogue): ...new pass_data instance and... (make_pass_thread_prologue_and_epilogue): ...new function. (pass_match_asm_constraints): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_match_asm_constraints): ...new pass_data instance and... (make_pass_match_asm_constraints): ...new function. * fwprop.c (pass_rtl_fwprop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_fwprop): ...new pass_data instance and... (make_pass_rtl_fwprop): ...new function. (pass_rtl_fwprop_addr): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_fwprop_addr): ...new pass_data instance and... (make_pass_rtl_fwprop_addr): ...new function. * gcse.c (pass_rtl_pre): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_pre): ...new pass_data instance and... (make_pass_rtl_pre): ...new function. (pass_rtl_hoist): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_hoist): ...new pass_data instance and... (make_pass_rtl_hoist): ...new function. * gimple-low.c (pass_lower_cf): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_cf): ...new pass_data instance and... (make_pass_lower_cf): ...new function. * gimple-ssa-strength-reduction.c (pass_strength_reduction): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strength_reduction): ...new pass_data instance and... (make_pass_strength_reduction): ...new function. * ifcvt.c (pass_rtl_ifcvt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_ifcvt): ...new pass_data instance and... (make_pass_rtl_ifcvt): ...new function. (pass_if_after_combine): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_if_after_combine): ...new pass_data instance and... (make_pass_if_after_combine): ...new function. (pass_if_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_if_after_reload): ...new pass_data instance and... (make_pass_if_after_reload): ...new function. * init-regs.c (pass_initialize_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_initialize_regs): ...new pass_data instance and... (make_pass_initialize_regs): ...new function. * ipa-cp.c (pass_ipa_cp): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_cp): ...new pass_data instance and... (make_pass_ipa_cp): ...new function. * ipa-inline-analysis.c (pass_inline_parameters): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_inline_parameters): ...new pass_data instance and... (make_pass_inline_parameters): ...new function. * ipa-inline.c (pass_early_inline): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_inline): ...new pass_data instance and... (make_pass_early_inline): ...new function. (pass_ipa_inline): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_inline): ...new pass_data instance and... (make_pass_ipa_inline): ...new function. * ipa-pure-const.c (pass_local_pure_const): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_local_pure_const): ...new pass_data instance and... (make_pass_local_pure_const): ...new function. (pass_ipa_pure_const): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_pure_const): ...new pass_data instance and... (make_pass_ipa_pure_const): ...new function. * ipa-reference.c (pass_ipa_reference): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_reference): ...new pass_data instance and... (make_pass_ipa_reference): ...new function. * ipa-split.c (pass_split_functions): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_split_functions): ...new pass_data instance and... (make_pass_split_functions): ...new function. (pass_feedback_split_functions): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_feedback_split_functions): ...new pass_data instance and... (make_pass_feedback_split_functions): ...new function. * ipa.c (pass_ipa_function_and_variable_visibility): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_function_and_variable_visibility): ...new pass_data instance and... (make_pass_ipa_function_and_variable_visibility): ...new function. (pass_ipa_free_inline_summary): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_free_inline_summary): ...new pass_data instance and... (make_pass_ipa_free_inline_summary): ...new function. (pass_ipa_whole_program_visibility): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_whole_program_visibility): ...new pass_data instance and... (make_pass_ipa_whole_program_visibility): ...new function. (pass_ipa_profile): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_profile): ...new pass_data instance and... (make_pass_ipa_profile): ...new function. (pass_ipa_cdtor_merge): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_cdtor_merge): ...new pass_data instance and... (make_pass_ipa_cdtor_merge): ...new function. * ira.c (pass_ira): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ira): ...new pass_data instance and... (make_pass_ira): ...new function. (pass_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reload): ...new pass_data instance and... (make_pass_reload): ...new function. * jump.c (pass_cleanup_barriers): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cleanup_barriers): ...new pass_data instance and... (make_pass_cleanup_barriers): ...new function. * loop-init.c (pass_loop2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_loop2): ...new pass_data instance and... (make_pass_loop2): ...new function. (pass_rtl_loop_init): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_loop_init): ...new pass_data instance and... (make_pass_rtl_loop_init): ...new function. (pass_rtl_loop_done): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_loop_done): ...new pass_data instance and... (make_pass_rtl_loop_done): ...new function. (pass_rtl_move_loop_invariants): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_move_loop_invariants): ...new pass_data instance and... (make_pass_rtl_move_loop_invariants): ...new function. (pass_rtl_unswitch): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_unswitch): ...new pass_data instance and... (make_pass_rtl_unswitch): ...new function. (pass_rtl_unroll_and_peel_loops): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_unroll_and_peel_loops): ...new pass_data instance and... (make_pass_rtl_unroll_and_peel_loops): ...new function. (pass_rtl_doloop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_doloop): ...new pass_data instance and... (make_pass_rtl_doloop): ...new function. * lower-subreg.c (pass_lower_subreg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_lower_subreg): ...new pass_data instance and... (make_pass_lower_subreg): ...new function. (pass_lower_subreg2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_lower_subreg2): ...new pass_data instance and... (make_pass_lower_subreg2): ...new function. * lto-streamer-out.c (pass_ipa_lto_gimple_out): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_lto_gimple_out): ...new pass_data instance and... (make_pass_ipa_lto_gimple_out): ...new function. (pass_ipa_lto_finish_out): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_lto_finish_out): ...new pass_data instance and... (make_pass_ipa_lto_finish_out): ...new function. * mode-switching.c (pass_mode_switching): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mode_switching): ...new pass_data instance and... (make_pass_mode_switching): ...new function. * modulo-sched.c (pass_sms): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sms): ...new pass_data instance and... (make_pass_sms): ...new function. * omp-low.c (pass_expand_omp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_expand_omp): ...new pass_data instance and... (make_pass_expand_omp): ...new function. (pass_lower_omp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_omp): ...new pass_data instance and... (make_pass_lower_omp): ...new function. (pass_diagnose_omp_blocks): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_diagnose_omp_blocks): ...new pass_data instance and... (make_pass_diagnose_omp_blocks): ...new function. * passes.c (pass_early_local_passes): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_early_local_passes): ...new pass_data instance and... (make_pass_early_local_passes): ...new function. (pass_all_early_optimizations): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_early_optimizations): ...new pass_data instance and... (make_pass_all_early_optimizations): ...new function. (pass_all_optimizations): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_optimizations): ...new pass_data instance and... (make_pass_all_optimizations): ...new function. (pass_all_optimizations_g): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_optimizations_g): ...new pass_data instance and... (make_pass_all_optimizations_g): ...new function. (pass_rest_of_compilation): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rest_of_compilation): ...new pass_data instance and... (make_pass_rest_of_compilation): ...new function. (pass_postreload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_postreload): ...new pass_data instance and... (make_pass_postreload): ...new function. * postreload-gcse.c (pass_gcse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_gcse2): ...new pass_data instance and... (make_pass_gcse2): ...new function. * postreload.c (pass_postreload_cse): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_postreload_cse): ...new pass_data instance and... (make_pass_postreload_cse): ...new function. * predict.c (pass_profile): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_profile): ...new pass_data instance and... (make_pass_profile): ...new function. (pass_strip_predict_hints): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strip_predict_hints): ...new pass_data instance and... (make_pass_strip_predict_hints): ...new function. * recog.c (pass_peephole2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_peephole2): ...new pass_data instance and... (make_pass_peephole2): ...new function. (pass_split_all_insns): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_all_insns): ...new pass_data instance and... (make_pass_split_all_insns): ...new function. (pass_split_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_after_reload): ...new pass_data instance and... (make_pass_split_after_reload): ...new function. (pass_split_before_regstack): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_before_regstack): ...new pass_data instance and... (make_pass_split_before_regstack): ...new function. (pass_split_before_sched2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_before_sched2): ...new pass_data instance and... (make_pass_split_before_sched2): ...new function. (pass_split_for_shorten_branches): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_for_shorten_branches): ...new pass_data instance and... (make_pass_split_for_shorten_branches): ...new function. * ree.c (pass_ree): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ree): ...new pass_data instance and... (make_pass_ree): ...new function. * reg-stack.c (pass_stack_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_regs): ...new pass_data instance and... (make_pass_stack_regs): ...new function. (pass_stack_regs_run): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_regs_run): ...new pass_data instance and... (make_pass_stack_regs_run): ...new function. * regcprop.c (pass_cprop_hardreg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cprop_hardreg): ...new pass_data instance and... (make_pass_cprop_hardreg): ...new function. * reginfo.c (pass_reginfo_init): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reginfo_init): ...new pass_data instance and... (make_pass_reginfo_init): ...new function. * regmove.c (pass_regmove): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_regmove): ...new pass_data instance and... (make_pass_regmove): ...new function. * regrename.c (pass_regrename): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_regrename): ...new pass_data instance and... (make_pass_regrename): ...new function. * reorg.c (pass_delay_slots): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_delay_slots): ...new pass_data instance and... (make_pass_delay_slots): ...new function. (pass_machine_reorg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_machine_reorg): ...new pass_data instance and... (make_pass_machine_reorg): ...new function. * sched-rgn.c (pass_sched): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sched): ...new pass_data instance and... (make_pass_sched): ...new function. (pass_sched2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sched2): ...new pass_data instance and... (make_pass_sched2): ...new function. * stack-ptr-mod.c (pass_stack_ptr_mod): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_ptr_mod): ...new pass_data instance and... (make_pass_stack_ptr_mod): ...new function. * store-motion.c (pass_rtl_store_motion): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_store_motion): ...new pass_data instance and... (make_pass_rtl_store_motion): ...new function. * tracer.c (pass_tracer): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tracer): ...new pass_data instance and... (make_pass_tracer): ...new function. * trans-mem.c (pass_diagnose_tm_blocks): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_diagnose_tm_blocks): ...new pass_data instance and... (make_pass_diagnose_tm_blocks): ...new function. (pass_lower_tm): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_tm): ...new pass_data instance and... (make_pass_lower_tm): ...new function. (pass_tm_init): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_init): ...new pass_data instance and... (make_pass_tm_init): ...new function. (pass_tm_mark): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_mark): ...new pass_data instance and... (make_pass_tm_mark): ...new function. (pass_tm_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_edges): ...new pass_data instance and... (make_pass_tm_edges): ...new function. (pass_tm_memopt): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_memopt): ...new pass_data instance and... (make_pass_tm_memopt): ...new function. (pass_ipa_tm): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_tm): ...new pass_data instance and... (make_pass_ipa_tm): ...new function. * tree-call-cdce.c (pass_call_cdce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_call_cdce): ...new pass_data instance and... (make_pass_call_cdce): ...new function. * tree-cfg.c (pass_build_cfg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_cfg): ...new pass_data instance and... (make_pass_build_cfg): ...new function. (pass_split_crit_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_split_crit_edges): ...new pass_data instance and... (make_pass_split_crit_edges): ...new function. (pass_warn_function_return): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_function_return): ...new pass_data instance and... (make_pass_warn_function_return): ...new function. (pass_warn_function_noreturn): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_function_noreturn): ...new pass_data instance and... (make_pass_warn_function_noreturn): ...new function. (pass_warn_unused_result): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_unused_result): ...new pass_data instance and... (make_pass_warn_unused_result): ...new function. * tree-cfgcleanup.c (pass_merge_phi): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_merge_phi): ...new pass_data instance and... (make_pass_merge_phi): ...new function. * tree-complex.c (pass_lower_complex): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_complex): ...new pass_data instance and... (make_pass_lower_complex): ...new function. (pass_lower_complex_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_complex_O0): ...new pass_data instance and... (make_pass_lower_complex_O0): ...new function. * tree-eh.c (pass_lower_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_eh): ...new pass_data instance and... (make_pass_lower_eh): ...new function. (pass_refactor_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_refactor_eh): ...new pass_data instance and... (make_pass_refactor_eh): ...new function. (pass_lower_resx): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_resx): ...new pass_data instance and... (make_pass_lower_resx): ...new function. (pass_lower_eh_dispatch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_eh_dispatch): ...new pass_data instance and... (make_pass_lower_eh_dispatch): ...new function. (pass_cleanup_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cleanup_eh): ...new pass_data instance and... (make_pass_cleanup_eh): ...new function. * tree-emutls.c (pass_ipa_lower_emutls): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_lower_emutls): ...new pass_data instance and... (make_pass_ipa_lower_emutls): ...new function. * tree-if-conv.c (pass_if_conversion): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_if_conversion): ...new pass_data instance and... (make_pass_if_conversion): ...new function. * tree-into-ssa.c (pass_build_ssa): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_ssa): ...new pass_data instance and... (make_pass_build_ssa): ...new function. * tree-loop-distribution.c (pass_loop_distribution): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_loop_distribution): ...new pass_data instance and... (make_pass_loop_distribution): ...new function. * tree-mudflap.c (pass_mudflap_1): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_1): ...new pass_data instance and... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_2): ...new pass_data instance and... (make_pass_mudflap_2): ...new function. * tree-nomudflap.c (pass_mudflap_1): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_1): ...new pass_data instance and... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_2): ...new pass_data instance and... (make_pass_mudflap_2): ...new function. * tree-nrv.c (pass_nrv): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_nrv): ...new pass_data instance and... (make_pass_nrv): ...new function. (pass_return_slot): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_return_slot): ...new pass_data instance and... (make_pass_return_slot): ...new function. * tree-object-size.c (pass_object_sizes): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_object_sizes): ...new pass_data instance and... (make_pass_object_sizes): ...new function. * tree-optimize.c (pass_cleanup_cfg_post_optimizing): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cleanup_cfg_post_optimizing): ...new pass_data instance and... (make_pass_cleanup_cfg_post_optimizing): ...new function. (pass_fixup_cfg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fixup_cfg): ...new pass_data instance and... (make_pass_fixup_cfg): ...new function. * tree-pass.h (pass_mudflap_1): Replace declaration with that of... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Replace declaration with that of... (make_pass_mudflap_2): ...new function. (pass_asan): Replace declaration with that of... (make_pass_asan): ...new function. (pass_asan_O0): Replace declaration with that of... (make_pass_asan_O0): ...new function. (pass_tsan): Replace declaration with that of... (make_pass_tsan): ...new function. (pass_tsan_O0): Replace declaration with that of... (make_pass_tsan_O0): ...new function. (pass_lower_cf): Replace declaration with that of... (make_pass_lower_cf): ...new function. (pass_refactor_eh): Replace declaration with that of... (make_pass_refactor_eh): ...new function. (pass_lower_eh): Replace declaration with that of... (make_pass_lower_eh): ...new function. (pass_lower_eh_dispatch): Replace declaration with that of... (make_pass_lower_eh_dispatch): ...new function. (pass_lower_resx): Replace declaration with that of... (make_pass_lower_resx): ...new function. (pass_build_cfg): Replace declaration with that of... (make_pass_build_cfg): ...new function. (pass_early_tree_profile): Replace declaration with that of... (make_pass_early_tree_profile): ...new function. (pass_cleanup_eh): Replace declaration with that of... (make_pass_cleanup_eh): ...new function. (pass_sra): Replace declaration with that of... (make_pass_sra): ...new function. (pass_sra_early): Replace declaration with that of... (make_pass_sra_early): ...new function. (pass_early_ipa_sra): Replace declaration with that of... (make_pass_early_ipa_sra): ...new function. (pass_tail_recursion): Replace declaration with that of... (make_pass_tail_recursion): ...new function. (pass_tail_calls): Replace declaration with that of... (make_pass_tail_calls): ...new function. (pass_tree_loop): Replace declaration with that of... (make_pass_tree_loop): ...new function. (pass_tree_loop_init): Replace declaration with that of... (make_pass_tree_loop_init): ...new function. (pass_lim): Replace declaration with that of... (make_pass_lim): ...new function. (pass_tree_unswitch): Replace declaration with that of... (make_pass_tree_unswitch): ...new function. (pass_predcom): Replace declaration with that of... (make_pass_predcom): ...new function. (pass_iv_canon): Replace declaration with that of... (make_pass_iv_canon): ...new function. (pass_scev_cprop): Replace declaration with that of... (make_pass_scev_cprop): ...new function. (pass_empty_loop): Replace declaration with that of... (make_pass_empty_loop): ...new function. (pass_record_bounds): Replace declaration with that of... (make_pass_record_bounds): ...new function. (pass_graphite): Replace declaration with that of... (make_pass_graphite): ...new function. (pass_graphite_transforms): Replace declaration with that of... (make_pass_graphite_transforms): ...new function. (pass_if_conversion): Replace declaration with that of... (make_pass_if_conversion): ...new function. (pass_loop_distribution): Replace declaration with that of... (make_pass_loop_distribution): ...new function. (pass_vectorize): Replace declaration with that of... (make_pass_vectorize): ...new function. (pass_slp_vectorize): Replace declaration with that of... (make_pass_slp_vectorize): ...new function. (pass_complete_unroll): Replace declaration with that of... (make_pass_complete_unroll): ...new function. (pass_complete_unrolli): Replace declaration with that of... (make_pass_complete_unrolli): ...new function. (pass_parallelize_loops): Replace declaration with that of... (make_pass_parallelize_loops): ...new function. (pass_loop_prefetch): Replace declaration with that of... (make_pass_loop_prefetch): ...new function. (pass_iv_optimize): Replace declaration with that of... (make_pass_iv_optimize): ...new function. (pass_tree_loop_done): Replace declaration with that of... (make_pass_tree_loop_done): ...new function. (pass_ch): Replace declaration with that of... (make_pass_ch): ...new function. (pass_ccp): Replace declaration with that of... (make_pass_ccp): ...new function. (pass_phi_only_cprop): Replace declaration with that of... (make_pass_phi_only_cprop): ...new function. (pass_build_ssa): Replace declaration with that of... (make_pass_build_ssa): ...new function. (pass_build_alias): Replace declaration with that of... (make_pass_build_alias): ...new function. (pass_build_ealias): Replace declaration with that of... (make_pass_build_ealias): ...new function. (pass_dominator): Replace declaration with that of... (make_pass_dominator): ...new function. (pass_dce): Replace declaration with that of... (make_pass_dce): ...new function. (pass_dce_loop): Replace declaration with that of... (make_pass_dce_loop): ...new function. (pass_cd_dce): Replace declaration with that of... (make_pass_cd_dce): ...new function. (pass_call_cdce): Replace declaration with that of... (make_pass_call_cdce): ...new function. (pass_merge_phi): Replace declaration with that of... (make_pass_merge_phi): ...new function. (pass_split_crit_edges): Replace declaration with that of... (make_pass_split_crit_edges): ...new function. (pass_pre): Replace declaration with that of... (make_pass_pre): ...new function. (pass_profile): Replace declaration with that of... (make_pass_profile): ...new function. (pass_strip_predict_hints): Replace declaration with that of... (make_pass_strip_predict_hints): ...new function. (pass_lower_complex_O0): Replace declaration with that of... (make_pass_lower_complex_O0): ...new function. (pass_lower_complex): Replace declaration with that of... (make_pass_lower_complex): ...new function. (pass_lower_vector): Replace declaration with that of... (make_pass_lower_vector): ...new function. (pass_lower_vector_ssa): Replace declaration with that of... (make_pass_lower_vector_ssa): ...new function. (pass_lower_omp): Replace declaration with that of... (make_pass_lower_omp): ...new function. (pass_diagnose_omp_blocks): Replace declaration with that of... (make_pass_diagnose_omp_blocks): ...new function. (pass_expand_omp): Replace declaration with that of... (make_pass_expand_omp): ...new function. (pass_expand_omp_ssa): Replace declaration with that of... (make_pass_expand_omp_ssa): ...new function. (pass_object_sizes): Replace declaration with that of... (make_pass_object_sizes): ...new function. (pass_strlen): Replace declaration with that of... (make_pass_strlen): ...new function. (pass_fold_builtins): Replace declaration with that of... (make_pass_fold_builtins): ...new function. (pass_stdarg): Replace declaration with that of... (make_pass_stdarg): ...new function. (pass_early_warn_uninitialized): Replace declaration with that of... (make_pass_early_warn_uninitialized): ...new function. (pass_late_warn_uninitialized): Replace declaration with that of... (make_pass_late_warn_uninitialized): ...new function. (pass_cse_reciprocals): Replace declaration with that of... (make_pass_cse_reciprocals): ...new function. (pass_cse_sincos): Replace declaration with that of... (make_pass_cse_sincos): ...new function. (pass_optimize_bswap): Replace declaration with that of... (make_pass_optimize_bswap): ...new function. (pass_optimize_widening_mul): Replace declaration with that of... (make_pass_optimize_widening_mul): ...new function. (pass_warn_function_return): Replace declaration with that of... (make_pass_warn_function_return): ...new function. (pass_warn_function_noreturn): Replace declaration with that of... (make_pass_warn_function_noreturn): ...new function. (pass_cselim): Replace declaration with that of... (make_pass_cselim): ...new function. (pass_phiopt): Replace declaration with that of... (make_pass_phiopt): ...new function. (pass_forwprop): Replace declaration with that of... (make_pass_forwprop): ...new function. (pass_phiprop): Replace declaration with that of... (make_pass_phiprop): ...new function. (pass_tree_ifcombine): Replace declaration with that of... (make_pass_tree_ifcombine): ...new function. (pass_dse): Replace declaration with that of... (make_pass_dse): ...new function. (pass_nrv): Replace declaration with that of... (make_pass_nrv): ...new function. (pass_rename_ssa_copies): Replace declaration with that of... (make_pass_rename_ssa_copies): ...new function. (pass_sink_code): Replace declaration with that of... (make_pass_sink_code): ...new function. (pass_fre): Replace declaration with that of... (make_pass_fre): ...new function. (pass_check_data_deps): Replace declaration with that of... (make_pass_check_data_deps): ...new function. (pass_copy_prop): Replace declaration with that of... (make_pass_copy_prop): ...new function. (pass_vrp): Replace declaration with that of... (make_pass_vrp): ...new function. (pass_uncprop): Replace declaration with that of... (make_pass_uncprop): ...new function. (pass_return_slot): Replace declaration with that of... (make_pass_return_slot): ...new function. (pass_reassoc): Replace declaration with that of... (make_pass_reassoc): ...new function. (pass_rebuild_cgraph_edges): Replace declaration with that of... (make_pass_rebuild_cgraph_edges): ...new function. (pass_remove_cgraph_callee_edges): Replace declaration with that of... (make_pass_remove_cgraph_callee_edges): ...new function. (pass_build_cgraph_edges): Replace declaration with that of... (make_pass_build_cgraph_edges): ...new function. (pass_local_pure_const): Replace declaration with that of... (make_pass_local_pure_const): ...new function. (pass_tracer): Replace declaration with that of... (make_pass_tracer): ...new function. (pass_warn_unused_result): Replace declaration with that of... (make_pass_warn_unused_result): ...new function. (pass_diagnose_tm_blocks): Replace declaration with that of... (make_pass_diagnose_tm_blocks): ...new function. (pass_lower_tm): Replace declaration with that of... (make_pass_lower_tm): ...new function. (pass_tm_init): Replace declaration with that of... (make_pass_tm_init): ...new function. (pass_tm_mark): Replace declaration with that of... (make_pass_tm_mark): ...new function. (pass_tm_memopt): Replace declaration with that of... (make_pass_tm_memopt): ...new function. (pass_tm_edges): Replace declaration with that of... (make_pass_tm_edges): ...new function. (pass_split_functions): Replace declaration with that of... (make_pass_split_functions): ...new function. (pass_feedback_split_functions): Replace declaration with that of... (make_pass_feedback_split_functions): ...new function. (pass_strength_reduction): Replace declaration with that of... (make_pass_strength_reduction): ...new function. (pass_ipa_lower_emutls): Replace declaration with that of... (make_pass_ipa_lower_emutls): ...new function. (pass_ipa_function_and_variable_visibility): Replace declaration with that of... (make_pass_ipa_function_and_variable_visibility): ...new function. (pass_ipa_tree_profile): Replace declaration with that of... (make_pass_ipa_tree_profile): ...new function. (pass_early_local_passes): Replace declaration with that of... (make_pass_early_local_passes): ...new function. (pass_ipa_whole_program_visibility): Replace declaration with that of... (make_pass_ipa_whole_program_visibility): ...new function. (pass_ipa_lto_gimple_out): Replace declaration with that of... (make_pass_ipa_lto_gimple_out): ...new function. (pass_ipa_increase_alignment): Replace declaration with that of... (make_pass_ipa_increase_alignment): ...new function. (pass_ipa_inline): Replace declaration with that of... (make_pass_ipa_inline): ...new function. (pass_ipa_free_lang_data): Replace declaration with that of... (make_pass_ipa_free_lang_data): ...new function. (pass_ipa_free_inline_summary): Replace declaration with that of... (make_pass_ipa_free_inline_summary): ...new function. (pass_ipa_cp): Replace declaration with that of... (make_pass_ipa_cp): ...new function. (pass_ipa_reference): Replace declaration with that of... (make_pass_ipa_reference): ...new function. (pass_ipa_pure_const): Replace declaration with that of... (make_pass_ipa_pure_const): ...new function. (pass_ipa_pta): Replace declaration with that of... (make_pass_ipa_pta): ...new function. (pass_ipa_lto_finish_out): Replace declaration with that of... (make_pass_ipa_lto_finish_out): ...new function. (pass_ipa_tm): Replace declaration with that of... (make_pass_ipa_tm): ...new function. (pass_ipa_profile): Replace declaration with that of... (make_pass_ipa_profile): ...new function. (pass_ipa_cdtor_merge): Replace declaration with that of... (make_pass_ipa_cdtor_merge): ...new function. (pass_cleanup_cfg_post_optimizing): Replace declaration with that of... (make_pass_cleanup_cfg_post_optimizing): ...new function. (pass_init_datastructures): Replace declaration with that of... (make_pass_init_datastructures): ...new function. (pass_fixup_cfg): Replace declaration with that of... (make_pass_fixup_cfg): ...new function. (pass_expand): Replace declaration with that of... (make_pass_expand): ...new function. (pass_instantiate_virtual_regs): Replace declaration with that of... (make_pass_instantiate_virtual_regs): ...new function. (pass_rtl_fwprop): Replace declaration with that of... (make_pass_rtl_fwprop): ...new function. (pass_rtl_fwprop_addr): Replace declaration with that of... (make_pass_rtl_fwprop_addr): ...new function. (pass_jump): Replace declaration with that of... (make_pass_jump): ...new function. (pass_jump2): Replace declaration with that of... (make_pass_jump2): ...new function. (pass_lower_subreg): Replace declaration with that of... (make_pass_lower_subreg): ...new function. (pass_cse): Replace declaration with that of... (make_pass_cse): ...new function. (pass_fast_rtl_dce): Replace declaration with that of... (make_pass_fast_rtl_dce): ...new function. (pass_ud_rtl_dce): Replace declaration with that of... (make_pass_ud_rtl_dce): ...new function. (pass_rtl_dce): Replace declaration with that of... (make_pass_rtl_dce): ...new function. (pass_rtl_dse1): Replace declaration with that of... (make_pass_rtl_dse1): ...new function. (pass_rtl_dse2): Replace declaration with that of... (make_pass_rtl_dse2): ...new function. (pass_rtl_dse3): Replace declaration with that of... (make_pass_rtl_dse3): ...new function. (pass_rtl_cprop): Replace declaration with that of... (make_pass_rtl_cprop): ...new function. (pass_rtl_pre): Replace declaration with that of... (make_pass_rtl_pre): ...new function. (pass_rtl_hoist): Replace declaration with that of... (make_pass_rtl_hoist): ...new function. (pass_rtl_store_motion): Replace declaration with that of... (make_pass_rtl_store_motion): ...new function. (pass_cse_after_global_opts): Replace declaration with that of... (make_pass_cse_after_global_opts): ...new function. (pass_rtl_ifcvt): Replace declaration with that of... (make_pass_rtl_ifcvt): ...new function. (pass_into_cfg_layout_mode): Replace declaration with that of... (make_pass_into_cfg_layout_mode): ...new function. (pass_outof_cfg_layout_mode): Replace declaration with that of... (make_pass_outof_cfg_layout_mode): ...new function. (pass_loop2): Replace declaration with that of... (make_pass_loop2): ...new function. (pass_rtl_loop_init): Replace declaration with that of... (make_pass_rtl_loop_init): ...new function. (pass_rtl_move_loop_invariants): Replace declaration with that of... (make_pass_rtl_move_loop_invariants): ...new function. (pass_rtl_unswitch): Replace declaration with that of... (make_pass_rtl_unswitch): ...new function. (pass_rtl_unroll_and_peel_loops): Replace declaration with that of... (make_pass_rtl_unroll_and_peel_loops): ...new function. (pass_rtl_doloop): Replace declaration with that of... (make_pass_rtl_doloop): ...new function. (pass_rtl_loop_done): Replace declaration with that of... (make_pass_rtl_loop_done): ...new function. (pass_web): Replace declaration with that of... (make_pass_web): ...new function. (pass_cse2): Replace declaration with that of... (make_pass_cse2): ...new function. (pass_df_initialize_opt): Replace declaration with that of... (make_pass_df_initialize_opt): ...new function. (pass_df_initialize_no_opt): Replace declaration with that of... (make_pass_df_initialize_no_opt): ...new function. (pass_reginfo_init): Replace declaration with that of... (make_pass_reginfo_init): ...new function. (pass_inc_dec): Replace declaration with that of... (make_pass_inc_dec): ...new function. (pass_stack_ptr_mod): Replace declaration with that of... (make_pass_stack_ptr_mod): ...new function. (pass_initialize_regs): Replace declaration with that of... (make_pass_initialize_regs): ...new function. (pass_combine): Replace declaration with that of... (make_pass_combine): ...new function. (pass_if_after_combine): Replace declaration with that of... (make_pass_if_after_combine): ...new function. (pass_ree): Replace declaration with that of... (make_pass_ree): ...new function. (pass_partition_blocks): Replace declaration with that of... (make_pass_partition_blocks): ...new function. (pass_match_asm_constraints): Replace declaration with that of... (make_pass_match_asm_constraints): ...new function. (pass_regmove): Replace declaration with that of... (make_pass_regmove): ...new function. (pass_split_all_insns): Replace declaration with that of... (make_pass_split_all_insns): ...new function. (pass_fast_rtl_byte_dce): Replace declaration with that of... (make_pass_fast_rtl_byte_dce): ...new function. (pass_lower_subreg2): Replace declaration with that of... (make_pass_lower_subreg2): ...new function. (pass_mode_switching): Replace declaration with that of... (make_pass_mode_switching): ...new function. (pass_sms): Replace declaration with that of... (make_pass_sms): ...new function. (pass_sched): Replace declaration with that of... (make_pass_sched): ...new function. (pass_ira): Replace declaration with that of... (make_pass_ira): ...new function. (pass_reload): Replace declaration with that of... (make_pass_reload): ...new function. (pass_clean_state): Replace declaration with that of... (make_pass_clean_state): ...new function. (pass_branch_prob): Replace declaration with that of... (make_pass_branch_prob): ...new function. (pass_value_profile_transformations): Replace declaration with that of... (make_pass_value_profile_transformations): ...new function. (pass_postreload_cse): Replace declaration with that of... (make_pass_postreload_cse): ...new function. (pass_gcse2): Replace declaration with that of... (make_pass_gcse2): ...new function. (pass_split_after_reload): Replace declaration with that of... (make_pass_split_after_reload): ...new function. (pass_branch_target_load_optimize1): Replace declaration with that of... (make_pass_branch_target_load_optimize1): ...new function. (pass_thread_prologue_and_epilogue): Replace declaration with that of... (make_pass_thread_prologue_and_epilogue): ...new function. (pass_stack_adjustments): Replace declaration with that of... (make_pass_stack_adjustments): ...new function. (pass_peephole2): Replace declaration with that of... (make_pass_peephole2): ...new function. (pass_if_after_reload): Replace declaration with that of... (make_pass_if_after_reload): ...new function. (pass_regrename): Replace declaration with that of... (make_pass_regrename): ...new function. (pass_cprop_hardreg): Replace declaration with that of... (make_pass_cprop_hardreg): ...new function. (pass_reorder_blocks): Replace declaration with that of... (make_pass_reorder_blocks): ...new function. (pass_branch_target_load_optimize2): Replace declaration with that of... (make_pass_branch_target_load_optimize2): ...new function. (pass_leaf_regs): Replace declaration with that of... (make_pass_leaf_regs): ...new function. (pass_split_before_sched2): Replace declaration with that of... (make_pass_split_before_sched2): ...new function. (pass_compare_elim_after_reload): Replace declaration with that of... (make_pass_compare_elim_after_reload): ...new function. (pass_sched2): Replace declaration with that of... (make_pass_sched2): ...new function. (pass_stack_regs): Replace declaration with that of... (make_pass_stack_regs): ...new function. (pass_stack_regs_run): Replace declaration with that of... (make_pass_stack_regs_run): ...new function. (pass_df_finish): Replace declaration with that of... (make_pass_df_finish): ...new function. (pass_compute_alignments): Replace declaration with that of... (make_pass_compute_alignments): ...new function. (pass_duplicate_computed_gotos): Replace declaration with that of... (make_pass_duplicate_computed_gotos): ...new function. (pass_variable_tracking): Replace declaration with that of... (make_pass_variable_tracking): ...new function. (pass_free_cfg): Replace declaration with that of... (make_pass_free_cfg): ...new function. (pass_machine_reorg): Replace declaration with that of... (make_pass_machine_reorg): ...new function. (pass_cleanup_barriers): Replace declaration with that of... (make_pass_cleanup_barriers): ...new function. (pass_delay_slots): Replace declaration with that of... (make_pass_delay_slots): ...new function. (pass_split_for_shorten_branches): Replace declaration with that of... (make_pass_split_for_shorten_branches): ...new function. (pass_split_before_regstack): Replace declaration with that of... (make_pass_split_before_regstack): ...new function. (pass_convert_to_eh_region_ranges): Replace declaration with that of... (make_pass_convert_to_eh_region_ranges): ...new function. (pass_shorten_branches): Replace declaration with that of... (make_pass_shorten_branches): ...new function. (pass_set_nothrow_function_flags): Replace declaration with that of... (make_pass_set_nothrow_function_flags): ...new function. (pass_dwarf2_frame): Replace declaration with that of... (make_pass_dwarf2_frame): ...new function. (pass_final): Replace declaration with that of... (make_pass_final): ...new function. (pass_rtl_seqabstr): Replace declaration with that of... (make_pass_rtl_seqabstr): ...new function. (pass_release_ssa_names): Replace declaration with that of... (make_pass_release_ssa_names): ...new function. (pass_early_inline): Replace declaration with that of... (make_pass_early_inline): ...new function. (pass_inline_parameters): Replace declaration with that of... (make_pass_inline_parameters): ...new function. (pass_update_address_taken): Replace declaration with that of... (make_pass_update_address_taken): ...new function. (pass_convert_switch): Replace declaration with that of... (make_pass_convert_switch): ...new function. * tree-profile.c (pass_ipa_tree_profile): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_tree_profile): ...new pass_data instance and... (make_pass_ipa_tree_profile): ...new function. * tree-sra.c (pass_sra_early): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sra_early): ...new pass_data instance and... (make_pass_sra_early): ...new function. (pass_sra): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sra): ...new pass_data instance and... (make_pass_sra): ...new function. (pass_early_ipa_sra): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_ipa_sra): ...new pass_data instance and... (make_pass_early_ipa_sra): ...new function. * tree-ssa-ccp.c (pass_ccp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_ccp): ...new pass_data instance and... (make_pass_ccp): ...new function. (pass_fold_builtins): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fold_builtins): ...new pass_data instance and... (make_pass_fold_builtins): ...new function. * tree-ssa-copy.c (pass_copy_prop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_copy_prop): ...new pass_data instance and... (make_pass_copy_prop): ...new function. * tree-ssa-copyrename.c (pass_rename_ssa_copies): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_rename_ssa_copies): ...new pass_data instance and... (make_pass_rename_ssa_copies): ...new function. * tree-ssa-dce.c (pass_dce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dce): ...new pass_data instance and... (make_pass_dce): ...new function. (pass_dce_loop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dce_loop): ...new pass_data instance and... (make_pass_dce_loop): ...new function. (pass_cd_dce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cd_dce): ...new pass_data instance and... (make_pass_cd_dce): ...new function. * tree-ssa-dom.c (pass_dominator): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dominator): ...new pass_data instance and... (make_pass_dominator): ...new function. (pass_phi_only_cprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phi_only_cprop): ...new pass_data instance and... (make_pass_phi_only_cprop): ...new function. * tree-ssa-dse.c (pass_dse): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dse): ...new pass_data instance and... (make_pass_dse): ...new function. * tree-ssa-forwprop.c (pass_forwprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_forwprop): ...new pass_data instance and... (make_pass_forwprop): ...new function. * tree-ssa-ifcombine.c (pass_tree_ifcombine): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_ifcombine): ...new pass_data instance and... (make_pass_tree_ifcombine): ...new function. * tree-ssa-loop-ch.c (pass_ch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_ch): ...new pass_data instance and... (make_pass_ch): ...new function. * tree-ssa-loop.c (pass_tree_loop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop): ...new pass_data instance and... (make_pass_tree_loop): ...new function. (pass_tree_loop_init): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop_init): ...new pass_data instance and... (make_pass_tree_loop_init): ...new function. (pass_lim): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lim): ...new pass_data instance and... (make_pass_lim): ...new function. (pass_tree_unswitch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_unswitch): ...new pass_data instance and... (make_pass_tree_unswitch): ...new function. (pass_predcom): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_predcom): ...new pass_data instance and... (make_pass_predcom): ...new function. (pass_vectorize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_vectorize): ...new pass_data instance and... (make_pass_vectorize): ...new function. (pass_graphite): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_graphite): ...new pass_data instance and... (make_pass_graphite): ...new function. (pass_graphite_transforms): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_graphite_transforms): ...new pass_data instance and... (make_pass_graphite_transforms): ...new function. (pass_check_data_deps): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_check_data_deps): ...new pass_data instance and... (make_pass_check_data_deps): ...new function. (pass_iv_canon): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_iv_canon): ...new pass_data instance and... (make_pass_iv_canon): ...new function. (pass_scev_cprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_scev_cprop): ...new pass_data instance and... (make_pass_scev_cprop): ...new function. (pass_record_bounds): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_record_bounds): ...new pass_data instance and... (make_pass_record_bounds): ...new function. (pass_complete_unroll): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_complete_unroll): ...new pass_data instance and... (make_pass_complete_unroll): ...new function. (pass_complete_unrolli): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_complete_unrolli): ...new pass_data instance and... (make_pass_complete_unrolli): ...new function. (pass_parallelize_loops): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_parallelize_loops): ...new pass_data instance and... (make_pass_parallelize_loops): ...new function. (pass_loop_prefetch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_loop_prefetch): ...new pass_data instance and... (make_pass_loop_prefetch): ...new function. (pass_iv_optimize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_iv_optimize): ...new pass_data instance and... (make_pass_iv_optimize): ...new function. (pass_tree_loop_done): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop_done): ...new pass_data instance and... (make_pass_tree_loop_done): ...new function. * tree-ssa-math-opts.c (pass_cse_reciprocals): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cse_reciprocals): ...new pass_data instance and... (make_pass_cse_reciprocals): ...new function. (pass_cse_sincos): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cse_sincos): ...new pass_data instance and... (make_pass_cse_sincos): ...new function. (pass_optimize_bswap): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_optimize_bswap): ...new pass_data instance and... (make_pass_optimize_bswap): ...new function. (pass_optimize_widening_mul): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_optimize_widening_mul): ...new pass_data instance and... (make_pass_optimize_widening_mul): ...new function. * tree-ssa-phiopt.c (pass_phiopt): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phiopt): ...new pass_data instance and... (make_pass_phiopt): ...new function. (pass_cselim): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cselim): ...new pass_data instance and... (make_pass_cselim): ...new function. * tree-ssa-phiprop.c (pass_phiprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phiprop): ...new pass_data instance and... (make_pass_phiprop): ...new function. * tree-ssa-pre.c (pass_pre): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_pre): ...new pass_data instance and... (make_pass_pre): ...new function. (pass_fre): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fre): ...new pass_data instance and... (make_pass_fre): ...new function. * tree-ssa-reassoc.c (pass_reassoc): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_reassoc): ...new pass_data instance and... (make_pass_reassoc): ...new function. * tree-ssa-sink.c (pass_sink_code): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sink_code): ...new pass_data instance and... (make_pass_sink_code): ...new function. * tree-ssa-strlen.c (pass_strlen): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strlen): ...new pass_data instance and... (make_pass_strlen): ...new function. * tree-ssa-structalias.c (pass_build_alias): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_alias): ...new pass_data instance and... (make_pass_build_alias): ...new function. (pass_build_ealias): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_ealias): ...new pass_data instance and... (make_pass_build_ealias): ...new function. (pass_ipa_pta): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_pta): ...new pass_data instance and... (make_pass_ipa_pta): ...new function. * tree-ssa-uncprop.c (pass_uncprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_uncprop): ...new pass_data instance and... (make_pass_uncprop): ...new function. * tree-ssa-uninit.c (pass_late_warn_uninitialized): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_late_warn_uninitialized): ...new pass_data instance and... (make_pass_late_warn_uninitialized): ...new function. * tree-ssa.c (pass_init_datastructures): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_init_datastructures): ...new pass_data instance and... (make_pass_init_datastructures): ...new function. (pass_early_warn_uninitialized): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_warn_uninitialized): ...new pass_data instance and... (make_pass_early_warn_uninitialized): ...new function. (pass_update_address_taken): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_update_address_taken): ...new pass_data instance and... (make_pass_update_address_taken): ...new function. * tree-ssanames.c (pass_release_ssa_names): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_release_ssa_names): ...new pass_data instance and... (make_pass_release_ssa_names): ...new function. * tree-stdarg.c (pass_stdarg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_stdarg): ...new pass_data instance and... (make_pass_stdarg): ...new function. * tree-switch-conversion.c (pass_convert_switch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_convert_switch): ...new pass_data instance and... (make_pass_convert_switch): ...new function. * tree-tailcall.c (pass_tail_recursion): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tail_recursion): ...new pass_data instance and... (make_pass_tail_recursion): ...new function. (pass_tail_calls): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tail_calls): ...new pass_data instance and... (make_pass_tail_calls): ...new function. * tree-vect-generic.c (pass_lower_vector): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_vector): ...new pass_data instance and... (make_pass_lower_vector): ...new function. (pass_lower_vector_ssa): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_vector_ssa): ...new pass_data instance and... (make_pass_lower_vector_ssa): ...new function. * tree-vectorizer.c (pass_slp_vectorize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_slp_vectorize): ...new pass_data instance and... (make_pass_slp_vectorize): ...new function. (pass_ipa_increase_alignment): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_increase_alignment): ...new pass_data instance and... (make_pass_ipa_increase_alignment): ...new function. * tree-vrp.c (pass_vrp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_vrp): ...new pass_data instance and... (make_pass_vrp): ...new function. * tree.c (pass_ipa_free_lang_data): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_free_lang_data): ...new pass_data instance and... (make_pass_ipa_free_lang_data): ...new function. * tsan.c (pass_tsan): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tsan): ...new pass_data instance and... (make_pass_tsan): ...new function. (pass_tsan_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tsan_O0): ...new pass_data instance and... (make_pass_tsan_O0): ...new function. * var-tracking.c (pass_variable_tracking): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_variable_tracking): ...new pass_data instance and... (make_pass_variable_tracking): ...new function. * web.c (pass_web): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_web): ...new pass_data instance and... (make_pass_web): ...new function. * config/epiphany/epiphany.h (pass_mode_switch_use): Replace declaration with that of... (make_pass_mode_switch_use): ...new function. (pass_resolve_sw_modes): Replace declaration with that of... (make_pass_resolve_sw_modes): ...new function. * config/epiphany/mode-switch-use.c (pass_mode_switch_use): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mode_switch_use): ...new pass_data instance and... (make_pass_mode_switch_use): ...new function. * config/epiphany/resolve-sw-modes.c (pass_resolve_sw_modes): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_resolve_sw_modes): ...new pass_data instance and... (make_pass_resolve_sw_modes): ...new function. * config/i386/i386.c (pass_insert_vzeroupper): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_insert_vzeroupper): ...new pass_data instance and... (make_pass_insert_vzeroupper): ...new function. * config/sparc/sparc.c (pass_work_around_errata): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_work_around_errata): ...new pass_data instance and... (make_pass_work_around_errata): ...new function. * config/mips/mips.c (pass_mips_machine_reorg2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mips_machine_reorg2): ...new pass_data instance and... (make_pass_mips_machine_reorg2): ...new function. gcc/testsuite/ Patch autogenerated by refactor_passes.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 03fe39476a4c4ea450b49e087cfa817b5f92021e * gcc.dg/plugin/one_time_plugin.c (one_pass): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_one_pass): ...new pass_data instance and... (make_one_pass): ...new function. * gcc.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_self_assign): ...new pass_data instance and... (make_pass_warn_self_assign): ...new function. * g++.dg/plugin/dumb_plugin.c (pass_dumb_plugin_example): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dumb_plugin_example): ...new pass_data instance and... (make_pass_dumb_plugin_example): ...new function. * g++.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_self_assign): ...new pass_data instance and... (make_pass_warn_self_assign): ...new function. From-SVN: r201508
2013-08-05 22:16:05 +02:00
{}
/* opt_pass methods: */
pass cfun to pass::execute gcc/ * passes.c (opt_pass::execute): Adjust. (pass_manager::execute_pass_mode_switching): Likewise. (early_local_passes::execute): Likewise. (execute_one_pass): Pass cfun to the pass's execute method. * tree-pass.h (opt_pass::execute): Add function * argument. * asan.c, auto-inc-dec.c, bb-reorder.c, bt-load.c, cfgcleanup.c, cfgexpand.c, cfgrtl.c, cgraphbuild.c, combine-stack-adj.c, combine.c, compare-elim.c, config/arc/arc.c, config/epiphany/mode-switch-use.c, config/epiphany/resolve-sw-modes.c, config/i386/i386.c, config/mips/mips.c, config/rl78/rl78.c, config/s390/s390.c, config/sparc/sparc.c, cprop.c, dce.c, df-core.c, dse.c, dwarf2cfi.c, except.c, final.c, function.c, fwprop.c, gcse.c, gimple-low.c, gimple-ssa-isolate-paths.c, gimple-ssa-strength-reduction.c, graphite.c, ifcvt.c, init-regs.c, ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c, ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c, ipa.c, ira.c, jump.c, loop-init.c, lower-subreg.c, mode-switching.c, omp-low.c, postreload-gcse.c, postreload.c, predict.c, recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, reorg.c, sched-rgn.c, stack-ptr-mod.c, store-motion.c, tracer.c, trans-mem.c, tree-call-cdce.c, tree-cfg.c, tree-cfgcleanup.c, tree-complex.c, tree-eh.c, tree-emutls.c, tree-if-conv.c, tree-into-ssa.c, tree-loop-distribution.c, tree-nrv.c, tree-object-size.c, tree-parloops.c, tree-predcom.c, tree-ssa-ccp.c, tree-ssa-copy.c, tree-ssa-copyrename.c, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c, tree-ssa-loop-ivcanon.c, tree-ssa-loop-prefetch.c, tree-ssa-loop-unswitch.c, tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c, tree-ssa-structalias.c, tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-ssanames.c, tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c, tree-vect-generic.c, tree-vectorizer.c, tree-vrp.c, tree.c, tsan.c, ubsan.c, var-tracking.c, vtable-verify.c, web.c: Adjust. From-SVN: r209482
2014-04-17 14:37:34 +02:00
virtual unsigned int execute (function *) { return reginfo_init (); }
Automated conversion of passes to C++ classes gcc/ Patch autogenerated by refactor_passes.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 03fe39476a4c4ea450b49e087cfa817b5f92021e * asan.c (pass_asan): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_asan): ...new pass_data instance and... (make_pass_asan): ...new function. (pass_asan_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_asan_O0): ...new pass_data instance and... (make_pass_asan_O0): ...new function. * auto-inc-dec.c (pass_inc_dec): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_inc_dec): ...new pass_data instance and... (make_pass_inc_dec): ...new function. * bb-reorder.c (pass_reorder_blocks): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reorder_blocks): ...new pass_data instance and... (make_pass_reorder_blocks): ...new function. (pass_duplicate_computed_gotos): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_duplicate_computed_gotos): ...new pass_data instance and... (make_pass_duplicate_computed_gotos): ...new function. (pass_partition_blocks): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_partition_blocks): ...new pass_data instance and... (make_pass_partition_blocks): ...new function. * bt-load.c (pass_branch_target_load_optimize1): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_branch_target_load_optimize1): ...new pass_data instance and... (make_pass_branch_target_load_optimize1): ...new function. (pass_branch_target_load_optimize2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_branch_target_load_optimize2): ...new pass_data instance and... (make_pass_branch_target_load_optimize2): ...new function. * cfgcleanup.c (pass_jump): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_jump): ...new pass_data instance and... (make_pass_jump): ...new function. (pass_jump2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_jump2): ...new pass_data instance and... (make_pass_jump2): ...new function. * cfgexpand.c (pass_expand): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_expand): ...new pass_data instance and... (make_pass_expand): ...new function. * cfgrtl.c (pass_free_cfg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_free_cfg): ...new pass_data instance and... (make_pass_free_cfg): ...new function. (pass_into_cfg_layout_mode): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_into_cfg_layout_mode): ...new pass_data instance and... (make_pass_into_cfg_layout_mode): ...new function. (pass_outof_cfg_layout_mode): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_outof_cfg_layout_mode): ...new pass_data instance and... (make_pass_outof_cfg_layout_mode): ...new function. * cgraphbuild.c (pass_build_cgraph_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_cgraph_edges): ...new pass_data instance and... (make_pass_build_cgraph_edges): ...new function. (pass_rebuild_cgraph_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_rebuild_cgraph_edges): ...new pass_data instance and... (make_pass_rebuild_cgraph_edges): ...new function. (pass_remove_cgraph_callee_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_remove_cgraph_callee_edges): ...new pass_data instance and... (make_pass_remove_cgraph_callee_edges): ...new function. * combine-stack-adj.c (pass_stack_adjustments): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_adjustments): ...new pass_data instance and... (make_pass_stack_adjustments): ...new function. * combine.c (pass_combine): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_combine): ...new pass_data instance and... (make_pass_combine): ...new function. * compare-elim.c (pass_compare_elim_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_compare_elim_after_reload): ...new pass_data instance and... (make_pass_compare_elim_after_reload): ...new function. * cprop.c (pass_rtl_cprop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_cprop): ...new pass_data instance and... (make_pass_rtl_cprop): ...new function. * cse.c (pass_cse): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse): ...new pass_data instance and... (make_pass_cse): ...new function. (pass_cse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse2): ...new pass_data instance and... (make_pass_cse2): ...new function. (pass_cse_after_global_opts): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse_after_global_opts): ...new pass_data instance and... (make_pass_cse_after_global_opts): ...new function. * dce.c (pass_ud_rtl_dce): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ud_rtl_dce): ...new pass_data instance and... (make_pass_ud_rtl_dce): ...new function. (pass_fast_rtl_dce): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_fast_rtl_dce): ...new pass_data instance and... (make_pass_fast_rtl_dce): ...new function. * df-core.c (pass_df_initialize_opt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_initialize_opt): ...new pass_data instance and... (make_pass_df_initialize_opt): ...new function. (pass_df_initialize_no_opt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_initialize_no_opt): ...new pass_data instance and... (make_pass_df_initialize_no_opt): ...new function. (pass_df_finish): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_finish): ...new pass_data instance and... (make_pass_df_finish): ...new function. * dse.c (pass_rtl_dse1): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_dse1): ...new pass_data instance and... (make_pass_rtl_dse1): ...new function. (pass_rtl_dse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_dse2): ...new pass_data instance and... (make_pass_rtl_dse2): ...new function. * dwarf2cfi.c (pass_dwarf2_frame): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_dwarf2_frame): ...new pass_data instance and... (make_pass_dwarf2_frame): ...new function. * except.c (pass_set_nothrow_function_flags): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_set_nothrow_function_flags): ...new pass_data instance and... (make_pass_set_nothrow_function_flags): ...new function. (pass_convert_to_eh_region_ranges): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_convert_to_eh_region_ranges): ...new pass_data instance and... (make_pass_convert_to_eh_region_ranges): ...new function. * final.c (pass_compute_alignments): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_compute_alignments): ...new pass_data instance and... (make_pass_compute_alignments): ...new function. (pass_final): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_final): ...new pass_data instance and... (make_pass_final): ...new function. (pass_shorten_branches): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_shorten_branches): ...new pass_data instance and... (make_pass_shorten_branches): ...new function. (pass_clean_state): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_clean_state): ...new pass_data instance and... (make_pass_clean_state): ...new function. * function.c (pass_instantiate_virtual_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_instantiate_virtual_regs): ...new pass_data instance and... (make_pass_instantiate_virtual_regs): ...new function. (pass_leaf_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_leaf_regs): ...new pass_data instance and... (make_pass_leaf_regs): ...new function. (pass_thread_prologue_and_epilogue): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_thread_prologue_and_epilogue): ...new pass_data instance and... (make_pass_thread_prologue_and_epilogue): ...new function. (pass_match_asm_constraints): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_match_asm_constraints): ...new pass_data instance and... (make_pass_match_asm_constraints): ...new function. * fwprop.c (pass_rtl_fwprop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_fwprop): ...new pass_data instance and... (make_pass_rtl_fwprop): ...new function. (pass_rtl_fwprop_addr): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_fwprop_addr): ...new pass_data instance and... (make_pass_rtl_fwprop_addr): ...new function. * gcse.c (pass_rtl_pre): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_pre): ...new pass_data instance and... (make_pass_rtl_pre): ...new function. (pass_rtl_hoist): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_hoist): ...new pass_data instance and... (make_pass_rtl_hoist): ...new function. * gimple-low.c (pass_lower_cf): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_cf): ...new pass_data instance and... (make_pass_lower_cf): ...new function. * gimple-ssa-strength-reduction.c (pass_strength_reduction): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strength_reduction): ...new pass_data instance and... (make_pass_strength_reduction): ...new function. * ifcvt.c (pass_rtl_ifcvt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_ifcvt): ...new pass_data instance and... (make_pass_rtl_ifcvt): ...new function. (pass_if_after_combine): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_if_after_combine): ...new pass_data instance and... (make_pass_if_after_combine): ...new function. (pass_if_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_if_after_reload): ...new pass_data instance and... (make_pass_if_after_reload): ...new function. * init-regs.c (pass_initialize_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_initialize_regs): ...new pass_data instance and... (make_pass_initialize_regs): ...new function. * ipa-cp.c (pass_ipa_cp): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_cp): ...new pass_data instance and... (make_pass_ipa_cp): ...new function. * ipa-inline-analysis.c (pass_inline_parameters): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_inline_parameters): ...new pass_data instance and... (make_pass_inline_parameters): ...new function. * ipa-inline.c (pass_early_inline): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_inline): ...new pass_data instance and... (make_pass_early_inline): ...new function. (pass_ipa_inline): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_inline): ...new pass_data instance and... (make_pass_ipa_inline): ...new function. * ipa-pure-const.c (pass_local_pure_const): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_local_pure_const): ...new pass_data instance and... (make_pass_local_pure_const): ...new function. (pass_ipa_pure_const): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_pure_const): ...new pass_data instance and... (make_pass_ipa_pure_const): ...new function. * ipa-reference.c (pass_ipa_reference): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_reference): ...new pass_data instance and... (make_pass_ipa_reference): ...new function. * ipa-split.c (pass_split_functions): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_split_functions): ...new pass_data instance and... (make_pass_split_functions): ...new function. (pass_feedback_split_functions): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_feedback_split_functions): ...new pass_data instance and... (make_pass_feedback_split_functions): ...new function. * ipa.c (pass_ipa_function_and_variable_visibility): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_function_and_variable_visibility): ...new pass_data instance and... (make_pass_ipa_function_and_variable_visibility): ...new function. (pass_ipa_free_inline_summary): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_free_inline_summary): ...new pass_data instance and... (make_pass_ipa_free_inline_summary): ...new function. (pass_ipa_whole_program_visibility): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_whole_program_visibility): ...new pass_data instance and... (make_pass_ipa_whole_program_visibility): ...new function. (pass_ipa_profile): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_profile): ...new pass_data instance and... (make_pass_ipa_profile): ...new function. (pass_ipa_cdtor_merge): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_cdtor_merge): ...new pass_data instance and... (make_pass_ipa_cdtor_merge): ...new function. * ira.c (pass_ira): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ira): ...new pass_data instance and... (make_pass_ira): ...new function. (pass_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reload): ...new pass_data instance and... (make_pass_reload): ...new function. * jump.c (pass_cleanup_barriers): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cleanup_barriers): ...new pass_data instance and... (make_pass_cleanup_barriers): ...new function. * loop-init.c (pass_loop2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_loop2): ...new pass_data instance and... (make_pass_loop2): ...new function. (pass_rtl_loop_init): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_loop_init): ...new pass_data instance and... (make_pass_rtl_loop_init): ...new function. (pass_rtl_loop_done): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_loop_done): ...new pass_data instance and... (make_pass_rtl_loop_done): ...new function. (pass_rtl_move_loop_invariants): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_move_loop_invariants): ...new pass_data instance and... (make_pass_rtl_move_loop_invariants): ...new function. (pass_rtl_unswitch): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_unswitch): ...new pass_data instance and... (make_pass_rtl_unswitch): ...new function. (pass_rtl_unroll_and_peel_loops): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_unroll_and_peel_loops): ...new pass_data instance and... (make_pass_rtl_unroll_and_peel_loops): ...new function. (pass_rtl_doloop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_doloop): ...new pass_data instance and... (make_pass_rtl_doloop): ...new function. * lower-subreg.c (pass_lower_subreg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_lower_subreg): ...new pass_data instance and... (make_pass_lower_subreg): ...new function. (pass_lower_subreg2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_lower_subreg2): ...new pass_data instance and... (make_pass_lower_subreg2): ...new function. * lto-streamer-out.c (pass_ipa_lto_gimple_out): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_lto_gimple_out): ...new pass_data instance and... (make_pass_ipa_lto_gimple_out): ...new function. (pass_ipa_lto_finish_out): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_lto_finish_out): ...new pass_data instance and... (make_pass_ipa_lto_finish_out): ...new function. * mode-switching.c (pass_mode_switching): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mode_switching): ...new pass_data instance and... (make_pass_mode_switching): ...new function. * modulo-sched.c (pass_sms): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sms): ...new pass_data instance and... (make_pass_sms): ...new function. * omp-low.c (pass_expand_omp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_expand_omp): ...new pass_data instance and... (make_pass_expand_omp): ...new function. (pass_lower_omp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_omp): ...new pass_data instance and... (make_pass_lower_omp): ...new function. (pass_diagnose_omp_blocks): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_diagnose_omp_blocks): ...new pass_data instance and... (make_pass_diagnose_omp_blocks): ...new function. * passes.c (pass_early_local_passes): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_early_local_passes): ...new pass_data instance and... (make_pass_early_local_passes): ...new function. (pass_all_early_optimizations): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_early_optimizations): ...new pass_data instance and... (make_pass_all_early_optimizations): ...new function. (pass_all_optimizations): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_optimizations): ...new pass_data instance and... (make_pass_all_optimizations): ...new function. (pass_all_optimizations_g): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_optimizations_g): ...new pass_data instance and... (make_pass_all_optimizations_g): ...new function. (pass_rest_of_compilation): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rest_of_compilation): ...new pass_data instance and... (make_pass_rest_of_compilation): ...new function. (pass_postreload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_postreload): ...new pass_data instance and... (make_pass_postreload): ...new function. * postreload-gcse.c (pass_gcse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_gcse2): ...new pass_data instance and... (make_pass_gcse2): ...new function. * postreload.c (pass_postreload_cse): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_postreload_cse): ...new pass_data instance and... (make_pass_postreload_cse): ...new function. * predict.c (pass_profile): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_profile): ...new pass_data instance and... (make_pass_profile): ...new function. (pass_strip_predict_hints): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strip_predict_hints): ...new pass_data instance and... (make_pass_strip_predict_hints): ...new function. * recog.c (pass_peephole2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_peephole2): ...new pass_data instance and... (make_pass_peephole2): ...new function. (pass_split_all_insns): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_all_insns): ...new pass_data instance and... (make_pass_split_all_insns): ...new function. (pass_split_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_after_reload): ...new pass_data instance and... (make_pass_split_after_reload): ...new function. (pass_split_before_regstack): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_before_regstack): ...new pass_data instance and... (make_pass_split_before_regstack): ...new function. (pass_split_before_sched2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_before_sched2): ...new pass_data instance and... (make_pass_split_before_sched2): ...new function. (pass_split_for_shorten_branches): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_for_shorten_branches): ...new pass_data instance and... (make_pass_split_for_shorten_branches): ...new function. * ree.c (pass_ree): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ree): ...new pass_data instance and... (make_pass_ree): ...new function. * reg-stack.c (pass_stack_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_regs): ...new pass_data instance and... (make_pass_stack_regs): ...new function. (pass_stack_regs_run): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_regs_run): ...new pass_data instance and... (make_pass_stack_regs_run): ...new function. * regcprop.c (pass_cprop_hardreg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cprop_hardreg): ...new pass_data instance and... (make_pass_cprop_hardreg): ...new function. * reginfo.c (pass_reginfo_init): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reginfo_init): ...new pass_data instance and... (make_pass_reginfo_init): ...new function. * regmove.c (pass_regmove): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_regmove): ...new pass_data instance and... (make_pass_regmove): ...new function. * regrename.c (pass_regrename): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_regrename): ...new pass_data instance and... (make_pass_regrename): ...new function. * reorg.c (pass_delay_slots): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_delay_slots): ...new pass_data instance and... (make_pass_delay_slots): ...new function. (pass_machine_reorg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_machine_reorg): ...new pass_data instance and... (make_pass_machine_reorg): ...new function. * sched-rgn.c (pass_sched): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sched): ...new pass_data instance and... (make_pass_sched): ...new function. (pass_sched2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sched2): ...new pass_data instance and... (make_pass_sched2): ...new function. * stack-ptr-mod.c (pass_stack_ptr_mod): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_ptr_mod): ...new pass_data instance and... (make_pass_stack_ptr_mod): ...new function. * store-motion.c (pass_rtl_store_motion): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_store_motion): ...new pass_data instance and... (make_pass_rtl_store_motion): ...new function. * tracer.c (pass_tracer): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tracer): ...new pass_data instance and... (make_pass_tracer): ...new function. * trans-mem.c (pass_diagnose_tm_blocks): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_diagnose_tm_blocks): ...new pass_data instance and... (make_pass_diagnose_tm_blocks): ...new function. (pass_lower_tm): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_tm): ...new pass_data instance and... (make_pass_lower_tm): ...new function. (pass_tm_init): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_init): ...new pass_data instance and... (make_pass_tm_init): ...new function. (pass_tm_mark): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_mark): ...new pass_data instance and... (make_pass_tm_mark): ...new function. (pass_tm_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_edges): ...new pass_data instance and... (make_pass_tm_edges): ...new function. (pass_tm_memopt): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_memopt): ...new pass_data instance and... (make_pass_tm_memopt): ...new function. (pass_ipa_tm): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_tm): ...new pass_data instance and... (make_pass_ipa_tm): ...new function. * tree-call-cdce.c (pass_call_cdce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_call_cdce): ...new pass_data instance and... (make_pass_call_cdce): ...new function. * tree-cfg.c (pass_build_cfg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_cfg): ...new pass_data instance and... (make_pass_build_cfg): ...new function. (pass_split_crit_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_split_crit_edges): ...new pass_data instance and... (make_pass_split_crit_edges): ...new function. (pass_warn_function_return): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_function_return): ...new pass_data instance and... (make_pass_warn_function_return): ...new function. (pass_warn_function_noreturn): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_function_noreturn): ...new pass_data instance and... (make_pass_warn_function_noreturn): ...new function. (pass_warn_unused_result): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_unused_result): ...new pass_data instance and... (make_pass_warn_unused_result): ...new function. * tree-cfgcleanup.c (pass_merge_phi): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_merge_phi): ...new pass_data instance and... (make_pass_merge_phi): ...new function. * tree-complex.c (pass_lower_complex): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_complex): ...new pass_data instance and... (make_pass_lower_complex): ...new function. (pass_lower_complex_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_complex_O0): ...new pass_data instance and... (make_pass_lower_complex_O0): ...new function. * tree-eh.c (pass_lower_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_eh): ...new pass_data instance and... (make_pass_lower_eh): ...new function. (pass_refactor_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_refactor_eh): ...new pass_data instance and... (make_pass_refactor_eh): ...new function. (pass_lower_resx): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_resx): ...new pass_data instance and... (make_pass_lower_resx): ...new function. (pass_lower_eh_dispatch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_eh_dispatch): ...new pass_data instance and... (make_pass_lower_eh_dispatch): ...new function. (pass_cleanup_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cleanup_eh): ...new pass_data instance and... (make_pass_cleanup_eh): ...new function. * tree-emutls.c (pass_ipa_lower_emutls): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_lower_emutls): ...new pass_data instance and... (make_pass_ipa_lower_emutls): ...new function. * tree-if-conv.c (pass_if_conversion): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_if_conversion): ...new pass_data instance and... (make_pass_if_conversion): ...new function. * tree-into-ssa.c (pass_build_ssa): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_ssa): ...new pass_data instance and... (make_pass_build_ssa): ...new function. * tree-loop-distribution.c (pass_loop_distribution): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_loop_distribution): ...new pass_data instance and... (make_pass_loop_distribution): ...new function. * tree-mudflap.c (pass_mudflap_1): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_1): ...new pass_data instance and... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_2): ...new pass_data instance and... (make_pass_mudflap_2): ...new function. * tree-nomudflap.c (pass_mudflap_1): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_1): ...new pass_data instance and... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_2): ...new pass_data instance and... (make_pass_mudflap_2): ...new function. * tree-nrv.c (pass_nrv): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_nrv): ...new pass_data instance and... (make_pass_nrv): ...new function. (pass_return_slot): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_return_slot): ...new pass_data instance and... (make_pass_return_slot): ...new function. * tree-object-size.c (pass_object_sizes): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_object_sizes): ...new pass_data instance and... (make_pass_object_sizes): ...new function. * tree-optimize.c (pass_cleanup_cfg_post_optimizing): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cleanup_cfg_post_optimizing): ...new pass_data instance and... (make_pass_cleanup_cfg_post_optimizing): ...new function. (pass_fixup_cfg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fixup_cfg): ...new pass_data instance and... (make_pass_fixup_cfg): ...new function. * tree-pass.h (pass_mudflap_1): Replace declaration with that of... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Replace declaration with that of... (make_pass_mudflap_2): ...new function. (pass_asan): Replace declaration with that of... (make_pass_asan): ...new function. (pass_asan_O0): Replace declaration with that of... (make_pass_asan_O0): ...new function. (pass_tsan): Replace declaration with that of... (make_pass_tsan): ...new function. (pass_tsan_O0): Replace declaration with that of... (make_pass_tsan_O0): ...new function. (pass_lower_cf): Replace declaration with that of... (make_pass_lower_cf): ...new function. (pass_refactor_eh): Replace declaration with that of... (make_pass_refactor_eh): ...new function. (pass_lower_eh): Replace declaration with that of... (make_pass_lower_eh): ...new function. (pass_lower_eh_dispatch): Replace declaration with that of... (make_pass_lower_eh_dispatch): ...new function. (pass_lower_resx): Replace declaration with that of... (make_pass_lower_resx): ...new function. (pass_build_cfg): Replace declaration with that of... (make_pass_build_cfg): ...new function. (pass_early_tree_profile): Replace declaration with that of... (make_pass_early_tree_profile): ...new function. (pass_cleanup_eh): Replace declaration with that of... (make_pass_cleanup_eh): ...new function. (pass_sra): Replace declaration with that of... (make_pass_sra): ...new function. (pass_sra_early): Replace declaration with that of... (make_pass_sra_early): ...new function. (pass_early_ipa_sra): Replace declaration with that of... (make_pass_early_ipa_sra): ...new function. (pass_tail_recursion): Replace declaration with that of... (make_pass_tail_recursion): ...new function. (pass_tail_calls): Replace declaration with that of... (make_pass_tail_calls): ...new function. (pass_tree_loop): Replace declaration with that of... (make_pass_tree_loop): ...new function. (pass_tree_loop_init): Replace declaration with that of... (make_pass_tree_loop_init): ...new function. (pass_lim): Replace declaration with that of... (make_pass_lim): ...new function. (pass_tree_unswitch): Replace declaration with that of... (make_pass_tree_unswitch): ...new function. (pass_predcom): Replace declaration with that of... (make_pass_predcom): ...new function. (pass_iv_canon): Replace declaration with that of... (make_pass_iv_canon): ...new function. (pass_scev_cprop): Replace declaration with that of... (make_pass_scev_cprop): ...new function. (pass_empty_loop): Replace declaration with that of... (make_pass_empty_loop): ...new function. (pass_record_bounds): Replace declaration with that of... (make_pass_record_bounds): ...new function. (pass_graphite): Replace declaration with that of... (make_pass_graphite): ...new function. (pass_graphite_transforms): Replace declaration with that of... (make_pass_graphite_transforms): ...new function. (pass_if_conversion): Replace declaration with that of... (make_pass_if_conversion): ...new function. (pass_loop_distribution): Replace declaration with that of... (make_pass_loop_distribution): ...new function. (pass_vectorize): Replace declaration with that of... (make_pass_vectorize): ...new function. (pass_slp_vectorize): Replace declaration with that of... (make_pass_slp_vectorize): ...new function. (pass_complete_unroll): Replace declaration with that of... (make_pass_complete_unroll): ...new function. (pass_complete_unrolli): Replace declaration with that of... (make_pass_complete_unrolli): ...new function. (pass_parallelize_loops): Replace declaration with that of... (make_pass_parallelize_loops): ...new function. (pass_loop_prefetch): Replace declaration with that of... (make_pass_loop_prefetch): ...new function. (pass_iv_optimize): Replace declaration with that of... (make_pass_iv_optimize): ...new function. (pass_tree_loop_done): Replace declaration with that of... (make_pass_tree_loop_done): ...new function. (pass_ch): Replace declaration with that of... (make_pass_ch): ...new function. (pass_ccp): Replace declaration with that of... (make_pass_ccp): ...new function. (pass_phi_only_cprop): Replace declaration with that of... (make_pass_phi_only_cprop): ...new function. (pass_build_ssa): Replace declaration with that of... (make_pass_build_ssa): ...new function. (pass_build_alias): Replace declaration with that of... (make_pass_build_alias): ...new function. (pass_build_ealias): Replace declaration with that of... (make_pass_build_ealias): ...new function. (pass_dominator): Replace declaration with that of... (make_pass_dominator): ...new function. (pass_dce): Replace declaration with that of... (make_pass_dce): ...new function. (pass_dce_loop): Replace declaration with that of... (make_pass_dce_loop): ...new function. (pass_cd_dce): Replace declaration with that of... (make_pass_cd_dce): ...new function. (pass_call_cdce): Replace declaration with that of... (make_pass_call_cdce): ...new function. (pass_merge_phi): Replace declaration with that of... (make_pass_merge_phi): ...new function. (pass_split_crit_edges): Replace declaration with that of... (make_pass_split_crit_edges): ...new function. (pass_pre): Replace declaration with that of... (make_pass_pre): ...new function. (pass_profile): Replace declaration with that of... (make_pass_profile): ...new function. (pass_strip_predict_hints): Replace declaration with that of... (make_pass_strip_predict_hints): ...new function. (pass_lower_complex_O0): Replace declaration with that of... (make_pass_lower_complex_O0): ...new function. (pass_lower_complex): Replace declaration with that of... (make_pass_lower_complex): ...new function. (pass_lower_vector): Replace declaration with that of... (make_pass_lower_vector): ...new function. (pass_lower_vector_ssa): Replace declaration with that of... (make_pass_lower_vector_ssa): ...new function. (pass_lower_omp): Replace declaration with that of... (make_pass_lower_omp): ...new function. (pass_diagnose_omp_blocks): Replace declaration with that of... (make_pass_diagnose_omp_blocks): ...new function. (pass_expand_omp): Replace declaration with that of... (make_pass_expand_omp): ...new function. (pass_expand_omp_ssa): Replace declaration with that of... (make_pass_expand_omp_ssa): ...new function. (pass_object_sizes): Replace declaration with that of... (make_pass_object_sizes): ...new function. (pass_strlen): Replace declaration with that of... (make_pass_strlen): ...new function. (pass_fold_builtins): Replace declaration with that of... (make_pass_fold_builtins): ...new function. (pass_stdarg): Replace declaration with that of... (make_pass_stdarg): ...new function. (pass_early_warn_uninitialized): Replace declaration with that of... (make_pass_early_warn_uninitialized): ...new function. (pass_late_warn_uninitialized): Replace declaration with that of... (make_pass_late_warn_uninitialized): ...new function. (pass_cse_reciprocals): Replace declaration with that of... (make_pass_cse_reciprocals): ...new function. (pass_cse_sincos): Replace declaration with that of... (make_pass_cse_sincos): ...new function. (pass_optimize_bswap): Replace declaration with that of... (make_pass_optimize_bswap): ...new function. (pass_optimize_widening_mul): Replace declaration with that of... (make_pass_optimize_widening_mul): ...new function. (pass_warn_function_return): Replace declaration with that of... (make_pass_warn_function_return): ...new function. (pass_warn_function_noreturn): Replace declaration with that of... (make_pass_warn_function_noreturn): ...new function. (pass_cselim): Replace declaration with that of... (make_pass_cselim): ...new function. (pass_phiopt): Replace declaration with that of... (make_pass_phiopt): ...new function. (pass_forwprop): Replace declaration with that of... (make_pass_forwprop): ...new function. (pass_phiprop): Replace declaration with that of... (make_pass_phiprop): ...new function. (pass_tree_ifcombine): Replace declaration with that of... (make_pass_tree_ifcombine): ...new function. (pass_dse): Replace declaration with that of... (make_pass_dse): ...new function. (pass_nrv): Replace declaration with that of... (make_pass_nrv): ...new function. (pass_rename_ssa_copies): Replace declaration with that of... (make_pass_rename_ssa_copies): ...new function. (pass_sink_code): Replace declaration with that of... (make_pass_sink_code): ...new function. (pass_fre): Replace declaration with that of... (make_pass_fre): ...new function. (pass_check_data_deps): Replace declaration with that of... (make_pass_check_data_deps): ...new function. (pass_copy_prop): Replace declaration with that of... (make_pass_copy_prop): ...new function. (pass_vrp): Replace declaration with that of... (make_pass_vrp): ...new function. (pass_uncprop): Replace declaration with that of... (make_pass_uncprop): ...new function. (pass_return_slot): Replace declaration with that of... (make_pass_return_slot): ...new function. (pass_reassoc): Replace declaration with that of... (make_pass_reassoc): ...new function. (pass_rebuild_cgraph_edges): Replace declaration with that of... (make_pass_rebuild_cgraph_edges): ...new function. (pass_remove_cgraph_callee_edges): Replace declaration with that of... (make_pass_remove_cgraph_callee_edges): ...new function. (pass_build_cgraph_edges): Replace declaration with that of... (make_pass_build_cgraph_edges): ...new function. (pass_local_pure_const): Replace declaration with that of... (make_pass_local_pure_const): ...new function. (pass_tracer): Replace declaration with that of... (make_pass_tracer): ...new function. (pass_warn_unused_result): Replace declaration with that of... (make_pass_warn_unused_result): ...new function. (pass_diagnose_tm_blocks): Replace declaration with that of... (make_pass_diagnose_tm_blocks): ...new function. (pass_lower_tm): Replace declaration with that of... (make_pass_lower_tm): ...new function. (pass_tm_init): Replace declaration with that of... (make_pass_tm_init): ...new function. (pass_tm_mark): Replace declaration with that of... (make_pass_tm_mark): ...new function. (pass_tm_memopt): Replace declaration with that of... (make_pass_tm_memopt): ...new function. (pass_tm_edges): Replace declaration with that of... (make_pass_tm_edges): ...new function. (pass_split_functions): Replace declaration with that of... (make_pass_split_functions): ...new function. (pass_feedback_split_functions): Replace declaration with that of... (make_pass_feedback_split_functions): ...new function. (pass_strength_reduction): Replace declaration with that of... (make_pass_strength_reduction): ...new function. (pass_ipa_lower_emutls): Replace declaration with that of... (make_pass_ipa_lower_emutls): ...new function. (pass_ipa_function_and_variable_visibility): Replace declaration with that of... (make_pass_ipa_function_and_variable_visibility): ...new function. (pass_ipa_tree_profile): Replace declaration with that of... (make_pass_ipa_tree_profile): ...new function. (pass_early_local_passes): Replace declaration with that of... (make_pass_early_local_passes): ...new function. (pass_ipa_whole_program_visibility): Replace declaration with that of... (make_pass_ipa_whole_program_visibility): ...new function. (pass_ipa_lto_gimple_out): Replace declaration with that of... (make_pass_ipa_lto_gimple_out): ...new function. (pass_ipa_increase_alignment): Replace declaration with that of... (make_pass_ipa_increase_alignment): ...new function. (pass_ipa_inline): Replace declaration with that of... (make_pass_ipa_inline): ...new function. (pass_ipa_free_lang_data): Replace declaration with that of... (make_pass_ipa_free_lang_data): ...new function. (pass_ipa_free_inline_summary): Replace declaration with that of... (make_pass_ipa_free_inline_summary): ...new function. (pass_ipa_cp): Replace declaration with that of... (make_pass_ipa_cp): ...new function. (pass_ipa_reference): Replace declaration with that of... (make_pass_ipa_reference): ...new function. (pass_ipa_pure_const): Replace declaration with that of... (make_pass_ipa_pure_const): ...new function. (pass_ipa_pta): Replace declaration with that of... (make_pass_ipa_pta): ...new function. (pass_ipa_lto_finish_out): Replace declaration with that of... (make_pass_ipa_lto_finish_out): ...new function. (pass_ipa_tm): Replace declaration with that of... (make_pass_ipa_tm): ...new function. (pass_ipa_profile): Replace declaration with that of... (make_pass_ipa_profile): ...new function. (pass_ipa_cdtor_merge): Replace declaration with that of... (make_pass_ipa_cdtor_merge): ...new function. (pass_cleanup_cfg_post_optimizing): Replace declaration with that of... (make_pass_cleanup_cfg_post_optimizing): ...new function. (pass_init_datastructures): Replace declaration with that of... (make_pass_init_datastructures): ...new function. (pass_fixup_cfg): Replace declaration with that of... (make_pass_fixup_cfg): ...new function. (pass_expand): Replace declaration with that of... (make_pass_expand): ...new function. (pass_instantiate_virtual_regs): Replace declaration with that of... (make_pass_instantiate_virtual_regs): ...new function. (pass_rtl_fwprop): Replace declaration with that of... (make_pass_rtl_fwprop): ...new function. (pass_rtl_fwprop_addr): Replace declaration with that of... (make_pass_rtl_fwprop_addr): ...new function. (pass_jump): Replace declaration with that of... (make_pass_jump): ...new function. (pass_jump2): Replace declaration with that of... (make_pass_jump2): ...new function. (pass_lower_subreg): Replace declaration with that of... (make_pass_lower_subreg): ...new function. (pass_cse): Replace declaration with that of... (make_pass_cse): ...new function. (pass_fast_rtl_dce): Replace declaration with that of... (make_pass_fast_rtl_dce): ...new function. (pass_ud_rtl_dce): Replace declaration with that of... (make_pass_ud_rtl_dce): ...new function. (pass_rtl_dce): Replace declaration with that of... (make_pass_rtl_dce): ...new function. (pass_rtl_dse1): Replace declaration with that of... (make_pass_rtl_dse1): ...new function. (pass_rtl_dse2): Replace declaration with that of... (make_pass_rtl_dse2): ...new function. (pass_rtl_dse3): Replace declaration with that of... (make_pass_rtl_dse3): ...new function. (pass_rtl_cprop): Replace declaration with that of... (make_pass_rtl_cprop): ...new function. (pass_rtl_pre): Replace declaration with that of... (make_pass_rtl_pre): ...new function. (pass_rtl_hoist): Replace declaration with that of... (make_pass_rtl_hoist): ...new function. (pass_rtl_store_motion): Replace declaration with that of... (make_pass_rtl_store_motion): ...new function. (pass_cse_after_global_opts): Replace declaration with that of... (make_pass_cse_after_global_opts): ...new function. (pass_rtl_ifcvt): Replace declaration with that of... (make_pass_rtl_ifcvt): ...new function. (pass_into_cfg_layout_mode): Replace declaration with that of... (make_pass_into_cfg_layout_mode): ...new function. (pass_outof_cfg_layout_mode): Replace declaration with that of... (make_pass_outof_cfg_layout_mode): ...new function. (pass_loop2): Replace declaration with that of... (make_pass_loop2): ...new function. (pass_rtl_loop_init): Replace declaration with that of... (make_pass_rtl_loop_init): ...new function. (pass_rtl_move_loop_invariants): Replace declaration with that of... (make_pass_rtl_move_loop_invariants): ...new function. (pass_rtl_unswitch): Replace declaration with that of... (make_pass_rtl_unswitch): ...new function. (pass_rtl_unroll_and_peel_loops): Replace declaration with that of... (make_pass_rtl_unroll_and_peel_loops): ...new function. (pass_rtl_doloop): Replace declaration with that of... (make_pass_rtl_doloop): ...new function. (pass_rtl_loop_done): Replace declaration with that of... (make_pass_rtl_loop_done): ...new function. (pass_web): Replace declaration with that of... (make_pass_web): ...new function. (pass_cse2): Replace declaration with that of... (make_pass_cse2): ...new function. (pass_df_initialize_opt): Replace declaration with that of... (make_pass_df_initialize_opt): ...new function. (pass_df_initialize_no_opt): Replace declaration with that of... (make_pass_df_initialize_no_opt): ...new function. (pass_reginfo_init): Replace declaration with that of... (make_pass_reginfo_init): ...new function. (pass_inc_dec): Replace declaration with that of... (make_pass_inc_dec): ...new function. (pass_stack_ptr_mod): Replace declaration with that of... (make_pass_stack_ptr_mod): ...new function. (pass_initialize_regs): Replace declaration with that of... (make_pass_initialize_regs): ...new function. (pass_combine): Replace declaration with that of... (make_pass_combine): ...new function. (pass_if_after_combine): Replace declaration with that of... (make_pass_if_after_combine): ...new function. (pass_ree): Replace declaration with that of... (make_pass_ree): ...new function. (pass_partition_blocks): Replace declaration with that of... (make_pass_partition_blocks): ...new function. (pass_match_asm_constraints): Replace declaration with that of... (make_pass_match_asm_constraints): ...new function. (pass_regmove): Replace declaration with that of... (make_pass_regmove): ...new function. (pass_split_all_insns): Replace declaration with that of... (make_pass_split_all_insns): ...new function. (pass_fast_rtl_byte_dce): Replace declaration with that of... (make_pass_fast_rtl_byte_dce): ...new function. (pass_lower_subreg2): Replace declaration with that of... (make_pass_lower_subreg2): ...new function. (pass_mode_switching): Replace declaration with that of... (make_pass_mode_switching): ...new function. (pass_sms): Replace declaration with that of... (make_pass_sms): ...new function. (pass_sched): Replace declaration with that of... (make_pass_sched): ...new function. (pass_ira): Replace declaration with that of... (make_pass_ira): ...new function. (pass_reload): Replace declaration with that of... (make_pass_reload): ...new function. (pass_clean_state): Replace declaration with that of... (make_pass_clean_state): ...new function. (pass_branch_prob): Replace declaration with that of... (make_pass_branch_prob): ...new function. (pass_value_profile_transformations): Replace declaration with that of... (make_pass_value_profile_transformations): ...new function. (pass_postreload_cse): Replace declaration with that of... (make_pass_postreload_cse): ...new function. (pass_gcse2): Replace declaration with that of... (make_pass_gcse2): ...new function. (pass_split_after_reload): Replace declaration with that of... (make_pass_split_after_reload): ...new function. (pass_branch_target_load_optimize1): Replace declaration with that of... (make_pass_branch_target_load_optimize1): ...new function. (pass_thread_prologue_and_epilogue): Replace declaration with that of... (make_pass_thread_prologue_and_epilogue): ...new function. (pass_stack_adjustments): Replace declaration with that of... (make_pass_stack_adjustments): ...new function. (pass_peephole2): Replace declaration with that of... (make_pass_peephole2): ...new function. (pass_if_after_reload): Replace declaration with that of... (make_pass_if_after_reload): ...new function. (pass_regrename): Replace declaration with that of... (make_pass_regrename): ...new function. (pass_cprop_hardreg): Replace declaration with that of... (make_pass_cprop_hardreg): ...new function. (pass_reorder_blocks): Replace declaration with that of... (make_pass_reorder_blocks): ...new function. (pass_branch_target_load_optimize2): Replace declaration with that of... (make_pass_branch_target_load_optimize2): ...new function. (pass_leaf_regs): Replace declaration with that of... (make_pass_leaf_regs): ...new function. (pass_split_before_sched2): Replace declaration with that of... (make_pass_split_before_sched2): ...new function. (pass_compare_elim_after_reload): Replace declaration with that of... (make_pass_compare_elim_after_reload): ...new function. (pass_sched2): Replace declaration with that of... (make_pass_sched2): ...new function. (pass_stack_regs): Replace declaration with that of... (make_pass_stack_regs): ...new function. (pass_stack_regs_run): Replace declaration with that of... (make_pass_stack_regs_run): ...new function. (pass_df_finish): Replace declaration with that of... (make_pass_df_finish): ...new function. (pass_compute_alignments): Replace declaration with that of... (make_pass_compute_alignments): ...new function. (pass_duplicate_computed_gotos): Replace declaration with that of... (make_pass_duplicate_computed_gotos): ...new function. (pass_variable_tracking): Replace declaration with that of... (make_pass_variable_tracking): ...new function. (pass_free_cfg): Replace declaration with that of... (make_pass_free_cfg): ...new function. (pass_machine_reorg): Replace declaration with that of... (make_pass_machine_reorg): ...new function. (pass_cleanup_barriers): Replace declaration with that of... (make_pass_cleanup_barriers): ...new function. (pass_delay_slots): Replace declaration with that of... (make_pass_delay_slots): ...new function. (pass_split_for_shorten_branches): Replace declaration with that of... (make_pass_split_for_shorten_branches): ...new function. (pass_split_before_regstack): Replace declaration with that of... (make_pass_split_before_regstack): ...new function. (pass_convert_to_eh_region_ranges): Replace declaration with that of... (make_pass_convert_to_eh_region_ranges): ...new function. (pass_shorten_branches): Replace declaration with that of... (make_pass_shorten_branches): ...new function. (pass_set_nothrow_function_flags): Replace declaration with that of... (make_pass_set_nothrow_function_flags): ...new function. (pass_dwarf2_frame): Replace declaration with that of... (make_pass_dwarf2_frame): ...new function. (pass_final): Replace declaration with that of... (make_pass_final): ...new function. (pass_rtl_seqabstr): Replace declaration with that of... (make_pass_rtl_seqabstr): ...new function. (pass_release_ssa_names): Replace declaration with that of... (make_pass_release_ssa_names): ...new function. (pass_early_inline): Replace declaration with that of... (make_pass_early_inline): ...new function. (pass_inline_parameters): Replace declaration with that of... (make_pass_inline_parameters): ...new function. (pass_update_address_taken): Replace declaration with that of... (make_pass_update_address_taken): ...new function. (pass_convert_switch): Replace declaration with that of... (make_pass_convert_switch): ...new function. * tree-profile.c (pass_ipa_tree_profile): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_tree_profile): ...new pass_data instance and... (make_pass_ipa_tree_profile): ...new function. * tree-sra.c (pass_sra_early): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sra_early): ...new pass_data instance and... (make_pass_sra_early): ...new function. (pass_sra): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sra): ...new pass_data instance and... (make_pass_sra): ...new function. (pass_early_ipa_sra): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_ipa_sra): ...new pass_data instance and... (make_pass_early_ipa_sra): ...new function. * tree-ssa-ccp.c (pass_ccp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_ccp): ...new pass_data instance and... (make_pass_ccp): ...new function. (pass_fold_builtins): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fold_builtins): ...new pass_data instance and... (make_pass_fold_builtins): ...new function. * tree-ssa-copy.c (pass_copy_prop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_copy_prop): ...new pass_data instance and... (make_pass_copy_prop): ...new function. * tree-ssa-copyrename.c (pass_rename_ssa_copies): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_rename_ssa_copies): ...new pass_data instance and... (make_pass_rename_ssa_copies): ...new function. * tree-ssa-dce.c (pass_dce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dce): ...new pass_data instance and... (make_pass_dce): ...new function. (pass_dce_loop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dce_loop): ...new pass_data instance and... (make_pass_dce_loop): ...new function. (pass_cd_dce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cd_dce): ...new pass_data instance and... (make_pass_cd_dce): ...new function. * tree-ssa-dom.c (pass_dominator): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dominator): ...new pass_data instance and... (make_pass_dominator): ...new function. (pass_phi_only_cprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phi_only_cprop): ...new pass_data instance and... (make_pass_phi_only_cprop): ...new function. * tree-ssa-dse.c (pass_dse): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dse): ...new pass_data instance and... (make_pass_dse): ...new function. * tree-ssa-forwprop.c (pass_forwprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_forwprop): ...new pass_data instance and... (make_pass_forwprop): ...new function. * tree-ssa-ifcombine.c (pass_tree_ifcombine): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_ifcombine): ...new pass_data instance and... (make_pass_tree_ifcombine): ...new function. * tree-ssa-loop-ch.c (pass_ch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_ch): ...new pass_data instance and... (make_pass_ch): ...new function. * tree-ssa-loop.c (pass_tree_loop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop): ...new pass_data instance and... (make_pass_tree_loop): ...new function. (pass_tree_loop_init): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop_init): ...new pass_data instance and... (make_pass_tree_loop_init): ...new function. (pass_lim): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lim): ...new pass_data instance and... (make_pass_lim): ...new function. (pass_tree_unswitch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_unswitch): ...new pass_data instance and... (make_pass_tree_unswitch): ...new function. (pass_predcom): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_predcom): ...new pass_data instance and... (make_pass_predcom): ...new function. (pass_vectorize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_vectorize): ...new pass_data instance and... (make_pass_vectorize): ...new function. (pass_graphite): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_graphite): ...new pass_data instance and... (make_pass_graphite): ...new function. (pass_graphite_transforms): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_graphite_transforms): ...new pass_data instance and... (make_pass_graphite_transforms): ...new function. (pass_check_data_deps): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_check_data_deps): ...new pass_data instance and... (make_pass_check_data_deps): ...new function. (pass_iv_canon): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_iv_canon): ...new pass_data instance and... (make_pass_iv_canon): ...new function. (pass_scev_cprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_scev_cprop): ...new pass_data instance and... (make_pass_scev_cprop): ...new function. (pass_record_bounds): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_record_bounds): ...new pass_data instance and... (make_pass_record_bounds): ...new function. (pass_complete_unroll): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_complete_unroll): ...new pass_data instance and... (make_pass_complete_unroll): ...new function. (pass_complete_unrolli): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_complete_unrolli): ...new pass_data instance and... (make_pass_complete_unrolli): ...new function. (pass_parallelize_loops): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_parallelize_loops): ...new pass_data instance and... (make_pass_parallelize_loops): ...new function. (pass_loop_prefetch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_loop_prefetch): ...new pass_data instance and... (make_pass_loop_prefetch): ...new function. (pass_iv_optimize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_iv_optimize): ...new pass_data instance and... (make_pass_iv_optimize): ...new function. (pass_tree_loop_done): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop_done): ...new pass_data instance and... (make_pass_tree_loop_done): ...new function. * tree-ssa-math-opts.c (pass_cse_reciprocals): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cse_reciprocals): ...new pass_data instance and... (make_pass_cse_reciprocals): ...new function. (pass_cse_sincos): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cse_sincos): ...new pass_data instance and... (make_pass_cse_sincos): ...new function. (pass_optimize_bswap): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_optimize_bswap): ...new pass_data instance and... (make_pass_optimize_bswap): ...new function. (pass_optimize_widening_mul): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_optimize_widening_mul): ...new pass_data instance and... (make_pass_optimize_widening_mul): ...new function. * tree-ssa-phiopt.c (pass_phiopt): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phiopt): ...new pass_data instance and... (make_pass_phiopt): ...new function. (pass_cselim): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cselim): ...new pass_data instance and... (make_pass_cselim): ...new function. * tree-ssa-phiprop.c (pass_phiprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phiprop): ...new pass_data instance and... (make_pass_phiprop): ...new function. * tree-ssa-pre.c (pass_pre): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_pre): ...new pass_data instance and... (make_pass_pre): ...new function. (pass_fre): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fre): ...new pass_data instance and... (make_pass_fre): ...new function. * tree-ssa-reassoc.c (pass_reassoc): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_reassoc): ...new pass_data instance and... (make_pass_reassoc): ...new function. * tree-ssa-sink.c (pass_sink_code): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sink_code): ...new pass_data instance and... (make_pass_sink_code): ...new function. * tree-ssa-strlen.c (pass_strlen): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strlen): ...new pass_data instance and... (make_pass_strlen): ...new function. * tree-ssa-structalias.c (pass_build_alias): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_alias): ...new pass_data instance and... (make_pass_build_alias): ...new function. (pass_build_ealias): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_ealias): ...new pass_data instance and... (make_pass_build_ealias): ...new function. (pass_ipa_pta): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_pta): ...new pass_data instance and... (make_pass_ipa_pta): ...new function. * tree-ssa-uncprop.c (pass_uncprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_uncprop): ...new pass_data instance and... (make_pass_uncprop): ...new function. * tree-ssa-uninit.c (pass_late_warn_uninitialized): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_late_warn_uninitialized): ...new pass_data instance and... (make_pass_late_warn_uninitialized): ...new function. * tree-ssa.c (pass_init_datastructures): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_init_datastructures): ...new pass_data instance and... (make_pass_init_datastructures): ...new function. (pass_early_warn_uninitialized): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_warn_uninitialized): ...new pass_data instance and... (make_pass_early_warn_uninitialized): ...new function. (pass_update_address_taken): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_update_address_taken): ...new pass_data instance and... (make_pass_update_address_taken): ...new function. * tree-ssanames.c (pass_release_ssa_names): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_release_ssa_names): ...new pass_data instance and... (make_pass_release_ssa_names): ...new function. * tree-stdarg.c (pass_stdarg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_stdarg): ...new pass_data instance and... (make_pass_stdarg): ...new function. * tree-switch-conversion.c (pass_convert_switch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_convert_switch): ...new pass_data instance and... (make_pass_convert_switch): ...new function. * tree-tailcall.c (pass_tail_recursion): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tail_recursion): ...new pass_data instance and... (make_pass_tail_recursion): ...new function. (pass_tail_calls): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tail_calls): ...new pass_data instance and... (make_pass_tail_calls): ...new function. * tree-vect-generic.c (pass_lower_vector): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_vector): ...new pass_data instance and... (make_pass_lower_vector): ...new function. (pass_lower_vector_ssa): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_vector_ssa): ...new pass_data instance and... (make_pass_lower_vector_ssa): ...new function. * tree-vectorizer.c (pass_slp_vectorize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_slp_vectorize): ...new pass_data instance and... (make_pass_slp_vectorize): ...new function. (pass_ipa_increase_alignment): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_increase_alignment): ...new pass_data instance and... (make_pass_ipa_increase_alignment): ...new function. * tree-vrp.c (pass_vrp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_vrp): ...new pass_data instance and... (make_pass_vrp): ...new function. * tree.c (pass_ipa_free_lang_data): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_free_lang_data): ...new pass_data instance and... (make_pass_ipa_free_lang_data): ...new function. * tsan.c (pass_tsan): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tsan): ...new pass_data instance and... (make_pass_tsan): ...new function. (pass_tsan_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tsan_O0): ...new pass_data instance and... (make_pass_tsan_O0): ...new function. * var-tracking.c (pass_variable_tracking): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_variable_tracking): ...new pass_data instance and... (make_pass_variable_tracking): ...new function. * web.c (pass_web): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_web): ...new pass_data instance and... (make_pass_web): ...new function. * config/epiphany/epiphany.h (pass_mode_switch_use): Replace declaration with that of... (make_pass_mode_switch_use): ...new function. (pass_resolve_sw_modes): Replace declaration with that of... (make_pass_resolve_sw_modes): ...new function. * config/epiphany/mode-switch-use.c (pass_mode_switch_use): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mode_switch_use): ...new pass_data instance and... (make_pass_mode_switch_use): ...new function. * config/epiphany/resolve-sw-modes.c (pass_resolve_sw_modes): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_resolve_sw_modes): ...new pass_data instance and... (make_pass_resolve_sw_modes): ...new function. * config/i386/i386.c (pass_insert_vzeroupper): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_insert_vzeroupper): ...new pass_data instance and... (make_pass_insert_vzeroupper): ...new function. * config/sparc/sparc.c (pass_work_around_errata): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_work_around_errata): ...new pass_data instance and... (make_pass_work_around_errata): ...new function. * config/mips/mips.c (pass_mips_machine_reorg2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mips_machine_reorg2): ...new pass_data instance and... (make_pass_mips_machine_reorg2): ...new function. gcc/testsuite/ Patch autogenerated by refactor_passes.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 03fe39476a4c4ea450b49e087cfa817b5f92021e * gcc.dg/plugin/one_time_plugin.c (one_pass): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_one_pass): ...new pass_data instance and... (make_one_pass): ...new function. * gcc.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_self_assign): ...new pass_data instance and... (make_pass_warn_self_assign): ...new function. * g++.dg/plugin/dumb_plugin.c (pass_dumb_plugin_example): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dumb_plugin_example): ...new pass_data instance and... (make_pass_dumb_plugin_example): ...new function. * g++.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_self_assign): ...new pass_data instance and... (make_pass_warn_self_assign): ...new function. From-SVN: r201508
2013-08-05 22:16:05 +02:00
}; // class pass_reginfo_init
} // anon namespace
rtl_opt_pass *
make_pass_reginfo_init (gcc::context *ctxt)
{
return new pass_reginfo_init (ctxt);
}
[multiple changes] 2008-08-26 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c, ira-color.c, ira-costs.c, ira.h, ira-lives.c, ira.c, ira-conflicts.c, ira-emit.c, ira-int.h: New files. * doc/passes.texi: Describe IRA. * doc/tm.texi (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Describe the new macros. * doc/invoke.texi (ira-max-loops-num): Describe the new parameter. (-fira, -fira-algorithm, -fira-coalesce, -fno-ira-move-spills, -fira-propagate-cost, -fno-ira-share-save-slots, -fno-ira-share-spill-slots, -fira-verbose): Describe new options. * flags.h (ira_algorithm): New enumeration. (flag_ira_algorithm, flag_ira_verbose): New external variable declarations. * postreload.c (gate_handle_postreload): Don't do post reload optimizations unless the reload is completed. * reload.c (push_reload, find_dummy_reload): Use DF_LR_OUT for IRA. * tree-pass.h (pass_ira): New external variable declaration. * reload.h: Add 2008 to the Copyright. * cfgloopanal.c: Include params.h. (estimate_reg_pressure_cost): Decrease cost for IRA optimization mode. * params.h (IRA_MAX_LOOPS_NUM): New macro. * toplev.c (ira.h): New include. (flag_ira_algorithm, flag_ira_verbose): New external variables. (backend_init_target): Call ira_init. (backend_init): Call ira_init_once. (finalize): Call finish_ira_once. * toplev.h (flag_ira, flag_ira_coalesce, flag_ira_move_spills, flag_ira_share_save_slots, flag_ira_share_spill_slots): New external variables. * regs.h (contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): New external variable declarations. (move_table): New typedef. * caller-save.c: Include headers output.h and ira.h. (no_caller_save_reg_set): New global variable. (save_slots_num, save_slots): New variables. (reg_save_code, reg_restore_code, add_stored_regs): Add prototypes. (init_caller_save): Set up no_caller_save_reg_set. (init_save_areas): Reset save_slots_num. (saved_hard_reg): New structure. (hard_reg_map, saved_regs_num, all_saved_regs): New variables. (initiate_saved_hard_regs, new_saved_hard_reg, finish_saved_hard_regs, saved_hard_reg_compare_func): New functions. (setup_save_areas): Add code for sharing stack slots. (all_blocks): New variable. (save_call_clobbered_regs): Process pseudo-register too. (mark_set_regs): Process pseudo-register too. (insert_one_insn): Put the insn after bb note in a empty basic block. Add insn check. * global.c (eliminable_regset): Make it external. (mark_elimination): Use DF_LR_IN for IRA. (pseudo_for_reload_consideration_p): New. (build_insn_chain): Make it external. Don't ignore spilled pseudos for IRA. Use pseudo_for_reload_consideration_p. (gate_handle_global_alloc): New function. (pass_global_alloc): Add the gate function. * opts.c (decode_options): Set up flag_ira. Print the warning for -fira. (common_handle_option): Process -fira-algorithm and -fira-verbose. * timevar.def (TV_IRA, TV_RELOAD): New passes. * regmove.c (regmove_optimize): Don't do replacement of output for IRA. * hard-reg-set.h (no_caller_save_reg_set, reg_class_subclasses): New external variable declarations. * local-alloc.c (update_equiv_regs): Make it external. Return true if jump label rebuilding should be done. Rescan new_insn for notes. (gate_handle_local_alloc): New function. (pass_local_alloc): Add the gate function. * alias.c (value_addr_p, stack_addr_p): New functions. (nonoverlapping_memrefs_p): Use them for IRA. * common.opt (fira, fira-algorithm, fira-coalesce, fira-move-spills, fira-share-save-slots, fira-share-spill-slots, fira-verbose): New options. * regclass.c (reg_class_subclasses, contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): Make the variables external. (move_table): Remove typedef. (init_move_cost): Make it external. (allocate_reg_info, resize_reg_info, setup_reg_classes): New functions. * rtl.h (init_move_cost, allocate_reg_info, resize_reg_info, setup_reg_classes): New function prototypes. (eliminable_regset): New external variable declaration. (build_insn_chain, update_equiv_regs): New function prototypes. * Makefile.in (IRA_INT_H): New definition. (OBJS-common): Add ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, and ira-lives.o. (reload1.o, toplev.o): Add dependence on ira.h. (cfgloopanal.o): Add PARAMS_H. (caller-save.o): Add dependence on output.h and ira.h. (ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, ira-lives.o): New entries. * passes.c (pass_ira): New pass. * params.def (PARAM_IRA_MAX_LOOPS_NUM): New parameter. * reload1.c (ira.h): Include the header. (changed_allocation_pseudos): New bitmap. (init_reload): Initiate the bitmap. (compute_use_by_pseudos): Permits spilled registers in FROM. (temp_pseudo_reg_arr): New variable. (reload): Allocate and free temp_pseudo_reg_arr. Sort pseudos for IRA. Call alter_reg with the additional parameter. Don't clear spilled_pseudos for IRA. Restore original insn chain for IRA. Clear changed_allocation_pseudos at the end of reload. (calculate_needs_all_insns): Call IRA's mark_memory_move_deletion. (hard_regno_to_pseudo_regno): New variable. (count_pseudo): Check spilled pseudos. Set up hard_regno_to_pseudo_regno. (count_spilled_pseudo): Check spilled pseudos. Update hard_regno_to_pseudo_regno. (find_reg): Use better_spill_reload_regno_p. Check hard_regno_to_pseudo_regno. (alter_reg): Set up spilled_pseudos. Add a new parameter. Add code for IRA. (eliminate_regs_1): Use additional parameter for alter_reg. (finish_spills): Set up pseudo_previous_regs only for spilled pseudos. Call reassign_pseudos once for all spilled pseudos, pass more arguments. Don't clear live_throughout and dead_or_set for spilled pseudos. Use additional parameter for alter_reg. Call mark_allocation_change. Set up changed_allocation_pseudos. Remove sanity check. (emit_input_reload_insns, delete_output_reload): Use additional parameter for alter_reg. Call mark_allocation_change. (substitute, gen_reload_chain_without_interm_reg_p): New functions. (reloads_conflict): Use gen_reload_chain_without_interm_reg_p. * testsuite/gcc.dg/20080410-1.c: New file. * config/s390/s390.h (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Define. * config/sparc/sparc.h (IRA_COVER_CLASSES): New macro. * config/i386/i386.h (IRA_COVER_CLASSES): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES): Ditto. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/alpha/alpha.h (IRA_COVER_CLASSES): Ditto. 2008-08-24 Jeff Law <law@redhat.com> * ira.c (setup_reg_class_intersect_union): Prefer smallest class when ignoring unavailable registers. 2008-08-24 Jeff Law <law@redhat.com> * ira-color.c (coalesced_pseudo_reg_slot_compare): Check FRAME_GROWS_DOWNWARD and STACK_GROWS_DOWNWARD. * ira.c (setup_eliminable_regset): Check stack_realign_needed. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): New macro. 2008-06-03 Steve Chamberlain <steve.chamberlain@gmail.com> * ira-build.c (allocno_range_compare_func): Stabilize sort. 2008-05-29 Andy Hutchinson <hutchinsonandy@aim.com> * config/avr/avr.h (IRA_COVER_CLASSES): New macro. * reload1.c (find_reg): Process registers in register allocation order. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * toplev.c (backend_init_target): Move ira_init call from here... (lang_dependent_init_target): ...to here. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * ira.c (setup_class_subset_and_memory_move_costs): Don't calculate memory move costs for NO_REGS. 2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org> * ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if STACK_REGS is defined. 2008-04-08 Andrew Pinski <andrew_pinski@playstation.sony.com> * config/spu/spu.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Bernd Schmidt <bernd.schmidt@analog.com> * config/bfin/bfin.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Kaz Kojima <kkojima@gcc.gnu.org> * config/sh/sh.h (IRA_COVER_CLASSES): Define. * config/sh/sh.md (movsicc_true+3): Check if emit returns a barrier. From-SVN: r139590
2008-08-26 14:39:58 +02:00
/* Set up preferred, alternate, and allocno classes for REGNO as
[multiple changes] 2011-03-28 Vladimir Makarov <vmakarov@redhat.com> * ira-color.c (update_left_conflict_sizes_p): Don't assume that conflict object hard regset nodes have intersecting hard reg sets. * regmove.c (regmove_optimize): Move ira_set_pseudo_classes call after regstat_init_n_sets_and_refs. * ira.c: Add more comments at the top. (setup_stack_reg_pressure_class, setup_pressure_classes): Add comments how we compute the register pressure classes. (setup_allocno_and_important_classes): Add more comments. (setup_class_translate_array, reorder_important_classes) (setup_reg_class_relations): Add comments. * ira-emit.c: Add 2011 to the Copyright line. Add comments at the start of the file. * ira-color.c: Add 2011 to the Copyright line. (assign_hard_reg): Add more comments. (improve_allocation): Ditto. * ira-costs.c: Add 2011 to the Copyright line. (setup_cost_classes, setup_regno_cost_classes_by_aclass): Add more comments. (setup_regno_cost_classes_by_mode): Ditto. Initial patches from ira-improv branch: 2010-08-13 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c: (ira_create_object): Remove initialization of OBJECT_PROFITABLE_HARD_REGS. Initialize OBJECT_ADD_DATA. (ira_create_allocno): Remove initialization of ALLOCNO_MEM_OPTIMIZED_DEST, ALLOCNO_MEM_OPTIMIZED_DEST_P, ALLOCNO_SOMEWHERE_RENAMED_P, ALLOCNO_CHILD_RENAMED_P, ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P, ALLOCNO_COLORABLE_P, ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO, ALLOCNO_FIRST_COALESCED_ALLOCNO, ALLOCNO_NEXT_COALESCED_ALLOCNO. Initialize ALLOCNO_ADD_DATA. (copy_info_to_removed_store_destinations): Use ALLOCNO_EMIT_DATA and allocno_emit_reg instead of ALLOCNO_MEM_OPTIMIZED_DEST_P and ALLOCNO_REG. (ira_flattening): Ditto. Use ALLOCNO_EMIT_DATA instead of ALLOCNO_MEM_OPTIMIZED_DEST and ALLOCNO_SOMEWHERE_RENAMED_P. * ira.c (ira_reallocate): Remove. (setup_pressure_classes): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. (setup_allocno_assignment_flags): Use ALLOCNO_EMIT_DATA. (ira): Call ira_initiate_emit_data and ira_finish_emit_data. * ira-color.c: Use ALLOCNO_COLOR_DATA instead of ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P, ALLOCNO_COLORABLE_P, ALLOCNO_AVAILABLE_REGS_NUM, ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO. ALLOCNO_TEMP. Use OBJECT_COLOR_DATA instead of OBJECT_PROFITABLE_HARD_REGS, OBJECT_HARD_REGS_NODE, OBJECT_HARD_REGS_SUBNODES_START, OBJECT_HARD_REGS_SUBNODES_NUM. Fix formatting. (object_hard_regs_t, object_hard_regs_node_t): Move from ira-int.h. (struct object_hard_regs, struct object_hard_regs_node): Ditto. (struct allocno_color_data): New. (allocno_color_data_t): New typedef. (allocno_color_data): New definition. (ALLOCNO_COLOR_DATA): New macro. (struct object_color_data): New. (object_color_data_t): New typedef. (object_color_data): New definition. (OBJECT_COLOR_DATA): New macro. (update_copy_costs, calculate_allocno_spill_cost): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. (move_spill_restore, update_curr_costs): Ditto. (allocno_spill_priority): Make it inline. (color_pass): Allocate and free allocno_color_dat and object_color_data. (struct coalesce_data, coalesce_data_t): New. (allocno_coalesce_data): New definition. (ALLOCNO_COALESCE_DATA): New macro. (merge_allocnos, coalesced_allocno_conflict_p): Use ALLOCNO_COALESCED_DATA instead of ALLOCNO_FIRST_COALESCED_ALLOCNO, ALLOCNO_NEXT_COALESCED_ALLOCNO, ALLOCNO_TEMP. (coalesce_allocnos): Ditto. (setup_coalesced_allocno_costs_and_nums): Ditto. (collect_spilled_coalesced_allocnos): Ditto. (slot_coalesced_allocno_live_ranges_intersect_p): Ditto. (setup_slot_coalesced_allocno_live_ranges): Ditto. (coalesce_spill_slots): Ditto. (ira_sort_regnos_for_alter_reg): Ditto. Allocate, initialize and free allocno_coalesce_data. * ira-conflicts.c: Fix formatting. (process_regs_for_copy): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. (build_object_conflicts): Optimize. * ira-costs.c (record_reg_classes): Optimize. Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost, ira_may_move_in_cost, and ira_may_move_out_cost instead of ira_get_register_move_cost and ira_get_may_move_cost. (record_address_regs): Ditto. (scan_one_insn): Optimize. (find_costs_and_classes): Optimize. (process_bb_node_for_hard_reg_moves): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. * ira-emit.c: Use allocno_emit_reg, ALLOCNO_EMIT_DATA instead of ALLOCNO_REG, ALLOCNO_CHILD_RENAMED_P, ALLOCNO_MEM_OPTIMIZED_DEST, ALLOCNO_MEM_OPTIMIZED_DEST_P, and ALLOCNO_SOMEWHERE_RENAMED_P. (ira_allocno_emit_data, void_p, new_allocno_emit_data_vec): New definitions. (ira_initiate_emit_data, ira_finish_emit_data) (create_new_allocno): New functions. (modify_move_list): Call create_new_alloc instead of ira_create_allocno. (emit_move_list): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. * ira-int.h: Fix some comments. (object_hard_regs_t, object_hard_regs_node_t): Move to ira-color.c. (struct object_hard_regs, struct object_hard_regs_node): Ditto. (struct ira_object): Remove profitable_hard_regs, hard_regs_node, hard_regs_subnodes_start, hard_regs_subnodes_num. Add new member add_data. (struct ira_allocno): Make mode and aclass a bitfield. Move other bitfield after mode. Make hard_regno a short int. Make hard_regno short. Remove first_coalesced_allocno and next_coalesced_allocno. Move mem_optimized_dest_p, somewhere_renamed_p, child_renamed_p, reg, and mem_optimized_dest into struct ira_emit_data. Remove in_graph_p, may_be_spilled_p, available_regs_num, next_bucket_allocno, prev_bucket_allocno, temp, colorable_p. Add new member add_data. (ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P): Remove. (ALLOCNO_COLORABLE_P, ALLOCNO_AVAILABLE_REGS_NUM): Remove. (ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO): Remove. (ALLOCNO_TEMP, ALLOCNO_FIRST_COALESCED_ALLOCNO): Remove. (ALLOCNO_NEXT_COALESCED_ALLOCNO): Remove. (ALLOCNO_ADD_DATA): New macro. (ira_emit_data_t): New typedef. (struct ira_emit_data): New. Move mem_optimized_dest_p, somewhere_renamed_p, child_renamed_p, reg, mem_optimized_dest from struct ira_allocno. (ALLOCNO_EMIT_DATA): New macro. (ira_allocno_emit_data, allocno_emit_reg): New. (ALLOCNO_PROFITABLE_HARD_REGS, OBJECT_HARD_REGS_NODE): Remove. (OBJECT_HARD_REGS_SUBNODES_STAR, OBJECT_HARD_REGS_SUBNODES_NUM): Remove. (OBJECT_ADD_DATA): New macro. (ira_reallocate): Remove. (ira_initiate_emit_data, ira_finish_emit_data): New. (ira_get_register_move_cost, ira_get_may_move_cost): Remove. (ira_init_register_move_cost_if_necessary): New. (ira_object_conflict_iter_next): Merge into ira_object_conflict_iter_cond. (FOR_EACH_OBJECT_CONFLICT): Don't use ira_object_conflict_iter_next. * ira-live.c: (process_single_reg_class_operands): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. 2010-08-13 Vladimir Makarov <vmakarov@redhat.com> * ira-int.h (struct target_ira_int): Remove x_cost_classes. * ira-costs.c: Fix formatting. (cost_classes, cost_classes_num): Remove. (struct cost_classes, cost_classes_t, const_cost_classes_t): New. (regno_cost_classes, cost_classes_hash, cost_classes_eq): New. (cost_classes_del, cost_classes_htab): New. (cost_classes_aclass_cache, cost_classes_mode_cache): New. (initiate_regno_cost_classes, setup_cost_classes): New. (setup_regno_cost_classes_by_aclass): New. (setup_regno_cost_classes_by_mode, finish_regno_cost_classes): New. (record_reg_classes): Use regno_cost_classes instead of cost_classes. Move checking opposite operand up. (record_address_regs): Use regno_cost_classes instead of cost_classes. (scan_one_insn): Ditto. Use always general register. (print_allocno_costs): Use regno_cost_classes instead of cost_classes. (print_pseudo_costs): Ditto. Use Reg_N_REFS. (find_costs_and_classes): Set up cost classes for each registers. Use also their mode for this. Use regno_cost_classes instead of cost_classes. (setup_allocno_class_and_costs): Use regno_cost_classes instead of cost_classes. (free_ira_costs, ira_init_costs): Don't use cost_classes. (ira_costs, ira_set_pseudo_classes): Call initiate_regno_cost_classes and finish_regno_cost_classes. 2010-10-04 Vladimir Makarov <vmakarov@redhat.com> * target-def.h (TARGET_IRA_COVER_CLASSES): Remove. * target.def (ira_cover_classes): Remove. * doc/tm.texi: Remove TARGET_IRA_COVER_CLASSES and IRA_COVER_CLASSES. * doc/tm.texi.in: Ditto. * ira-conflicts.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Use ALLOCNO_COVER_CLASS_COST instead of ALLOCNO_CLASS_COST. Fix formatting. * targhooks.c (default_ira_cover_classes): Remove. * targhooks.h (default_ira_cover_classes): Ditto. * haifa-sched.c: Remove mentioning cover classes from the file. Use ira_reg_pressure_cover instead of ira_reg_class_cover. Use ira_pressure_classes and ira_pressure_classes_num instead of ira_reg_class_cover_size and ira_reg_class_cover. Use sched_regno_pressure_class instead of sched_regno_cover_class. (mark_regno_birth_or_death, setup_insn_reg_pressure_info): Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. * ira-int.h: Add 2010 to Copyright. Remove mentioning cover classes from the file. (object_hard_regs_t, object_hard_regs_node_t): New typedefs. (struct object_hard_regs, struct object_hard_regs_node): New. (struct ira_object): New members profitable_hard_regs, hard_regs_node, hard_regs_subnodes_start, hard_regs_subnodes_num. (struct ira_allocno): Rename cover_class to aclass. Rename cover_class_cost and updated_cover_class_cost to class_cost and updated_class_cost. Remove splay_removed_p and left_conflict_size. Add new members colorable_p. (ALLOCNO_SPLAY_REMOVED_P, ALLOCNO_LEFT_CONFLICTS_SIZE): Remove. (ALLOCNO_COLORABLE_P): New macro. (ALLOCNO_COVER_CLASS): Rename to ALLOCNO_CLASS. (ALLOCNO_COVER_CLASS_COST, ALLOCNO_UPDATED_COVER_CLASS_COST): Rename to ALLOCNO_CLASS_COST and ALLOCNO_UPDATED__CLASS_COST. (OBJECT_...): Rename parameter C to O. (OBJECT_PROFITABLE_HARD_REGS): New macro. (OBJECT_HARD_REGS_NODE, OBJECT_HARD_REGS_SUBNODES_START) (OBJECT_HARD_REGS_SUBNODES_NUM): New macros. (struct target_ira_int): New members x_ira_max_memory_move_cost, x_ira_max_register_move_cost, x_ira_max_may_move_in_cost, x_ira_max_may_move_out_cost, x_ira_reg_allocno_class_p, x_ira_reg_pressure_class_p, x_ira_important_class_nums, x_ira_reg_class_superunion. Rename x_prohibited_class_mode_reg to x_ira_prohibited_class_mode_reg. Rename x_ira_reg_class_union to x_ira_reg_class_subunion. (ira_max_memory_move_cost, ira_max_register_move_cost) (ira_max_may_move_in_cost, ira_max_may_move_out_cost) (ira_reg_allocno_class_p, ira_reg_pressure_class_p) (ira_important_class_nums, ira_reg_class_superunion): New macros. (prohibited_class_mode_regs): Rename to ira_prohibited_class_mode_regs. (ira_reg_class_union): Rename to ira_reg_class_subunion. (ira_debug_class_cover): Rename to ira_debug_allocno_classes. (ira_set_allocno_cover_class): Rename to ira_set_allocno_class. (ira_tune_allocno_costs_and_cover_classes): Rename to ira_tune_allocno_costs. (ira_debug_hard_regs_forest): New. (ira_object_conflict_iter_init, ira_object_conflict_iter_cond) (ira_object_conflict_iter_next): Fix comments. (ira_hard_reg_set_intersection_p, hard_reg_set_size): New functions. (ira_allocate_and_set_costs, ira_allocate_and_copy_costs): Rename cover_class to aclass. (ira_allocate_and_accumulate_costs): Ditto. (ira_allocate_and_set_or_copy_costs): Ditto. * opts.c (decode_options): Remove ira_cover_class check. * ira-color.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS, ALLOCNO_CLASS_COST, and ALLOCNO_UPDATED_CLASS_COST instead of ALLOCNO_COVER_CLASS, ALLOCNO_COVER_CLASS_COST, and ALLOCNO_UPDATED_COVER_CLASS_COST. Fix formatting. (splay-tree.h): Remove include. (allocno_coalesced_p, processed_coalesced_allocno_bitmap): Move before copy_freq_compare_func. (allocnos_for_spilling, removed_splay_allocno_vec): Remove. (object_hard_regs_vec, object_hard_regs_htab, node_check_tick): New definitions. (hard_regs_roots, hard_regs_node_vec): Ditto. (object_hard_regs_hash, object_hard_regs_eq, find_hard_regs): Ditto. (insert_hard_regs, init_object_hard_regs, add_object_hard_regs): Ditto. (finish_object_hard_regs, object_hard_regs_compare): Ditto. (create_new_object_hard_regs_node): Ditto. (add_new_object_hard_regs_node_to_forest): Ditto. (add_object_hard_regs_to_forest, collect_object_hard_regs_cover): Ditto. (setup_object_hard_regs_nodes_parent, first_common_ancestor_node): Ditto. (print_hard_reg_set, print_hard_regs_subforest): Ditto. (print_hard_regs_forest, ira_debug_hard_regs_forest): Ditto. (remove_unused_object_hard_regs_nodes): Ditto. (enumerate_object_hard_regs_nodes): Ditto. (object_hard_regs_nodes_num, object_hard_regs_nodes): Ditto. (object_hard_regs_subnode_t): Ditto. (struct object_hard_regs_subnode): Ditto. (object_hard_regs_subnodes, object_hard_regs_subnode_index): Ditto. (setup_object_hard_regs_subnode_index): Ditto. (get_object_hard_regs_subnodes_num): Ditto. (form_object_hard_regs_nodes_forest): Ditto. (finish_object_hard_regs_nodes_tree): Ditto. (finish_object_hard_regs_nodes_forest): Ditto. (allocnos_have_intersected_live_ranges_p): Rename to allocnos_conflict_by_live_ranges_p. Move before copy_freq_compare_func. (pseudos_have_intersected_live_ranges_p): Rename to conflict_by_live_ranges_p. Move before copy_freq_compare_func. (setup_left_conflict_sizes_p, update_left_conflict_sizes_p): Ditto. (empty_profitable_hard_regs, setup_profitable_hard_regs): Ditto. (update_copy_costs): Remove assert. Skip cost update if the hard reg does not belong the class. (assign_hard_reg): Process only profitable hard regs. (uncolorable_allocnos_num): Make it scalar. (allocno_spill_priority): Use ALLOCNO_EXCESS_PRESSURE_POINTS_NUM and ira_reg_class_max_nregs instead of ALLOCNO_LEFT_CONFLICTS_SIZE and ira_reg_class_max_nregs. (bucket_allocno_compare_func): Check frequency first. (sort_bucket): Add compare function as a parameter. (add_allocno_to_ordered_bucket): Assume no coalesced allocnos. (uncolorable_allocnos_splay_tree, USE_SPLAY_P): Remove. (push_allocno_to_stack): Rewrite for checking new allocno colorability. (remove_allocno_from_bucket_and_push): Print cost too. Remove assert. (push_only_colorable): Pass new parameter to sort_bucket. (push_allocno_to_spill): Remove. (allocno_spill_priority_compare): Make it inline and rewrite. (splay_tree_allocate, splay_tree_free): Remove. (allocno_spill_sort_compare): New function. (push_allocnos_to_stack): Sort allocnos for spilling once. Don't build and use splay tree. Choose first allocno in uncolorable allocno bucket to spill. Remove setting spill cost. (all_conflicting_hard_regs): Remove. (setup_allocno_available_regs_num): Check only profitable hard regs. Print info about hard regs nodes. (setup_allocno_left_conflicts_size): Remove. (put_allocno_into_bucket): Don't call setup_allocno_left_conflicts_size. Use setup_left_conflict_sizes_p. (improve_allocation): New. (color_allocnos): Call setup_profitable_hard_regs, form_object_hard_regs_nodes_forest, improve_allocation, finish_object_hard_regs_nodes_forest. Setup spill cost. (print_loop_title): Use pressure classes. (color_allocnso): Ditto. (do_coloring): Remove allocation and freeing splay_tree_node_pool and allocnos_for_spilling. (ira_sort_regnos_for_alter_reg): Don't setup members {first,next}_coalesced_allocno. (color): Remove allocating and freeing removed_splay_allocno_vec. (fast_allocation): Use ira_prohibited_class_mode_regs instead of prohibited_class_mode_regs. * ira-lives.c: Remove mentioning cover classes from the file. Fix formatting. (update_allocno_pressure_excess_length): Use pressure classes. (inc_register_pressure, dec_register_pressure): Check for pressure class. (mark_pseudo_regno_live, mark_pseudo_regno_subword_live): Use pressure class. Use ira_reg_class_nregs instead of ira_reg_class_max_nregs. (mark_pseudo_regno_dead, mark_pseudo_regno_subword_dead): Ditto. (mark_hard_reg_live, mark_hard_reg_dead): Use pressure class. (single_reg_class): Use ira_reg_class_nregs instead of ira_reg_class_max_nregs. (process_bb_node_lives): Use pressure classes. * ira-emit.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Fix formatting. (change_loop): Use pressure classes. (modify_move_list): Call ira_set_allocno_class instead of ira_set_allocno_cover_class. * ira-build.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS and ALLOCNO_CLASS_COST instead of ALLOCNO_COVER_CLASS and ALLOCNO_COVER_CLASS_COST. Use ALLOCNO_UPDATED_CLASS_COST instead of ALLOCNO_UPDATED_COVER_CLASS_COST. Fix formatting. (ira_create_object): Initiate OBJECT_PROFITABLE_HARD_REGS. (ira_create_allocno): Remove initialization of ALLOCNO_SPLAY_REMOVED_P, ALLOCNO_LEFT_CONFLICT_SIZE. Initialize ALLOCNO_COLORABLE_P. (ira_set_allocno_cover_class): Rename to ira_set_allocno_class. Update conflict regs for the objects. (create_cap_allocno): Remove assert. Don't propagate ALLOCNO_AVAILABLE_REGS_NUM. (ira_free_allocno_costs): New function. (finish_allocno): Change a part of code into call of ira_free_allocno_costs. (low_pressure_loop_node_p): Use pressure classes. (object_range_compare_func): Don't compare classes. (setup_min_max_conflict_allocno_ids): Ditto. * loop-invariant.c: Remove mentioning cover classes from the file. Use ira_pressure_classes and ira_pressure_classes_num instead of ira_reg_class_cover_size and ira_reg_class_cover. Fix formatting. (get_cover_class_and_nregs): Rename to get_cover_pressure_and_nregs. Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. Use reg_allocno_class instead of reg_cover_class. (get_inv_cost): Use instead ira_stack_reg_pressure_class of STACK_REG_COVER_CLASS. (get_regno_cover_class): Rename to get_regno_pressure_class. (move_loop_invariants): Initialize and finalize regstat. * ira.c: Remove mentioning cover classes from the file. Add comments about coloring without cover classes. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Fix formatting. (alloc_reg_class_subclasses, setup_reg_subclasses): Move it before setup_class_subset_and_memory_move_costs. (setup_stack_reg_pressure_class, setup_pressure_classes): New. (setup_cover_and_important_classes): Rename to setup_allocno_and_important_classes. (setup_class_translate_array): New. (setup_class_translate): Call it for allocno and pressure classes. (cover_class_order): Rename to allocno_class_order. (comp_reg_classes_func): Use ira_allocno_class_translate instead of ira_class_translate. (reorder_important_classes): Set up ira_important_class_nums. (setup_reg_class_relations): Set up ira_reg_class_superunion. (print_class_cover): Rename to print_classes. Add parameter. (ira_debug_class_cover): Rename to ira_debug_allocno_classes. Print pressure classes too. (find_reg_class_closure): Rename to find_reg_classes. Don't call setup_reg_subclasses. (ira_hard_regno_cover_class): Rename to ira_hard_regno_allocno_class. (ira_reg_class_nregs): Rename to ira_reg_class_max_nregs. (setup_prohibited_class_mode_regs): Use ira_prohibited_class_mode_regs instead of prohibited_class_mode_regs. (clarify_prohibited_class_mode_regs): New function. (ira_init_register_move_cost): Set up ira_max_register_move_cost, ira_max_may_move_in_cost, and ira_max_may_move_out_cost. (ira_init_once): Initialize them. (free_register_move_costs): Process them. (ira_init): Move calls of find_reg_classes and setup_hard_regno_aclass after setup_prohibited_class_mode_regs. Call clarify_prohibited_class_mode_regs. (ira_no_alloc_reg): Remove. (too_high_register_pressure_p): Use pressure classes. * sched-deps.c: Remove mentioning cover classes from the file. Use ira_reg_pressure_cover instead of ira_reg_class_cover. Use ira_pressure_classes and ira_pressure_classes_num instead of ira_reg_class_cover_size and ira_reg_class_cover. (mark_insn_hard_regno_birth, mark_hard_regno_death): Use sched_regno_pressure_class instead of sched_regno_cover_class. (mark_insn_pseudo_birth, mark_pseudo_death): Ditto. Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. * ira.h: Add 2010 to Copyright. (ira_no_alloc_reg): Remove external. (struct target_ira): Rename x_ira_hard_regno_cover_class, x_ira_reg_class_cover_size, x_ira_reg_class_cover, and x_ira_class_translate to x_ira_hard_regno_allocno_class, x_ira_allocno_classes_num, x_ira_allocno_classes, and x_ira_allocno_class_translate. Add x_ira_pressure_classes_num, x_ira_pressure_classes, x_ira_pressure_class_translate, and x_ira_stack_reg_pressure_class. Rename x_ira_reg_class_nregs to x_ira_reg_class_max_nregs. Add x_ira_reg_class_min_nregs and x_ira_no_alloc_regs. (ira_hard_regno_cover_class): Rename to ira_hard_regno_allocno_class. (ira_reg_class_cover_size, ira_reg_class_cover): Rename to ira_allocno_classes_num and ira_allocno_classes. (ira_class_translate): Rename to ira_allocno_class_translate. (ira_pressure_classes_num, ira_pressure_classes): New definitions. (ira_pressure_class_translate, ira_stack_reg_pressure_class): Ditto. (ira_reg_class_nregs): Rename to ira_reg_class_max_nregs. (ira_reg_class_min_nregs, ira_stack_reg_pressure_class): New (ira_no_alloc_regs): New. * ira-costs.c: Add 2010 to Copyright. Remove mentioning cover classes from the file. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Use ALLOCNO_CLASS_COST instead of ALLOCNO_COVER_CLASS_COST. (regno_cover_class): Rename to regno_aclass. (record_reg_classes): Use ira_reg_class_subunion instead of ira_reg_class_union. (record_address_regs): Check overflow. (scan_one_insn): Ditto. (print_allocno_costs): Print total mem cost fore regional allocation. (print_pseudo_costs): Use REG_N_REFS. (find_costs_and_classes): Use classes intersected with them on the 1st pass. Check overflow. Use ira_reg_class_subunion instead of ira_reg_class_union. Use ira_allocno_class_translate and regno_aclass instead of ira_class_translate and regno_cover_class. Modify code for finding regno_aclass. Setup preferred classes for the next pass. (setup_allocno_cover_class_and_costs): Rename to setup_allocno_class_and_costs. Use regno_aclass instead of regno_cover_class. Use ira_set_allocno_class instead of ira_set_allocno_cover_class. (init_costs, finish_costs): Use regno_aclass instead of regno_cover_class. (ira_costs): Use setup_allocno_class_and_costs instead of setup_allocno_cover_class_and_costs. (ira_tune_allocno_costs_and_cover_classes): Rename to ira_tune_allocno_costs. Check overflow. Skip conflict hard regs by processing objects. Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. * rtl.h (reg_cover_class): Rename to reg_allocno_class. * sched-int.h: Remove mentioning cover classes from the file. (sched_regno_cover_class): Rename to sched_regno_pressure_class. * reginfo.c: Add 2010 to Copyright. Remove mentioning cover classes from the file. (struct reg_pref): Rename coverclass into allocnoclass. (reg_cover_class): Rename to reg_allocno_class. * Makefile.in (ira-color.o): Remove SPLAY_TREE_H from dependencies. * config/alpha/alpha.h (IRA_COVER_CLASSES): Remove. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/avr/avr.h (IRA_COVER_CLASSES): Ditto. * config/bfin/bfin.h (IRA_COVER_CLASSES): Ditto. * config/cris/cris.h (IRA_COVER_CLASSES): Ditto. * config/fr30/fr30.h (IRA_COVER_CLASSES): Ditto. * config/frv/frv.h (IRA_COVER_CLASSES): Ditto. * config/h8300/h8300.h (IRA_COVER_CLASSES): Ditto. * config/i386/i386.h (STACK_REG_COVER_CLASS): Ditto. * config/i386/i386.c (TARGET_IRA_COVER_CLASSES) (i386_ira_cover_classes): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/iq2000/iq2000.h (IRA_COVER_CLASSES): Ditto. * config/m32r/m32r.h (IRA_COVER_CLASSES): Ditto. * config/m68k/m68k.h (IRA_COVER_CLASSES): Ditto. * config/mcore/mcore.h (IRA_COVER_CLASSES): Ditto. * config/mep/mep.h (IRA_COVER_CLASSES): Ditto. * config/mips/mips.c (TARGET_IRA_COVER_CLASSES) (mips_ira_cover_classes): Ditto. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): Ditto. * config/moxie/moxie.h (IRA_COVER_CLASSES): Ditto. * config/pa/pa64-regs.h (IRA_COVER_CLASSES): Ditto. * config/pa/pa32-regs.h (IRA_COVER_CLASSES): Ditto. * config/picochip/picochip.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES_PRE_VSX) (IRA_COVER_CLASSES_VSX): Ditto. * config/rs6000/rs6000.c (TARGET_IRA_COVER_CLASSES) (rs6000_ira_cover_classes): Ditto. * config/rx/rx.h (IRA_COVER_CLASSES): Ditto. * config/s390/s390.h (IRA_COVER_CLASSES): Ditto. * config/score/score.h (IRA_COVER_CLASSES): Ditto. * config/sh/sh.h (IRA_COVER_CLASSES): Ditto. * config/sparc/sparc.h (IRA_COVER_CLASSES): Ditto. * config/spu/spu.h (IRA_COVER_CLASSES): Ditto. * config/stormy16/stormy16.h (IRA_COVER_CLASSES): Ditto. * config/v850/v850.h (IRA_COVER_CLASSES): Ditto. * config/vax/vax.h (IRA_COVER_CLASSES): Ditto. * config/xtensa/xtensa.h (IRA_COVER_CLASSES): Ditto. From-SVN: r171649
2011-03-29 03:02:05 +02:00
PREFCLASS, ALTCLASS, and ALLOCNOCLASS. */
[multiple changes] 2008-08-26 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c, ira-color.c, ira-costs.c, ira.h, ira-lives.c, ira.c, ira-conflicts.c, ira-emit.c, ira-int.h: New files. * doc/passes.texi: Describe IRA. * doc/tm.texi (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Describe the new macros. * doc/invoke.texi (ira-max-loops-num): Describe the new parameter. (-fira, -fira-algorithm, -fira-coalesce, -fno-ira-move-spills, -fira-propagate-cost, -fno-ira-share-save-slots, -fno-ira-share-spill-slots, -fira-verbose): Describe new options. * flags.h (ira_algorithm): New enumeration. (flag_ira_algorithm, flag_ira_verbose): New external variable declarations. * postreload.c (gate_handle_postreload): Don't do post reload optimizations unless the reload is completed. * reload.c (push_reload, find_dummy_reload): Use DF_LR_OUT for IRA. * tree-pass.h (pass_ira): New external variable declaration. * reload.h: Add 2008 to the Copyright. * cfgloopanal.c: Include params.h. (estimate_reg_pressure_cost): Decrease cost for IRA optimization mode. * params.h (IRA_MAX_LOOPS_NUM): New macro. * toplev.c (ira.h): New include. (flag_ira_algorithm, flag_ira_verbose): New external variables. (backend_init_target): Call ira_init. (backend_init): Call ira_init_once. (finalize): Call finish_ira_once. * toplev.h (flag_ira, flag_ira_coalesce, flag_ira_move_spills, flag_ira_share_save_slots, flag_ira_share_spill_slots): New external variables. * regs.h (contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): New external variable declarations. (move_table): New typedef. * caller-save.c: Include headers output.h and ira.h. (no_caller_save_reg_set): New global variable. (save_slots_num, save_slots): New variables. (reg_save_code, reg_restore_code, add_stored_regs): Add prototypes. (init_caller_save): Set up no_caller_save_reg_set. (init_save_areas): Reset save_slots_num. (saved_hard_reg): New structure. (hard_reg_map, saved_regs_num, all_saved_regs): New variables. (initiate_saved_hard_regs, new_saved_hard_reg, finish_saved_hard_regs, saved_hard_reg_compare_func): New functions. (setup_save_areas): Add code for sharing stack slots. (all_blocks): New variable. (save_call_clobbered_regs): Process pseudo-register too. (mark_set_regs): Process pseudo-register too. (insert_one_insn): Put the insn after bb note in a empty basic block. Add insn check. * global.c (eliminable_regset): Make it external. (mark_elimination): Use DF_LR_IN for IRA. (pseudo_for_reload_consideration_p): New. (build_insn_chain): Make it external. Don't ignore spilled pseudos for IRA. Use pseudo_for_reload_consideration_p. (gate_handle_global_alloc): New function. (pass_global_alloc): Add the gate function. * opts.c (decode_options): Set up flag_ira. Print the warning for -fira. (common_handle_option): Process -fira-algorithm and -fira-verbose. * timevar.def (TV_IRA, TV_RELOAD): New passes. * regmove.c (regmove_optimize): Don't do replacement of output for IRA. * hard-reg-set.h (no_caller_save_reg_set, reg_class_subclasses): New external variable declarations. * local-alloc.c (update_equiv_regs): Make it external. Return true if jump label rebuilding should be done. Rescan new_insn for notes. (gate_handle_local_alloc): New function. (pass_local_alloc): Add the gate function. * alias.c (value_addr_p, stack_addr_p): New functions. (nonoverlapping_memrefs_p): Use them for IRA. * common.opt (fira, fira-algorithm, fira-coalesce, fira-move-spills, fira-share-save-slots, fira-share-spill-slots, fira-verbose): New options. * regclass.c (reg_class_subclasses, contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): Make the variables external. (move_table): Remove typedef. (init_move_cost): Make it external. (allocate_reg_info, resize_reg_info, setup_reg_classes): New functions. * rtl.h (init_move_cost, allocate_reg_info, resize_reg_info, setup_reg_classes): New function prototypes. (eliminable_regset): New external variable declaration. (build_insn_chain, update_equiv_regs): New function prototypes. * Makefile.in (IRA_INT_H): New definition. (OBJS-common): Add ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, and ira-lives.o. (reload1.o, toplev.o): Add dependence on ira.h. (cfgloopanal.o): Add PARAMS_H. (caller-save.o): Add dependence on output.h and ira.h. (ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, ira-lives.o): New entries. * passes.c (pass_ira): New pass. * params.def (PARAM_IRA_MAX_LOOPS_NUM): New parameter. * reload1.c (ira.h): Include the header. (changed_allocation_pseudos): New bitmap. (init_reload): Initiate the bitmap. (compute_use_by_pseudos): Permits spilled registers in FROM. (temp_pseudo_reg_arr): New variable. (reload): Allocate and free temp_pseudo_reg_arr. Sort pseudos for IRA. Call alter_reg with the additional parameter. Don't clear spilled_pseudos for IRA. Restore original insn chain for IRA. Clear changed_allocation_pseudos at the end of reload. (calculate_needs_all_insns): Call IRA's mark_memory_move_deletion. (hard_regno_to_pseudo_regno): New variable. (count_pseudo): Check spilled pseudos. Set up hard_regno_to_pseudo_regno. (count_spilled_pseudo): Check spilled pseudos. Update hard_regno_to_pseudo_regno. (find_reg): Use better_spill_reload_regno_p. Check hard_regno_to_pseudo_regno. (alter_reg): Set up spilled_pseudos. Add a new parameter. Add code for IRA. (eliminate_regs_1): Use additional parameter for alter_reg. (finish_spills): Set up pseudo_previous_regs only for spilled pseudos. Call reassign_pseudos once for all spilled pseudos, pass more arguments. Don't clear live_throughout and dead_or_set for spilled pseudos. Use additional parameter for alter_reg. Call mark_allocation_change. Set up changed_allocation_pseudos. Remove sanity check. (emit_input_reload_insns, delete_output_reload): Use additional parameter for alter_reg. Call mark_allocation_change. (substitute, gen_reload_chain_without_interm_reg_p): New functions. (reloads_conflict): Use gen_reload_chain_without_interm_reg_p. * testsuite/gcc.dg/20080410-1.c: New file. * config/s390/s390.h (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Define. * config/sparc/sparc.h (IRA_COVER_CLASSES): New macro. * config/i386/i386.h (IRA_COVER_CLASSES): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES): Ditto. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/alpha/alpha.h (IRA_COVER_CLASSES): Ditto. 2008-08-24 Jeff Law <law@redhat.com> * ira.c (setup_reg_class_intersect_union): Prefer smallest class when ignoring unavailable registers. 2008-08-24 Jeff Law <law@redhat.com> * ira-color.c (coalesced_pseudo_reg_slot_compare): Check FRAME_GROWS_DOWNWARD and STACK_GROWS_DOWNWARD. * ira.c (setup_eliminable_regset): Check stack_realign_needed. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): New macro. 2008-06-03 Steve Chamberlain <steve.chamberlain@gmail.com> * ira-build.c (allocno_range_compare_func): Stabilize sort. 2008-05-29 Andy Hutchinson <hutchinsonandy@aim.com> * config/avr/avr.h (IRA_COVER_CLASSES): New macro. * reload1.c (find_reg): Process registers in register allocation order. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * toplev.c (backend_init_target): Move ira_init call from here... (lang_dependent_init_target): ...to here. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * ira.c (setup_class_subset_and_memory_move_costs): Don't calculate memory move costs for NO_REGS. 2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org> * ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if STACK_REGS is defined. 2008-04-08 Andrew Pinski <andrew_pinski@playstation.sony.com> * config/spu/spu.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Bernd Schmidt <bernd.schmidt@analog.com> * config/bfin/bfin.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Kaz Kojima <kkojima@gcc.gnu.org> * config/sh/sh.h (IRA_COVER_CLASSES): Define. * config/sh/sh.md (movsicc_true+3): Check if emit returns a barrier. From-SVN: r139590
2008-08-26 14:39:58 +02:00
void
setup_reg_classes (int regno,
invoke.texi (-fsched-pressure): Document it. 2009-09-02 Vladimir Makarov <vmakarov@redhat.com> * doc/invoke.texi (-fsched-pressure): Document it. (-fsched-reg-pressure-heuristic): Remove it. * reload.c (ira.h): Include. (find_reloads): Add choosing reload on number of small spilled classes. * haifa-sched.c (ira.h): Include. (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure, saved_reg_pressure, curr_reg_live, saved_reg_live, region_ref_regs): New variables. (sched_init_region_reg_pressure_info, mark_regno_birth_or_death, initiate_reg_pressure_info, setup_ref_regs, initiate_bb_reg_pressure_info, save_reg_pressure, restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New functions. (setup_insn_reg_pressure_info): New function. (rank_for_schedule): Add pressure checking and insn issue time. Remove comparison of insn reg weights. (ready_sort): Set insn reg pressure info. (update_register_pressure, setup_insn_max_reg_pressure, update_reg_and_insn_max_reg_pressure, sched_setup_bb_reg_pressure_info): New functions. (schedule_insn): Add code for printing and updating reg pressure info. (find_set_reg_weight, find_insn_reg_weight): Remove. (ok_for_early_queue_removal): Do nothing if pressure_only_p. (debug_ready_list): Print reg pressure info. (schedule_block): Ditto. Check insn issue time. (sched_init): Set up sched_pressure_p. Allocate and set up some reg pressure related info. (sched_finish): Free some reg pressure related info. (fix_tick_ready): Make insn always ready if pressure_p. (init_h_i_d): Don't call find_insn_reg_weight. (haifa_finish_h_i_d): Free insn reg pressure info. * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move to ira.h. * ira-lives.c (single_reg_class): Check mode to find how many registers are necessary for operand. (ira_implicitly_set_insn_hard_regs): New. * common.opt (fsched-pressure): New options. (fsched-reg-pressure-heuristic): Remove. * ira.c (setup_eliminable_regset): Rename to ira_setup_eliminable_regset. Make it external. (expand_reg_info): Pass cover class to setup_reg_classes. (ira): Call resize_reg_info instead of allocate_reg_info. * sched-deps.c: Include ira.h. (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New. (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses, reg_pressure_info, insn_use_p, mark_insn_pseudo_birth, mark_insn_hard_regno_birth, mark_insn_reg_birth, mark_pseudo_death, mark_hard_regno_death, mark_reg_death, mark_insn_reg_store, mark_insn_reg_clobber, setup_insn_reg_pressure_info): New. (sched_analyze_1): Update implicit_reg_pending_uses. (sched_analyze_insn): Find implicit sets, uses, clobbers of regs. Use them to create dependencies. Set insn reg uses and pressure info. Process reg_pending_uses in one place. (free_deps): Free implicit sets. (remove_from_deps): Remove implicit sets if necessary. Check implicit sets when clearing reg_last_in_use. (init_deps_global): Clear implicit_reg_pending_clobbers and implicit_reg_pending_uses. * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move from ira-int.h. (ira_setup_eliminable_regset, ira_set_pseudo_classes, ira_implicitly_set_insn_hard_regs): New prototypes. * ira-costs.c (pseudo_classes_defined_p, allocno_p, cost_elements_num): New variables. (allocno_costs, total_costs): Rename to costs and total_allocno_costs. (COSTS_OF_ALLOCNO): Rename to COSTS. (allocno_pref): Rename to pref. (allocno_pref_buffer): Rename to pref_buffer. (common_classes): Rename to regno_cover_class. (COST_INDEX): New. (record_reg_classes): Set allocno attributes only if allocno_p. (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM. (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM and COSTS_OF_ALLOCNO. (print_costs): Rename to print_allocno_costs. (print_pseudo_costs): New. (process_bb_node_for_costs): Split into 2 functions with new function process_bb_for_costs. Pass BB to process_bb_for_costs. (find_allocno_class_costs): Rename to find_costs_and_classes. Add new parameter dump_file. Use cost_elements_num instead of ira_allocnos_num. Make one iteration if preferred classes were already calculated for scheduler. Make 2 versions of code depending on allocno_p. (setup_allocno_cover_class_and_costs): Check allocno_p. Use regno_cover_class and COSTS instead of common_classes and COSTS_OF_ALLOCNO. (init_costs, finish_costs): New. (ira_costs): Set up allocno_p and cost_elements_num. Call init_costs and finish_costs. (ira_set_pseudo_classes): New. * rtl.h (allocate_reg_info): Remove. (resize_reg_info): Change return type. (reg_cover_class): New. (setup_reg_classes): Add new parameter. * sched-int.h (struct deps_reg): New member implicit_sets. (sched_pressure_p, sched_regno_cover_class): New external definitions. (INCREASE_BITS): New macro. (struct reg_pressure_data, struct reg_use_data): New. (struct _haifa_insn_data): Remove reg_weight. Add members reg_pressure, reg_use_list, reg_set_list, and reg_pressure_excess_cost_change. (struct deps): New member implicit_sets. (pressure_p): New variable. (COVER_CLASS_BITS, INCREASE_BITS): New macros. (struct reg_pressure_data, struct reg_use_data): New. (INSN_REG_WEIGHT): Remove. (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST, INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros. (sched_init_region_reg_pressure_info, sched_setup_bb_reg_pressure_info): New prototypes. * reginfo.c (struct reg_pref): New member coverclass. (reg_cover_class): New function. (reginfo_init, pass_reginfo_init): Move after free_reg_info. (reg_info_size): New variable. (allocate_reg_info): Make static. Setup reg_info_size. (resize_reg_info): Use reg_info_size. Return flag of resizing. (setup_reg_classes): Add a new parameter. Setup cover class too. * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the dependencies. * sched-rgn.c (deps_join): Set up implicit_sets. (schedule_region): Set up region and basic blocks pressure relative info. * passes.c (init_optimization_passes): Move pass_subregs_of_mode_init before pass_sched. From-SVN: r151348
2009-09-02 20:54:25 +02:00
enum reg_class prefclass, enum reg_class altclass,
[multiple changes] 2011-03-28 Vladimir Makarov <vmakarov@redhat.com> * ira-color.c (update_left_conflict_sizes_p): Don't assume that conflict object hard regset nodes have intersecting hard reg sets. * regmove.c (regmove_optimize): Move ira_set_pseudo_classes call after regstat_init_n_sets_and_refs. * ira.c: Add more comments at the top. (setup_stack_reg_pressure_class, setup_pressure_classes): Add comments how we compute the register pressure classes. (setup_allocno_and_important_classes): Add more comments. (setup_class_translate_array, reorder_important_classes) (setup_reg_class_relations): Add comments. * ira-emit.c: Add 2011 to the Copyright line. Add comments at the start of the file. * ira-color.c: Add 2011 to the Copyright line. (assign_hard_reg): Add more comments. (improve_allocation): Ditto. * ira-costs.c: Add 2011 to the Copyright line. (setup_cost_classes, setup_regno_cost_classes_by_aclass): Add more comments. (setup_regno_cost_classes_by_mode): Ditto. Initial patches from ira-improv branch: 2010-08-13 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c: (ira_create_object): Remove initialization of OBJECT_PROFITABLE_HARD_REGS. Initialize OBJECT_ADD_DATA. (ira_create_allocno): Remove initialization of ALLOCNO_MEM_OPTIMIZED_DEST, ALLOCNO_MEM_OPTIMIZED_DEST_P, ALLOCNO_SOMEWHERE_RENAMED_P, ALLOCNO_CHILD_RENAMED_P, ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P, ALLOCNO_COLORABLE_P, ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO, ALLOCNO_FIRST_COALESCED_ALLOCNO, ALLOCNO_NEXT_COALESCED_ALLOCNO. Initialize ALLOCNO_ADD_DATA. (copy_info_to_removed_store_destinations): Use ALLOCNO_EMIT_DATA and allocno_emit_reg instead of ALLOCNO_MEM_OPTIMIZED_DEST_P and ALLOCNO_REG. (ira_flattening): Ditto. Use ALLOCNO_EMIT_DATA instead of ALLOCNO_MEM_OPTIMIZED_DEST and ALLOCNO_SOMEWHERE_RENAMED_P. * ira.c (ira_reallocate): Remove. (setup_pressure_classes): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. (setup_allocno_assignment_flags): Use ALLOCNO_EMIT_DATA. (ira): Call ira_initiate_emit_data and ira_finish_emit_data. * ira-color.c: Use ALLOCNO_COLOR_DATA instead of ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P, ALLOCNO_COLORABLE_P, ALLOCNO_AVAILABLE_REGS_NUM, ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO. ALLOCNO_TEMP. Use OBJECT_COLOR_DATA instead of OBJECT_PROFITABLE_HARD_REGS, OBJECT_HARD_REGS_NODE, OBJECT_HARD_REGS_SUBNODES_START, OBJECT_HARD_REGS_SUBNODES_NUM. Fix formatting. (object_hard_regs_t, object_hard_regs_node_t): Move from ira-int.h. (struct object_hard_regs, struct object_hard_regs_node): Ditto. (struct allocno_color_data): New. (allocno_color_data_t): New typedef. (allocno_color_data): New definition. (ALLOCNO_COLOR_DATA): New macro. (struct object_color_data): New. (object_color_data_t): New typedef. (object_color_data): New definition. (OBJECT_COLOR_DATA): New macro. (update_copy_costs, calculate_allocno_spill_cost): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. (move_spill_restore, update_curr_costs): Ditto. (allocno_spill_priority): Make it inline. (color_pass): Allocate and free allocno_color_dat and object_color_data. (struct coalesce_data, coalesce_data_t): New. (allocno_coalesce_data): New definition. (ALLOCNO_COALESCE_DATA): New macro. (merge_allocnos, coalesced_allocno_conflict_p): Use ALLOCNO_COALESCED_DATA instead of ALLOCNO_FIRST_COALESCED_ALLOCNO, ALLOCNO_NEXT_COALESCED_ALLOCNO, ALLOCNO_TEMP. (coalesce_allocnos): Ditto. (setup_coalesced_allocno_costs_and_nums): Ditto. (collect_spilled_coalesced_allocnos): Ditto. (slot_coalesced_allocno_live_ranges_intersect_p): Ditto. (setup_slot_coalesced_allocno_live_ranges): Ditto. (coalesce_spill_slots): Ditto. (ira_sort_regnos_for_alter_reg): Ditto. Allocate, initialize and free allocno_coalesce_data. * ira-conflicts.c: Fix formatting. (process_regs_for_copy): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. (build_object_conflicts): Optimize. * ira-costs.c (record_reg_classes): Optimize. Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost, ira_may_move_in_cost, and ira_may_move_out_cost instead of ira_get_register_move_cost and ira_get_may_move_cost. (record_address_regs): Ditto. (scan_one_insn): Optimize. (find_costs_and_classes): Optimize. (process_bb_node_for_hard_reg_moves): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. * ira-emit.c: Use allocno_emit_reg, ALLOCNO_EMIT_DATA instead of ALLOCNO_REG, ALLOCNO_CHILD_RENAMED_P, ALLOCNO_MEM_OPTIMIZED_DEST, ALLOCNO_MEM_OPTIMIZED_DEST_P, and ALLOCNO_SOMEWHERE_RENAMED_P. (ira_allocno_emit_data, void_p, new_allocno_emit_data_vec): New definitions. (ira_initiate_emit_data, ira_finish_emit_data) (create_new_allocno): New functions. (modify_move_list): Call create_new_alloc instead of ira_create_allocno. (emit_move_list): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. * ira-int.h: Fix some comments. (object_hard_regs_t, object_hard_regs_node_t): Move to ira-color.c. (struct object_hard_regs, struct object_hard_regs_node): Ditto. (struct ira_object): Remove profitable_hard_regs, hard_regs_node, hard_regs_subnodes_start, hard_regs_subnodes_num. Add new member add_data. (struct ira_allocno): Make mode and aclass a bitfield. Move other bitfield after mode. Make hard_regno a short int. Make hard_regno short. Remove first_coalesced_allocno and next_coalesced_allocno. Move mem_optimized_dest_p, somewhere_renamed_p, child_renamed_p, reg, and mem_optimized_dest into struct ira_emit_data. Remove in_graph_p, may_be_spilled_p, available_regs_num, next_bucket_allocno, prev_bucket_allocno, temp, colorable_p. Add new member add_data. (ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P): Remove. (ALLOCNO_COLORABLE_P, ALLOCNO_AVAILABLE_REGS_NUM): Remove. (ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO): Remove. (ALLOCNO_TEMP, ALLOCNO_FIRST_COALESCED_ALLOCNO): Remove. (ALLOCNO_NEXT_COALESCED_ALLOCNO): Remove. (ALLOCNO_ADD_DATA): New macro. (ira_emit_data_t): New typedef. (struct ira_emit_data): New. Move mem_optimized_dest_p, somewhere_renamed_p, child_renamed_p, reg, mem_optimized_dest from struct ira_allocno. (ALLOCNO_EMIT_DATA): New macro. (ira_allocno_emit_data, allocno_emit_reg): New. (ALLOCNO_PROFITABLE_HARD_REGS, OBJECT_HARD_REGS_NODE): Remove. (OBJECT_HARD_REGS_SUBNODES_STAR, OBJECT_HARD_REGS_SUBNODES_NUM): Remove. (OBJECT_ADD_DATA): New macro. (ira_reallocate): Remove. (ira_initiate_emit_data, ira_finish_emit_data): New. (ira_get_register_move_cost, ira_get_may_move_cost): Remove. (ira_init_register_move_cost_if_necessary): New. (ira_object_conflict_iter_next): Merge into ira_object_conflict_iter_cond. (FOR_EACH_OBJECT_CONFLICT): Don't use ira_object_conflict_iter_next. * ira-live.c: (process_single_reg_class_operands): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. 2010-08-13 Vladimir Makarov <vmakarov@redhat.com> * ira-int.h (struct target_ira_int): Remove x_cost_classes. * ira-costs.c: Fix formatting. (cost_classes, cost_classes_num): Remove. (struct cost_classes, cost_classes_t, const_cost_classes_t): New. (regno_cost_classes, cost_classes_hash, cost_classes_eq): New. (cost_classes_del, cost_classes_htab): New. (cost_classes_aclass_cache, cost_classes_mode_cache): New. (initiate_regno_cost_classes, setup_cost_classes): New. (setup_regno_cost_classes_by_aclass): New. (setup_regno_cost_classes_by_mode, finish_regno_cost_classes): New. (record_reg_classes): Use regno_cost_classes instead of cost_classes. Move checking opposite operand up. (record_address_regs): Use regno_cost_classes instead of cost_classes. (scan_one_insn): Ditto. Use always general register. (print_allocno_costs): Use regno_cost_classes instead of cost_classes. (print_pseudo_costs): Ditto. Use Reg_N_REFS. (find_costs_and_classes): Set up cost classes for each registers. Use also their mode for this. Use regno_cost_classes instead of cost_classes. (setup_allocno_class_and_costs): Use regno_cost_classes instead of cost_classes. (free_ira_costs, ira_init_costs): Don't use cost_classes. (ira_costs, ira_set_pseudo_classes): Call initiate_regno_cost_classes and finish_regno_cost_classes. 2010-10-04 Vladimir Makarov <vmakarov@redhat.com> * target-def.h (TARGET_IRA_COVER_CLASSES): Remove. * target.def (ira_cover_classes): Remove. * doc/tm.texi: Remove TARGET_IRA_COVER_CLASSES and IRA_COVER_CLASSES. * doc/tm.texi.in: Ditto. * ira-conflicts.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Use ALLOCNO_COVER_CLASS_COST instead of ALLOCNO_CLASS_COST. Fix formatting. * targhooks.c (default_ira_cover_classes): Remove. * targhooks.h (default_ira_cover_classes): Ditto. * haifa-sched.c: Remove mentioning cover classes from the file. Use ira_reg_pressure_cover instead of ira_reg_class_cover. Use ira_pressure_classes and ira_pressure_classes_num instead of ira_reg_class_cover_size and ira_reg_class_cover. Use sched_regno_pressure_class instead of sched_regno_cover_class. (mark_regno_birth_or_death, setup_insn_reg_pressure_info): Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. * ira-int.h: Add 2010 to Copyright. Remove mentioning cover classes from the file. (object_hard_regs_t, object_hard_regs_node_t): New typedefs. (struct object_hard_regs, struct object_hard_regs_node): New. (struct ira_object): New members profitable_hard_regs, hard_regs_node, hard_regs_subnodes_start, hard_regs_subnodes_num. (struct ira_allocno): Rename cover_class to aclass. Rename cover_class_cost and updated_cover_class_cost to class_cost and updated_class_cost. Remove splay_removed_p and left_conflict_size. Add new members colorable_p. (ALLOCNO_SPLAY_REMOVED_P, ALLOCNO_LEFT_CONFLICTS_SIZE): Remove. (ALLOCNO_COLORABLE_P): New macro. (ALLOCNO_COVER_CLASS): Rename to ALLOCNO_CLASS. (ALLOCNO_COVER_CLASS_COST, ALLOCNO_UPDATED_COVER_CLASS_COST): Rename to ALLOCNO_CLASS_COST and ALLOCNO_UPDATED__CLASS_COST. (OBJECT_...): Rename parameter C to O. (OBJECT_PROFITABLE_HARD_REGS): New macro. (OBJECT_HARD_REGS_NODE, OBJECT_HARD_REGS_SUBNODES_START) (OBJECT_HARD_REGS_SUBNODES_NUM): New macros. (struct target_ira_int): New members x_ira_max_memory_move_cost, x_ira_max_register_move_cost, x_ira_max_may_move_in_cost, x_ira_max_may_move_out_cost, x_ira_reg_allocno_class_p, x_ira_reg_pressure_class_p, x_ira_important_class_nums, x_ira_reg_class_superunion. Rename x_prohibited_class_mode_reg to x_ira_prohibited_class_mode_reg. Rename x_ira_reg_class_union to x_ira_reg_class_subunion. (ira_max_memory_move_cost, ira_max_register_move_cost) (ira_max_may_move_in_cost, ira_max_may_move_out_cost) (ira_reg_allocno_class_p, ira_reg_pressure_class_p) (ira_important_class_nums, ira_reg_class_superunion): New macros. (prohibited_class_mode_regs): Rename to ira_prohibited_class_mode_regs. (ira_reg_class_union): Rename to ira_reg_class_subunion. (ira_debug_class_cover): Rename to ira_debug_allocno_classes. (ira_set_allocno_cover_class): Rename to ira_set_allocno_class. (ira_tune_allocno_costs_and_cover_classes): Rename to ira_tune_allocno_costs. (ira_debug_hard_regs_forest): New. (ira_object_conflict_iter_init, ira_object_conflict_iter_cond) (ira_object_conflict_iter_next): Fix comments. (ira_hard_reg_set_intersection_p, hard_reg_set_size): New functions. (ira_allocate_and_set_costs, ira_allocate_and_copy_costs): Rename cover_class to aclass. (ira_allocate_and_accumulate_costs): Ditto. (ira_allocate_and_set_or_copy_costs): Ditto. * opts.c (decode_options): Remove ira_cover_class check. * ira-color.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS, ALLOCNO_CLASS_COST, and ALLOCNO_UPDATED_CLASS_COST instead of ALLOCNO_COVER_CLASS, ALLOCNO_COVER_CLASS_COST, and ALLOCNO_UPDATED_COVER_CLASS_COST. Fix formatting. (splay-tree.h): Remove include. (allocno_coalesced_p, processed_coalesced_allocno_bitmap): Move before copy_freq_compare_func. (allocnos_for_spilling, removed_splay_allocno_vec): Remove. (object_hard_regs_vec, object_hard_regs_htab, node_check_tick): New definitions. (hard_regs_roots, hard_regs_node_vec): Ditto. (object_hard_regs_hash, object_hard_regs_eq, find_hard_regs): Ditto. (insert_hard_regs, init_object_hard_regs, add_object_hard_regs): Ditto. (finish_object_hard_regs, object_hard_regs_compare): Ditto. (create_new_object_hard_regs_node): Ditto. (add_new_object_hard_regs_node_to_forest): Ditto. (add_object_hard_regs_to_forest, collect_object_hard_regs_cover): Ditto. (setup_object_hard_regs_nodes_parent, first_common_ancestor_node): Ditto. (print_hard_reg_set, print_hard_regs_subforest): Ditto. (print_hard_regs_forest, ira_debug_hard_regs_forest): Ditto. (remove_unused_object_hard_regs_nodes): Ditto. (enumerate_object_hard_regs_nodes): Ditto. (object_hard_regs_nodes_num, object_hard_regs_nodes): Ditto. (object_hard_regs_subnode_t): Ditto. (struct object_hard_regs_subnode): Ditto. (object_hard_regs_subnodes, object_hard_regs_subnode_index): Ditto. (setup_object_hard_regs_subnode_index): Ditto. (get_object_hard_regs_subnodes_num): Ditto. (form_object_hard_regs_nodes_forest): Ditto. (finish_object_hard_regs_nodes_tree): Ditto. (finish_object_hard_regs_nodes_forest): Ditto. (allocnos_have_intersected_live_ranges_p): Rename to allocnos_conflict_by_live_ranges_p. Move before copy_freq_compare_func. (pseudos_have_intersected_live_ranges_p): Rename to conflict_by_live_ranges_p. Move before copy_freq_compare_func. (setup_left_conflict_sizes_p, update_left_conflict_sizes_p): Ditto. (empty_profitable_hard_regs, setup_profitable_hard_regs): Ditto. (update_copy_costs): Remove assert. Skip cost update if the hard reg does not belong the class. (assign_hard_reg): Process only profitable hard regs. (uncolorable_allocnos_num): Make it scalar. (allocno_spill_priority): Use ALLOCNO_EXCESS_PRESSURE_POINTS_NUM and ira_reg_class_max_nregs instead of ALLOCNO_LEFT_CONFLICTS_SIZE and ira_reg_class_max_nregs. (bucket_allocno_compare_func): Check frequency first. (sort_bucket): Add compare function as a parameter. (add_allocno_to_ordered_bucket): Assume no coalesced allocnos. (uncolorable_allocnos_splay_tree, USE_SPLAY_P): Remove. (push_allocno_to_stack): Rewrite for checking new allocno colorability. (remove_allocno_from_bucket_and_push): Print cost too. Remove assert. (push_only_colorable): Pass new parameter to sort_bucket. (push_allocno_to_spill): Remove. (allocno_spill_priority_compare): Make it inline and rewrite. (splay_tree_allocate, splay_tree_free): Remove. (allocno_spill_sort_compare): New function. (push_allocnos_to_stack): Sort allocnos for spilling once. Don't build and use splay tree. Choose first allocno in uncolorable allocno bucket to spill. Remove setting spill cost. (all_conflicting_hard_regs): Remove. (setup_allocno_available_regs_num): Check only profitable hard regs. Print info about hard regs nodes. (setup_allocno_left_conflicts_size): Remove. (put_allocno_into_bucket): Don't call setup_allocno_left_conflicts_size. Use setup_left_conflict_sizes_p. (improve_allocation): New. (color_allocnos): Call setup_profitable_hard_regs, form_object_hard_regs_nodes_forest, improve_allocation, finish_object_hard_regs_nodes_forest. Setup spill cost. (print_loop_title): Use pressure classes. (color_allocnso): Ditto. (do_coloring): Remove allocation and freeing splay_tree_node_pool and allocnos_for_spilling. (ira_sort_regnos_for_alter_reg): Don't setup members {first,next}_coalesced_allocno. (color): Remove allocating and freeing removed_splay_allocno_vec. (fast_allocation): Use ira_prohibited_class_mode_regs instead of prohibited_class_mode_regs. * ira-lives.c: Remove mentioning cover classes from the file. Fix formatting. (update_allocno_pressure_excess_length): Use pressure classes. (inc_register_pressure, dec_register_pressure): Check for pressure class. (mark_pseudo_regno_live, mark_pseudo_regno_subword_live): Use pressure class. Use ira_reg_class_nregs instead of ira_reg_class_max_nregs. (mark_pseudo_regno_dead, mark_pseudo_regno_subword_dead): Ditto. (mark_hard_reg_live, mark_hard_reg_dead): Use pressure class. (single_reg_class): Use ira_reg_class_nregs instead of ira_reg_class_max_nregs. (process_bb_node_lives): Use pressure classes. * ira-emit.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Fix formatting. (change_loop): Use pressure classes. (modify_move_list): Call ira_set_allocno_class instead of ira_set_allocno_cover_class. * ira-build.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS and ALLOCNO_CLASS_COST instead of ALLOCNO_COVER_CLASS and ALLOCNO_COVER_CLASS_COST. Use ALLOCNO_UPDATED_CLASS_COST instead of ALLOCNO_UPDATED_COVER_CLASS_COST. Fix formatting. (ira_create_object): Initiate OBJECT_PROFITABLE_HARD_REGS. (ira_create_allocno): Remove initialization of ALLOCNO_SPLAY_REMOVED_P, ALLOCNO_LEFT_CONFLICT_SIZE. Initialize ALLOCNO_COLORABLE_P. (ira_set_allocno_cover_class): Rename to ira_set_allocno_class. Update conflict regs for the objects. (create_cap_allocno): Remove assert. Don't propagate ALLOCNO_AVAILABLE_REGS_NUM. (ira_free_allocno_costs): New function. (finish_allocno): Change a part of code into call of ira_free_allocno_costs. (low_pressure_loop_node_p): Use pressure classes. (object_range_compare_func): Don't compare classes. (setup_min_max_conflict_allocno_ids): Ditto. * loop-invariant.c: Remove mentioning cover classes from the file. Use ira_pressure_classes and ira_pressure_classes_num instead of ira_reg_class_cover_size and ira_reg_class_cover. Fix formatting. (get_cover_class_and_nregs): Rename to get_cover_pressure_and_nregs. Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. Use reg_allocno_class instead of reg_cover_class. (get_inv_cost): Use instead ira_stack_reg_pressure_class of STACK_REG_COVER_CLASS. (get_regno_cover_class): Rename to get_regno_pressure_class. (move_loop_invariants): Initialize and finalize regstat. * ira.c: Remove mentioning cover classes from the file. Add comments about coloring without cover classes. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Fix formatting. (alloc_reg_class_subclasses, setup_reg_subclasses): Move it before setup_class_subset_and_memory_move_costs. (setup_stack_reg_pressure_class, setup_pressure_classes): New. (setup_cover_and_important_classes): Rename to setup_allocno_and_important_classes. (setup_class_translate_array): New. (setup_class_translate): Call it for allocno and pressure classes. (cover_class_order): Rename to allocno_class_order. (comp_reg_classes_func): Use ira_allocno_class_translate instead of ira_class_translate. (reorder_important_classes): Set up ira_important_class_nums. (setup_reg_class_relations): Set up ira_reg_class_superunion. (print_class_cover): Rename to print_classes. Add parameter. (ira_debug_class_cover): Rename to ira_debug_allocno_classes. Print pressure classes too. (find_reg_class_closure): Rename to find_reg_classes. Don't call setup_reg_subclasses. (ira_hard_regno_cover_class): Rename to ira_hard_regno_allocno_class. (ira_reg_class_nregs): Rename to ira_reg_class_max_nregs. (setup_prohibited_class_mode_regs): Use ira_prohibited_class_mode_regs instead of prohibited_class_mode_regs. (clarify_prohibited_class_mode_regs): New function. (ira_init_register_move_cost): Set up ira_max_register_move_cost, ira_max_may_move_in_cost, and ira_max_may_move_out_cost. (ira_init_once): Initialize them. (free_register_move_costs): Process them. (ira_init): Move calls of find_reg_classes and setup_hard_regno_aclass after setup_prohibited_class_mode_regs. Call clarify_prohibited_class_mode_regs. (ira_no_alloc_reg): Remove. (too_high_register_pressure_p): Use pressure classes. * sched-deps.c: Remove mentioning cover classes from the file. Use ira_reg_pressure_cover instead of ira_reg_class_cover. Use ira_pressure_classes and ira_pressure_classes_num instead of ira_reg_class_cover_size and ira_reg_class_cover. (mark_insn_hard_regno_birth, mark_hard_regno_death): Use sched_regno_pressure_class instead of sched_regno_cover_class. (mark_insn_pseudo_birth, mark_pseudo_death): Ditto. Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. * ira.h: Add 2010 to Copyright. (ira_no_alloc_reg): Remove external. (struct target_ira): Rename x_ira_hard_regno_cover_class, x_ira_reg_class_cover_size, x_ira_reg_class_cover, and x_ira_class_translate to x_ira_hard_regno_allocno_class, x_ira_allocno_classes_num, x_ira_allocno_classes, and x_ira_allocno_class_translate. Add x_ira_pressure_classes_num, x_ira_pressure_classes, x_ira_pressure_class_translate, and x_ira_stack_reg_pressure_class. Rename x_ira_reg_class_nregs to x_ira_reg_class_max_nregs. Add x_ira_reg_class_min_nregs and x_ira_no_alloc_regs. (ira_hard_regno_cover_class): Rename to ira_hard_regno_allocno_class. (ira_reg_class_cover_size, ira_reg_class_cover): Rename to ira_allocno_classes_num and ira_allocno_classes. (ira_class_translate): Rename to ira_allocno_class_translate. (ira_pressure_classes_num, ira_pressure_classes): New definitions. (ira_pressure_class_translate, ira_stack_reg_pressure_class): Ditto. (ira_reg_class_nregs): Rename to ira_reg_class_max_nregs. (ira_reg_class_min_nregs, ira_stack_reg_pressure_class): New (ira_no_alloc_regs): New. * ira-costs.c: Add 2010 to Copyright. Remove mentioning cover classes from the file. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Use ALLOCNO_CLASS_COST instead of ALLOCNO_COVER_CLASS_COST. (regno_cover_class): Rename to regno_aclass. (record_reg_classes): Use ira_reg_class_subunion instead of ira_reg_class_union. (record_address_regs): Check overflow. (scan_one_insn): Ditto. (print_allocno_costs): Print total mem cost fore regional allocation. (print_pseudo_costs): Use REG_N_REFS. (find_costs_and_classes): Use classes intersected with them on the 1st pass. Check overflow. Use ira_reg_class_subunion instead of ira_reg_class_union. Use ira_allocno_class_translate and regno_aclass instead of ira_class_translate and regno_cover_class. Modify code for finding regno_aclass. Setup preferred classes for the next pass. (setup_allocno_cover_class_and_costs): Rename to setup_allocno_class_and_costs. Use regno_aclass instead of regno_cover_class. Use ira_set_allocno_class instead of ira_set_allocno_cover_class. (init_costs, finish_costs): Use regno_aclass instead of regno_cover_class. (ira_costs): Use setup_allocno_class_and_costs instead of setup_allocno_cover_class_and_costs. (ira_tune_allocno_costs_and_cover_classes): Rename to ira_tune_allocno_costs. Check overflow. Skip conflict hard regs by processing objects. Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. * rtl.h (reg_cover_class): Rename to reg_allocno_class. * sched-int.h: Remove mentioning cover classes from the file. (sched_regno_cover_class): Rename to sched_regno_pressure_class. * reginfo.c: Add 2010 to Copyright. Remove mentioning cover classes from the file. (struct reg_pref): Rename coverclass into allocnoclass. (reg_cover_class): Rename to reg_allocno_class. * Makefile.in (ira-color.o): Remove SPLAY_TREE_H from dependencies. * config/alpha/alpha.h (IRA_COVER_CLASSES): Remove. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/avr/avr.h (IRA_COVER_CLASSES): Ditto. * config/bfin/bfin.h (IRA_COVER_CLASSES): Ditto. * config/cris/cris.h (IRA_COVER_CLASSES): Ditto. * config/fr30/fr30.h (IRA_COVER_CLASSES): Ditto. * config/frv/frv.h (IRA_COVER_CLASSES): Ditto. * config/h8300/h8300.h (IRA_COVER_CLASSES): Ditto. * config/i386/i386.h (STACK_REG_COVER_CLASS): Ditto. * config/i386/i386.c (TARGET_IRA_COVER_CLASSES) (i386_ira_cover_classes): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/iq2000/iq2000.h (IRA_COVER_CLASSES): Ditto. * config/m32r/m32r.h (IRA_COVER_CLASSES): Ditto. * config/m68k/m68k.h (IRA_COVER_CLASSES): Ditto. * config/mcore/mcore.h (IRA_COVER_CLASSES): Ditto. * config/mep/mep.h (IRA_COVER_CLASSES): Ditto. * config/mips/mips.c (TARGET_IRA_COVER_CLASSES) (mips_ira_cover_classes): Ditto. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): Ditto. * config/moxie/moxie.h (IRA_COVER_CLASSES): Ditto. * config/pa/pa64-regs.h (IRA_COVER_CLASSES): Ditto. * config/pa/pa32-regs.h (IRA_COVER_CLASSES): Ditto. * config/picochip/picochip.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES_PRE_VSX) (IRA_COVER_CLASSES_VSX): Ditto. * config/rs6000/rs6000.c (TARGET_IRA_COVER_CLASSES) (rs6000_ira_cover_classes): Ditto. * config/rx/rx.h (IRA_COVER_CLASSES): Ditto. * config/s390/s390.h (IRA_COVER_CLASSES): Ditto. * config/score/score.h (IRA_COVER_CLASSES): Ditto. * config/sh/sh.h (IRA_COVER_CLASSES): Ditto. * config/sparc/sparc.h (IRA_COVER_CLASSES): Ditto. * config/spu/spu.h (IRA_COVER_CLASSES): Ditto. * config/stormy16/stormy16.h (IRA_COVER_CLASSES): Ditto. * config/v850/v850.h (IRA_COVER_CLASSES): Ditto. * config/vax/vax.h (IRA_COVER_CLASSES): Ditto. * config/xtensa/xtensa.h (IRA_COVER_CLASSES): Ditto. From-SVN: r171649
2011-03-29 03:02:05 +02:00
enum reg_class allocnoclass)
[multiple changes] 2008-08-26 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c, ira-color.c, ira-costs.c, ira.h, ira-lives.c, ira.c, ira-conflicts.c, ira-emit.c, ira-int.h: New files. * doc/passes.texi: Describe IRA. * doc/tm.texi (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Describe the new macros. * doc/invoke.texi (ira-max-loops-num): Describe the new parameter. (-fira, -fira-algorithm, -fira-coalesce, -fno-ira-move-spills, -fira-propagate-cost, -fno-ira-share-save-slots, -fno-ira-share-spill-slots, -fira-verbose): Describe new options. * flags.h (ira_algorithm): New enumeration. (flag_ira_algorithm, flag_ira_verbose): New external variable declarations. * postreload.c (gate_handle_postreload): Don't do post reload optimizations unless the reload is completed. * reload.c (push_reload, find_dummy_reload): Use DF_LR_OUT for IRA. * tree-pass.h (pass_ira): New external variable declaration. * reload.h: Add 2008 to the Copyright. * cfgloopanal.c: Include params.h. (estimate_reg_pressure_cost): Decrease cost for IRA optimization mode. * params.h (IRA_MAX_LOOPS_NUM): New macro. * toplev.c (ira.h): New include. (flag_ira_algorithm, flag_ira_verbose): New external variables. (backend_init_target): Call ira_init. (backend_init): Call ira_init_once. (finalize): Call finish_ira_once. * toplev.h (flag_ira, flag_ira_coalesce, flag_ira_move_spills, flag_ira_share_save_slots, flag_ira_share_spill_slots): New external variables. * regs.h (contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): New external variable declarations. (move_table): New typedef. * caller-save.c: Include headers output.h and ira.h. (no_caller_save_reg_set): New global variable. (save_slots_num, save_slots): New variables. (reg_save_code, reg_restore_code, add_stored_regs): Add prototypes. (init_caller_save): Set up no_caller_save_reg_set. (init_save_areas): Reset save_slots_num. (saved_hard_reg): New structure. (hard_reg_map, saved_regs_num, all_saved_regs): New variables. (initiate_saved_hard_regs, new_saved_hard_reg, finish_saved_hard_regs, saved_hard_reg_compare_func): New functions. (setup_save_areas): Add code for sharing stack slots. (all_blocks): New variable. (save_call_clobbered_regs): Process pseudo-register too. (mark_set_regs): Process pseudo-register too. (insert_one_insn): Put the insn after bb note in a empty basic block. Add insn check. * global.c (eliminable_regset): Make it external. (mark_elimination): Use DF_LR_IN for IRA. (pseudo_for_reload_consideration_p): New. (build_insn_chain): Make it external. Don't ignore spilled pseudos for IRA. Use pseudo_for_reload_consideration_p. (gate_handle_global_alloc): New function. (pass_global_alloc): Add the gate function. * opts.c (decode_options): Set up flag_ira. Print the warning for -fira. (common_handle_option): Process -fira-algorithm and -fira-verbose. * timevar.def (TV_IRA, TV_RELOAD): New passes. * regmove.c (regmove_optimize): Don't do replacement of output for IRA. * hard-reg-set.h (no_caller_save_reg_set, reg_class_subclasses): New external variable declarations. * local-alloc.c (update_equiv_regs): Make it external. Return true if jump label rebuilding should be done. Rescan new_insn for notes. (gate_handle_local_alloc): New function. (pass_local_alloc): Add the gate function. * alias.c (value_addr_p, stack_addr_p): New functions. (nonoverlapping_memrefs_p): Use them for IRA. * common.opt (fira, fira-algorithm, fira-coalesce, fira-move-spills, fira-share-save-slots, fira-share-spill-slots, fira-verbose): New options. * regclass.c (reg_class_subclasses, contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): Make the variables external. (move_table): Remove typedef. (init_move_cost): Make it external. (allocate_reg_info, resize_reg_info, setup_reg_classes): New functions. * rtl.h (init_move_cost, allocate_reg_info, resize_reg_info, setup_reg_classes): New function prototypes. (eliminable_regset): New external variable declaration. (build_insn_chain, update_equiv_regs): New function prototypes. * Makefile.in (IRA_INT_H): New definition. (OBJS-common): Add ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, and ira-lives.o. (reload1.o, toplev.o): Add dependence on ira.h. (cfgloopanal.o): Add PARAMS_H. (caller-save.o): Add dependence on output.h and ira.h. (ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, ira-lives.o): New entries. * passes.c (pass_ira): New pass. * params.def (PARAM_IRA_MAX_LOOPS_NUM): New parameter. * reload1.c (ira.h): Include the header. (changed_allocation_pseudos): New bitmap. (init_reload): Initiate the bitmap. (compute_use_by_pseudos): Permits spilled registers in FROM. (temp_pseudo_reg_arr): New variable. (reload): Allocate and free temp_pseudo_reg_arr. Sort pseudos for IRA. Call alter_reg with the additional parameter. Don't clear spilled_pseudos for IRA. Restore original insn chain for IRA. Clear changed_allocation_pseudos at the end of reload. (calculate_needs_all_insns): Call IRA's mark_memory_move_deletion. (hard_regno_to_pseudo_regno): New variable. (count_pseudo): Check spilled pseudos. Set up hard_regno_to_pseudo_regno. (count_spilled_pseudo): Check spilled pseudos. Update hard_regno_to_pseudo_regno. (find_reg): Use better_spill_reload_regno_p. Check hard_regno_to_pseudo_regno. (alter_reg): Set up spilled_pseudos. Add a new parameter. Add code for IRA. (eliminate_regs_1): Use additional parameter for alter_reg. (finish_spills): Set up pseudo_previous_regs only for spilled pseudos. Call reassign_pseudos once for all spilled pseudos, pass more arguments. Don't clear live_throughout and dead_or_set for spilled pseudos. Use additional parameter for alter_reg. Call mark_allocation_change. Set up changed_allocation_pseudos. Remove sanity check. (emit_input_reload_insns, delete_output_reload): Use additional parameter for alter_reg. Call mark_allocation_change. (substitute, gen_reload_chain_without_interm_reg_p): New functions. (reloads_conflict): Use gen_reload_chain_without_interm_reg_p. * testsuite/gcc.dg/20080410-1.c: New file. * config/s390/s390.h (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Define. * config/sparc/sparc.h (IRA_COVER_CLASSES): New macro. * config/i386/i386.h (IRA_COVER_CLASSES): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES): Ditto. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/alpha/alpha.h (IRA_COVER_CLASSES): Ditto. 2008-08-24 Jeff Law <law@redhat.com> * ira.c (setup_reg_class_intersect_union): Prefer smallest class when ignoring unavailable registers. 2008-08-24 Jeff Law <law@redhat.com> * ira-color.c (coalesced_pseudo_reg_slot_compare): Check FRAME_GROWS_DOWNWARD and STACK_GROWS_DOWNWARD. * ira.c (setup_eliminable_regset): Check stack_realign_needed. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): New macro. 2008-06-03 Steve Chamberlain <steve.chamberlain@gmail.com> * ira-build.c (allocno_range_compare_func): Stabilize sort. 2008-05-29 Andy Hutchinson <hutchinsonandy@aim.com> * config/avr/avr.h (IRA_COVER_CLASSES): New macro. * reload1.c (find_reg): Process registers in register allocation order. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * toplev.c (backend_init_target): Move ira_init call from here... (lang_dependent_init_target): ...to here. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * ira.c (setup_class_subset_and_memory_move_costs): Don't calculate memory move costs for NO_REGS. 2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org> * ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if STACK_REGS is defined. 2008-04-08 Andrew Pinski <andrew_pinski@playstation.sony.com> * config/spu/spu.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Bernd Schmidt <bernd.schmidt@analog.com> * config/bfin/bfin.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Kaz Kojima <kkojima@gcc.gnu.org> * config/sh/sh.h (IRA_COVER_CLASSES): Define. * config/sh/sh.md (movsicc_true+3): Check if emit returns a barrier. From-SVN: r139590
2008-08-26 14:39:58 +02:00
{
if (reg_pref == NULL)
return;
gcc_assert (reg_info_size >= max_reg_num ());
[multiple changes] 2008-08-26 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c, ira-color.c, ira-costs.c, ira.h, ira-lives.c, ira.c, ira-conflicts.c, ira-emit.c, ira-int.h: New files. * doc/passes.texi: Describe IRA. * doc/tm.texi (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Describe the new macros. * doc/invoke.texi (ira-max-loops-num): Describe the new parameter. (-fira, -fira-algorithm, -fira-coalesce, -fno-ira-move-spills, -fira-propagate-cost, -fno-ira-share-save-slots, -fno-ira-share-spill-slots, -fira-verbose): Describe new options. * flags.h (ira_algorithm): New enumeration. (flag_ira_algorithm, flag_ira_verbose): New external variable declarations. * postreload.c (gate_handle_postreload): Don't do post reload optimizations unless the reload is completed. * reload.c (push_reload, find_dummy_reload): Use DF_LR_OUT for IRA. * tree-pass.h (pass_ira): New external variable declaration. * reload.h: Add 2008 to the Copyright. * cfgloopanal.c: Include params.h. (estimate_reg_pressure_cost): Decrease cost for IRA optimization mode. * params.h (IRA_MAX_LOOPS_NUM): New macro. * toplev.c (ira.h): New include. (flag_ira_algorithm, flag_ira_verbose): New external variables. (backend_init_target): Call ira_init. (backend_init): Call ira_init_once. (finalize): Call finish_ira_once. * toplev.h (flag_ira, flag_ira_coalesce, flag_ira_move_spills, flag_ira_share_save_slots, flag_ira_share_spill_slots): New external variables. * regs.h (contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): New external variable declarations. (move_table): New typedef. * caller-save.c: Include headers output.h and ira.h. (no_caller_save_reg_set): New global variable. (save_slots_num, save_slots): New variables. (reg_save_code, reg_restore_code, add_stored_regs): Add prototypes. (init_caller_save): Set up no_caller_save_reg_set. (init_save_areas): Reset save_slots_num. (saved_hard_reg): New structure. (hard_reg_map, saved_regs_num, all_saved_regs): New variables. (initiate_saved_hard_regs, new_saved_hard_reg, finish_saved_hard_regs, saved_hard_reg_compare_func): New functions. (setup_save_areas): Add code for sharing stack slots. (all_blocks): New variable. (save_call_clobbered_regs): Process pseudo-register too. (mark_set_regs): Process pseudo-register too. (insert_one_insn): Put the insn after bb note in a empty basic block. Add insn check. * global.c (eliminable_regset): Make it external. (mark_elimination): Use DF_LR_IN for IRA. (pseudo_for_reload_consideration_p): New. (build_insn_chain): Make it external. Don't ignore spilled pseudos for IRA. Use pseudo_for_reload_consideration_p. (gate_handle_global_alloc): New function. (pass_global_alloc): Add the gate function. * opts.c (decode_options): Set up flag_ira. Print the warning for -fira. (common_handle_option): Process -fira-algorithm and -fira-verbose. * timevar.def (TV_IRA, TV_RELOAD): New passes. * regmove.c (regmove_optimize): Don't do replacement of output for IRA. * hard-reg-set.h (no_caller_save_reg_set, reg_class_subclasses): New external variable declarations. * local-alloc.c (update_equiv_regs): Make it external. Return true if jump label rebuilding should be done. Rescan new_insn for notes. (gate_handle_local_alloc): New function. (pass_local_alloc): Add the gate function. * alias.c (value_addr_p, stack_addr_p): New functions. (nonoverlapping_memrefs_p): Use them for IRA. * common.opt (fira, fira-algorithm, fira-coalesce, fira-move-spills, fira-share-save-slots, fira-share-spill-slots, fira-verbose): New options. * regclass.c (reg_class_subclasses, contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): Make the variables external. (move_table): Remove typedef. (init_move_cost): Make it external. (allocate_reg_info, resize_reg_info, setup_reg_classes): New functions. * rtl.h (init_move_cost, allocate_reg_info, resize_reg_info, setup_reg_classes): New function prototypes. (eliminable_regset): New external variable declaration. (build_insn_chain, update_equiv_regs): New function prototypes. * Makefile.in (IRA_INT_H): New definition. (OBJS-common): Add ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, and ira-lives.o. (reload1.o, toplev.o): Add dependence on ira.h. (cfgloopanal.o): Add PARAMS_H. (caller-save.o): Add dependence on output.h and ira.h. (ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, ira-lives.o): New entries. * passes.c (pass_ira): New pass. * params.def (PARAM_IRA_MAX_LOOPS_NUM): New parameter. * reload1.c (ira.h): Include the header. (changed_allocation_pseudos): New bitmap. (init_reload): Initiate the bitmap. (compute_use_by_pseudos): Permits spilled registers in FROM. (temp_pseudo_reg_arr): New variable. (reload): Allocate and free temp_pseudo_reg_arr. Sort pseudos for IRA. Call alter_reg with the additional parameter. Don't clear spilled_pseudos for IRA. Restore original insn chain for IRA. Clear changed_allocation_pseudos at the end of reload. (calculate_needs_all_insns): Call IRA's mark_memory_move_deletion. (hard_regno_to_pseudo_regno): New variable. (count_pseudo): Check spilled pseudos. Set up hard_regno_to_pseudo_regno. (count_spilled_pseudo): Check spilled pseudos. Update hard_regno_to_pseudo_regno. (find_reg): Use better_spill_reload_regno_p. Check hard_regno_to_pseudo_regno. (alter_reg): Set up spilled_pseudos. Add a new parameter. Add code for IRA. (eliminate_regs_1): Use additional parameter for alter_reg. (finish_spills): Set up pseudo_previous_regs only for spilled pseudos. Call reassign_pseudos once for all spilled pseudos, pass more arguments. Don't clear live_throughout and dead_or_set for spilled pseudos. Use additional parameter for alter_reg. Call mark_allocation_change. Set up changed_allocation_pseudos. Remove sanity check. (emit_input_reload_insns, delete_output_reload): Use additional parameter for alter_reg. Call mark_allocation_change. (substitute, gen_reload_chain_without_interm_reg_p): New functions. (reloads_conflict): Use gen_reload_chain_without_interm_reg_p. * testsuite/gcc.dg/20080410-1.c: New file. * config/s390/s390.h (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Define. * config/sparc/sparc.h (IRA_COVER_CLASSES): New macro. * config/i386/i386.h (IRA_COVER_CLASSES): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES): Ditto. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/alpha/alpha.h (IRA_COVER_CLASSES): Ditto. 2008-08-24 Jeff Law <law@redhat.com> * ira.c (setup_reg_class_intersect_union): Prefer smallest class when ignoring unavailable registers. 2008-08-24 Jeff Law <law@redhat.com> * ira-color.c (coalesced_pseudo_reg_slot_compare): Check FRAME_GROWS_DOWNWARD and STACK_GROWS_DOWNWARD. * ira.c (setup_eliminable_regset): Check stack_realign_needed. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): New macro. 2008-06-03 Steve Chamberlain <steve.chamberlain@gmail.com> * ira-build.c (allocno_range_compare_func): Stabilize sort. 2008-05-29 Andy Hutchinson <hutchinsonandy@aim.com> * config/avr/avr.h (IRA_COVER_CLASSES): New macro. * reload1.c (find_reg): Process registers in register allocation order. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * toplev.c (backend_init_target): Move ira_init call from here... (lang_dependent_init_target): ...to here. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * ira.c (setup_class_subset_and_memory_move_costs): Don't calculate memory move costs for NO_REGS. 2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org> * ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if STACK_REGS is defined. 2008-04-08 Andrew Pinski <andrew_pinski@playstation.sony.com> * config/spu/spu.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Bernd Schmidt <bernd.schmidt@analog.com> * config/bfin/bfin.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Kaz Kojima <kkojima@gcc.gnu.org> * config/sh/sh.h (IRA_COVER_CLASSES): Define. * config/sh/sh.md (movsicc_true+3): Check if emit returns a barrier. From-SVN: r139590
2008-08-26 14:39:58 +02:00
reg_pref[regno].prefclass = prefclass;
reg_pref[regno].altclass = altclass;
[multiple changes] 2011-03-28 Vladimir Makarov <vmakarov@redhat.com> * ira-color.c (update_left_conflict_sizes_p): Don't assume that conflict object hard regset nodes have intersecting hard reg sets. * regmove.c (regmove_optimize): Move ira_set_pseudo_classes call after regstat_init_n_sets_and_refs. * ira.c: Add more comments at the top. (setup_stack_reg_pressure_class, setup_pressure_classes): Add comments how we compute the register pressure classes. (setup_allocno_and_important_classes): Add more comments. (setup_class_translate_array, reorder_important_classes) (setup_reg_class_relations): Add comments. * ira-emit.c: Add 2011 to the Copyright line. Add comments at the start of the file. * ira-color.c: Add 2011 to the Copyright line. (assign_hard_reg): Add more comments. (improve_allocation): Ditto. * ira-costs.c: Add 2011 to the Copyright line. (setup_cost_classes, setup_regno_cost_classes_by_aclass): Add more comments. (setup_regno_cost_classes_by_mode): Ditto. Initial patches from ira-improv branch: 2010-08-13 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c: (ira_create_object): Remove initialization of OBJECT_PROFITABLE_HARD_REGS. Initialize OBJECT_ADD_DATA. (ira_create_allocno): Remove initialization of ALLOCNO_MEM_OPTIMIZED_DEST, ALLOCNO_MEM_OPTIMIZED_DEST_P, ALLOCNO_SOMEWHERE_RENAMED_P, ALLOCNO_CHILD_RENAMED_P, ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P, ALLOCNO_COLORABLE_P, ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO, ALLOCNO_FIRST_COALESCED_ALLOCNO, ALLOCNO_NEXT_COALESCED_ALLOCNO. Initialize ALLOCNO_ADD_DATA. (copy_info_to_removed_store_destinations): Use ALLOCNO_EMIT_DATA and allocno_emit_reg instead of ALLOCNO_MEM_OPTIMIZED_DEST_P and ALLOCNO_REG. (ira_flattening): Ditto. Use ALLOCNO_EMIT_DATA instead of ALLOCNO_MEM_OPTIMIZED_DEST and ALLOCNO_SOMEWHERE_RENAMED_P. * ira.c (ira_reallocate): Remove. (setup_pressure_classes): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. (setup_allocno_assignment_flags): Use ALLOCNO_EMIT_DATA. (ira): Call ira_initiate_emit_data and ira_finish_emit_data. * ira-color.c: Use ALLOCNO_COLOR_DATA instead of ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P, ALLOCNO_COLORABLE_P, ALLOCNO_AVAILABLE_REGS_NUM, ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO. ALLOCNO_TEMP. Use OBJECT_COLOR_DATA instead of OBJECT_PROFITABLE_HARD_REGS, OBJECT_HARD_REGS_NODE, OBJECT_HARD_REGS_SUBNODES_START, OBJECT_HARD_REGS_SUBNODES_NUM. Fix formatting. (object_hard_regs_t, object_hard_regs_node_t): Move from ira-int.h. (struct object_hard_regs, struct object_hard_regs_node): Ditto. (struct allocno_color_data): New. (allocno_color_data_t): New typedef. (allocno_color_data): New definition. (ALLOCNO_COLOR_DATA): New macro. (struct object_color_data): New. (object_color_data_t): New typedef. (object_color_data): New definition. (OBJECT_COLOR_DATA): New macro. (update_copy_costs, calculate_allocno_spill_cost): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. (move_spill_restore, update_curr_costs): Ditto. (allocno_spill_priority): Make it inline. (color_pass): Allocate and free allocno_color_dat and object_color_data. (struct coalesce_data, coalesce_data_t): New. (allocno_coalesce_data): New definition. (ALLOCNO_COALESCE_DATA): New macro. (merge_allocnos, coalesced_allocno_conflict_p): Use ALLOCNO_COALESCED_DATA instead of ALLOCNO_FIRST_COALESCED_ALLOCNO, ALLOCNO_NEXT_COALESCED_ALLOCNO, ALLOCNO_TEMP. (coalesce_allocnos): Ditto. (setup_coalesced_allocno_costs_and_nums): Ditto. (collect_spilled_coalesced_allocnos): Ditto. (slot_coalesced_allocno_live_ranges_intersect_p): Ditto. (setup_slot_coalesced_allocno_live_ranges): Ditto. (coalesce_spill_slots): Ditto. (ira_sort_regnos_for_alter_reg): Ditto. Allocate, initialize and free allocno_coalesce_data. * ira-conflicts.c: Fix formatting. (process_regs_for_copy): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. (build_object_conflicts): Optimize. * ira-costs.c (record_reg_classes): Optimize. Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost, ira_may_move_in_cost, and ira_may_move_out_cost instead of ira_get_register_move_cost and ira_get_may_move_cost. (record_address_regs): Ditto. (scan_one_insn): Optimize. (find_costs_and_classes): Optimize. (process_bb_node_for_hard_reg_moves): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. * ira-emit.c: Use allocno_emit_reg, ALLOCNO_EMIT_DATA instead of ALLOCNO_REG, ALLOCNO_CHILD_RENAMED_P, ALLOCNO_MEM_OPTIMIZED_DEST, ALLOCNO_MEM_OPTIMIZED_DEST_P, and ALLOCNO_SOMEWHERE_RENAMED_P. (ira_allocno_emit_data, void_p, new_allocno_emit_data_vec): New definitions. (ira_initiate_emit_data, ira_finish_emit_data) (create_new_allocno): New functions. (modify_move_list): Call create_new_alloc instead of ira_create_allocno. (emit_move_list): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. * ira-int.h: Fix some comments. (object_hard_regs_t, object_hard_regs_node_t): Move to ira-color.c. (struct object_hard_regs, struct object_hard_regs_node): Ditto. (struct ira_object): Remove profitable_hard_regs, hard_regs_node, hard_regs_subnodes_start, hard_regs_subnodes_num. Add new member add_data. (struct ira_allocno): Make mode and aclass a bitfield. Move other bitfield after mode. Make hard_regno a short int. Make hard_regno short. Remove first_coalesced_allocno and next_coalesced_allocno. Move mem_optimized_dest_p, somewhere_renamed_p, child_renamed_p, reg, and mem_optimized_dest into struct ira_emit_data. Remove in_graph_p, may_be_spilled_p, available_regs_num, next_bucket_allocno, prev_bucket_allocno, temp, colorable_p. Add new member add_data. (ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P): Remove. (ALLOCNO_COLORABLE_P, ALLOCNO_AVAILABLE_REGS_NUM): Remove. (ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO): Remove. (ALLOCNO_TEMP, ALLOCNO_FIRST_COALESCED_ALLOCNO): Remove. (ALLOCNO_NEXT_COALESCED_ALLOCNO): Remove. (ALLOCNO_ADD_DATA): New macro. (ira_emit_data_t): New typedef. (struct ira_emit_data): New. Move mem_optimized_dest_p, somewhere_renamed_p, child_renamed_p, reg, mem_optimized_dest from struct ira_allocno. (ALLOCNO_EMIT_DATA): New macro. (ira_allocno_emit_data, allocno_emit_reg): New. (ALLOCNO_PROFITABLE_HARD_REGS, OBJECT_HARD_REGS_NODE): Remove. (OBJECT_HARD_REGS_SUBNODES_STAR, OBJECT_HARD_REGS_SUBNODES_NUM): Remove. (OBJECT_ADD_DATA): New macro. (ira_reallocate): Remove. (ira_initiate_emit_data, ira_finish_emit_data): New. (ira_get_register_move_cost, ira_get_may_move_cost): Remove. (ira_init_register_move_cost_if_necessary): New. (ira_object_conflict_iter_next): Merge into ira_object_conflict_iter_cond. (FOR_EACH_OBJECT_CONFLICT): Don't use ira_object_conflict_iter_next. * ira-live.c: (process_single_reg_class_operands): Call ira_init_register_move_cost_if_necessary. Use ira_register_move_cost instead of ira_get_register_move_cost. 2010-08-13 Vladimir Makarov <vmakarov@redhat.com> * ira-int.h (struct target_ira_int): Remove x_cost_classes. * ira-costs.c: Fix formatting. (cost_classes, cost_classes_num): Remove. (struct cost_classes, cost_classes_t, const_cost_classes_t): New. (regno_cost_classes, cost_classes_hash, cost_classes_eq): New. (cost_classes_del, cost_classes_htab): New. (cost_classes_aclass_cache, cost_classes_mode_cache): New. (initiate_regno_cost_classes, setup_cost_classes): New. (setup_regno_cost_classes_by_aclass): New. (setup_regno_cost_classes_by_mode, finish_regno_cost_classes): New. (record_reg_classes): Use regno_cost_classes instead of cost_classes. Move checking opposite operand up. (record_address_regs): Use regno_cost_classes instead of cost_classes. (scan_one_insn): Ditto. Use always general register. (print_allocno_costs): Use regno_cost_classes instead of cost_classes. (print_pseudo_costs): Ditto. Use Reg_N_REFS. (find_costs_and_classes): Set up cost classes for each registers. Use also their mode for this. Use regno_cost_classes instead of cost_classes. (setup_allocno_class_and_costs): Use regno_cost_classes instead of cost_classes. (free_ira_costs, ira_init_costs): Don't use cost_classes. (ira_costs, ira_set_pseudo_classes): Call initiate_regno_cost_classes and finish_regno_cost_classes. 2010-10-04 Vladimir Makarov <vmakarov@redhat.com> * target-def.h (TARGET_IRA_COVER_CLASSES): Remove. * target.def (ira_cover_classes): Remove. * doc/tm.texi: Remove TARGET_IRA_COVER_CLASSES and IRA_COVER_CLASSES. * doc/tm.texi.in: Ditto. * ira-conflicts.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Use ALLOCNO_COVER_CLASS_COST instead of ALLOCNO_CLASS_COST. Fix formatting. * targhooks.c (default_ira_cover_classes): Remove. * targhooks.h (default_ira_cover_classes): Ditto. * haifa-sched.c: Remove mentioning cover classes from the file. Use ira_reg_pressure_cover instead of ira_reg_class_cover. Use ira_pressure_classes and ira_pressure_classes_num instead of ira_reg_class_cover_size and ira_reg_class_cover. Use sched_regno_pressure_class instead of sched_regno_cover_class. (mark_regno_birth_or_death, setup_insn_reg_pressure_info): Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. * ira-int.h: Add 2010 to Copyright. Remove mentioning cover classes from the file. (object_hard_regs_t, object_hard_regs_node_t): New typedefs. (struct object_hard_regs, struct object_hard_regs_node): New. (struct ira_object): New members profitable_hard_regs, hard_regs_node, hard_regs_subnodes_start, hard_regs_subnodes_num. (struct ira_allocno): Rename cover_class to aclass. Rename cover_class_cost and updated_cover_class_cost to class_cost and updated_class_cost. Remove splay_removed_p and left_conflict_size. Add new members colorable_p. (ALLOCNO_SPLAY_REMOVED_P, ALLOCNO_LEFT_CONFLICTS_SIZE): Remove. (ALLOCNO_COLORABLE_P): New macro. (ALLOCNO_COVER_CLASS): Rename to ALLOCNO_CLASS. (ALLOCNO_COVER_CLASS_COST, ALLOCNO_UPDATED_COVER_CLASS_COST): Rename to ALLOCNO_CLASS_COST and ALLOCNO_UPDATED__CLASS_COST. (OBJECT_...): Rename parameter C to O. (OBJECT_PROFITABLE_HARD_REGS): New macro. (OBJECT_HARD_REGS_NODE, OBJECT_HARD_REGS_SUBNODES_START) (OBJECT_HARD_REGS_SUBNODES_NUM): New macros. (struct target_ira_int): New members x_ira_max_memory_move_cost, x_ira_max_register_move_cost, x_ira_max_may_move_in_cost, x_ira_max_may_move_out_cost, x_ira_reg_allocno_class_p, x_ira_reg_pressure_class_p, x_ira_important_class_nums, x_ira_reg_class_superunion. Rename x_prohibited_class_mode_reg to x_ira_prohibited_class_mode_reg. Rename x_ira_reg_class_union to x_ira_reg_class_subunion. (ira_max_memory_move_cost, ira_max_register_move_cost) (ira_max_may_move_in_cost, ira_max_may_move_out_cost) (ira_reg_allocno_class_p, ira_reg_pressure_class_p) (ira_important_class_nums, ira_reg_class_superunion): New macros. (prohibited_class_mode_regs): Rename to ira_prohibited_class_mode_regs. (ira_reg_class_union): Rename to ira_reg_class_subunion. (ira_debug_class_cover): Rename to ira_debug_allocno_classes. (ira_set_allocno_cover_class): Rename to ira_set_allocno_class. (ira_tune_allocno_costs_and_cover_classes): Rename to ira_tune_allocno_costs. (ira_debug_hard_regs_forest): New. (ira_object_conflict_iter_init, ira_object_conflict_iter_cond) (ira_object_conflict_iter_next): Fix comments. (ira_hard_reg_set_intersection_p, hard_reg_set_size): New functions. (ira_allocate_and_set_costs, ira_allocate_and_copy_costs): Rename cover_class to aclass. (ira_allocate_and_accumulate_costs): Ditto. (ira_allocate_and_set_or_copy_costs): Ditto. * opts.c (decode_options): Remove ira_cover_class check. * ira-color.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS, ALLOCNO_CLASS_COST, and ALLOCNO_UPDATED_CLASS_COST instead of ALLOCNO_COVER_CLASS, ALLOCNO_COVER_CLASS_COST, and ALLOCNO_UPDATED_COVER_CLASS_COST. Fix formatting. (splay-tree.h): Remove include. (allocno_coalesced_p, processed_coalesced_allocno_bitmap): Move before copy_freq_compare_func. (allocnos_for_spilling, removed_splay_allocno_vec): Remove. (object_hard_regs_vec, object_hard_regs_htab, node_check_tick): New definitions. (hard_regs_roots, hard_regs_node_vec): Ditto. (object_hard_regs_hash, object_hard_regs_eq, find_hard_regs): Ditto. (insert_hard_regs, init_object_hard_regs, add_object_hard_regs): Ditto. (finish_object_hard_regs, object_hard_regs_compare): Ditto. (create_new_object_hard_regs_node): Ditto. (add_new_object_hard_regs_node_to_forest): Ditto. (add_object_hard_regs_to_forest, collect_object_hard_regs_cover): Ditto. (setup_object_hard_regs_nodes_parent, first_common_ancestor_node): Ditto. (print_hard_reg_set, print_hard_regs_subforest): Ditto. (print_hard_regs_forest, ira_debug_hard_regs_forest): Ditto. (remove_unused_object_hard_regs_nodes): Ditto. (enumerate_object_hard_regs_nodes): Ditto. (object_hard_regs_nodes_num, object_hard_regs_nodes): Ditto. (object_hard_regs_subnode_t): Ditto. (struct object_hard_regs_subnode): Ditto. (object_hard_regs_subnodes, object_hard_regs_subnode_index): Ditto. (setup_object_hard_regs_subnode_index): Ditto. (get_object_hard_regs_subnodes_num): Ditto. (form_object_hard_regs_nodes_forest): Ditto. (finish_object_hard_regs_nodes_tree): Ditto. (finish_object_hard_regs_nodes_forest): Ditto. (allocnos_have_intersected_live_ranges_p): Rename to allocnos_conflict_by_live_ranges_p. Move before copy_freq_compare_func. (pseudos_have_intersected_live_ranges_p): Rename to conflict_by_live_ranges_p. Move before copy_freq_compare_func. (setup_left_conflict_sizes_p, update_left_conflict_sizes_p): Ditto. (empty_profitable_hard_regs, setup_profitable_hard_regs): Ditto. (update_copy_costs): Remove assert. Skip cost update if the hard reg does not belong the class. (assign_hard_reg): Process only profitable hard regs. (uncolorable_allocnos_num): Make it scalar. (allocno_spill_priority): Use ALLOCNO_EXCESS_PRESSURE_POINTS_NUM and ira_reg_class_max_nregs instead of ALLOCNO_LEFT_CONFLICTS_SIZE and ira_reg_class_max_nregs. (bucket_allocno_compare_func): Check frequency first. (sort_bucket): Add compare function as a parameter. (add_allocno_to_ordered_bucket): Assume no coalesced allocnos. (uncolorable_allocnos_splay_tree, USE_SPLAY_P): Remove. (push_allocno_to_stack): Rewrite for checking new allocno colorability. (remove_allocno_from_bucket_and_push): Print cost too. Remove assert. (push_only_colorable): Pass new parameter to sort_bucket. (push_allocno_to_spill): Remove. (allocno_spill_priority_compare): Make it inline and rewrite. (splay_tree_allocate, splay_tree_free): Remove. (allocno_spill_sort_compare): New function. (push_allocnos_to_stack): Sort allocnos for spilling once. Don't build and use splay tree. Choose first allocno in uncolorable allocno bucket to spill. Remove setting spill cost. (all_conflicting_hard_regs): Remove. (setup_allocno_available_regs_num): Check only profitable hard regs. Print info about hard regs nodes. (setup_allocno_left_conflicts_size): Remove. (put_allocno_into_bucket): Don't call setup_allocno_left_conflicts_size. Use setup_left_conflict_sizes_p. (improve_allocation): New. (color_allocnos): Call setup_profitable_hard_regs, form_object_hard_regs_nodes_forest, improve_allocation, finish_object_hard_regs_nodes_forest. Setup spill cost. (print_loop_title): Use pressure classes. (color_allocnso): Ditto. (do_coloring): Remove allocation and freeing splay_tree_node_pool and allocnos_for_spilling. (ira_sort_regnos_for_alter_reg): Don't setup members {first,next}_coalesced_allocno. (color): Remove allocating and freeing removed_splay_allocno_vec. (fast_allocation): Use ira_prohibited_class_mode_regs instead of prohibited_class_mode_regs. * ira-lives.c: Remove mentioning cover classes from the file. Fix formatting. (update_allocno_pressure_excess_length): Use pressure classes. (inc_register_pressure, dec_register_pressure): Check for pressure class. (mark_pseudo_regno_live, mark_pseudo_regno_subword_live): Use pressure class. Use ira_reg_class_nregs instead of ira_reg_class_max_nregs. (mark_pseudo_regno_dead, mark_pseudo_regno_subword_dead): Ditto. (mark_hard_reg_live, mark_hard_reg_dead): Use pressure class. (single_reg_class): Use ira_reg_class_nregs instead of ira_reg_class_max_nregs. (process_bb_node_lives): Use pressure classes. * ira-emit.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Fix formatting. (change_loop): Use pressure classes. (modify_move_list): Call ira_set_allocno_class instead of ira_set_allocno_cover_class. * ira-build.c: Remove mentioning cover classes from the file. Use ALLOCNO_CLASS and ALLOCNO_CLASS_COST instead of ALLOCNO_COVER_CLASS and ALLOCNO_COVER_CLASS_COST. Use ALLOCNO_UPDATED_CLASS_COST instead of ALLOCNO_UPDATED_COVER_CLASS_COST. Fix formatting. (ira_create_object): Initiate OBJECT_PROFITABLE_HARD_REGS. (ira_create_allocno): Remove initialization of ALLOCNO_SPLAY_REMOVED_P, ALLOCNO_LEFT_CONFLICT_SIZE. Initialize ALLOCNO_COLORABLE_P. (ira_set_allocno_cover_class): Rename to ira_set_allocno_class. Update conflict regs for the objects. (create_cap_allocno): Remove assert. Don't propagate ALLOCNO_AVAILABLE_REGS_NUM. (ira_free_allocno_costs): New function. (finish_allocno): Change a part of code into call of ira_free_allocno_costs. (low_pressure_loop_node_p): Use pressure classes. (object_range_compare_func): Don't compare classes. (setup_min_max_conflict_allocno_ids): Ditto. * loop-invariant.c: Remove mentioning cover classes from the file. Use ira_pressure_classes and ira_pressure_classes_num instead of ira_reg_class_cover_size and ira_reg_class_cover. Fix formatting. (get_cover_class_and_nregs): Rename to get_cover_pressure_and_nregs. Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. Use reg_allocno_class instead of reg_cover_class. (get_inv_cost): Use instead ira_stack_reg_pressure_class of STACK_REG_COVER_CLASS. (get_regno_cover_class): Rename to get_regno_pressure_class. (move_loop_invariants): Initialize and finalize regstat. * ira.c: Remove mentioning cover classes from the file. Add comments about coloring without cover classes. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Fix formatting. (alloc_reg_class_subclasses, setup_reg_subclasses): Move it before setup_class_subset_and_memory_move_costs. (setup_stack_reg_pressure_class, setup_pressure_classes): New. (setup_cover_and_important_classes): Rename to setup_allocno_and_important_classes. (setup_class_translate_array): New. (setup_class_translate): Call it for allocno and pressure classes. (cover_class_order): Rename to allocno_class_order. (comp_reg_classes_func): Use ira_allocno_class_translate instead of ira_class_translate. (reorder_important_classes): Set up ira_important_class_nums. (setup_reg_class_relations): Set up ira_reg_class_superunion. (print_class_cover): Rename to print_classes. Add parameter. (ira_debug_class_cover): Rename to ira_debug_allocno_classes. Print pressure classes too. (find_reg_class_closure): Rename to find_reg_classes. Don't call setup_reg_subclasses. (ira_hard_regno_cover_class): Rename to ira_hard_regno_allocno_class. (ira_reg_class_nregs): Rename to ira_reg_class_max_nregs. (setup_prohibited_class_mode_regs): Use ira_prohibited_class_mode_regs instead of prohibited_class_mode_regs. (clarify_prohibited_class_mode_regs): New function. (ira_init_register_move_cost): Set up ira_max_register_move_cost, ira_max_may_move_in_cost, and ira_max_may_move_out_cost. (ira_init_once): Initialize them. (free_register_move_costs): Process them. (ira_init): Move calls of find_reg_classes and setup_hard_regno_aclass after setup_prohibited_class_mode_regs. Call clarify_prohibited_class_mode_regs. (ira_no_alloc_reg): Remove. (too_high_register_pressure_p): Use pressure classes. * sched-deps.c: Remove mentioning cover classes from the file. Use ira_reg_pressure_cover instead of ira_reg_class_cover. Use ira_pressure_classes and ira_pressure_classes_num instead of ira_reg_class_cover_size and ira_reg_class_cover. (mark_insn_hard_regno_birth, mark_hard_regno_death): Use sched_regno_pressure_class instead of sched_regno_cover_class. (mark_insn_pseudo_birth, mark_pseudo_death): Ditto. Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. * ira.h: Add 2010 to Copyright. (ira_no_alloc_reg): Remove external. (struct target_ira): Rename x_ira_hard_regno_cover_class, x_ira_reg_class_cover_size, x_ira_reg_class_cover, and x_ira_class_translate to x_ira_hard_regno_allocno_class, x_ira_allocno_classes_num, x_ira_allocno_classes, and x_ira_allocno_class_translate. Add x_ira_pressure_classes_num, x_ira_pressure_classes, x_ira_pressure_class_translate, and x_ira_stack_reg_pressure_class. Rename x_ira_reg_class_nregs to x_ira_reg_class_max_nregs. Add x_ira_reg_class_min_nregs and x_ira_no_alloc_regs. (ira_hard_regno_cover_class): Rename to ira_hard_regno_allocno_class. (ira_reg_class_cover_size, ira_reg_class_cover): Rename to ira_allocno_classes_num and ira_allocno_classes. (ira_class_translate): Rename to ira_allocno_class_translate. (ira_pressure_classes_num, ira_pressure_classes): New definitions. (ira_pressure_class_translate, ira_stack_reg_pressure_class): Ditto. (ira_reg_class_nregs): Rename to ira_reg_class_max_nregs. (ira_reg_class_min_nregs, ira_stack_reg_pressure_class): New (ira_no_alloc_regs): New. * ira-costs.c: Add 2010 to Copyright. Remove mentioning cover classes from the file. Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS. Use ALLOCNO_CLASS_COST instead of ALLOCNO_COVER_CLASS_COST. (regno_cover_class): Rename to regno_aclass. (record_reg_classes): Use ira_reg_class_subunion instead of ira_reg_class_union. (record_address_regs): Check overflow. (scan_one_insn): Ditto. (print_allocno_costs): Print total mem cost fore regional allocation. (print_pseudo_costs): Use REG_N_REFS. (find_costs_and_classes): Use classes intersected with them on the 1st pass. Check overflow. Use ira_reg_class_subunion instead of ira_reg_class_union. Use ira_allocno_class_translate and regno_aclass instead of ira_class_translate and regno_cover_class. Modify code for finding regno_aclass. Setup preferred classes for the next pass. (setup_allocno_cover_class_and_costs): Rename to setup_allocno_class_and_costs. Use regno_aclass instead of regno_cover_class. Use ira_set_allocno_class instead of ira_set_allocno_cover_class. (init_costs, finish_costs): Use regno_aclass instead of regno_cover_class. (ira_costs): Use setup_allocno_class_and_costs instead of setup_allocno_cover_class_and_costs. (ira_tune_allocno_costs_and_cover_classes): Rename to ira_tune_allocno_costs. Check overflow. Skip conflict hard regs by processing objects. Use ira_reg_class_max_nregs instead of ira_reg_class_nregs. * rtl.h (reg_cover_class): Rename to reg_allocno_class. * sched-int.h: Remove mentioning cover classes from the file. (sched_regno_cover_class): Rename to sched_regno_pressure_class. * reginfo.c: Add 2010 to Copyright. Remove mentioning cover classes from the file. (struct reg_pref): Rename coverclass into allocnoclass. (reg_cover_class): Rename to reg_allocno_class. * Makefile.in (ira-color.o): Remove SPLAY_TREE_H from dependencies. * config/alpha/alpha.h (IRA_COVER_CLASSES): Remove. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/avr/avr.h (IRA_COVER_CLASSES): Ditto. * config/bfin/bfin.h (IRA_COVER_CLASSES): Ditto. * config/cris/cris.h (IRA_COVER_CLASSES): Ditto. * config/fr30/fr30.h (IRA_COVER_CLASSES): Ditto. * config/frv/frv.h (IRA_COVER_CLASSES): Ditto. * config/h8300/h8300.h (IRA_COVER_CLASSES): Ditto. * config/i386/i386.h (STACK_REG_COVER_CLASS): Ditto. * config/i386/i386.c (TARGET_IRA_COVER_CLASSES) (i386_ira_cover_classes): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/iq2000/iq2000.h (IRA_COVER_CLASSES): Ditto. * config/m32r/m32r.h (IRA_COVER_CLASSES): Ditto. * config/m68k/m68k.h (IRA_COVER_CLASSES): Ditto. * config/mcore/mcore.h (IRA_COVER_CLASSES): Ditto. * config/mep/mep.h (IRA_COVER_CLASSES): Ditto. * config/mips/mips.c (TARGET_IRA_COVER_CLASSES) (mips_ira_cover_classes): Ditto. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): Ditto. * config/moxie/moxie.h (IRA_COVER_CLASSES): Ditto. * config/pa/pa64-regs.h (IRA_COVER_CLASSES): Ditto. * config/pa/pa32-regs.h (IRA_COVER_CLASSES): Ditto. * config/picochip/picochip.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES_PRE_VSX) (IRA_COVER_CLASSES_VSX): Ditto. * config/rs6000/rs6000.c (TARGET_IRA_COVER_CLASSES) (rs6000_ira_cover_classes): Ditto. * config/rx/rx.h (IRA_COVER_CLASSES): Ditto. * config/s390/s390.h (IRA_COVER_CLASSES): Ditto. * config/score/score.h (IRA_COVER_CLASSES): Ditto. * config/sh/sh.h (IRA_COVER_CLASSES): Ditto. * config/sparc/sparc.h (IRA_COVER_CLASSES): Ditto. * config/spu/spu.h (IRA_COVER_CLASSES): Ditto. * config/stormy16/stormy16.h (IRA_COVER_CLASSES): Ditto. * config/v850/v850.h (IRA_COVER_CLASSES): Ditto. * config/vax/vax.h (IRA_COVER_CLASSES): Ditto. * config/xtensa/xtensa.h (IRA_COVER_CLASSES): Ditto. From-SVN: r171649
2011-03-29 03:02:05 +02:00
reg_pref[regno].allocnoclass = allocnoclass;
[multiple changes] 2008-08-26 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c, ira-color.c, ira-costs.c, ira.h, ira-lives.c, ira.c, ira-conflicts.c, ira-emit.c, ira-int.h: New files. * doc/passes.texi: Describe IRA. * doc/tm.texi (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Describe the new macros. * doc/invoke.texi (ira-max-loops-num): Describe the new parameter. (-fira, -fira-algorithm, -fira-coalesce, -fno-ira-move-spills, -fira-propagate-cost, -fno-ira-share-save-slots, -fno-ira-share-spill-slots, -fira-verbose): Describe new options. * flags.h (ira_algorithm): New enumeration. (flag_ira_algorithm, flag_ira_verbose): New external variable declarations. * postreload.c (gate_handle_postreload): Don't do post reload optimizations unless the reload is completed. * reload.c (push_reload, find_dummy_reload): Use DF_LR_OUT for IRA. * tree-pass.h (pass_ira): New external variable declaration. * reload.h: Add 2008 to the Copyright. * cfgloopanal.c: Include params.h. (estimate_reg_pressure_cost): Decrease cost for IRA optimization mode. * params.h (IRA_MAX_LOOPS_NUM): New macro. * toplev.c (ira.h): New include. (flag_ira_algorithm, flag_ira_verbose): New external variables. (backend_init_target): Call ira_init. (backend_init): Call ira_init_once. (finalize): Call finish_ira_once. * toplev.h (flag_ira, flag_ira_coalesce, flag_ira_move_spills, flag_ira_share_save_slots, flag_ira_share_spill_slots): New external variables. * regs.h (contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): New external variable declarations. (move_table): New typedef. * caller-save.c: Include headers output.h and ira.h. (no_caller_save_reg_set): New global variable. (save_slots_num, save_slots): New variables. (reg_save_code, reg_restore_code, add_stored_regs): Add prototypes. (init_caller_save): Set up no_caller_save_reg_set. (init_save_areas): Reset save_slots_num. (saved_hard_reg): New structure. (hard_reg_map, saved_regs_num, all_saved_regs): New variables. (initiate_saved_hard_regs, new_saved_hard_reg, finish_saved_hard_regs, saved_hard_reg_compare_func): New functions. (setup_save_areas): Add code for sharing stack slots. (all_blocks): New variable. (save_call_clobbered_regs): Process pseudo-register too. (mark_set_regs): Process pseudo-register too. (insert_one_insn): Put the insn after bb note in a empty basic block. Add insn check. * global.c (eliminable_regset): Make it external. (mark_elimination): Use DF_LR_IN for IRA. (pseudo_for_reload_consideration_p): New. (build_insn_chain): Make it external. Don't ignore spilled pseudos for IRA. Use pseudo_for_reload_consideration_p. (gate_handle_global_alloc): New function. (pass_global_alloc): Add the gate function. * opts.c (decode_options): Set up flag_ira. Print the warning for -fira. (common_handle_option): Process -fira-algorithm and -fira-verbose. * timevar.def (TV_IRA, TV_RELOAD): New passes. * regmove.c (regmove_optimize): Don't do replacement of output for IRA. * hard-reg-set.h (no_caller_save_reg_set, reg_class_subclasses): New external variable declarations. * local-alloc.c (update_equiv_regs): Make it external. Return true if jump label rebuilding should be done. Rescan new_insn for notes. (gate_handle_local_alloc): New function. (pass_local_alloc): Add the gate function. * alias.c (value_addr_p, stack_addr_p): New functions. (nonoverlapping_memrefs_p): Use them for IRA. * common.opt (fira, fira-algorithm, fira-coalesce, fira-move-spills, fira-share-save-slots, fira-share-spill-slots, fira-verbose): New options. * regclass.c (reg_class_subclasses, contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): Make the variables external. (move_table): Remove typedef. (init_move_cost): Make it external. (allocate_reg_info, resize_reg_info, setup_reg_classes): New functions. * rtl.h (init_move_cost, allocate_reg_info, resize_reg_info, setup_reg_classes): New function prototypes. (eliminable_regset): New external variable declaration. (build_insn_chain, update_equiv_regs): New function prototypes. * Makefile.in (IRA_INT_H): New definition. (OBJS-common): Add ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, and ira-lives.o. (reload1.o, toplev.o): Add dependence on ira.h. (cfgloopanal.o): Add PARAMS_H. (caller-save.o): Add dependence on output.h and ira.h. (ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, ira-lives.o): New entries. * passes.c (pass_ira): New pass. * params.def (PARAM_IRA_MAX_LOOPS_NUM): New parameter. * reload1.c (ira.h): Include the header. (changed_allocation_pseudos): New bitmap. (init_reload): Initiate the bitmap. (compute_use_by_pseudos): Permits spilled registers in FROM. (temp_pseudo_reg_arr): New variable. (reload): Allocate and free temp_pseudo_reg_arr. Sort pseudos for IRA. Call alter_reg with the additional parameter. Don't clear spilled_pseudos for IRA. Restore original insn chain for IRA. Clear changed_allocation_pseudos at the end of reload. (calculate_needs_all_insns): Call IRA's mark_memory_move_deletion. (hard_regno_to_pseudo_regno): New variable. (count_pseudo): Check spilled pseudos. Set up hard_regno_to_pseudo_regno. (count_spilled_pseudo): Check spilled pseudos. Update hard_regno_to_pseudo_regno. (find_reg): Use better_spill_reload_regno_p. Check hard_regno_to_pseudo_regno. (alter_reg): Set up spilled_pseudos. Add a new parameter. Add code for IRA. (eliminate_regs_1): Use additional parameter for alter_reg. (finish_spills): Set up pseudo_previous_regs only for spilled pseudos. Call reassign_pseudos once for all spilled pseudos, pass more arguments. Don't clear live_throughout and dead_or_set for spilled pseudos. Use additional parameter for alter_reg. Call mark_allocation_change. Set up changed_allocation_pseudos. Remove sanity check. (emit_input_reload_insns, delete_output_reload): Use additional parameter for alter_reg. Call mark_allocation_change. (substitute, gen_reload_chain_without_interm_reg_p): New functions. (reloads_conflict): Use gen_reload_chain_without_interm_reg_p. * testsuite/gcc.dg/20080410-1.c: New file. * config/s390/s390.h (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Define. * config/sparc/sparc.h (IRA_COVER_CLASSES): New macro. * config/i386/i386.h (IRA_COVER_CLASSES): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES): Ditto. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/alpha/alpha.h (IRA_COVER_CLASSES): Ditto. 2008-08-24 Jeff Law <law@redhat.com> * ira.c (setup_reg_class_intersect_union): Prefer smallest class when ignoring unavailable registers. 2008-08-24 Jeff Law <law@redhat.com> * ira-color.c (coalesced_pseudo_reg_slot_compare): Check FRAME_GROWS_DOWNWARD and STACK_GROWS_DOWNWARD. * ira.c (setup_eliminable_regset): Check stack_realign_needed. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): New macro. 2008-06-03 Steve Chamberlain <steve.chamberlain@gmail.com> * ira-build.c (allocno_range_compare_func): Stabilize sort. 2008-05-29 Andy Hutchinson <hutchinsonandy@aim.com> * config/avr/avr.h (IRA_COVER_CLASSES): New macro. * reload1.c (find_reg): Process registers in register allocation order. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * toplev.c (backend_init_target): Move ira_init call from here... (lang_dependent_init_target): ...to here. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * ira.c (setup_class_subset_and_memory_move_costs): Don't calculate memory move costs for NO_REGS. 2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org> * ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if STACK_REGS is defined. 2008-04-08 Andrew Pinski <andrew_pinski@playstation.sony.com> * config/spu/spu.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Bernd Schmidt <bernd.schmidt@analog.com> * config/bfin/bfin.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Kaz Kojima <kkojima@gcc.gnu.org> * config/sh/sh.h (IRA_COVER_CLASSES): Define. * config/sh/sh.md (movsicc_true+3): Check if emit returns a barrier. From-SVN: r139590
2008-08-26 14:39:58 +02:00
}
1991-11-06 00:39:50 +01:00
/* This is the `regscan' pass of the compiler, run just before cse and
again just before loop. It finds the first and last use of each
pseudo-register. */
static void reg_scan_mark_refs (rtx, rtx_insn *);
tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. 2008-01-29 Vladimir Makarov <vmakarov@redhat.com> * doc/tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. * doc/passes.texi: Remove entries about regclass, local-alloc, and global. Modify entries about regmove and IRA. * ra-conflict.c: Remove the file. * reload.c (push_reload, find_dummy_reload): Remove flag_ira. * tree-pass.h (pass_local_alloc, pass_global_alloc): Remove. (pass_regclass_init): Rename to pass_reginfo_init. * cfgloopanal.c (estimate_reg_pressure_cost): Remove flag_ira. * toplev.h (flag_ira): Remove. * caller-save.c (setup_save_areas): Remove flag_ira. * ira-color.c (ira_reuse_stack_slot, ira_mark_new_stack_slot): Ditto. * global.c: Remove the file. * opts.c: (decode_options): Remove flag_ira. * hard-reg-set.h (losing_caller_save_reg_set): Remove. * regmove.c: Modify file description. (find_use_as_address, try_auto_increment): Define them only if AUTO_INC_DEC is defined. (replacement_quality, replace_in_call_usage, fixup_match_1, stable_and_no_regs_but_for_p): Remove. (reg_set_in_bb): Make it static. (regmove_optimize): Remove flag_ira and code which worked for !flag_ira. * local-alloc.c: Remove the file. * common.opt (fira): Remove. * ira.c: Include except.h. (eliminable_regset): Move from global.c. (mark_elimination): Ditto. Remove flag_ira. (reg_renumber, struct equivalence, reg_equiv, equiv_mem, equiv_mem_modified, validate_equiv_mem_from_store, validate_equiv_mem, equiv_init_varies_p, equiv_init_movable_p, contains_replace_regs, memref_referenced_p, memref_used_between_p, no_equiv, recorded_label_ref): Move from local-alloc.c. (update_equiv_regs): Ditto. Make it static. (print_insn_chain, print_insn_chains): Move it from global.c. pseudo_for_reload_consideration_p): Ditto. Remove flag_ira. (build_insn_chain): Ditto. Make it static. (ra_init_live_subregs): Move from ra-conflict.c. Make it static. Rename to init_live_subregs. (gate_ira): Remove flag_ira. * regclass.c: Rename reginfo.c. Change file description. (FORBIDDEN_INC_DEC_CLASSES): Remove. (reg_class_superclasses, forbidden_inc_dec_class, in_inc_dec): Remove. (init_reg_sets_1): Remove code for evaluation of reg_class_superclasses and losing_caller_save_reg_set. (init_regs): Remove init_reg_autoinc. (struct costs, costs, init_cost, ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): Remove. (regclass_init): Rename to reginfo_init. Don't initialize init_cost. (pass_regclass_init): Rename to pass_reginfo_init. Modify corresponding entries. (dump_regclass, record_operand_costs, scan_one_insn, init_reg_autoinc, regclass, record_reg_classes, copy_cost, record_address_regs, auto_inc_dec_reg_p): Remove. (gt-regclass.h): Rename to gt-reginfo.h. * rtl.h (dump_global_regs, retry_global_alloc, build_insn_chain, dump_local_alloc, update_equiv_regs): Remove. * Makefile.in (RA_H): Remove. (OBJS-common): Remove global.o, local-alloc.o, and ra-conflict.o. Rename regclass.o to reginfo.o. (regclass.o): Rename to reginfo.o. Rename gt-regclass.h to gt-reginfo.h. (global.o, local-alloc.o, ra-conflict.o): Remove entries. (GTFILES): Rename regclass.c to reginfo.c. * passes.c (init_optimization_passes): Remove pass_local_alloc and pass_global_alloc. Rename pass_regclass_init to pass_reginfo_init. * reload1.c (compute_use_by_pseudos, reload, count_pseudo, count_spilled_pseudo, find_reg, alter_reg, delete_output_reload): Remove flag_ira. (finish_spills): Ditto. Remove code for !flga_ira. From-SVN: r143757
2009-01-29 15:51:46 +01:00
1991-11-06 00:39:50 +01:00
void
reg_scan (rtx_insn *f, unsigned int nregs ATTRIBUTE_UNUSED)
1991-11-06 00:39:50 +01:00
{
rtx_insn *insn;
1991-11-06 00:39:50 +01:00
timevar_push (TV_REG_SCAN);
1991-11-06 00:39:50 +01:00
for (insn = f; insn; insn = NEXT_INSN (insn))
if (INSN_P (insn))
1991-11-06 00:39:50 +01:00
{
reg_scan_mark_refs (PATTERN (insn), insn);
if (REG_NOTES (insn))
reg_scan_mark_refs (REG_NOTES (insn), insn);
}
timevar_pop (TV_REG_SCAN);
}
/* X is the expression to scan. INSN is the insn it appears in.
NOTE_FLAG is nonzero if X is from INSN's notes rather than its body.
We should only record information for REGs with numbers
greater than or equal to MIN_REGNO. */
static void
reg_scan_mark_refs (rtx x, rtx_insn *insn)
1991-11-06 00:39:50 +01:00
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
enum rtx_code code;
rtx dest;
rtx note;
1991-11-06 00:39:50 +01:00
[multiple changes] 2002-07-15 Michael Matz <matz@suse.de>, Daniel Berlin <dberlin@dberlin.org>, Denis Chertykov <denisc@overta.ru> Add a new register allocator. * ra.c: New file. * ra.h: New file. * ra-build.c: New file. * ra-colorize.c: New file. * ra-debug.c: New file. * ra-rewrite.c: New file. * Makefile.in (ra.o, ra-build.o, ra-colorize.o, ra-debug.o, (ra-rewrite.o): New .o files for libbackend.a. (GTFILES): Add basic-block.h. * toplev.c (flag_new_regalloc): New. (f_options): New option "new-ra". (rest_of_compilation): Call initialize_uninitialized_subregs() only for the old allocator. If flag_new_regalloc is set, call new allocator, instead of local_alloc(), global_alloc() and friends. * doc/invoke.texi: Document -fnew-ra. * basic-block.h (FOR_ALL_BB): New. * config/rs6000/rs6000.c (print_operand): Write small constants as @l+80. * df.c (read_modify_subreg_p): Narrow down cases for a rmw subreg. (df_reg_table_realloc): Make size at least as large as max_reg_num(). (df_insn_table_realloc): Size argument now is absolute, not relative. Changed all callers. * gengtype.c (main): Add the pseudo-type "HARD_REG_SET". * regclass.c (reg_scan_mark_refs): Ignore NULL rtx's. 2002-06-20 Michael Matz <matz@suse.de> * df.h (struct ref.id): Make unsigned. * df.c (df_bb_reg_def_chain_create): Remove unsigned cast. 2002-06-13 Michael Matz <matz@suse.de> * df.h (DF_REF_MODE_CHANGE): New flag. * df.c (df_def_record_1, df_uses_record): Set this flag for refs involving subregs with invalid mode changes, when CLASS_CANNOT_CHANGE_MODE is defined. 2002-05-07 Michael Matz <matz@suse.de> * reload1.c (fixup_abnormal_edges): Don't insert on NULL edge. 2002-05-03 Michael Matz <matz@suse.de> * sbitmap.c (sbitmap_difference): Accept sbitmaps of different size. Sat Feb 2 18:58:07 2002 Denis Chertykov <denisc@overta.ru> * regclass.c (regclass): Work with all regs which have sets or refs. (reg_scan_mark_refs): Count regs inside (clobber ...). 2002-01-04 Michael Matz <matzmich@cs.tu-berlin.de> * df.c (df_ref_record): Correctly calculate SUBREGs of hardregs. (df_bb_reg_def_chain_create, df_bb_reg_use_chain_create): Only add new refs. (df_bb_refs_update): Don't clear insns_modified here, ... (df_analyse): ... but here. * sbitmap.c (dump_sbitmap_file): New. (debug_sbitmap): Use it. * sbitmap.h (dump_sbitmap_file): Add prototype. 2001-08-07 Daniel Berlin <dan@cgsoftware.com> * df.c (df_insn_modify): Grow the UID table if necessary, rather than assume all emits go through df_insns_modify. 2001-07-26 Daniel Berlin <dan@cgsoftware.com> * regclass.c (reg_scan_mark_refs): When we increase REG_N_SETS, increase REG_N_REFS (like flow does), so that regclass doesn't think a reg is useless, and thus, not calculate a class, when it really should have. 2001-01-28 Daniel Berlin <dberlin@redhat.com> * sbitmap.h (EXECUTE_IF_SET_IN_SBITMAP_REV): New macro, needed for dataflow analysis. From-SVN: r55458
2002-07-15 16:07:06 +02:00
if (!x)
return;
code = GET_CODE (x);
1991-11-06 00:39:50 +01:00
switch (code)
{
case CONST:
alias.c (rtx_equal_for_memref_p): Convert constant cases. 2012-08-23 Kenneth Zadeck <zadeck@naturalbridge.com> * alias.c (rtx_equal_for_memref_p): Convert constant cases. * combine.c (find_single_use_1, mark_used_regs_combine): Convert to CASE_CONST_ANY. * cse.c (exp_equiv_p, canon_reg, fold_rtx, cse_process_notes_1, count_reg_usage): Convert constant cases. * cselib.c (cselib_expand_value_rtx_1): Convert to CASE_CONST_ANY. (cselib_subst_to_values): Convert constant cases. * df-scan.c (df_uses_record): Ditto. * dse.c (const_or_frame_p): Convert case statements to explicit if-then-else using mode classes. * emit-rtl.c (verify_rtx_sharing, copy_insn_1): Convert constant cases. * explow.c (convert_memory_address_addr_space): Ditto. * gcse.c (want_to_gcse_p, oprs_unchanged_p, compute_transp): Ditto. * genattrtab.c (attr_copy_rtx, clear_struct_flag): Ditto. * ira.c (equiv_init_varies_p, contains_replace_regs, memref_referenced_p, rtx_moveable_p): Ditto. * jump.c (mark_jump_label_1): Remove constant cases. (rtx_renumbered_equal_p): Convert to CASE_CONST_UNIQUE. * loop-invariant.c (check_maybe_invariant, hash_invariant_expr_1, invariant_expr_equal_p): Convert to CASE_CONST_ANY. * postreload-gcse.c (oprs_unchanged_p): Convert constant cases. * reginfo.c (reg_scan_mark_refs): Ditto. * regrename.c (scan_rtx): Ditto. * reload1.c (eliminate_regs_1, elimination_effects, scan_paradoxical_subregs): Ditto. * reload.c (operands_match_p, subst_reg_equivs): Ditto. * resource.c (mark_referenced_resources, mark_set_resources): Ditto. * rtlanal.c (rtx_unstable_p, rtx_varies_p, count_occurrences) (reg_mentioned_p, modified_between_p, modified_in_p) (volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, inequality_comparisons_p, computed_jump_p_1): Ditto. * rtl.c (copy_rtx, rtx_equal_p_cb, rtx_equal_p): Ditto. * sched-deps.c (sched_analyze_2): Ditto. * valtrack.c (cleanup_auto_inc_dec): Ditto. * rtl.h: (CASE_CONST_SCALAR_INT, CASE_CONST_UNIQUE, CASE_CONST_ANY): New macros. From-SVN: r190627
2012-08-23 20:46:18 +02:00
CASE_CONST_ANY:
1991-11-06 00:39:50 +01:00
case CC0:
case PC:
case SYMBOL_REF:
case LABEL_REF:
case ADDR_VEC:
case ADDR_DIFF_VEC:
case REG:
return;
1991-11-06 00:39:50 +01:00
case EXPR_LIST:
if (XEXP (x, 0))
reg_scan_mark_refs (XEXP (x, 0), insn);
if (XEXP (x, 1))
reg_scan_mark_refs (XEXP (x, 1), insn);
break;
case INSN_LIST:
case INT_LIST:
if (XEXP (x, 1))
reg_scan_mark_refs (XEXP (x, 1), insn);
break;
[multiple changes] 2002-07-15 Michael Matz <matz@suse.de>, Daniel Berlin <dberlin@dberlin.org>, Denis Chertykov <denisc@overta.ru> Add a new register allocator. * ra.c: New file. * ra.h: New file. * ra-build.c: New file. * ra-colorize.c: New file. * ra-debug.c: New file. * ra-rewrite.c: New file. * Makefile.in (ra.o, ra-build.o, ra-colorize.o, ra-debug.o, (ra-rewrite.o): New .o files for libbackend.a. (GTFILES): Add basic-block.h. * toplev.c (flag_new_regalloc): New. (f_options): New option "new-ra". (rest_of_compilation): Call initialize_uninitialized_subregs() only for the old allocator. If flag_new_regalloc is set, call new allocator, instead of local_alloc(), global_alloc() and friends. * doc/invoke.texi: Document -fnew-ra. * basic-block.h (FOR_ALL_BB): New. * config/rs6000/rs6000.c (print_operand): Write small constants as @l+80. * df.c (read_modify_subreg_p): Narrow down cases for a rmw subreg. (df_reg_table_realloc): Make size at least as large as max_reg_num(). (df_insn_table_realloc): Size argument now is absolute, not relative. Changed all callers. * gengtype.c (main): Add the pseudo-type "HARD_REG_SET". * regclass.c (reg_scan_mark_refs): Ignore NULL rtx's. 2002-06-20 Michael Matz <matz@suse.de> * df.h (struct ref.id): Make unsigned. * df.c (df_bb_reg_def_chain_create): Remove unsigned cast. 2002-06-13 Michael Matz <matz@suse.de> * df.h (DF_REF_MODE_CHANGE): New flag. * df.c (df_def_record_1, df_uses_record): Set this flag for refs involving subregs with invalid mode changes, when CLASS_CANNOT_CHANGE_MODE is defined. 2002-05-07 Michael Matz <matz@suse.de> * reload1.c (fixup_abnormal_edges): Don't insert on NULL edge. 2002-05-03 Michael Matz <matz@suse.de> * sbitmap.c (sbitmap_difference): Accept sbitmaps of different size. Sat Feb 2 18:58:07 2002 Denis Chertykov <denisc@overta.ru> * regclass.c (regclass): Work with all regs which have sets or refs. (reg_scan_mark_refs): Count regs inside (clobber ...). 2002-01-04 Michael Matz <matzmich@cs.tu-berlin.de> * df.c (df_ref_record): Correctly calculate SUBREGs of hardregs. (df_bb_reg_def_chain_create, df_bb_reg_use_chain_create): Only add new refs. (df_bb_refs_update): Don't clear insns_modified here, ... (df_analyse): ... but here. * sbitmap.c (dump_sbitmap_file): New. (debug_sbitmap): Use it. * sbitmap.h (dump_sbitmap_file): Add prototype. 2001-08-07 Daniel Berlin <dan@cgsoftware.com> * df.c (df_insn_modify): Grow the UID table if necessary, rather than assume all emits go through df_insns_modify. 2001-07-26 Daniel Berlin <dan@cgsoftware.com> * regclass.c (reg_scan_mark_refs): When we increase REG_N_SETS, increase REG_N_REFS (like flow does), so that regclass doesn't think a reg is useless, and thus, not calculate a class, when it really should have. 2001-01-28 Daniel Berlin <dberlin@redhat.com> * sbitmap.h (EXECUTE_IF_SET_IN_SBITMAP_REV): New macro, needed for dataflow analysis. From-SVN: r55458
2002-07-15 16:07:06 +02:00
case CLOBBER:
if (MEM_P (XEXP (x, 0)))
reg_scan_mark_refs (XEXP (XEXP (x, 0), 0), insn);
[multiple changes] 2002-07-15 Michael Matz <matz@suse.de>, Daniel Berlin <dberlin@dberlin.org>, Denis Chertykov <denisc@overta.ru> Add a new register allocator. * ra.c: New file. * ra.h: New file. * ra-build.c: New file. * ra-colorize.c: New file. * ra-debug.c: New file. * ra-rewrite.c: New file. * Makefile.in (ra.o, ra-build.o, ra-colorize.o, ra-debug.o, (ra-rewrite.o): New .o files for libbackend.a. (GTFILES): Add basic-block.h. * toplev.c (flag_new_regalloc): New. (f_options): New option "new-ra". (rest_of_compilation): Call initialize_uninitialized_subregs() only for the old allocator. If flag_new_regalloc is set, call new allocator, instead of local_alloc(), global_alloc() and friends. * doc/invoke.texi: Document -fnew-ra. * basic-block.h (FOR_ALL_BB): New. * config/rs6000/rs6000.c (print_operand): Write small constants as @l+80. * df.c (read_modify_subreg_p): Narrow down cases for a rmw subreg. (df_reg_table_realloc): Make size at least as large as max_reg_num(). (df_insn_table_realloc): Size argument now is absolute, not relative. Changed all callers. * gengtype.c (main): Add the pseudo-type "HARD_REG_SET". * regclass.c (reg_scan_mark_refs): Ignore NULL rtx's. 2002-06-20 Michael Matz <matz@suse.de> * df.h (struct ref.id): Make unsigned. * df.c (df_bb_reg_def_chain_create): Remove unsigned cast. 2002-06-13 Michael Matz <matz@suse.de> * df.h (DF_REF_MODE_CHANGE): New flag. * df.c (df_def_record_1, df_uses_record): Set this flag for refs involving subregs with invalid mode changes, when CLASS_CANNOT_CHANGE_MODE is defined. 2002-05-07 Michael Matz <matz@suse.de> * reload1.c (fixup_abnormal_edges): Don't insert on NULL edge. 2002-05-03 Michael Matz <matz@suse.de> * sbitmap.c (sbitmap_difference): Accept sbitmaps of different size. Sat Feb 2 18:58:07 2002 Denis Chertykov <denisc@overta.ru> * regclass.c (regclass): Work with all regs which have sets or refs. (reg_scan_mark_refs): Count regs inside (clobber ...). 2002-01-04 Michael Matz <matzmich@cs.tu-berlin.de> * df.c (df_ref_record): Correctly calculate SUBREGs of hardregs. (df_bb_reg_def_chain_create, df_bb_reg_use_chain_create): Only add new refs. (df_bb_refs_update): Don't clear insns_modified here, ... (df_analyse): ... but here. * sbitmap.c (dump_sbitmap_file): New. (debug_sbitmap): Use it. * sbitmap.h (dump_sbitmap_file): Add prototype. 2001-08-07 Daniel Berlin <dan@cgsoftware.com> * df.c (df_insn_modify): Grow the UID table if necessary, rather than assume all emits go through df_insns_modify. 2001-07-26 Daniel Berlin <dan@cgsoftware.com> * regclass.c (reg_scan_mark_refs): When we increase REG_N_SETS, increase REG_N_REFS (like flow does), so that regclass doesn't think a reg is useless, and thus, not calculate a class, when it really should have. 2001-01-28 Daniel Berlin <dberlin@redhat.com> * sbitmap.h (EXECUTE_IF_SET_IN_SBITMAP_REV): New macro, needed for dataflow analysis. From-SVN: r55458
2002-07-15 16:07:06 +02:00
break;
1991-11-06 00:39:50 +01:00
case SET:
/* Count a set of the destination if it is a register. */
for (dest = SET_DEST (x);
GET_CODE (dest) == SUBREG || GET_CODE (dest) == STRICT_LOW_PART
|| GET_CODE (dest) == ZERO_EXTRACT;
1991-11-06 00:39:50 +01:00
dest = XEXP (dest, 0))
;
/* If this is setting a pseudo from another pseudo or the sum of a
pseudo and a constant integer and the other pseudo is known to be
a pointer, set the destination to be a pointer as well.
Likewise if it is setting the destination from an address or from a
value equivalent to an address or to the sum of an address and
something else.
But don't do any of this if the pseudo corresponds to a user
variable since it should have already been set as a pointer based
on the type. */
alias.c (record_set, [...]): Use REG_P. 2004-06-15 Jerry Quinn <jlquinn@optonline.net> * alias.c (record_set, record_base_value, canon_rtx, get_addr, nonlocal_mentioned_p_1, init_alias_analysis): Use REG_P. * bt-load.c (find_btr_reference, insn_sets_btr_p, note_btr_set): Likewise. * builtins.c (expand_builtin_setjmp, expand_builtin_apply, expand_builtin_mathfn, expand_builtin_strlen, expand_builtin_memcmp, expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_frame_address): Likewise. * caller-save.c (mark_set_regs, add_stored_regs, mark_referenced_regs, insert_one_insn): Likewise. * calls.c (prepare_call_address, precompute_register_parameters, precompute_arguments, expand_call, emit_library_call_value_1): Likewise. * cfganal.c (flow_active_insn_p): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, can_combine_p, combinable_i3pat, try_combine, find_split_point, COMBINE_RTX_EQUAL_P, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, make_extraction, recog_for_combine, gen_lowpart_for_combine, simplify_comparison, record_dead_and_set_regs_1, record_dead_and_set_regs, record_promoted_value, check_promoted_subreg, get_last_value_validate, get_last_value, reg_dead_at_p_1, reg_bitfield_target_p, distribute_notes, unmentioned_reg_p_1): Likewise. * conflict.c (mark_reg): Likewise. * cse.c (HASH, COST, COST_IN, approx_reg_cost_1, notreg_cost, mention_regs, insert_regs, lookup, lookup_for_remove, insert, merge_equiv_classes, flush_hash_table, invalidate, remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg, invalidate_for_call, use_related_value, canon_hash, exp_equiv_p, cse_rtx_varies_p, canon_reg, find_best_addr, fold_rtx, equiv_constant, record_jump_cond, cse_insn, addr_affects_sp_p, invalidate_from_clobbers, cse_process_notes, cse_around_loop, cse_set_around_loop, count_reg_usage, set_live_p, cse_change_cc_mode, cse_cc_succs, cse_condition_code_reg): Likewise. * cselib.c (cselib_reg_set_mode, rtx_equal_for_cselib_p, cselib_lookup, cselib_invalidate_regno, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (dbxout_symbol_location, dbxout_parms, dbxout_reg_parms, dbxout_block): Likewise. * df.c (df_ref_record, df_def_record_1, df_uses_record): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2out_frame_debug_expr, is_pseudo_reg, is_based_loc, rtl_for_decl_location): Likewise. * emit-rtl.c (set_reg_attrs_for_parm, set_decl_rtl, set_decl_incoming_rtl, mark_user_reg): Likewise. * explow.c (copy_all_regs, copy_all_regs, memory_address, force_reg, copy_to_suggested_reg, allocate_dynamic_stack_space, probe_stack_range, hard_function_value): Likewise. * expmed.c (store_bit_field, store_fixed_bit_field, store_split_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_divmod, emit_store_flag_force): Likewise. * expr.c (convert_move, convert_modes, block_move_libcall_safe_for_call_parm, emit_group_load, use_reg, use_group_regs, emit_move_insn, emit_move_insn_1, compress_float_constant, push_block, emit_single_push_insn, emit_push_insn, get_subtarget, expand_assignment, store_expr, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment, do_store_flag, do_tablejump): Likewise. * final.c (profile_function, final_scan_insn, alter_subreg, get_mem_expr_from_op, output_asm_operand_names, output_operand, only_leaf_regs_used, leaf_renumber_regs_insn): Likewise. * flow.c (verify_wide_reg_1, mark_regs_live_at_end, find_regno_partial, propagate_one_insn, init_propagate_block_info, insn_dead_p, libcall_dead_p, mark_set_1, not_reg_cond, attempt_auto_inc, find_auto_inc, mark_used_regs, count_or_remove_death_notes_bb): Likewise. * function.c (find_temp_slot_from_address, update_temp_slot_address, preserve_temp_slots, put_var_into_stack, fixup_var_refs_insn, fixup_var_refs_1, fixup_stack_1, optimize_bit_field, flush_addressof, put_addressof_into_stack, purge_addressof_1, insns_for_mem_walk, purge_single_hard_subreg_set, instantiate_decl, instantiate_virtual_regs_1, aggregate_value_p, assign_parms, promoted_input_arg, setjmp_vars_warning, setjmp_args_warning, setjmp_protect, setjmp_protect_args, fix_lexical_addr, expand_function_start, diddle_return_value, clobber_return_register, expand_function_end, keep_stack_depressed, handle_epilogue_set, update_epilogue_consts): Likewise. * genemit.c (gen_exp, gen_insn): Likewise. * genrecog.c (make_insn_sequence): Likewise. * global.c (global_conflicts, expand_preferences, mark_reg_store, mark_reg_conflicts, set_preference, reg_becomes_live, build_insn_chain, mark_reg_change): Likewise. * haifa_sched.c (CONST_BASED_ADDRESS_P, find_set_reg_weight): Likewise. * ifcvt.c (noce_try_abs, noce_get_condition, noce_process_if_block): Likewise. * integrate.c (copy_rtx_and_substitute, try_constants, subst_constants, mark_stores, allocate_initial_values): Likewise. * jump.c (reversed_comparison_code_parts, delete_prior_computation, delete_computation, rtx_renumbered_equal_p, true_regnum, reg_or_subregno): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem, update_equiv_regs, no_equiv, block_alloc, combine_regs, reg_is_set, wipe_dead_reg, no_conflict_p): Likewise. * loop-iv.c (simple_reg_p, simple_set_p, kill_sets, iv_get_reaching_def, iv_analyze_biv, altered_reg_used, mark_altered, simple_rhs_p, simplify_using_assignment, implies_p): Likewise. * loop.c (scan_loop, combine_movables, rtx_equal_for_loop_p, move_movables, note_set_pseudo_multiple_uses, consec_sets_invariant_p, find_single_use_in_loop, count_one_set, loop_bivs_init_find, loop_givs_rescan, check_insn_for_bivs, check_insn_for_givs, valid_initial_value_p, simplify_giv_expr, consec_sets_giv, loop_regs_update, check_dbra_loop, maybe_eliminate_biv, maybe_eliminate_biv_1, record_initial, update_reg_last_use, canonicalize_condition, loop_regs_scan, load_mems, try_copy_prop, try_swap_copy_prop): Likewise. * optabs.c (expand_binop, expand_vector_binop, expand_vector_unop, expand_abs, emit_no_conflict_block, emit_libcall_block, expand_float): Likewise. * postreload.c (reload_cse_simplify, reload_cse_simplify_set, reload_cse_simplify_operands, reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * print-rtl.c (print_rtx): Likewise. * ra-build.c (copy_insn_p, remember_move, init_one_web_common, contains_pseudo, handle_asm_insn): Likewise. * ra-debug.c (ra_print_rtx_object, dump_constraints, dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, emit_colors, remove_suspicious_death_notes): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1, find_single_use, register_operand, scratch_operand, nonmemory_operand, constrain_operands): Likewise. * reg-stack (check_asm_stack_operands, remove_regno_note, emit_swap_insn, swap_rtx_condition, subst_stack_regs_pat, subst_asm_stack_regs): Likewise. * regclass.c (scan_one_insn, record_reg_classes, copy_cost, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (discover_flags_reg, replacement_quality, copy_src_to_dest, reg_is_remote_constant_p, regmove_optimize, fixup_match_1): Likewise. * regrename.c (note_sets, clear_dead_regs, build_def_use, kill_value, kill_set_value, copyprop_hardreg_forward_1): Likewise. * reload.c (MATCHES, push_secondary_reload, find_reusable_reload, reload_inner_reg_of_subreg, can_reload_into, push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, find_reloads_toplev, find_reloads_address, subst_indexed_address, find_reloads_address_1, find_reloads_subreg_address, find_replacement, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg, regno_clobbered_p): Likewise. * reload1.c (replace_pseudos_in, reload, calculate_needs_all_insns, find_reg, delete_dead_insn, alter_reg, eliminate_regs, elimination_effects, eliminate_regs_in_insn, scan_paradoxical_subregs, forget_old_reloads_1, reload_reg_free_for_value_p, choose_reload_regs, emit_input_reload_insns, emit_output_reload_insns, do_input_reload, do_output_reload, emit_reload_insns, gen_reload, delete_address_reloads_1, inc_for_reload): Likewise. * reorg.c (update_reg_dead_notes, fix_reg_dead_note, update_reg_unused_notes, fill_slots_from_thread): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c (nonzero_address_p, get_jump_table_offset, global_reg_mentioned_p_1, reg_mentioned_p, reg_referenced_p, reg_set_p, set_noop_p, find_last_value, refers_to_regno_p, note_stores, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, find_regno_fusage, replace_regs, regno_use_in, parms_set, find_first_parameter_load, keep_with_call_p, hoist_test_store, hoist_update_store, address_cost, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (deps_may_trap_p, sched_analyze_1, sched_analyze_insn, sched_analyze): Likewise. * sched-rgn.c (check_live_1, update_live_1, sets_likely_spilled_1): Likewise. * sdbout.c (sdbout_symbol, sdbout_parms, sdbout_reg_parms): Likewise. * simplify-rtx.c (simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_subreg): Likewise. * stmt.c (decl_conflicts_with_clobbers_p, expand_asm_operands, expand_end_stmt_expr, expand_return, expand_decl, expand_anon_union_decl): Likewise. * unroll.c (precondition_loop_p, calculate_giv_inc, copy_loop_body, find_splittable_regs, find_splittable_givs, find_common_reg_term, loop_iterations): Likewise. * var-tracking.c (variable_union, variable_part_different_p, variable_different_p, count_uses, add_uses, add_stores, compute_bb_dataflow, set_variable_part, delete_variable_part, emit_notes_in_bb, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (assemble_variable): Likewise. From-SVN: r83195
2004-06-15 20:02:40 +02:00
if (REG_P (SET_DEST (x))
&& REGNO (SET_DEST (x)) >= FIRST_PSEUDO_REGISTER
/* If the destination pseudo is set more than once, then other
sets might not be to a pointer value (consider access to a
union in two threads of control in the presence of global
function.h (emit_status): Delete member regno_pointer_flag and rename regno_pointer_flag_length to... * function.h (emit_status): Delete member regno_pointer_flag and rename regno_pointer_flag_length to regno_pointer_align_length. Delete define for REGNO_POINTER_FLAG. * integrate.h (inline_remap): Delete member regno_pointer_flag. Add member x_regno_reg_rtx. * rtl.h (rtx_def): Use frame_related bit to indicate register is a pointer in REG expressions. Define REG_POINTER macro. * alias.c (find_base_value, find_base_term): Use REG_POINTER instead of REGNO_POINTER_FLAG. * combine.c (nonzero_bits, num_sign_bit_copies): Likewise. * emit-rtl.c (gen_reg_rtx): Use regno_pointer_align_length instead of regno_pointer_flag_length. Remove code which refers to regno_pointer_flag. (mark_reg_pointer): Use REG_POINTER. (free_emit_status): Remove code which refers to regno_pointer_flag. (init_emit, mark_emit_status): Likewise. * flow.c (dump_flow_info): Likewise. * function.c (preserve_temp_slots): Likewise. * integrate.c (expand_inline_function, copy_rtx_and_substitute): Use x_regno_reg_rtx instead of regno_pointer_flag for function pointer determination in map. * loop.c (strength_reduce, maybe_eliminate_biv_1): Use REG_POINTER. * predict.c (estimate_probability): Likewise. * regclass.c (record_address_regs, reg_scan_mark_refs): Likewise. * unroll.c (unroll_loop): Use x_regno_reg_rtx instead of regno_pointer_flag for function pointer determination in map. * convex.h (RTX_COSTS): Don't test regno_pointer_flag and use REG_POINTER. * pa.c (hppa_legitimize_address, emit_move_sequence, basereg_operand): Use REG_POINTER. (restore_unscaled_index_insn_codes): Revise comment. From-SVN: r37863
2000-11-30 07:31:19 +01:00
optimizations). So only set REG_POINTER on the destination
pseudo if this is the only set of that pseudo. */
&& DF_REG_DEF_COUNT (REGNO (SET_DEST (x))) == 1
&& ! REG_USERVAR_P (SET_DEST (x))
function.h (emit_status): Delete member regno_pointer_flag and rename regno_pointer_flag_length to... * function.h (emit_status): Delete member regno_pointer_flag and rename regno_pointer_flag_length to regno_pointer_align_length. Delete define for REGNO_POINTER_FLAG. * integrate.h (inline_remap): Delete member regno_pointer_flag. Add member x_regno_reg_rtx. * rtl.h (rtx_def): Use frame_related bit to indicate register is a pointer in REG expressions. Define REG_POINTER macro. * alias.c (find_base_value, find_base_term): Use REG_POINTER instead of REGNO_POINTER_FLAG. * combine.c (nonzero_bits, num_sign_bit_copies): Likewise. * emit-rtl.c (gen_reg_rtx): Use regno_pointer_align_length instead of regno_pointer_flag_length. Remove code which refers to regno_pointer_flag. (mark_reg_pointer): Use REG_POINTER. (free_emit_status): Remove code which refers to regno_pointer_flag. (init_emit, mark_emit_status): Likewise. * flow.c (dump_flow_info): Likewise. * function.c (preserve_temp_slots): Likewise. * integrate.c (expand_inline_function, copy_rtx_and_substitute): Use x_regno_reg_rtx instead of regno_pointer_flag for function pointer determination in map. * loop.c (strength_reduce, maybe_eliminate_biv_1): Use REG_POINTER. * predict.c (estimate_probability): Likewise. * regclass.c (record_address_regs, reg_scan_mark_refs): Likewise. * unroll.c (unroll_loop): Use x_regno_reg_rtx instead of regno_pointer_flag for function pointer determination in map. * convex.h (RTX_COSTS): Don't test regno_pointer_flag and use REG_POINTER. * pa.c (hppa_legitimize_address, emit_move_sequence, basereg_operand): Use REG_POINTER. (restore_unscaled_index_insn_codes): Revise comment. From-SVN: r37863
2000-11-30 07:31:19 +01:00
&& ! REG_POINTER (SET_DEST (x))
alias.c (record_set, [...]): Use REG_P. 2004-06-15 Jerry Quinn <jlquinn@optonline.net> * alias.c (record_set, record_base_value, canon_rtx, get_addr, nonlocal_mentioned_p_1, init_alias_analysis): Use REG_P. * bt-load.c (find_btr_reference, insn_sets_btr_p, note_btr_set): Likewise. * builtins.c (expand_builtin_setjmp, expand_builtin_apply, expand_builtin_mathfn, expand_builtin_strlen, expand_builtin_memcmp, expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_frame_address): Likewise. * caller-save.c (mark_set_regs, add_stored_regs, mark_referenced_regs, insert_one_insn): Likewise. * calls.c (prepare_call_address, precompute_register_parameters, precompute_arguments, expand_call, emit_library_call_value_1): Likewise. * cfganal.c (flow_active_insn_p): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, can_combine_p, combinable_i3pat, try_combine, find_split_point, COMBINE_RTX_EQUAL_P, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, make_extraction, recog_for_combine, gen_lowpart_for_combine, simplify_comparison, record_dead_and_set_regs_1, record_dead_and_set_regs, record_promoted_value, check_promoted_subreg, get_last_value_validate, get_last_value, reg_dead_at_p_1, reg_bitfield_target_p, distribute_notes, unmentioned_reg_p_1): Likewise. * conflict.c (mark_reg): Likewise. * cse.c (HASH, COST, COST_IN, approx_reg_cost_1, notreg_cost, mention_regs, insert_regs, lookup, lookup_for_remove, insert, merge_equiv_classes, flush_hash_table, invalidate, remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg, invalidate_for_call, use_related_value, canon_hash, exp_equiv_p, cse_rtx_varies_p, canon_reg, find_best_addr, fold_rtx, equiv_constant, record_jump_cond, cse_insn, addr_affects_sp_p, invalidate_from_clobbers, cse_process_notes, cse_around_loop, cse_set_around_loop, count_reg_usage, set_live_p, cse_change_cc_mode, cse_cc_succs, cse_condition_code_reg): Likewise. * cselib.c (cselib_reg_set_mode, rtx_equal_for_cselib_p, cselib_lookup, cselib_invalidate_regno, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (dbxout_symbol_location, dbxout_parms, dbxout_reg_parms, dbxout_block): Likewise. * df.c (df_ref_record, df_def_record_1, df_uses_record): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2out_frame_debug_expr, is_pseudo_reg, is_based_loc, rtl_for_decl_location): Likewise. * emit-rtl.c (set_reg_attrs_for_parm, set_decl_rtl, set_decl_incoming_rtl, mark_user_reg): Likewise. * explow.c (copy_all_regs, copy_all_regs, memory_address, force_reg, copy_to_suggested_reg, allocate_dynamic_stack_space, probe_stack_range, hard_function_value): Likewise. * expmed.c (store_bit_field, store_fixed_bit_field, store_split_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_divmod, emit_store_flag_force): Likewise. * expr.c (convert_move, convert_modes, block_move_libcall_safe_for_call_parm, emit_group_load, use_reg, use_group_regs, emit_move_insn, emit_move_insn_1, compress_float_constant, push_block, emit_single_push_insn, emit_push_insn, get_subtarget, expand_assignment, store_expr, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment, do_store_flag, do_tablejump): Likewise. * final.c (profile_function, final_scan_insn, alter_subreg, get_mem_expr_from_op, output_asm_operand_names, output_operand, only_leaf_regs_used, leaf_renumber_regs_insn): Likewise. * flow.c (verify_wide_reg_1, mark_regs_live_at_end, find_regno_partial, propagate_one_insn, init_propagate_block_info, insn_dead_p, libcall_dead_p, mark_set_1, not_reg_cond, attempt_auto_inc, find_auto_inc, mark_used_regs, count_or_remove_death_notes_bb): Likewise. * function.c (find_temp_slot_from_address, update_temp_slot_address, preserve_temp_slots, put_var_into_stack, fixup_var_refs_insn, fixup_var_refs_1, fixup_stack_1, optimize_bit_field, flush_addressof, put_addressof_into_stack, purge_addressof_1, insns_for_mem_walk, purge_single_hard_subreg_set, instantiate_decl, instantiate_virtual_regs_1, aggregate_value_p, assign_parms, promoted_input_arg, setjmp_vars_warning, setjmp_args_warning, setjmp_protect, setjmp_protect_args, fix_lexical_addr, expand_function_start, diddle_return_value, clobber_return_register, expand_function_end, keep_stack_depressed, handle_epilogue_set, update_epilogue_consts): Likewise. * genemit.c (gen_exp, gen_insn): Likewise. * genrecog.c (make_insn_sequence): Likewise. * global.c (global_conflicts, expand_preferences, mark_reg_store, mark_reg_conflicts, set_preference, reg_becomes_live, build_insn_chain, mark_reg_change): Likewise. * haifa_sched.c (CONST_BASED_ADDRESS_P, find_set_reg_weight): Likewise. * ifcvt.c (noce_try_abs, noce_get_condition, noce_process_if_block): Likewise. * integrate.c (copy_rtx_and_substitute, try_constants, subst_constants, mark_stores, allocate_initial_values): Likewise. * jump.c (reversed_comparison_code_parts, delete_prior_computation, delete_computation, rtx_renumbered_equal_p, true_regnum, reg_or_subregno): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem, update_equiv_regs, no_equiv, block_alloc, combine_regs, reg_is_set, wipe_dead_reg, no_conflict_p): Likewise. * loop-iv.c (simple_reg_p, simple_set_p, kill_sets, iv_get_reaching_def, iv_analyze_biv, altered_reg_used, mark_altered, simple_rhs_p, simplify_using_assignment, implies_p): Likewise. * loop.c (scan_loop, combine_movables, rtx_equal_for_loop_p, move_movables, note_set_pseudo_multiple_uses, consec_sets_invariant_p, find_single_use_in_loop, count_one_set, loop_bivs_init_find, loop_givs_rescan, check_insn_for_bivs, check_insn_for_givs, valid_initial_value_p, simplify_giv_expr, consec_sets_giv, loop_regs_update, check_dbra_loop, maybe_eliminate_biv, maybe_eliminate_biv_1, record_initial, update_reg_last_use, canonicalize_condition, loop_regs_scan, load_mems, try_copy_prop, try_swap_copy_prop): Likewise. * optabs.c (expand_binop, expand_vector_binop, expand_vector_unop, expand_abs, emit_no_conflict_block, emit_libcall_block, expand_float): Likewise. * postreload.c (reload_cse_simplify, reload_cse_simplify_set, reload_cse_simplify_operands, reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * print-rtl.c (print_rtx): Likewise. * ra-build.c (copy_insn_p, remember_move, init_one_web_common, contains_pseudo, handle_asm_insn): Likewise. * ra-debug.c (ra_print_rtx_object, dump_constraints, dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, emit_colors, remove_suspicious_death_notes): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1, find_single_use, register_operand, scratch_operand, nonmemory_operand, constrain_operands): Likewise. * reg-stack (check_asm_stack_operands, remove_regno_note, emit_swap_insn, swap_rtx_condition, subst_stack_regs_pat, subst_asm_stack_regs): Likewise. * regclass.c (scan_one_insn, record_reg_classes, copy_cost, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (discover_flags_reg, replacement_quality, copy_src_to_dest, reg_is_remote_constant_p, regmove_optimize, fixup_match_1): Likewise. * regrename.c (note_sets, clear_dead_regs, build_def_use, kill_value, kill_set_value, copyprop_hardreg_forward_1): Likewise. * reload.c (MATCHES, push_secondary_reload, find_reusable_reload, reload_inner_reg_of_subreg, can_reload_into, push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, find_reloads_toplev, find_reloads_address, subst_indexed_address, find_reloads_address_1, find_reloads_subreg_address, find_replacement, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg, regno_clobbered_p): Likewise. * reload1.c (replace_pseudos_in, reload, calculate_needs_all_insns, find_reg, delete_dead_insn, alter_reg, eliminate_regs, elimination_effects, eliminate_regs_in_insn, scan_paradoxical_subregs, forget_old_reloads_1, reload_reg_free_for_value_p, choose_reload_regs, emit_input_reload_insns, emit_output_reload_insns, do_input_reload, do_output_reload, emit_reload_insns, gen_reload, delete_address_reloads_1, inc_for_reload): Likewise. * reorg.c (update_reg_dead_notes, fix_reg_dead_note, update_reg_unused_notes, fill_slots_from_thread): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c (nonzero_address_p, get_jump_table_offset, global_reg_mentioned_p_1, reg_mentioned_p, reg_referenced_p, reg_set_p, set_noop_p, find_last_value, refers_to_regno_p, note_stores, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, find_regno_fusage, replace_regs, regno_use_in, parms_set, find_first_parameter_load, keep_with_call_p, hoist_test_store, hoist_update_store, address_cost, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (deps_may_trap_p, sched_analyze_1, sched_analyze_insn, sched_analyze): Likewise. * sched-rgn.c (check_live_1, update_live_1, sets_likely_spilled_1): Likewise. * sdbout.c (sdbout_symbol, sdbout_parms, sdbout_reg_parms): Likewise. * simplify-rtx.c (simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_subreg): Likewise. * stmt.c (decl_conflicts_with_clobbers_p, expand_asm_operands, expand_end_stmt_expr, expand_return, expand_decl, expand_anon_union_decl): Likewise. * unroll.c (precondition_loop_p, calculate_giv_inc, copy_loop_body, find_splittable_regs, find_splittable_givs, find_common_reg_term, loop_iterations): Likewise. * var-tracking.c (variable_union, variable_part_different_p, variable_different_p, count_uses, add_uses, add_stores, compute_bb_dataflow, set_variable_part, delete_variable_part, emit_notes_in_bb, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (assemble_variable): Likewise. From-SVN: r83195
2004-06-15 20:02:40 +02:00
&& ((REG_P (SET_SRC (x))
function.h (emit_status): Delete member regno_pointer_flag and rename regno_pointer_flag_length to... * function.h (emit_status): Delete member regno_pointer_flag and rename regno_pointer_flag_length to regno_pointer_align_length. Delete define for REGNO_POINTER_FLAG. * integrate.h (inline_remap): Delete member regno_pointer_flag. Add member x_regno_reg_rtx. * rtl.h (rtx_def): Use frame_related bit to indicate register is a pointer in REG expressions. Define REG_POINTER macro. * alias.c (find_base_value, find_base_term): Use REG_POINTER instead of REGNO_POINTER_FLAG. * combine.c (nonzero_bits, num_sign_bit_copies): Likewise. * emit-rtl.c (gen_reg_rtx): Use regno_pointer_align_length instead of regno_pointer_flag_length. Remove code which refers to regno_pointer_flag. (mark_reg_pointer): Use REG_POINTER. (free_emit_status): Remove code which refers to regno_pointer_flag. (init_emit, mark_emit_status): Likewise. * flow.c (dump_flow_info): Likewise. * function.c (preserve_temp_slots): Likewise. * integrate.c (expand_inline_function, copy_rtx_and_substitute): Use x_regno_reg_rtx instead of regno_pointer_flag for function pointer determination in map. * loop.c (strength_reduce, maybe_eliminate_biv_1): Use REG_POINTER. * predict.c (estimate_probability): Likewise. * regclass.c (record_address_regs, reg_scan_mark_refs): Likewise. * unroll.c (unroll_loop): Use x_regno_reg_rtx instead of regno_pointer_flag for function pointer determination in map. * convex.h (RTX_COSTS): Don't test regno_pointer_flag and use REG_POINTER. * pa.c (hppa_legitimize_address, emit_move_sequence, basereg_operand): Use REG_POINTER. (restore_unscaled_index_insn_codes): Revise comment. From-SVN: r37863
2000-11-30 07:31:19 +01:00
&& REG_POINTER (SET_SRC (x)))
|| ((GET_CODE (SET_SRC (x)) == PLUS
|| GET_CODE (SET_SRC (x)) == LO_SUM)
&& CONST_INT_P (XEXP (SET_SRC (x), 1))
alias.c (record_set, [...]): Use REG_P. 2004-06-15 Jerry Quinn <jlquinn@optonline.net> * alias.c (record_set, record_base_value, canon_rtx, get_addr, nonlocal_mentioned_p_1, init_alias_analysis): Use REG_P. * bt-load.c (find_btr_reference, insn_sets_btr_p, note_btr_set): Likewise. * builtins.c (expand_builtin_setjmp, expand_builtin_apply, expand_builtin_mathfn, expand_builtin_strlen, expand_builtin_memcmp, expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_frame_address): Likewise. * caller-save.c (mark_set_regs, add_stored_regs, mark_referenced_regs, insert_one_insn): Likewise. * calls.c (prepare_call_address, precompute_register_parameters, precompute_arguments, expand_call, emit_library_call_value_1): Likewise. * cfganal.c (flow_active_insn_p): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, can_combine_p, combinable_i3pat, try_combine, find_split_point, COMBINE_RTX_EQUAL_P, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, make_extraction, recog_for_combine, gen_lowpart_for_combine, simplify_comparison, record_dead_and_set_regs_1, record_dead_and_set_regs, record_promoted_value, check_promoted_subreg, get_last_value_validate, get_last_value, reg_dead_at_p_1, reg_bitfield_target_p, distribute_notes, unmentioned_reg_p_1): Likewise. * conflict.c (mark_reg): Likewise. * cse.c (HASH, COST, COST_IN, approx_reg_cost_1, notreg_cost, mention_regs, insert_regs, lookup, lookup_for_remove, insert, merge_equiv_classes, flush_hash_table, invalidate, remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg, invalidate_for_call, use_related_value, canon_hash, exp_equiv_p, cse_rtx_varies_p, canon_reg, find_best_addr, fold_rtx, equiv_constant, record_jump_cond, cse_insn, addr_affects_sp_p, invalidate_from_clobbers, cse_process_notes, cse_around_loop, cse_set_around_loop, count_reg_usage, set_live_p, cse_change_cc_mode, cse_cc_succs, cse_condition_code_reg): Likewise. * cselib.c (cselib_reg_set_mode, rtx_equal_for_cselib_p, cselib_lookup, cselib_invalidate_regno, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (dbxout_symbol_location, dbxout_parms, dbxout_reg_parms, dbxout_block): Likewise. * df.c (df_ref_record, df_def_record_1, df_uses_record): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2out_frame_debug_expr, is_pseudo_reg, is_based_loc, rtl_for_decl_location): Likewise. * emit-rtl.c (set_reg_attrs_for_parm, set_decl_rtl, set_decl_incoming_rtl, mark_user_reg): Likewise. * explow.c (copy_all_regs, copy_all_regs, memory_address, force_reg, copy_to_suggested_reg, allocate_dynamic_stack_space, probe_stack_range, hard_function_value): Likewise. * expmed.c (store_bit_field, store_fixed_bit_field, store_split_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_divmod, emit_store_flag_force): Likewise. * expr.c (convert_move, convert_modes, block_move_libcall_safe_for_call_parm, emit_group_load, use_reg, use_group_regs, emit_move_insn, emit_move_insn_1, compress_float_constant, push_block, emit_single_push_insn, emit_push_insn, get_subtarget, expand_assignment, store_expr, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment, do_store_flag, do_tablejump): Likewise. * final.c (profile_function, final_scan_insn, alter_subreg, get_mem_expr_from_op, output_asm_operand_names, output_operand, only_leaf_regs_used, leaf_renumber_regs_insn): Likewise. * flow.c (verify_wide_reg_1, mark_regs_live_at_end, find_regno_partial, propagate_one_insn, init_propagate_block_info, insn_dead_p, libcall_dead_p, mark_set_1, not_reg_cond, attempt_auto_inc, find_auto_inc, mark_used_regs, count_or_remove_death_notes_bb): Likewise. * function.c (find_temp_slot_from_address, update_temp_slot_address, preserve_temp_slots, put_var_into_stack, fixup_var_refs_insn, fixup_var_refs_1, fixup_stack_1, optimize_bit_field, flush_addressof, put_addressof_into_stack, purge_addressof_1, insns_for_mem_walk, purge_single_hard_subreg_set, instantiate_decl, instantiate_virtual_regs_1, aggregate_value_p, assign_parms, promoted_input_arg, setjmp_vars_warning, setjmp_args_warning, setjmp_protect, setjmp_protect_args, fix_lexical_addr, expand_function_start, diddle_return_value, clobber_return_register, expand_function_end, keep_stack_depressed, handle_epilogue_set, update_epilogue_consts): Likewise. * genemit.c (gen_exp, gen_insn): Likewise. * genrecog.c (make_insn_sequence): Likewise. * global.c (global_conflicts, expand_preferences, mark_reg_store, mark_reg_conflicts, set_preference, reg_becomes_live, build_insn_chain, mark_reg_change): Likewise. * haifa_sched.c (CONST_BASED_ADDRESS_P, find_set_reg_weight): Likewise. * ifcvt.c (noce_try_abs, noce_get_condition, noce_process_if_block): Likewise. * integrate.c (copy_rtx_and_substitute, try_constants, subst_constants, mark_stores, allocate_initial_values): Likewise. * jump.c (reversed_comparison_code_parts, delete_prior_computation, delete_computation, rtx_renumbered_equal_p, true_regnum, reg_or_subregno): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem, update_equiv_regs, no_equiv, block_alloc, combine_regs, reg_is_set, wipe_dead_reg, no_conflict_p): Likewise. * loop-iv.c (simple_reg_p, simple_set_p, kill_sets, iv_get_reaching_def, iv_analyze_biv, altered_reg_used, mark_altered, simple_rhs_p, simplify_using_assignment, implies_p): Likewise. * loop.c (scan_loop, combine_movables, rtx_equal_for_loop_p, move_movables, note_set_pseudo_multiple_uses, consec_sets_invariant_p, find_single_use_in_loop, count_one_set, loop_bivs_init_find, loop_givs_rescan, check_insn_for_bivs, check_insn_for_givs, valid_initial_value_p, simplify_giv_expr, consec_sets_giv, loop_regs_update, check_dbra_loop, maybe_eliminate_biv, maybe_eliminate_biv_1, record_initial, update_reg_last_use, canonicalize_condition, loop_regs_scan, load_mems, try_copy_prop, try_swap_copy_prop): Likewise. * optabs.c (expand_binop, expand_vector_binop, expand_vector_unop, expand_abs, emit_no_conflict_block, emit_libcall_block, expand_float): Likewise. * postreload.c (reload_cse_simplify, reload_cse_simplify_set, reload_cse_simplify_operands, reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * print-rtl.c (print_rtx): Likewise. * ra-build.c (copy_insn_p, remember_move, init_one_web_common, contains_pseudo, handle_asm_insn): Likewise. * ra-debug.c (ra_print_rtx_object, dump_constraints, dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, emit_colors, remove_suspicious_death_notes): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1, find_single_use, register_operand, scratch_operand, nonmemory_operand, constrain_operands): Likewise. * reg-stack (check_asm_stack_operands, remove_regno_note, emit_swap_insn, swap_rtx_condition, subst_stack_regs_pat, subst_asm_stack_regs): Likewise. * regclass.c (scan_one_insn, record_reg_classes, copy_cost, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (discover_flags_reg, replacement_quality, copy_src_to_dest, reg_is_remote_constant_p, regmove_optimize, fixup_match_1): Likewise. * regrename.c (note_sets, clear_dead_regs, build_def_use, kill_value, kill_set_value, copyprop_hardreg_forward_1): Likewise. * reload.c (MATCHES, push_secondary_reload, find_reusable_reload, reload_inner_reg_of_subreg, can_reload_into, push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, find_reloads_toplev, find_reloads_address, subst_indexed_address, find_reloads_address_1, find_reloads_subreg_address, find_replacement, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg, regno_clobbered_p): Likewise. * reload1.c (replace_pseudos_in, reload, calculate_needs_all_insns, find_reg, delete_dead_insn, alter_reg, eliminate_regs, elimination_effects, eliminate_regs_in_insn, scan_paradoxical_subregs, forget_old_reloads_1, reload_reg_free_for_value_p, choose_reload_regs, emit_input_reload_insns, emit_output_reload_insns, do_input_reload, do_output_reload, emit_reload_insns, gen_reload, delete_address_reloads_1, inc_for_reload): Likewise. * reorg.c (update_reg_dead_notes, fix_reg_dead_note, update_reg_unused_notes, fill_slots_from_thread): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c (nonzero_address_p, get_jump_table_offset, global_reg_mentioned_p_1, reg_mentioned_p, reg_referenced_p, reg_set_p, set_noop_p, find_last_value, refers_to_regno_p, note_stores, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, find_regno_fusage, replace_regs, regno_use_in, parms_set, find_first_parameter_load, keep_with_call_p, hoist_test_store, hoist_update_store, address_cost, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (deps_may_trap_p, sched_analyze_1, sched_analyze_insn, sched_analyze): Likewise. * sched-rgn.c (check_live_1, update_live_1, sets_likely_spilled_1): Likewise. * sdbout.c (sdbout_symbol, sdbout_parms, sdbout_reg_parms): Likewise. * simplify-rtx.c (simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_subreg): Likewise. * stmt.c (decl_conflicts_with_clobbers_p, expand_asm_operands, expand_end_stmt_expr, expand_return, expand_decl, expand_anon_union_decl): Likewise. * unroll.c (precondition_loop_p, calculate_giv_inc, copy_loop_body, find_splittable_regs, find_splittable_givs, find_common_reg_term, loop_iterations): Likewise. * var-tracking.c (variable_union, variable_part_different_p, variable_different_p, count_uses, add_uses, add_stores, compute_bb_dataflow, set_variable_part, delete_variable_part, emit_notes_in_bb, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (assemble_variable): Likewise. From-SVN: r83195
2004-06-15 20:02:40 +02:00
&& REG_P (XEXP (SET_SRC (x), 0))
function.h (emit_status): Delete member regno_pointer_flag and rename regno_pointer_flag_length to... * function.h (emit_status): Delete member regno_pointer_flag and rename regno_pointer_flag_length to regno_pointer_align_length. Delete define for REGNO_POINTER_FLAG. * integrate.h (inline_remap): Delete member regno_pointer_flag. Add member x_regno_reg_rtx. * rtl.h (rtx_def): Use frame_related bit to indicate register is a pointer in REG expressions. Define REG_POINTER macro. * alias.c (find_base_value, find_base_term): Use REG_POINTER instead of REGNO_POINTER_FLAG. * combine.c (nonzero_bits, num_sign_bit_copies): Likewise. * emit-rtl.c (gen_reg_rtx): Use regno_pointer_align_length instead of regno_pointer_flag_length. Remove code which refers to regno_pointer_flag. (mark_reg_pointer): Use REG_POINTER. (free_emit_status): Remove code which refers to regno_pointer_flag. (init_emit, mark_emit_status): Likewise. * flow.c (dump_flow_info): Likewise. * function.c (preserve_temp_slots): Likewise. * integrate.c (expand_inline_function, copy_rtx_and_substitute): Use x_regno_reg_rtx instead of regno_pointer_flag for function pointer determination in map. * loop.c (strength_reduce, maybe_eliminate_biv_1): Use REG_POINTER. * predict.c (estimate_probability): Likewise. * regclass.c (record_address_regs, reg_scan_mark_refs): Likewise. * unroll.c (unroll_loop): Use x_regno_reg_rtx instead of regno_pointer_flag for function pointer determination in map. * convex.h (RTX_COSTS): Don't test regno_pointer_flag and use REG_POINTER. * pa.c (hppa_legitimize_address, emit_move_sequence, basereg_operand): Use REG_POINTER. (restore_unscaled_index_insn_codes): Revise comment. From-SVN: r37863
2000-11-30 07:31:19 +01:00
&& REG_POINTER (XEXP (SET_SRC (x), 0)))
|| GET_CODE (SET_SRC (x)) == CONST
|| GET_CODE (SET_SRC (x)) == SYMBOL_REF
|| GET_CODE (SET_SRC (x)) == LABEL_REF
|| (GET_CODE (SET_SRC (x)) == HIGH
&& (GET_CODE (XEXP (SET_SRC (x), 0)) == CONST
|| GET_CODE (XEXP (SET_SRC (x), 0)) == SYMBOL_REF
|| GET_CODE (XEXP (SET_SRC (x), 0)) == LABEL_REF))
|| ((GET_CODE (SET_SRC (x)) == PLUS
|| GET_CODE (SET_SRC (x)) == LO_SUM)
&& (GET_CODE (XEXP (SET_SRC (x), 1)) == CONST
|| GET_CODE (XEXP (SET_SRC (x), 1)) == SYMBOL_REF
|| GET_CODE (XEXP (SET_SRC (x), 1)) == LABEL_REF))
|| ((note = find_reg_note (insn, REG_EQUAL, 0)) != 0
&& (GET_CODE (XEXP (note, 0)) == CONST
|| GET_CODE (XEXP (note, 0)) == SYMBOL_REF
|| GET_CODE (XEXP (note, 0)) == LABEL_REF))))
function.h (emit_status): Delete member regno_pointer_flag and rename regno_pointer_flag_length to... * function.h (emit_status): Delete member regno_pointer_flag and rename regno_pointer_flag_length to regno_pointer_align_length. Delete define for REGNO_POINTER_FLAG. * integrate.h (inline_remap): Delete member regno_pointer_flag. Add member x_regno_reg_rtx. * rtl.h (rtx_def): Use frame_related bit to indicate register is a pointer in REG expressions. Define REG_POINTER macro. * alias.c (find_base_value, find_base_term): Use REG_POINTER instead of REGNO_POINTER_FLAG. * combine.c (nonzero_bits, num_sign_bit_copies): Likewise. * emit-rtl.c (gen_reg_rtx): Use regno_pointer_align_length instead of regno_pointer_flag_length. Remove code which refers to regno_pointer_flag. (mark_reg_pointer): Use REG_POINTER. (free_emit_status): Remove code which refers to regno_pointer_flag. (init_emit, mark_emit_status): Likewise. * flow.c (dump_flow_info): Likewise. * function.c (preserve_temp_slots): Likewise. * integrate.c (expand_inline_function, copy_rtx_and_substitute): Use x_regno_reg_rtx instead of regno_pointer_flag for function pointer determination in map. * loop.c (strength_reduce, maybe_eliminate_biv_1): Use REG_POINTER. * predict.c (estimate_probability): Likewise. * regclass.c (record_address_regs, reg_scan_mark_refs): Likewise. * unroll.c (unroll_loop): Use x_regno_reg_rtx instead of regno_pointer_flag for function pointer determination in map. * convex.h (RTX_COSTS): Don't test regno_pointer_flag and use REG_POINTER. * pa.c (hppa_legitimize_address, emit_move_sequence, basereg_operand): Use REG_POINTER. (restore_unscaled_index_insn_codes): Revise comment. From-SVN: r37863
2000-11-30 07:31:19 +01:00
REG_POINTER (SET_DEST (x)) = 1;
/* If this is setting a register from a register or from a simple
conversion of a register, propagate REG_EXPR. */
if (REG_P (dest) && !REG_ATTRS (dest))
set_reg_attrs_from_value (dest, SET_SRC (x));
re PR c/7652 (-Wswitch-break : Warn if a switch case falls through) PR c/7652 gcc/ * alias.c (find_base_value): Adjust fall through comment. * cfgexpand.c (expand_debug_expr): Likewise. * combine.c (find_split_point): Likewise. (expand_compound_operation): Likewise. Add FALLTHRU. (make_compound_operation): Adjust fall through comment. (canon_reg_for_combine): Add FALLTHRU. (force_to_mode): Adjust fall through comment. (simplify_shift_const_1): Likewise. (simplify_comparison): Likewise. * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Add FALLTHRU. * config/aarch64/predicates.md: Likewise. * config/i386/i386.c (function_arg_advance_32): Likewise. (ix86_gimplify_va_arg): Likewise. (print_reg): Likewise. (ix86_print_operand): Likewise. (ix86_build_const_vector): Likewise. (ix86_expand_branch): Likewise. (ix86_sched_init_global): Adjust fall through comment. (ix86_expand_args_builtin): Add FALLTHRU. (ix86_expand_builtin): Likewise. (ix86_expand_vector_init_one_var): Likewise. * config/rs6000/rs6000.c (rs6000_emit_vector_compare_inner): Likewise. (rs6000_adjust_cost): Likewise. (insn_must_be_first_in_group): Likewise. * config/rs6000/rs6000.md: Likewise. Adjust fall through comment. * dbxout.c (dbxout_symbol): Adjust fall through comment. * df-scan.c (df_uses_record): Likewise. * dojump.c (do_jump): Add FALLTHRU. * dwarf2out.c (mem_loc_descriptor): Likewise. Adjust fall through comment. (resolve_args_picking_1): Adjust fall through comment. (loc_list_from_tree_1): Likewise. * expmed.c (make_tree): Likewise. * expr.c (expand_expr_real_2): Add FALLTHRU. (expand_expr_real_1): Likewise. Adjust fall through comment. * fold-const.c (const_binop): Adjust fall through comment. (fold_truth_not_expr): Likewise. (fold_cond_expr_with_comparison): Add FALLTHRU. (fold_binary_loc): Likewise. (contains_label_1): Adjust fall through comment. (multiple_of_p): Likewise. * gcov-tool.c (process_args): Add FALLTHRU. * genattrtab.c (check_attr_test): Likewise. (write_test_expr): Likewise. * genconfig.c (walk_insn_part): Likewise. * genpreds.c (validate_exp): Adjust fall through comment. (needs_variable): Likewise. * gensupport.c (get_alternatives_number): Add FALLTHRU. (subst_dup): Likewise. * gimple-pretty-print.c (dump_gimple_assign): Likewise. * gimplify.c (gimplify_addr_expr): Adjust fall through comment. (gimplify_scan_omp_clauses): Add FALLTHRU. (goa_stabilize_expr): Likewise. * graphite-isl-ast-to-gimple.c (substitute_ssa_name): Adjust fall through comment. * hsa-gen.c (get_address_from_value): Likewise. * ipa-icf.c (sem_function::hash_stmt): Likewise. * ira.c (ira_setup_alts): Add FALLTHRU. * lra-eliminations.c (lra_eliminate_regs_1): Adjust fall through comment. * lto-streamer-out.c (lto_output_tree_ref): Add FALLTHRU. * opts.c (common_handle_option): Likewise. * read-rtl.c (read_rtx_code): Likewise. * real.c (round_for_format): Likewise. * recog.c (asm_operand_ok): Likewise. * reginfo.c (reg_scan_mark_refs): Adjust fall through comment. * reload1.c (set_label_offsets): Likewise. (eliminate_regs_1): Likewise. (reload_reg_reaches_end_p): Likewise. * rtlanal.c (commutative_operand_precedence): Add FALLTHRU. (rtx_cost): Likewise. * sched-rgn.c (is_exception_free): Likewise. * simplify-rtx.c (simplify_rtx): Adjust fall through comment. * stor-layout.c (int_mode_for_mode): Likewise. * toplev.c (print_to_asm_out_file): Likewise. (print_to_stderr): Likewise. * tree-cfg.c (gimple_verify_flow_info): Likewise. * tree-chrec.c (chrec_fold_plus_1): Add FALLTHRU. (chrec_fold_multiply): Likewise. (evolution_function_is_invariant_rec_p): Likewise. (for_each_scev_op): Likewise. * tree-data-ref.c (siv_subscript_p): Likewise. (get_references_in_stmt): Likewise. * tree.c (find_placeholder_in_expr): Adjust fall through comment. (substitute_in_expr): Likewise. (type_cache_hasher::equal): Likewise. (walk_type_fields): Likewise. * var-tracking.c (adjust_mems): Add FALLTHRU. (set_dv_changed): Adjust fall through comment. * varasm.c (default_function_section): Add FALLTHRU. gcc/c-family/ * c-common.c (scalar_to_vector): Adjust fall through comment. * c-opts.c (c_common_handle_option): Likewise. * c-pragma.c (handle_pragma_pack): Add FALLTHRU. * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust fall through comment. * cilk.c (extract_free_variables): Add FALLTHRU. gcc/c/ * c-parser.c (c_parser_external_declaration): Add FALLTHRU. (c_parser_postfix_expression): Likewise. * c-typeck.c (build_unary_op): Adjust fall through comment. (c_mark_addressable): Likewise. gcc/cp/ * call.c (add_builtin_candidate): Add FALLTHRU. (build_integral_nontype_arg_conv): Adjust fall through comment. (build_new_op_1): Add FALLTHRU. (convert_like_real): Adjust fall through comment. * class.c (fixed_type_or_null): Likewise. * constexpr.c (cxx_eval_constant_expression): Likewise. (potential_constant_expression_1): Likewise. Add FALLTHRU. * cp-gimplify.c (cp_gimplify_expr): Adjust fall through comment. (cp_fold): Add FALLTHRU. * cvt.c (build_expr_type_conversion): Adjust fall through comment. * cxx-pretty-print.c (pp_cxx_unqualified_id): Add FALLTHRU. (pp_cxx_qualified_id): Likewise. (cxx_pretty_printer::constant): Adjust fall through comment. (cxx_pretty_printer::primary_expression): Add FALLTHRU. (pp_cxx_pm_expression): Adjust fall through comment. (cxx_pretty_printer::expression): Add FALLTHRU. (cxx_pretty_printer::declaration_specifiers): Reformat code. (pp_cxx_type_specifier_seq): Adjust fall through comment. (pp_cxx_ptr_operator): Likewise. Add FALLTHRU. * error.c (dump_type): Adjust fall through comment. (dump_decl): Likewise. * mangle.c (write_type): Likewise. * method.c (synthesized_method_walk): Add FALLTHRU. * name-lookup.c (arg_assoc_type): Likewise. * parser.c (cp_lexer_print_token): Adjust fall through comment. (cp_parser_primary_expression): Add FALLTHRU. (cp_parser_operator): Likewise. * pt.c (find_parameter_packs_r): Likewise. (tsubst_aggr_type): Adjust fall through comment. * semantics.c (finish_omp_clauses): Add FALLTHRU. * tree.c (lvalue_kind): Likewise. gcc/fortran/ * decl.c (match_attr_spec): Add FALLTHRU. * primary.c (match_arg_list_function): Likewise. * resolve.c (resolve_operator): Adjust fall through comment. (fixup_charlen): Add FALLTHRU. (resolve_allocate_expr): Adjust fall through comment. * trans-array.c (gfc_conv_ss_startstride): Add FALLTHRU. * trans-intrinsic.c (gfc_conv_intrinsic_len): Adjust fall through comment. gcc/java/ * expr.c (java_truthvalue_conversion): Adjust fall through comment. * jcf-io.c (verify_constant_pool): Likewise. * typeck.c (promote_type): Likewise. gcc/objc/ * objc-encoding.c (encode_type): Add FALLTHRU. libcpp/ * lex.c (search_line_fast): Add FALLTHRU. (_cpp_lex_direct): Likewise. (cpp_token_val_index): Adjust fall through comment. * macro.c (parse_params): Add FALLTHRU. * pch.c (count_defs): Adjust fall through comment. (write_defs): Likewise. libiberty/ * cp-demangle.c (d_print_mod): Add FALLTHRU. From-SVN: r239410
2016-08-12 12:30:47 +02:00
/* fall through */
1991-11-06 00:39:50 +01:00
default:
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
const char *fmt = GET_RTX_FORMAT (code);
int i;
1991-11-06 00:39:50 +01:00
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
if (fmt[i] == 'e')
reg_scan_mark_refs (XEXP (x, i), insn);
1991-11-06 00:39:50 +01:00
else if (fmt[i] == 'E' && XVEC (x, i) != 0)
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
int j;
1991-11-06 00:39:50 +01:00
for (j = XVECLEN (x, i) - 1; j >= 0; j--)
reg_scan_mark_refs (XVECEXP (x, i, j), insn);
1991-11-06 00:39:50 +01:00
}
}
}
}
}
tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. 2008-01-29 Vladimir Makarov <vmakarov@redhat.com> * doc/tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. * doc/passes.texi: Remove entries about regclass, local-alloc, and global. Modify entries about regmove and IRA. * ra-conflict.c: Remove the file. * reload.c (push_reload, find_dummy_reload): Remove flag_ira. * tree-pass.h (pass_local_alloc, pass_global_alloc): Remove. (pass_regclass_init): Rename to pass_reginfo_init. * cfgloopanal.c (estimate_reg_pressure_cost): Remove flag_ira. * toplev.h (flag_ira): Remove. * caller-save.c (setup_save_areas): Remove flag_ira. * ira-color.c (ira_reuse_stack_slot, ira_mark_new_stack_slot): Ditto. * global.c: Remove the file. * opts.c: (decode_options): Remove flag_ira. * hard-reg-set.h (losing_caller_save_reg_set): Remove. * regmove.c: Modify file description. (find_use_as_address, try_auto_increment): Define them only if AUTO_INC_DEC is defined. (replacement_quality, replace_in_call_usage, fixup_match_1, stable_and_no_regs_but_for_p): Remove. (reg_set_in_bb): Make it static. (regmove_optimize): Remove flag_ira and code which worked for !flag_ira. * local-alloc.c: Remove the file. * common.opt (fira): Remove. * ira.c: Include except.h. (eliminable_regset): Move from global.c. (mark_elimination): Ditto. Remove flag_ira. (reg_renumber, struct equivalence, reg_equiv, equiv_mem, equiv_mem_modified, validate_equiv_mem_from_store, validate_equiv_mem, equiv_init_varies_p, equiv_init_movable_p, contains_replace_regs, memref_referenced_p, memref_used_between_p, no_equiv, recorded_label_ref): Move from local-alloc.c. (update_equiv_regs): Ditto. Make it static. (print_insn_chain, print_insn_chains): Move it from global.c. pseudo_for_reload_consideration_p): Ditto. Remove flag_ira. (build_insn_chain): Ditto. Make it static. (ra_init_live_subregs): Move from ra-conflict.c. Make it static. Rename to init_live_subregs. (gate_ira): Remove flag_ira. * regclass.c: Rename reginfo.c. Change file description. (FORBIDDEN_INC_DEC_CLASSES): Remove. (reg_class_superclasses, forbidden_inc_dec_class, in_inc_dec): Remove. (init_reg_sets_1): Remove code for evaluation of reg_class_superclasses and losing_caller_save_reg_set. (init_regs): Remove init_reg_autoinc. (struct costs, costs, init_cost, ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): Remove. (regclass_init): Rename to reginfo_init. Don't initialize init_cost. (pass_regclass_init): Rename to pass_reginfo_init. Modify corresponding entries. (dump_regclass, record_operand_costs, scan_one_insn, init_reg_autoinc, regclass, record_reg_classes, copy_cost, record_address_regs, auto_inc_dec_reg_p): Remove. (gt-regclass.h): Rename to gt-reginfo.h. * rtl.h (dump_global_regs, retry_global_alloc, build_insn_chain, dump_local_alloc, update_equiv_regs): Remove. * Makefile.in (RA_H): Remove. (OBJS-common): Remove global.o, local-alloc.o, and ra-conflict.o. Rename regclass.o to reginfo.o. (regclass.o): Rename to reginfo.o. Rename gt-regclass.h to gt-reginfo.h. (global.o, local-alloc.o, ra-conflict.o): Remove entries. (GTFILES): Rename regclass.c to reginfo.c. * passes.c (init_optimization_passes): Remove pass_local_alloc and pass_global_alloc. Rename pass_regclass_init to pass_reginfo_init. * reload1.c (compute_use_by_pseudos, reload, count_pseudo, count_spilled_pseudo, find_reg, alter_reg, delete_output_reload): Remove flag_ira. (finish_spills): Ditto. Remove code for !flga_ira. From-SVN: r143757
2009-01-29 15:51:46 +01:00
1991-11-06 00:39:50 +01:00
/* Return nonzero if C1 is a subset of C2, i.e., if every register in C1
is also in C2. */
int
reg_class_subset_p (reg_class_t c1, reg_class_t c2)
1991-11-06 00:39:50 +01:00
{
return (c1 == c2
|| c2 == ALL_REGS
|| hard_reg_set_subset_p (reg_class_contents[(int) c1],
reg_class_contents[(int) c2]));
1991-11-06 00:39:50 +01:00
}
/* Return nonzero if there is a register that is in both C1 and C2. */
int
reg_classes_intersect_p (reg_class_t c1, reg_class_t c2)
1991-11-06 00:39:50 +01:00
{
return (c1 == c2
|| c1 == ALL_REGS
|| c2 == ALL_REGS
|| hard_reg_set_intersect_p (reg_class_contents[(int) c1],
reg_class_contents[(int) c2]));
1991-11-06 00:39:50 +01:00
}
tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. 2008-01-29 Vladimir Makarov <vmakarov@redhat.com> * doc/tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. * doc/passes.texi: Remove entries about regclass, local-alloc, and global. Modify entries about regmove and IRA. * ra-conflict.c: Remove the file. * reload.c (push_reload, find_dummy_reload): Remove flag_ira. * tree-pass.h (pass_local_alloc, pass_global_alloc): Remove. (pass_regclass_init): Rename to pass_reginfo_init. * cfgloopanal.c (estimate_reg_pressure_cost): Remove flag_ira. * toplev.h (flag_ira): Remove. * caller-save.c (setup_save_areas): Remove flag_ira. * ira-color.c (ira_reuse_stack_slot, ira_mark_new_stack_slot): Ditto. * global.c: Remove the file. * opts.c: (decode_options): Remove flag_ira. * hard-reg-set.h (losing_caller_save_reg_set): Remove. * regmove.c: Modify file description. (find_use_as_address, try_auto_increment): Define them only if AUTO_INC_DEC is defined. (replacement_quality, replace_in_call_usage, fixup_match_1, stable_and_no_regs_but_for_p): Remove. (reg_set_in_bb): Make it static. (regmove_optimize): Remove flag_ira and code which worked for !flag_ira. * local-alloc.c: Remove the file. * common.opt (fira): Remove. * ira.c: Include except.h. (eliminable_regset): Move from global.c. (mark_elimination): Ditto. Remove flag_ira. (reg_renumber, struct equivalence, reg_equiv, equiv_mem, equiv_mem_modified, validate_equiv_mem_from_store, validate_equiv_mem, equiv_init_varies_p, equiv_init_movable_p, contains_replace_regs, memref_referenced_p, memref_used_between_p, no_equiv, recorded_label_ref): Move from local-alloc.c. (update_equiv_regs): Ditto. Make it static. (print_insn_chain, print_insn_chains): Move it from global.c. pseudo_for_reload_consideration_p): Ditto. Remove flag_ira. (build_insn_chain): Ditto. Make it static. (ra_init_live_subregs): Move from ra-conflict.c. Make it static. Rename to init_live_subregs. (gate_ira): Remove flag_ira. * regclass.c: Rename reginfo.c. Change file description. (FORBIDDEN_INC_DEC_CLASSES): Remove. (reg_class_superclasses, forbidden_inc_dec_class, in_inc_dec): Remove. (init_reg_sets_1): Remove code for evaluation of reg_class_superclasses and losing_caller_save_reg_set. (init_regs): Remove init_reg_autoinc. (struct costs, costs, init_cost, ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): Remove. (regclass_init): Rename to reginfo_init. Don't initialize init_cost. (pass_regclass_init): Rename to pass_reginfo_init. Modify corresponding entries. (dump_regclass, record_operand_costs, scan_one_insn, init_reg_autoinc, regclass, record_reg_classes, copy_cost, record_address_regs, auto_inc_dec_reg_p): Remove. (gt-regclass.h): Rename to gt-reginfo.h. * rtl.h (dump_global_regs, retry_global_alloc, build_insn_chain, dump_local_alloc, update_equiv_regs): Remove. * Makefile.in (RA_H): Remove. (OBJS-common): Remove global.o, local-alloc.o, and ra-conflict.o. Rename regclass.o to reginfo.o. (regclass.o): Rename to reginfo.o. Rename gt-regclass.h to gt-reginfo.h. (global.o, local-alloc.o, ra-conflict.o): Remove entries. (GTFILES): Rename regclass.c to reginfo.c. * passes.c (init_optimization_passes): Remove pass_local_alloc and pass_global_alloc. Rename pass_regclass_init to pass_reginfo_init. * reload1.c (compute_use_by_pseudos, reload, count_pseudo, count_spilled_pseudo, find_reg, alter_reg, delete_output_reload): Remove flag_ira. (finish_spills): Ditto. Remove code for !flga_ira. From-SVN: r143757
2009-01-29 15:51:46 +01:00
inline hashval_t
remove need for store_values_directly This switches all hash_table users to use the layout that stores elements of type value_type in the hash table instead of the one storing value_type *. Since it becomes unused support for the value_type * layout is removed. gcc/ * hash-table.h: Remove version of hash_table that stored value_type *. * asan.c, attribs.c, bitmap.c, cfg.c, cgraph.h, config/arm/arm.c, config/i386/winnt.c, config/ia64/ia64.c, config/mips/mips.c, config/sol2.c, coverage.c, cselib.c, dse.c, dwarf2cfi.c, dwarf2out.c, except.c, gcse.c, genmatch.c, ggc-common.c, gimple-ssa-strength-reduction.c, gimplify.c, haifa-sched.c, hard-reg-set.h, hash-map.h, hash-set.h, ipa-devirt.c, ipa-icf.h, ipa-profile.c, ira-color.c, ira-costs.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lto-streamer.h, plugin.c, postreload-gcse.c, reginfo.c, statistics.c, store-motion.c, trans-mem.c, tree-cfg.c, tree-eh.c, tree-hasher.h, tree-into-ssa.c, tree-parloops.c, tree-sra.c, tree-ssa-coalesce.c, tree-ssa-dom.c, tree-ssa-live.c, tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-phiopt.c, tree-ssa-pre.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-ssa-structalias.c, tree-ssa-tail-merge.c, tree-ssa-threadupdate.c, tree-vectorizer.c, tree-vectorizer.h, valtrack.h, var-tracking.c, vtable-verify.c, vtable-verify.h: Adjust. libcc1/ * plugin.cc: Adjust for hash_table changes. gcc/java/ * jcf-io.c: Adjust for hash_table changes. gcc/lto/ * lto.c: Adjust for hash_table changes. gcc/objc/ * objc-act.c: Adjust for hash_table changes. From-SVN: r222213
2015-04-18 20:13:18 +02:00
simplifiable_subregs_hasher::hash (const simplifiable_subreg *value)
{
return value->shape.unique_id ();
}
inline bool
remove need for store_values_directly This switches all hash_table users to use the layout that stores elements of type value_type in the hash table instead of the one storing value_type *. Since it becomes unused support for the value_type * layout is removed. gcc/ * hash-table.h: Remove version of hash_table that stored value_type *. * asan.c, attribs.c, bitmap.c, cfg.c, cgraph.h, config/arm/arm.c, config/i386/winnt.c, config/ia64/ia64.c, config/mips/mips.c, config/sol2.c, coverage.c, cselib.c, dse.c, dwarf2cfi.c, dwarf2out.c, except.c, gcse.c, genmatch.c, ggc-common.c, gimple-ssa-strength-reduction.c, gimplify.c, haifa-sched.c, hard-reg-set.h, hash-map.h, hash-set.h, ipa-devirt.c, ipa-icf.h, ipa-profile.c, ira-color.c, ira-costs.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lto-streamer.h, plugin.c, postreload-gcse.c, reginfo.c, statistics.c, store-motion.c, trans-mem.c, tree-cfg.c, tree-eh.c, tree-hasher.h, tree-into-ssa.c, tree-parloops.c, tree-sra.c, tree-ssa-coalesce.c, tree-ssa-dom.c, tree-ssa-live.c, tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-phiopt.c, tree-ssa-pre.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-ssa-structalias.c, tree-ssa-tail-merge.c, tree-ssa-threadupdate.c, tree-vectorizer.c, tree-vectorizer.h, valtrack.h, var-tracking.c, vtable-verify.c, vtable-verify.h: Adjust. libcc1/ * plugin.cc: Adjust for hash_table changes. gcc/java/ * jcf-io.c: Adjust for hash_table changes. gcc/lto/ * lto.c: Adjust for hash_table changes. gcc/objc/ * objc-act.c: Adjust for hash_table changes. From-SVN: r222213
2015-04-18 20:13:18 +02:00
simplifiable_subregs_hasher::equal (const simplifiable_subreg *value,
const subreg_shape *compare)
{
return value->shape == *compare;
}
inline simplifiable_subreg::simplifiable_subreg (const subreg_shape &shape_in)
: shape (shape_in)
{
CLEAR_HARD_REG_SET (simplifiable_regs);
}
/* Return the set of hard registers that are able to form the subreg
described by SHAPE. */
const HARD_REG_SET &
simplifiable_subregs (const subreg_shape &shape)
{
if (!this_target_hard_regs->x_simplifiable_subregs)
this_target_hard_regs->x_simplifiable_subregs
= new hash_table <simplifiable_subregs_hasher> (30);
simplifiable_subreg **slot
= (this_target_hard_regs->x_simplifiable_subregs
->find_slot_with_hash (&shape, shape.unique_id (), INSERT));
if (!*slot)
{
simplifiable_subreg *info = new simplifiable_subreg (shape);
for (unsigned int i = 0; i < FIRST_PSEUDO_REGISTER; ++i)
if (HARD_REGNO_MODE_OK (i, shape.inner_mode)
&& simplify_subreg_regno (i, shape.inner_mode, shape.offset,
shape.outer_mode) >= 0)
SET_HARD_REG_BIT (info->simplifiable_regs, i);
*slot = info;
}
return (*slot)->simplifiable_regs;
}
tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. 2008-01-29 Vladimir Makarov <vmakarov@redhat.com> * doc/tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. * doc/passes.texi: Remove entries about regclass, local-alloc, and global. Modify entries about regmove and IRA. * ra-conflict.c: Remove the file. * reload.c (push_reload, find_dummy_reload): Remove flag_ira. * tree-pass.h (pass_local_alloc, pass_global_alloc): Remove. (pass_regclass_init): Rename to pass_reginfo_init. * cfgloopanal.c (estimate_reg_pressure_cost): Remove flag_ira. * toplev.h (flag_ira): Remove. * caller-save.c (setup_save_areas): Remove flag_ira. * ira-color.c (ira_reuse_stack_slot, ira_mark_new_stack_slot): Ditto. * global.c: Remove the file. * opts.c: (decode_options): Remove flag_ira. * hard-reg-set.h (losing_caller_save_reg_set): Remove. * regmove.c: Modify file description. (find_use_as_address, try_auto_increment): Define them only if AUTO_INC_DEC is defined. (replacement_quality, replace_in_call_usage, fixup_match_1, stable_and_no_regs_but_for_p): Remove. (reg_set_in_bb): Make it static. (regmove_optimize): Remove flag_ira and code which worked for !flag_ira. * local-alloc.c: Remove the file. * common.opt (fira): Remove. * ira.c: Include except.h. (eliminable_regset): Move from global.c. (mark_elimination): Ditto. Remove flag_ira. (reg_renumber, struct equivalence, reg_equiv, equiv_mem, equiv_mem_modified, validate_equiv_mem_from_store, validate_equiv_mem, equiv_init_varies_p, equiv_init_movable_p, contains_replace_regs, memref_referenced_p, memref_used_between_p, no_equiv, recorded_label_ref): Move from local-alloc.c. (update_equiv_regs): Ditto. Make it static. (print_insn_chain, print_insn_chains): Move it from global.c. pseudo_for_reload_consideration_p): Ditto. Remove flag_ira. (build_insn_chain): Ditto. Make it static. (ra_init_live_subregs): Move from ra-conflict.c. Make it static. Rename to init_live_subregs. (gate_ira): Remove flag_ira. * regclass.c: Rename reginfo.c. Change file description. (FORBIDDEN_INC_DEC_CLASSES): Remove. (reg_class_superclasses, forbidden_inc_dec_class, in_inc_dec): Remove. (init_reg_sets_1): Remove code for evaluation of reg_class_superclasses and losing_caller_save_reg_set. (init_regs): Remove init_reg_autoinc. (struct costs, costs, init_cost, ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): Remove. (regclass_init): Rename to reginfo_init. Don't initialize init_cost. (pass_regclass_init): Rename to pass_reginfo_init. Modify corresponding entries. (dump_regclass, record_operand_costs, scan_one_insn, init_reg_autoinc, regclass, record_reg_classes, copy_cost, record_address_regs, auto_inc_dec_reg_p): Remove. (gt-regclass.h): Rename to gt-reginfo.h. * rtl.h (dump_global_regs, retry_global_alloc, build_insn_chain, dump_local_alloc, update_equiv_regs): Remove. * Makefile.in (RA_H): Remove. (OBJS-common): Remove global.o, local-alloc.o, and ra-conflict.o. Rename regclass.o to reginfo.o. (regclass.o): Rename to reginfo.o. Rename gt-regclass.h to gt-reginfo.h. (global.o, local-alloc.o, ra-conflict.o): Remove entries. (GTFILES): Rename regclass.c to reginfo.c. * passes.c (init_optimization_passes): Remove pass_local_alloc and pass_global_alloc. Rename pass_regclass_init to pass_reginfo_init. * reload1.c (compute_use_by_pseudos, reload, count_pseudo, count_spilled_pseudo, find_reg, alter_reg, delete_output_reload): Remove flag_ira. (finish_spills): Ditto. Remove code for !flga_ira. From-SVN: r143757
2009-01-29 15:51:46 +01:00
/* Passes for keeping and updating info about modes of registers
inside subregisters. */
static HARD_REG_SET **valid_mode_changes;
static obstack valid_mode_changes_obstack;
/* Restrict the choice of register for SUBREG_REG (SUBREG) based
on information about SUBREG.
If PARTIAL_DEF, SUBREG is a partial definition of a multipart inner
register and we want to ensure that the other parts of the inner
register are correctly preserved. If !PARTIAL_DEF we need to
ensure that SUBREG itself can be formed. */
static void
record_subregs_of_mode (rtx subreg, bool partial_def)
{
unsigned int regno;
if (!REG_P (SUBREG_REG (subreg)))
return;
regno = REGNO (SUBREG_REG (subreg));
if (regno < FIRST_PSEUDO_REGISTER)
return;
subreg_shape shape (shape_of_subreg (subreg));
if (partial_def)
{
/* The number of independently-accessible SHAPE.outer_mode values
in SHAPE.inner_mode is GET_MODE_SIZE (SHAPE.inner_mode) / SIZE.
We need to check that the assignment will preserve all the other
SIZE-byte chunks in the inner register besides the one that
includes SUBREG.
In practice it is enough to check whether an equivalent
SHAPE.inner_mode value in an adjacent SIZE-byte chunk can be formed.
If the underlying registers are small enough, both subregs will
be valid. If the underlying registers are too large, one of the
subregs will be invalid.
This relies on the fact that we've already been passed
SUBREG with PARTIAL_DEF set to false. */
unsigned int size = MAX (REGMODE_NATURAL_SIZE (shape.inner_mode),
GET_MODE_SIZE (shape.outer_mode));
gcc_checking_assert (size < GET_MODE_SIZE (shape.inner_mode));
if (shape.offset >= size)
shape.offset -= size;
else
shape.offset += size;
}
if (valid_mode_changes[regno])
AND_HARD_REG_SET (*valid_mode_changes[regno],
simplifiable_subregs (shape));
else
{
valid_mode_changes[regno]
= XOBNEW (&valid_mode_changes_obstack, HARD_REG_SET);
COPY_HARD_REG_SET (*valid_mode_changes[regno],
simplifiable_subregs (shape));
}
}
/* Call record_subregs_of_mode for all the subregs in X. */
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
static void
find_subregs_of_mode (rtx x)
{
enum rtx_code code = GET_CODE (x);
const char * const fmt = GET_RTX_FORMAT (code);
int i;
if (code == SUBREG)
record_subregs_of_mode (x, false);
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
/* Time for some deep diving. */
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
if (fmt[i] == 'e')
find_subregs_of_mode (XEXP (x, i));
else if (fmt[i] == 'E')
{
int j;
for (j = XVECLEN (x, i) - 1; j >= 0; j--)
find_subregs_of_mode (XVECEXP (x, i, j));
}
}
}
params.def (PARAM_IRA_LOOP_RESERVED_REGS): New. 2009-09-26 Vladimir Makarov <vmakarov@redhat.com> * params.def (PARAM_IRA_LOOP_RESERVED_REGS): New. * params.h (IRA_LOOP_RESERVED_REGS): New * tree-pass.h (pass_subregs_of_mode_init, pass_subregs_of_mode_finish): Remove. * passes.c (pass_subregs_of_mode_init, pass_subregs_of_mode_finish): Remove. (pass_reginfo_init): Move before loop optimizations. * config/i386/i386.h (STACK_REG_COVER_CLASS): Define. * common.opt (fira-loop-pressure): New. * toplev.h (flag_ira_loop_pressure): New. * rtl.h (init_subregs_of_mode, finish_subregs_of_mode): New externals. * reginfo.c (init_subregs_of_mode, finish_subregs_of_mode): Make external and void type functions. (gate_subregs_of_mode_init, pass_subregs_of_mode_init, pass_subregs_of_mode_finish): Remove. * ira-costs.c (init_costs): Call init_subregs_of_mode. * regmove.c: Include ira.h. (regmove_optimize): Call ira_set_pseudo_classes after IRA based register pressure calculation in loops. * loop-invariant.c: Include REGS_H and ira.h. (struct loop_data): New members max_reg_pressure, regs_ref, and regs_live. (struct invariant): New member orig_regno. (curr_loop): New variable. (find_exits): Initialize regs_ref and regs_live. (create_new_invariant): Initialize orig_regno. (get_cover_class_and_nregs): New. (get_inv_cost): Make aregs_needed an array. Use regs_needed as an array. Add code for flag_ira_loop_pressure. (gain_for_invariant): Make new_regs an array. Add code for flag_ira_loop_pressure. (best_gain_for_invariant): Ditto. (set_move_mark): New parameter gain. Use it for debugging output. (find_invariants_to_move): Make regs_needed and new_regs an array. Add code for flag_ira_loop_pressure. (move_invariant_reg): Set up orig_regno. (move_invariants): Set up reg classes for pseudos for flag_ira_loop_pressure. (free_loop_data): Clear regs_ref and regs_live. (curr_regs_live, curr_reg_pressure, regs_set, n_regs_set, get_regno_cover_class, change_pressure, mark_regno_live, mark_regno_death, mark_reg_store, mark_reg_clobber, mark_reg_death, mark_ref_regs, calculate_loop_reg_pressure): New. (move_loop_invariants): Calculate pressure. Initialize curr_loop. * ira.c (ira): Call ira_set_pseudo_classes after IRA based register pressure calculation in loops if new regs were added. Call finish_subregs_of_mode. * opts.c (decode_options): Set up flag_ira_loop_pressure. * Makefile.in (loop-invariant.o): Add ira.h. (regmove.o): Ditto. * doc/invoke.texi (-fira-loop-pressure, ira-loop-reserved-regs): Describe. * doc/tm.texi (STACK_REG_COVER_CLASS): Describe. From-SVN: r152770
2009-10-14 18:24:11 +02:00
void
init_subregs_of_mode (void)
{
basic_block bb;
rtx_insn *insn;
gcc_obstack_init (&valid_mode_changes_obstack);
valid_mode_changes = XCNEWVEC (HARD_REG_SET *, max_reg_num ());
Eliminate FOR_EACH_BB macro. gcc/ * basic-block.h (FOR_EACH_BB): Eliminate macro. * asan.c (transform_statements, execute_sanopt): Eliminate use of FOR_EACH_BB in favor of FOR_EACH_BB_FN, to make use of cfun explicit. * auto-inc-dec.c (rest_of_handle_auto_inc_dec): Likewise. * bb-reorder.c (find_rarely_executed_basic_blocks_and_crossing_edges, set_edge_can_fallthru_flag, fix_up_fall_thru_edges, fix_crossing_unconditional_branches, add_reg_crossing_jump_notes, insert_section_boundary_note, rest_of_handle_reorder_blocks, duplicate_computed_gotos): Likewise. * cfg.c (clear_edges, compact_blocks, brief_dump_cfg): Likewise. * cfganal.c (find_unreachable_blocks, add_noreturn_fake_exit_edges, compute_dominance_frontiers_1, single_pred_before_succ_order): Likewise. * cfgbuild.c (find_many_sub_basic_blocks): Likewise. * cfgcleanup.c (try_optimize_cfg, delete_dead_jumptables): Likewise. * cfgexpand.c (add_scope_conflicts, discover_nonconstant_array_refs): Likewise. * cfgloop.c (flow_loops_cfg_dump, get_loop_body, record_loop_exits, verify_loop_structure): Likewise. * cfgloopanal.c (mark_loop_exit_edges): Likewise. * cfgrtl.c (compute_bb_for_insn, find_partition_fixes, verify_hot_cold_block_grouping, purge_all_dead_edges, fixup_abnormal_edges, record_effective_endpoints, outof_cfg_layout_mode, fixup_reorder_chain, force_one_exit_fallthru, break_superblocks): Likewise. * cgraphbuild.c (build_cgraph_edges, rebuild_cgraph_edges, cgraph_rebuild_references): Likewise. * combine-stack-adj.c (combine_stack_adjustments): Likewise. * combine.c (delete_noop_moves, create_log_links, combine_instructions): Likewise. * config/arm/arm.c (thumb1_reorg, thumb2_reorg): Likewise. * config/bfin/bfin.c (bfin_gen_bundles, reorder_var_tracking_notes): Likewise. * config/c6x/c6x.c (c6x_gen_bundles, conditionalize_after_sched, c6x_reorg): Likewise. * config/epiphany/resolve-sw-modes.c (resolve_sw_modes): Likewise. * config/frv/frv.c (frv_optimize_membar): Likewise. * config/i386/i386.c (ix86_finalize_stack_realign_flags): Likewise. * config/ia64/ia64.c (ia64_reorg): Likewise. * config/mips/mips.c (mips_annotate_pic_calls): Likewise. * config/picochip/picochip.c (reorder_var_tracking_notes): Likewise. * config/rs6000/rs6000.c (rs6000_alloc_sdmode_stack_slot): Likewise. * config/s390/s390.c (s390_regs_ever_clobbered): Likewise. * config/sh/sh_treg_combine.cc (sh_treg_combine::execute): Likewise. * config/spu/spu.c (spu_machine_dependent_reorg): Likewise. * config/tilegx/tilegx.c (tilegx_gen_bundles, reorder_var_tracking_notes): Likewise. * config/tilepro/tilepro.c (tilepro_gen_bundles, reorder_var_tracking_notes): Likewise. * coverage.c (coverage_compute_cfg_checksum): Likewise. * cprop.c (compute_hash_table_work, compute_cprop_data, local_cprop_pass, find_implicit_sets): Likewise. * cse.c (cse_condition_code_reg): Likewise. * dce.c (prescan_insns_for_dce): Likewise. * df-core.c (df_compact_blocks): Likewise. * df-problems.c (df_word_lr_alloc): Likewise. * df-scan.c (df_scan_start_dump, df_scan_blocks, df_insn_rescan_all, df_update_entry_exit_and_calls): Likewise. * dominance.c (calculate_dominance_info, verify_dominators, debug_dominance_info): Likewise. * dse.c (dse_step5_nospill): Likewise. * except.c (finish_eh_generation): Likewise. * final.c (compute_alignments): Likewise. * function.c (thread_prologue_and_epilogue_insns, rest_of_match_asm_constraints): Likewise. * gcse.c (compute_hash_table_work, prune_expressions, compute_pre_data, compute_code_hoist_vbeinout, hoist_code, calculate_bb_reg_pressure, compute_ld_motion_mems): Likewise. * gimple-iterator.c (gsi_commit_edge_inserts): Likewise. * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behaviour, find_explicit_erroneous_behaviour): Likewise. * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa, rewrite_cross_bb_scalar_deps_out_of_ssa): Likewise. * haifa-sched.c (haifa_sched_init): Likewise. * hw-doloop.c (discover_loops, set_bb_indices, reorder_loops): Likewise. * ifcvt.c (if_convert): Likewise. * init-regs.c (initialize_uninitialized_regs): Likewise. * ipa-prop.c (ipcp_transform_function): Likewise. * ipa-pure-const.c (analyze_function): Likewise. * ipa-split.c (find_split_points, execute_split_functions): Likewise. * ira-build.c (form_loop_tree): Likewise. * ira-costs.c (find_costs_and_classes): Likewise. * ira-emit.c (emit_moves, add_ranges_and_copies, ira_emit): Likewise. * ira.c (decrease_live_ranges_number, compute_regs_asm_clobbered, mark_elimination, update_equiv_regs, find_moveable_pseudos, split_live_ranges_for_shrink_wrap, allocate_initial_values): Likewise. * jump.c (mark_all_labels): Likewise. * lcm.c (compute_laterin, compute_insert_delete, compute_available, compute_nearerout, compute_rev_insert_delete): Likewise. * loop-init.c (fix_loop_structure): Likewise. * loop-invariant.c (calculate_loop_reg_pressure): Likewise. * lower-subreg.c (decompose_multiword_subregs, decompose_multiword_subregs): Likewise. * lra-assigns.c (assign_by_spills): Likewise. * lra-coalesce.c (lra_coalesce): Likewise. * lra-constraints.c (lra_inheritance, remove_inheritance_pseudos): Likewise. * lra-eliminations.c (lra_init_elimination): Likewise. * lra-spills.c (assign_spill_hard_regs, spill_pseudos, lra_final_code_change): Likewise. * lra.c (remove_scratches, check_rtl, has_nonexceptional_receiver, update_inc_notes): Likewise. * mcf.c (adjust_cfg_counts): Likewise. * mode-switching.c (optimize_mode_switching): Likewise. * modulo-sched.c (rest_of_handle_sms): Likewise. * omp-low.c (optimize_omp_library_calls, expand_omp_taskreg, expand_omp_target): Likewise. * postreload-gcse.c (alloc_mem, compute_hash_table): Likewise. * postreload.c (reload_cse_regs_1): Likewise. * predict.c (strip_predict_hints, tree_bb_level_predictions, tree_estimate_probability, expensive_function_p, estimate_bb_frequencies, compute_function_frequency): Likewise. * profile.c (is_inconsistent, compute_branch_probabilities, branch_prob): Likewise. * ree.c (find_removable_extensions): Likewise. * reg-stack.c (compensate_edges, convert_regs, reg_to_stack): Likewise. * regcprop.c (copyprop_hardreg_forward): Likewise. * reginfo.c (init_subregs_of_mode): Likewise. * regrename.c (regrename_analyze): Likewise. * regstat.c (regstat_compute_ri, regstat_compute_calls_crossed): Likewise. * reload1.c (has_nonexceptional_receiver, reload, calculate_elim_costs_all_insns): Likewise. * resource.c (init_resource_info, free_resource_info): Likewise. * sched-ebb.c (schedule_ebbs): Likewise. * sched-rgn.c (is_cfg_nonregular, find_single_block_region, haifa_find_rgns, sched_rgn_local_init): Likewise. * sel-sched-dump.c (sel_dump_cfg_2): Likewise. * sel-sched-ir.c (init_lv_sets, free_lv_sets, make_regions_from_the_rest): Likewise. * sese.c (build_sese_loop_nests, sese_build_liveouts): Likewise. * stack-ptr-mod.c (notice_stack_pointer_modification): Likewise. * store-motion.c (compute_store_table, build_store_vectors, one_store_motion_pass): Likewise. * tracer.c (tail_duplicate): Likewise. * trans-mem.c (compute_transaction_bits): Likewise. * tree-call-cdce.c (tree_call_cdce): Likewise. * tree-cfg.c (replace_loop_annotate, factor_computed_gotos, fold_cond_expr_cond, make_edges, assign_discriminators, make_abnormal_goto_edges, cleanup_dead_labels, group_case_labels, dump_cfg_stats, gimple_verify_flow_info, print_loop, execute_fixup_cfg): Likewise. * tree-cfgcleanup.c (cleanup_tree_cfg_1, merge_phi_nodes): Likewise. * tree-complex.c (init_dont_simulate_again, tree_lower_complex): Likewise. * tree-dfa.c (collect_dfa_stats, dump_enumerated_decls): Likewise. * tree-eh.c (execute_lower_resx, execute_lower_eh_dispatch, mark_reachable_handlers): Likewise. * tree-emutls.c (lower_emutls_function_body): Likewise. * tree-if-conv.c (main_tree_if_conversion): Likewise. * tree-inline.c (optimize_inline_calls): Likewise. * tree-into-ssa.c (rewrite_into_ssa, update_ssa): Likewise. * tree-nrv.c (tree_nrv, execute_return_slot_opt): Likewise. * tree-object-size.c (compute_object_sizes): Likewise. * tree-outof-ssa.c (eliminate_useless_phis, rewrite_trees, insert_backedge_copies, tree_profiling): Likewise. * tree-scalar-evolution.c (scev_const_prop): Likewise. * tree-sra.c (scan_function, sra_modify_function_body, propagate_dereference_distances, ipa_sra_modify_function_body, convert_callers): Likewise. * tree-ssa-ccp.c (ccp_initialize, execute_fold_all_builtins): Likewise. * tree-ssa-coalesce.c (build_ssa_conflict_graph): Likewise. create_outofssa_var_map, coalesce_partitions): Likewise. * tree-ssa-copy.c (init_copy_prop): Likewise. * tree-ssa-copyrename.c (rename_ssa_copies): Likewise. * tree-ssa-dce.c (find_obviously_necessary_stmts, eliminate_unnecessary_stmts): Likewise. * tree-ssa-dom.c (free_all_edge_infos, tree_ssa_dominator_optimize): Likewise. * tree-ssa-forwprop.c (ssa_forward_propagate_and_combine): Likewise. * tree-ssa-live.c (clear_unused_block_pointer, remove_unused_locals, new_tree_live_info, calculate_live_on_exit, dump_live_info, analyze_memory_references, fill_always_executed_in, tree_ssa_lim_finalize): Likewise. * tree-ssa-loop-manip.c (find_uses_to_rename, verify_loop_closed_ssa): Likewise. * tree-ssa-math-opts.c (execute_cse_reciprocals, execute_cse_sincos, execute_optimize_bswap, execute_optimize_widening_mul): Likewise. * tree-ssa-propagate.c (substitute_and_fold): Likewise. * tree-ssa-structalias.c (compute_points_to_sets): Likewise. * tree-ssa-tail-merge.c (find_same_succ, reset_cluster_vectors): Likewise. * tree-ssa-ter.c (find_replaceable_exprs): Likewise. * tree-ssa-threadupdate.c (thread_through_all_blocks): Likewise. * tree-ssa-uncprop.c (associate_equivalences_with_edges, tree_ssa_uncprop): Likewise. * tree-ssa-uninit.c (warn_uninitialized_vars, execute_late_warn_uninitialized): Likewise. * tree-ssa.c (verify_ssa, execute_update_addresses_taken): Likewise. * tree-stdarg.c (check_all_va_list_escapes, execute_optimize_stdarg): Likewise. * tree-switch-conversion.c (do_switchconv): Likewise. * tree-vect-generic.c (expand_vector_operations): Likewise. * tree-vectorizer.c (adjust_simduid_builtins, note_simd_array_uses, execute_vect_slp): Likewise. * tree-vrp.c (check_all_array_refs, remove_range_assertions, vrp_initialize, identify_jump_threads, instrument_memory_accesses): Likewise. * ubsan.c (ubsan_pass): Likewise. * value-prof.c (verify_histograms, gimple_value_profile_transformations, gimple_find_values_to_profile): Likewise. * var-tracking.c (vt_find_locations, dump_dataflow_sets, vt_emit_notes, vt_initialize, delete_debug_insns, vt_finalize): Likewise. gcc/testsuite/ * g++.dg/plugin/selfassign.c (execute_warn_self_assign): Eliminate use of FOR_EACH_BB in favor of FOR_EACH_BB_FN, to make use of cfun explicit. * gcc.dg/plugin/selfassign.c (execute_warn_self_assign): Likewise. From-SVN: r205828
2013-12-09 22:06:06 +01:00
FOR_EACH_BB_FN (bb, cfun)
FOR_BB_INSNS (bb, insn)
if (NONDEBUG_INSN_P (insn))
{
find_subregs_of_mode (PATTERN (insn));
df_ref def;
FOR_EACH_INSN_DEF (def, insn)
if (DF_REF_FLAGS_IS_SET (def, DF_REF_PARTIAL)
&& df_read_modify_subreg_p (DF_REF_REG (def)))
record_subregs_of_mode (DF_REF_REG (def), true);
}
}
const HARD_REG_SET *
valid_mode_changes_for_regno (unsigned int regno)
hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. 2002-11-04 Aldy Hernandez <aldyh@redhat.com> * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. * config/rs6000/rs6000.h (CLASS_CANNOT_CHANGE_MODE_P): Remove. (CLASS_CANNOT_CHANGE_MODE): Remove. (CANNOT_CHANGE_MODE_CLASS): New. * config/alpha/alpha.h: Same. * config/ia64/ia64.h: Same. * config/mips/mips.h: Same. * config/s390/s390.h: Same. * config/sh/sh.h: Same. * config/pa/pa64-regs.h: Same. * config/sh/sh-protos.h (sh_cannot_change_mode_class): Add prototype. * config/sh/sh.c (sh_cannot_change_mode_class): New. * config/mips/mips-protos.h (mips_cannot_change_mode_class): Add prototype. * config/mips/mips.c (mips_cannot_change_mode_class): New. * doc/tm.texi (Register Classes): Remove CLASS_CANNOT_CHANGE_MODE and CLASS_CANNOT_CHANGE_MODE_P. Document CANNOT_CHANGE_MODE_CLASS. * reload.c (push_reload): Use CANNOT_CHANGE_MODE_CLASS. (push_reload): Same. * simplify-rtx.c (simplify_subreg): Same. * reload1.c (choose_reload_regs): Same. * recog.c (register_operand): Same. * regrename.c (mode_change_ok): Change to use new CANNOT_CHANGE_MODE_CLASS infrastructure. * regclass.c (cannot_change_mode_set_regs): New. Declare subregs_of_mode. (regclass): Use subregs_of_mode. Remove references to reg_changes_mode. (init_reg_sets_1): Remove class_can_change_mode and reg_changes_mode code. (invalid_mode_change_p): New. (dump_regclass): Use invalid_mode_change_p instead of class_can_change_mode. (regclass): Same. (record_operand_costs): Do not set reg_changes_mode. * local-alloc.c (struct qty): Remove changes_mode field. (alloc_qty): Remove changes_mode initialization. (update_qty_class): Remove set of changes_mode. (find_free_reg): Use subregs_of_mode. * global.c (find_reg): Use subregs_of_mode info. * rtl.h (cannot_change_mode_set_regs): New prototype. (invalid_mode_change_p): Same. (REG_CANNOT_CHANGE_MODE_P): New macro. * flow.c (mark_used_regs): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. (life_analysis): Clear subregs_of_mode. * combine.c (subst): Pass class to CLASS_CANNOT_CHANGE_MODE_P. Remove use of CLASS_CANNOT_CHANGE_MODE. (simplify_set): Same. (gen_lowpart_for_combine): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. * regs.h: Add extern for subregs_of_mode; Include hard-reg-set and basic-block. (REG_CHANGES_MODE): Delete. From-SVN: r58794
2002-11-04 17:58:39 +01:00
{
return valid_mode_changes[regno];
hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. 2002-11-04 Aldy Hernandez <aldyh@redhat.com> * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. * config/rs6000/rs6000.h (CLASS_CANNOT_CHANGE_MODE_P): Remove. (CLASS_CANNOT_CHANGE_MODE): Remove. (CANNOT_CHANGE_MODE_CLASS): New. * config/alpha/alpha.h: Same. * config/ia64/ia64.h: Same. * config/mips/mips.h: Same. * config/s390/s390.h: Same. * config/sh/sh.h: Same. * config/pa/pa64-regs.h: Same. * config/sh/sh-protos.h (sh_cannot_change_mode_class): Add prototype. * config/sh/sh.c (sh_cannot_change_mode_class): New. * config/mips/mips-protos.h (mips_cannot_change_mode_class): Add prototype. * config/mips/mips.c (mips_cannot_change_mode_class): New. * doc/tm.texi (Register Classes): Remove CLASS_CANNOT_CHANGE_MODE and CLASS_CANNOT_CHANGE_MODE_P. Document CANNOT_CHANGE_MODE_CLASS. * reload.c (push_reload): Use CANNOT_CHANGE_MODE_CLASS. (push_reload): Same. * simplify-rtx.c (simplify_subreg): Same. * reload1.c (choose_reload_regs): Same. * recog.c (register_operand): Same. * regrename.c (mode_change_ok): Change to use new CANNOT_CHANGE_MODE_CLASS infrastructure. * regclass.c (cannot_change_mode_set_regs): New. Declare subregs_of_mode. (regclass): Use subregs_of_mode. Remove references to reg_changes_mode. (init_reg_sets_1): Remove class_can_change_mode and reg_changes_mode code. (invalid_mode_change_p): New. (dump_regclass): Use invalid_mode_change_p instead of class_can_change_mode. (regclass): Same. (record_operand_costs): Do not set reg_changes_mode. * local-alloc.c (struct qty): Remove changes_mode field. (alloc_qty): Remove changes_mode initialization. (update_qty_class): Remove set of changes_mode. (find_free_reg): Use subregs_of_mode. * global.c (find_reg): Use subregs_of_mode info. * rtl.h (cannot_change_mode_set_regs): New prototype. (invalid_mode_change_p): Same. (REG_CANNOT_CHANGE_MODE_P): New macro. * flow.c (mark_used_regs): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. (life_analysis): Clear subregs_of_mode. * combine.c (subst): Pass class to CLASS_CANNOT_CHANGE_MODE_P. Remove use of CLASS_CANNOT_CHANGE_MODE. (simplify_set): Same. (gen_lowpart_for_combine): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. * regs.h: Add extern for subregs_of_mode; Include hard-reg-set and basic-block. (REG_CHANGES_MODE): Delete. From-SVN: r58794
2002-11-04 17:58:39 +01:00
}
params.def (PARAM_IRA_LOOP_RESERVED_REGS): New. 2009-09-26 Vladimir Makarov <vmakarov@redhat.com> * params.def (PARAM_IRA_LOOP_RESERVED_REGS): New. * params.h (IRA_LOOP_RESERVED_REGS): New * tree-pass.h (pass_subregs_of_mode_init, pass_subregs_of_mode_finish): Remove. * passes.c (pass_subregs_of_mode_init, pass_subregs_of_mode_finish): Remove. (pass_reginfo_init): Move before loop optimizations. * config/i386/i386.h (STACK_REG_COVER_CLASS): Define. * common.opt (fira-loop-pressure): New. * toplev.h (flag_ira_loop_pressure): New. * rtl.h (init_subregs_of_mode, finish_subregs_of_mode): New externals. * reginfo.c (init_subregs_of_mode, finish_subregs_of_mode): Make external and void type functions. (gate_subregs_of_mode_init, pass_subregs_of_mode_init, pass_subregs_of_mode_finish): Remove. * ira-costs.c (init_costs): Call init_subregs_of_mode. * regmove.c: Include ira.h. (regmove_optimize): Call ira_set_pseudo_classes after IRA based register pressure calculation in loops. * loop-invariant.c: Include REGS_H and ira.h. (struct loop_data): New members max_reg_pressure, regs_ref, and regs_live. (struct invariant): New member orig_regno. (curr_loop): New variable. (find_exits): Initialize regs_ref and regs_live. (create_new_invariant): Initialize orig_regno. (get_cover_class_and_nregs): New. (get_inv_cost): Make aregs_needed an array. Use regs_needed as an array. Add code for flag_ira_loop_pressure. (gain_for_invariant): Make new_regs an array. Add code for flag_ira_loop_pressure. (best_gain_for_invariant): Ditto. (set_move_mark): New parameter gain. Use it for debugging output. (find_invariants_to_move): Make regs_needed and new_regs an array. Add code for flag_ira_loop_pressure. (move_invariant_reg): Set up orig_regno. (move_invariants): Set up reg classes for pseudos for flag_ira_loop_pressure. (free_loop_data): Clear regs_ref and regs_live. (curr_regs_live, curr_reg_pressure, regs_set, n_regs_set, get_regno_cover_class, change_pressure, mark_regno_live, mark_regno_death, mark_reg_store, mark_reg_clobber, mark_reg_death, mark_ref_regs, calculate_loop_reg_pressure): New. (move_loop_invariants): Calculate pressure. Initialize curr_loop. * ira.c (ira): Call ira_set_pseudo_classes after IRA based register pressure calculation in loops if new regs were added. Call finish_subregs_of_mode. * opts.c (decode_options): Set up flag_ira_loop_pressure. * Makefile.in (loop-invariant.o): Add ira.h. (regmove.o): Ditto. * doc/invoke.texi (-fira-loop-pressure, ira-loop-reserved-regs): Describe. * doc/tm.texi (STACK_REG_COVER_CLASS): Describe. From-SVN: r152770
2009-10-14 18:24:11 +02:00
void
finish_subregs_of_mode (void)
{
XDELETEVEC (valid_mode_changes);
obstack_free (&valid_mode_changes_obstack, NULL);
}
/* Free all data attached to the structure. This isn't a destructor because
we don't want to run on exit. */
params.def (PARAM_IRA_LOOP_RESERVED_REGS): New. 2009-09-26 Vladimir Makarov <vmakarov@redhat.com> * params.def (PARAM_IRA_LOOP_RESERVED_REGS): New. * params.h (IRA_LOOP_RESERVED_REGS): New * tree-pass.h (pass_subregs_of_mode_init, pass_subregs_of_mode_finish): Remove. * passes.c (pass_subregs_of_mode_init, pass_subregs_of_mode_finish): Remove. (pass_reginfo_init): Move before loop optimizations. * config/i386/i386.h (STACK_REG_COVER_CLASS): Define. * common.opt (fira-loop-pressure): New. * toplev.h (flag_ira_loop_pressure): New. * rtl.h (init_subregs_of_mode, finish_subregs_of_mode): New externals. * reginfo.c (init_subregs_of_mode, finish_subregs_of_mode): Make external and void type functions. (gate_subregs_of_mode_init, pass_subregs_of_mode_init, pass_subregs_of_mode_finish): Remove. * ira-costs.c (init_costs): Call init_subregs_of_mode. * regmove.c: Include ira.h. (regmove_optimize): Call ira_set_pseudo_classes after IRA based register pressure calculation in loops. * loop-invariant.c: Include REGS_H and ira.h. (struct loop_data): New members max_reg_pressure, regs_ref, and regs_live. (struct invariant): New member orig_regno. (curr_loop): New variable. (find_exits): Initialize regs_ref and regs_live. (create_new_invariant): Initialize orig_regno. (get_cover_class_and_nregs): New. (get_inv_cost): Make aregs_needed an array. Use regs_needed as an array. Add code for flag_ira_loop_pressure. (gain_for_invariant): Make new_regs an array. Add code for flag_ira_loop_pressure. (best_gain_for_invariant): Ditto. (set_move_mark): New parameter gain. Use it for debugging output. (find_invariants_to_move): Make regs_needed and new_regs an array. Add code for flag_ira_loop_pressure. (move_invariant_reg): Set up orig_regno. (move_invariants): Set up reg classes for pseudos for flag_ira_loop_pressure. (free_loop_data): Clear regs_ref and regs_live. (curr_regs_live, curr_reg_pressure, regs_set, n_regs_set, get_regno_cover_class, change_pressure, mark_regno_live, mark_regno_death, mark_reg_store, mark_reg_clobber, mark_reg_death, mark_ref_regs, calculate_loop_reg_pressure): New. (move_loop_invariants): Calculate pressure. Initialize curr_loop. * ira.c (ira): Call ira_set_pseudo_classes after IRA based register pressure calculation in loops if new regs were added. Call finish_subregs_of_mode. * opts.c (decode_options): Set up flag_ira_loop_pressure. * Makefile.in (loop-invariant.o): Add ira.h. (regmove.o): Ditto. * doc/invoke.texi (-fira-loop-pressure, ira-loop-reserved-regs): Describe. * doc/tm.texi (STACK_REG_COVER_CLASS): Describe. From-SVN: r152770
2009-10-14 18:24:11 +02:00
void
target_hard_regs::finalize ()
{
delete x_simplifiable_subregs;
}