gcc/gcc/genconditions.c

251 lines
7.0 KiB
C
Raw Permalink Normal View History

/* Process machine description and calculate constant conditions.
Copyright (C) 2001-2017 Free Software Foundation, Inc.
This file is part of GCC.
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 version.
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.
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/>. */
/* In a machine description, all of the insn patterns - define_insn,
define_expand, define_split, define_peephole, define_peephole2 -
contain an optional C expression which makes the final decision
about whether or not this pattern is usable. That expression may
turn out to be always false when the compiler is built. If it is,
most of the programs that generate code from the machine
description can simply ignore the entire pattern. */
#include "bconfig.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "rtl.h"
#include "errors.h"
Makefile.in (READ_MD_H): New variable. gcc/ * Makefile.in (READ_MD_H): New variable. (BUILD_RTL): Add build/read-md.o. (lto-wrapper.o): Depend on coretypes.h instead of defaults.h. (build/gensupport.o, build/read-rtl.o, build/genattr.o) (build/genattrtab.o, build/genconditions.o build/genemit.o) (build/genextract.o, build/genflags.o, build/genoutput.o) (build/genpreds.o, build/genrecog.o): Depend on $(READ_MD_H). (build/read-md.o): New rule. * defaults.h (obstack_chunk_alloc, obstack_chunk_free) (OBSTACK_CHUNK_SIZE, gcc_obstack_init): Move to... * coretypes.h: ...here. * lto-wrapper.c: Include coretypes.h instead of defaults.h. * pretty-print.c (obstack_chunk_alloc, obstack_chunk_free): Delete. * genattr.c: Include read-md.h. * genattrtab.c: Likewise. * genconditions.c: Likewise. * genemit.c: Likewise. * genextract.c: Likewise. * genflags.c: Likewise. * genoutput.c: Likewise. * genpreds.c: Likewise. * genrecog.c: Likewise. * rtl.h (read_skip_spaces, copy_rtx_ptr_loc, print_rtx_ptr_loc) (join_c_conditions, print_c_condition, read_rtx_filename) (read_rtx_lineno): Move to read-md.h. * read-rtl.c: Include read-md.h. (ptr_loc, string_obstack, ptr_locs, ptr_loc_obstack) (joined_conditions, joined_conditions_obstack, read_rtx_lineno) (read_rtx_filename, fatal_with_file_and_line, fatal_expected_char) (leading_ptr_hash, leading_ptr_eq_p, set_rtx_ptr_loc, get_rtx_ptr_loc) (copy_rtx_ptr_loc, print_rtx_ptr_loc, join_c_conditions) (print_c_condition, read_skip_spaces, read_escape, read_quoted_string) (read_braced_string, read_string): Move to read-md.c. (read_rtx): Move some initialization to init_md_reader and call init_md_reader here. * gensupport.h (message_with_line, n_comma_elts, scan_comma_elt): Move to read-md.h. * gensupport.c: Include read-md.h. (message_with_line, n_comma_elts, scan_comma_elt): Move to read-md.c. * read-md.h, read-md.c: New files. From-SVN: r160570
2010-06-10 22:21:23 +02:00
#include "read-md.h"
#include "gensupport.h"
/* so we can include except.h in the generated file. */
static int saw_eh_return;
static void write_header (void);
static void write_conditions (void);
static int write_one_condition (void **, void *);
/* Generate the header for insn-conditions.c. */
static void
write_header (void)
{
puts ("\
/* Generated automatically by the program `genconditions' from the target\n\
machine description file. */\n\
\n\
#include \"bconfig.h\"\n\
#define INCLUDE_STRING\n\
#include \"system.h\"\n\
\n\
/* It is necessary, but not entirely safe, to include the headers below\n\
in a generator program. As a defensive measure, don't do so when the\n\
table isn't going to have anything in it. */\n\
#if GCC_VERSION >= 3001\n\
\n\
/* Do not allow checking to confuse the issue. */\n\
#undef CHECKING_P\n\
#define CHECKING_P 0\n\
#undef ENABLE_TREE_CHECKING\n\
#undef ENABLE_RTL_CHECKING\n\
#undef ENABLE_RTL_FLAG_CHECKING\n\
#undef ENABLE_GC_CHECKING\n\
#undef ENABLE_GC_ALWAYS_COLLECT\n\
\n\
#include \"coretypes.h\"\n\
#include \"tm.h\"\n\
#include \"insn-constants.h\"\n\
#include \"rtl.h\"\n\
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\"\n\
#include \"tm_p.h\"\n\
function.h: Flatten file. 2014-10-16 Andrew MacLeod <amacleod@redhat.com> * function.h: Flatten file. Remove includes, adjust prototypes to reflect only what is in function.h. (enum direction, struct args_size, struct locate_and_pad_arg_data, ADD_PARM_SIZE, SUB_PARM_SIZE, ARGS_SIZE_TREE, ARGS_SIZE_RTX): Relocate from expr.h. (ASLK_REDUCE_ALIGN, ASLK_RECORD_PAD): Relocate from rtl.h. (optimize_function_for_size_p, optimize_function_for_speed_p): Move prototypes to predict.h. (init_varasm_status): Move prototype to varasm.h. * expr.h: Adjust include files. (enum direction, struct args_size, struct locate_and_pad_arg_data, ADD_PARM_SIZE, SUB_PARM_SIZE, ARGS_SIZE_TREE, ARGS_SIZE_RTX): Move to function.h. (locate_and_pad_parm): Move prototype to function.h. * rtl.h: (assign_stack_local, ASLK_REDUCE_ALIGN, ASLK_RECORD_PAD, assign_stack_local_1, assign_stack_temp, assign_stack_temp_for_type, assign_temp, reposition_prologue_and_epilogue_notes, prologue_epilogue_contains, sibcall_epilogue_contains, update_temp_slot_address, maybe_copy_prologue_epilogue_insn, set_return_jump_label): Move prototypes to function.h. * predict.h (optimize_function_for_size_p, optimize_function_for_speed_p): Relocate prototypes from function.h. * shrink-wrap.h (emit_return_into_block, active_insn_between, convert_jumps_to_returns, emit_return_for_exit): Move prototypes to function.h. * varasm.h (init_varasm_status): Relocate prototype from function.h. * genattrtab.c (write_header): Add predict.h to include list. * genconditions.c (write_header): Add predict.h to include list. * genemit.c (main): Adjust header file includes. * gengtype.c (ifiles): Add flattened function.h header files. * genoutput.c (output_prologue): Add predict.h to include list. * genpreds.c (write_insn_preds_c): Adjust header file includes. * genrecog.c (write_header): Add flattened function.h header files. * alias.c: Adjust include files. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgrtl.c: Likewise. * cgraph.h: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * coverage.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbxout.c: Likewise. * ddg.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dojump.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * function.c: Likewise. * gcse.c: Likewise. * gimple-fold.c: Likewise. * gimple-low.c: Likewise. * gimple-streamer.h: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lcm.c: Likewise. * loop-invariant.c: Likewise. * lra-assigns.c: Likewise. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * passes.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * profile.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regrename.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtlanal.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * statistics.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * symtab.c: Likewise. * targhooks.c: Likewise. * toplev.c: Likewise. * trans-mem.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-dfa.c: Likewise. * tree-eh.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-nested.c: Likewise. * tree-nrv.c: Likewise. * tree-profile.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.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-stdarg.c: Likewise. * tree-tailcall.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * valtrack.c: Likewise. * varasm.c: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * testsuite/g++.dg/plugin/pragma_plugin.c: Adjust include files. * config/aarch64/aarch64.c: Add flattened includes from function.h. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/arm.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: 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/h8300/h8300.c: Likewise. * config/i386/i386.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.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: 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: 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/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/rl78/rl78.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390.c: Likewise. * config/score/score.c: Likewise. * config/sh/sh.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/tilegx/tilegx.c: Likewise. * config/tilepro/tilepro.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/xtensa/xtensa.c: Likewise. 2014-10-16 Andrew MacLeod <amacleod@redhat.com> * ada/gcc-interface/misc.c: Adjust include files. 2014-10-16 Andrew MacLeod <amacleod@redhat.com> * c/c-decl.c: Adjust include files. 2014-10-16 Andrew MacLeod <amacleod@redhat.com> * c-family/c-pragma.c: Adjust include files. * c-family/c-semantics.c: Likewise. 2014-10-16 Andrew MacLeod <amacleod@redhat.com> * cp/cp-tree.h: Adjust include files. 2014-10-16 Andrew MacLeod <amacleod@redhat.com> * fortran/f95-lang.c: Adjust include files. * fortran/trans-decl.c: Likewise. 2014-10-16 Andrew MacLeod <amacleod@redhat.com> * java/class.c: Adjust include files. * java/resource.c: Likewise. 2014-10-16 Andrew MacLeod <amacleod@redhat.com> * objc/objc-act.c: Adjust include files. From-SVN: r216337
2014-10-16 18:37:19 +02:00
#include \"hard-reg-set.h\"\n\
#include \"function.h\"\n\
#include \"emit-rtl.h\"\n\
\n\
/* Fake - insn-config.h doesn't exist yet. */\n\
#define MAX_RECOG_OPERANDS 10\n\
#define MAX_DUP_OPERANDS 10\n\
#define MAX_INSNS_PER_SPLIT 5\n\
\n\
#include \"regs.h\"\n\
#include \"recog.h\"\n\
#include \"output.h\"\n\
#include \"flags.h\"\n\
#include \"hard-reg-set.h\"\n\
ggcplug.c: Shuffle includes to include gcc-plugin.h earlier. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * testsuite/gcc.dg/plugin/ggcplug.c: Shuffle includes to include gcc-plugin.h earlier. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * c/c-typeck.c: Adjust include files. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * c-family/c-gimplify.c: Adjust include files. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * cp/cp-gimplify.c: Adjust include files. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * go/go-gcc.cc: Adjust include files. * go/go-lang.c: Ditto. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * java/java-gimplify.c: Adjust include files. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * lto/lto-lang.c: Adjust include files. * lto/lto-object.c: Ditto. * lto/lto-partition.c: Ditto. * lto/lto-symtab.c: Ditto. * lto/lto.c: Ditto. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * basic-block.h: Remove all includes. (enum profile_status_d, struct control_flow_graph): Move to cfg.h * cfg.h (profile_status_d, struct control_flow_graph): Relocate here. * Makefile.in (GTFILES): Add cfg.h to list. * cgraph.h (symbol_table::create_empty): Move to cgraph.c. * cgraph.c (symbol_table::create_empty): Relocate from cgraph.h. * genconditions.c (write_header): Add predict.h and basic-block.h to lits of includes. * genemit.c (main): Ditto. * genpreds.c (write_insn_preds_c): Ditto. * genrecog.c (write_header): Ditto. * gengtype.c (open_base_files): Add predict.h, basic-block.h, and cfg.h to list of includes. * alias.c: Adjust include files. * asan.c: Ditto. * auto-inc-dec.c: Ditto. * auto-profile.c: Ditto. * bb-reorder.c: Ditto. * bt-load.c: Ditto. * builtins.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfganal.c: Ditto. * cfgbuild.c: Ditto. * cfgcleanup.c: Ditto. * cfgexpand.c: Ditto. * cfghooks.c: Ditto. * cfgloop.c: Ditto. * cfgloopanal.c: Ditto. * cfgloopmanip.c: Ditto. * cfgrtl.c: Ditto. * cgraphbuild.c: Ditto. * cgraphclones.c: Ditto. * cgraphunit.c: Ditto. * combine-stack-adj.c: Ditto. * combine.c: Ditto. * compare-elim.c: Ditto. * coverage.c: Ditto. * cprop.c: Ditto. * cse.c: Ditto. * cselib.c: Ditto. * data-streamer-in.c: Ditto. * data-streamer-out.c: Ditto. * data-streamer.c: Ditto. * dce.c: Ditto. * ddg.c: Ditto. * ddg.h: Ditto. * df-core.c: Ditto. * df-problems.c: Ditto. * df-scan.c: Ditto. * df.h: Ditto. * dojump.c: Ditto. * dominance.c: Ditto. * domwalk.c: Ditto. * dse.c: Ditto. * dwarf2cfi.c: Ditto. * emit-rtl.c: Ditto. * et-forest.c: Ditto. * except.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * fwprop.c: Ditto. * gcc-plugin.h: Ditto. * gcse.c: Ditto. * generic-match-head.c: Ditto. * ggc-page.c: Ditto. * gimple-builder.c: Ditto. * gimple-expr.c: Ditto. * gimple-fold.c: Ditto. * gimple-iterator.c: Ditto. * gimple-low.c: Ditto. * gimple-match-head.c: Ditto. * gimple-pretty-print.c: Ditto. * gimple-ssa-isolate-paths.c: Ditto. * gimple-ssa-strength-reduction.c: Ditto. * gimple-streamer-in.c: Ditto. * gimple-streamer-out.c: Ditto. * gimple-streamer.h: Ditto. * gimple-walk.c: Ditto. * gimple.c: Ditto. * gimplify-me.c: Ditto. * gimplify.c: Ditto. * graph.c: Ditto. * graphite-blocking.c: Ditto. * graphite-clast-to-gimple.c: Ditto. * graphite-dependences.c: Ditto. * graphite-interchange.c: Ditto. * graphite-isl-ast-to-gimple.c: Ditto. * graphite-optimize-isl.c: Ditto. * graphite-poly.c: Ditto. * graphite-scop-detection.c: Ditto. * graphite-sese-to-poly.c: Ditto. * graphite.c: Ditto. * haifa-sched.c: Ditto. * hw-doloop.c: Ditto. * ifcvt.c: Ditto. * init-regs.c: Ditto. * internal-fn.c: Ditto. * ipa-cp.c: Ditto. * ipa-devirt.c: Ditto. * ipa-icf-gimple.c: Ditto. * ipa-icf.c: Ditto. * ipa-inline-analysis.c: Ditto. * ipa-inline.c: Ditto. * ipa-polymorphic-call.c: Ditto. * ipa-profile.c: Ditto. * ipa-prop.c: Ditto. * ipa-pure-const.c: Ditto. * ipa-reference.c: Ditto. * ipa-split.c: Ditto. * ipa-utils.c: Ditto. * ipa.c: Ditto. * ira-build.c: Ditto. * ira-color.c: Ditto. * ira-conflicts.c: Ditto. * ira-costs.c: Ditto. * ira-emit.c: Ditto. * ira-lives.c: Ditto. * ira.c: Ditto. * jump.c: Ditto. * lcm.c: Ditto. * loop-doloop.c: Ditto. * loop-init.c: Ditto. * loop-invariant.c: Ditto. * loop-iv.c: Ditto. * loop-unroll.c: Ditto. * lower-subreg.c: Ditto. * lra-assigns.c: Ditto. * lra-coalesce.c: Ditto. * lra-constraints.c: Ditto. * lra-eliminations.c: Ditto. * lra-lives.c: Ditto. * lra-spills.c: Ditto. * lra.c: Ditto. * lto-cgraph.c: Ditto. * lto-compress.c: Ditto. * lto-opts.c: Ditto. * lto-section-in.c: Ditto. * lto-section-out.c: Ditto. * lto-streamer-in.c: Ditto. * lto-streamer-out.c: Ditto. * lto-streamer.c: Ditto. * mcf.c: Ditto. * mode-switching.c: Ditto. * modulo-sched.c: Ditto. * omp-low.c: Ditto. * optabs.c: Ditto. * opts-global.c: Ditto. * passes.c: Ditto. * postreload-gcse.c: Ditto. * postreload.c: Ditto. * predict.c: Ditto. * print-rtl.c: Ditto. * profile.c: Ditto. * recog.c: Ditto. * ree.c: Ditto. * reg-stack.c: Ditto. * regcprop.c: Ditto. * regcprop.h: Ditto. * reginfo.c: Ditto. * regrename.c: Ditto. * regstat.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtlanal.c: Ditto. * sched-deps.c: Ditto. * sched-ebb.c: Ditto. * sched-int.h: Ditto. * sched-rgn.c: Ditto. * sched-vis.c: Ditto. * sel-sched-dump.c: Ditto. * sel-sched-ir.c: Ditto. * sel-sched-ir.h: Ditto. * sel-sched.c: Ditto. * sese.c: Ditto. * shrink-wrap.c: Ditto. * stack-ptr-mod.c: Ditto. * stmt.c: Ditto. * store-motion.c: Ditto. * symtab.c: Ditto. * toplev.c: Ditto. * tracer.c: Ditto. * trans-mem.c: Ditto. * tree-affine.c: Ditto. * tree-call-cdce.c: Ditto. * tree-cfg.c: Ditto. * tree-cfgcleanup.c: Ditto. * tree-chrec.c: Ditto. * tree-complex.c: Ditto. * tree-data-ref.c: Ditto. * tree-dfa.c: Ditto. * tree-eh.c: Ditto. * tree-emutls.c: Ditto. * tree-if-conv.c: Ditto. * tree-inline.c: Ditto. * tree-into-ssa.c: Ditto. * tree-loop-distribution.c: Ditto. * tree-nested.c: Ditto. * tree-nrv.c: Ditto. * tree-object-size.c: Ditto. * tree-outof-ssa.c: Ditto. * tree-parloops.c: Ditto. * tree-phinodes.c: Ditto. * tree-predcom.c: Ditto. * tree-pretty-print.c: Ditto. * tree-profile.c: Ditto. * tree-scalar-evolution.c: Ditto. * tree-sra.c: Ditto. * tree-ssa-address.c: Ditto. * tree-ssa-alias.c: Ditto. * tree-ssa-ccp.c: Ditto. * tree-ssa-coalesce.c: Ditto. * tree-ssa-copy.c: Ditto. * tree-ssa-copyrename.c: Ditto. * tree-ssa-dce.c: Ditto. * tree-ssa-dom.c: Ditto. * tree-ssa-dse.c: Ditto. * tree-ssa-forwprop.c: Ditto. * tree-ssa-ifcombine.c: Ditto. * tree-ssa-live.c: Ditto. * tree-ssa-loop-ch.c: Ditto. * tree-ssa-loop-im.c: Ditto. * tree-ssa-loop-ivcanon.c: Ditto. * tree-ssa-loop-ivopts.c: Ditto. * tree-ssa-loop-manip.c: Ditto. * tree-ssa-loop-niter.c: Ditto. * tree-ssa-loop-prefetch.c: Ditto. * tree-ssa-loop-unswitch.c: Ditto. * tree-ssa-loop.c: Ditto. * tree-ssa-math-opts.c: Ditto. * tree-ssa-operands.c: Ditto. * tree-ssa-phiopt.c: Ditto. * tree-ssa-phiprop.c: Ditto. * tree-ssa-pre.c: Ditto. * tree-ssa-propagate.c: Ditto. * tree-ssa-reassoc.c: Ditto. * tree-ssa-sccvn.c: Ditto. * tree-ssa-sink.c: Ditto. * tree-ssa-strlen.c: Ditto. * tree-ssa-structalias.c: Ditto. * tree-ssa-tail-merge.c: Ditto. * tree-ssa-ter.c: Ditto. * tree-ssa-threadedge.c: Ditto. * tree-ssa-threadupdate.c: Ditto. * tree-ssa-uncprop.c: Ditto. * tree-ssa-uninit.c: Ditto. * tree-ssa.c: Ditto. * tree-ssanames.c: Ditto. * tree-stdarg.c: Ditto. * tree-streamer-in.c: Ditto. * tree-streamer-out.c: Ditto. * tree-streamer.c: Ditto. * tree-switch-conversion.c: Ditto. * tree-tailcall.c: Ditto. * tree-vect-data-refs.c: Ditto. * tree-vect-generic.c: Ditto. * tree-vect-loop-manip.c: Ditto. * tree-vect-loop.c: Ditto. * tree-vect-patterns.c: Ditto. * tree-vect-slp.c: Ditto. * tree-vect-stmts.c: Ditto. * tree-vectorizer.c: Ditto. * tree-vrp.c: Ditto. * tree.c: Ditto. * tsan.c: Ditto. * ubsan.c: Ditto. * valtrack.c: Ditto. * valtrack.h: Ditto. * value-prof.c: Ditto. * var-tracking.c: Ditto. * varasm.c: Ditto. * varpool.c: Ditto. * vtable-verify.c: Ditto. * web.c: Ditto. * config/aarch64/aarch64-builtins.c: Ditto. * config/aarch64/aarch64.c: Ditto. * config/alpha/alpha.c: Ditto. * config/arc/arc.c: Ditto. * config/arm/arm.c: Ditto. * config/avr/avr.c: Ditto. * config/bfin/bfin.c: Ditto. * config/c6x/c6x.c: Ditto. * config/cr16/cr16.c: Ditto. * config/cris/cris.c: Ditto. * config/darwin-c.c: Ditto. * config/darwin.c: Ditto. * config/epiphany/epiphany.c: Ditto. * config/epiphany/mode-switch-use.c: Ditto. * config/epiphany/resolve-sw-modes.c: Ditto. * config/fr30/fr30.c: Ditto. * config/frv/frv.c: Ditto. * config/h8300/h8300.c: Ditto. * config/i386/i386.c: Ditto. * config/i386/winnt.c: Ditto. * config/ia64/ia64.c: Ditto. * config/iq2000/iq2000.c: Ditto. * config/lm32/lm32.c: Ditto. * config/m32c/m32c.c: Ditto. * config/m32r/m32r.c: Ditto. * config/m68k/m68k.c: Ditto. * config/mcore/mcore.c: Ditto. * config/mep/mep.c: Ditto. * config/microblaze/microblaze.c: Ditto. * config/mips/mips.c: Ditto. * config/mmix/mmix.c: Ditto. * config/mn10300/mn10300.c: Ditto. * config/moxie/moxie.c: Ditto. * config/msp430/msp430.c: Ditto. * config/nds32/nds32-cost.c: Ditto. * config/nds32/nds32-fp-as-gp.c: Ditto. * config/nds32/nds32-intrinsic.c: Ditto. * config/nds32/nds32-isr.c: Ditto. * config/nds32/nds32-md-auxiliary.c: Ditto. * config/nds32/nds32-memory-manipulation.c: Ditto. * config/nds32/nds32-pipelines-auxiliary.c: Ditto. * config/nds32/nds32-predicates.c: Ditto. * config/nds32/nds32.c: Ditto. * config/nios2/nios2.c: Ditto. * config/pa/pa.c: Ditto. * config/pdp11/pdp11.c: Ditto. * config/rl78/rl78.c: Ditto. * config/rs6000/rs6000.c: Ditto. * config/rx/rx.c: Ditto. * config/s390/s390.c: Ditto. * config/sh/sh-mem.cc: Ditto. * config/sh/sh.c: Ditto. * config/sh/sh_optimize_sett_clrt.cc: Ditto. * config/sh/sh_treg_combine.cc: Ditto. * config/sparc/sparc.c: Ditto. * config/spu/spu.c: Ditto. * config/stormy16/stormy16.c: Ditto. * config/tilegx/tilegx.c: Ditto. * config/tilepro/tilepro.c: Ditto. * config/v850/v850.c: Ditto. * config/vax/vax.c: Ditto. * config/xtensa/xtensa.c: Ditto. From-SVN: r216735
2014-10-27 13:41:01 +01:00
#include \"predict.h\"\n\
#include \"basic-block.h\"\n\
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 \"bitmap.h\"\n\
#include \"df.h\"\n\
#include \"resource.h\"\n\
#include \"diagnostic-core.h\"\n\
#include \"reload.h\"\n\
#include \"tm-constrs.h\"\n");
if (saw_eh_return)
puts ("#define HAVE_eh_return 1");
puts ("#include \"except.h\"\n");
puts ("\
/* Dummy external declarations. */\n\
Use rtx_insn internally within generated functions 2014-08-21 David Malcolm <dmalcolm@redhat.com> * recog.h (insn_output_fn): Update this function typedef to match the changes below to the generated output functions, strengthening the 2nd param from rtx to rtx_insn *. * final.c (get_insn_template): Add a checked cast to rtx_insn * on insn when invoking an output function, to match the new signature of insn_output_fn with a stronger second param. * genconditions.c (write_header): In the generated code for gencondmd.c, strengthen the global "insn" from rtx to rtx_insn * to match the other changes in this patch. * genemit.c (gen_split): Strengthen the 1st param "curr_insn" of the generated "gen_" functions from rtx to rtx_insn * within their implementations. * genrecog.c (write_subroutine): Strengthen the 2nd param "insn" of the subfunctions within the generated "recog_", "split", "peephole2" function trees from rtx to rtx_insn *. For now, the top-level generated functions ("recog", "split", "peephole2") continue to take a plain rtx for "insn", to avoid introducing dependencies on other patches. Rename this 2nd param from "insn" to "uncast_insn", and reintroduce "insn" as a local variable of type rtx_insn *, initialized at the top of the generated function with a checked cast on "uncast_insn". (make_insn_sequence): Strengthen the 1st param "curr_insn" of the generated "gen_" functions from rtx to rtx_insn * within their prototypes. * genoutput.c (process_template): Strengthen the 2nd param within the generated "output_" functions "insn" from rtx to rtx_insn *. From-SVN: r214257
2014-08-21 09:49:28 +02:00
extern rtx_insn *insn;\n\
extern rtx ins1;\n\
extern rtx operands[];\n\
\n\
#endif /* gcc >= 3.0.1 */\n");
}
/* Write out one entry in the conditions table, using the data pointed
to by SLOT. Each entry looks like this:
{ "! optimize_size && ! TARGET_READ_MODIFY_WRITE",
__builtin_constant_p (! optimize_size && ! TARGET_READ_MODIFY_WRITE)
? (int) (! optimize_size && ! TARGET_READ_MODIFY_WRITE)
: -1) }, */
static int
write_one_condition (void **slot, void * ARG_UNUSED (dummy))
{
const struct c_test *test = * (const struct c_test **) slot;
const char *p;
read-md.c: Move various state to within class rtx_reader gcc/ChangeLog: * genattrtab.c (attr_string): Use rtx_reader_ptr for call to copy_md_ptr_loc. (gen_attr): Use rtx_reader_ptr for lookup_enum_type call. (write_test_expr): Use rtx_reader_ptr for calls to fprint_c_condition. (write_attr_value): Likewise. * genconditions.c (write_one_condition): Use rtx_reader_ptr for call to print_md_ptr_loc. (write_one_condition): Likewise for calls to print_c_condition. * genconstants.c: Include "statistics.h" and "vec.h". (main): Update for conversion to member functions. * genemit.c (emit_c_code): Use rtx_reader_ptr for call to print_md_ptr_loc. * genenums.c: Include "statistics.h" and "vec.h". (main): Update for conversion of traverse_enum_types to a method. * genmddeps.c: Include "statistics.h" and "vec.h". * genoutput.c (process_template): Use rtx_reader_ptr for call to print_md_ptr_loc. * genpreds.c (write_predicate_subfunction): Likewise. (write_predicate_expr): Likewise for calls to print_c_condition. * genrecog.c (print_test): Likewise. * gensupport.c (process_rtx): Likewise for calls to copy_md_ptr_loc and join_c_conditions. (alter_test_for_insn): Likewise for call to join_c_conditions. (process_substs_on_one_elem): Likewise. (gen_mnemonic_setattr): Update for move of string_obstack to a field of rtx_reader. (mnemonic_htab_callback): Likewise. Fix formatting. (gen_mnemonic_attr): Likewise. * gentarget-def.c (def_target_insn): Use rtx_reader_ptr for calls to print_c_condition. * read-md.c: Include "statistics.h" and "vec.h". (string_obstack): Convert this global to field "m_string_obstack" of class rtx_reader. (ptr_locs): Likewise, as "m_ptr_locs". (ptr_loc_obstack): Likewise, as "m_ptr_loc_obstack". (joined_conditions): Likewise, as "m_joined_conditions". (joined_conditions_obstack): Likewise, as "m_joined_conditions_obstack". (md_constants): Likewise, as "m_md_constants". (enum_types): Likewise, as "m_enum_types". (set_md_ptr_loc): Convert to... (rtx_reader::set_md_ptr_loc): ...member function. (get_md_ptr_loc): Convert to... (rtx_reader::get_md_ptr_loc): ...member function. (copy_md_ptr_loc): Convert to... (rtx_reader::copy_md_ptr_loc): ...member function. (fprint_md_ptr_loc): Convert to... (rtx_reader::fprint_md_ptr_loc): ...member function. (print_md_ptr_loc): Convert to... (rtx_reader::print_md_ptr_loc): ...member function. (join_c_conditions): Convert to... (rtx_reader::join_c_conditions): ...member function. (fprint_c_condition): Convert to... (rtx_reader::fprint_c_condition): ...member function. (print_c_condition): Convert to... (rtx_reader::print_c_condition): ...member function. (read_name): Convert to... (rtx_reader::read_name): ...member function. (read_escape): Convert to... (rtx_reader::read_escape): ...member function. (read_quoted_string): Convert to... (rtx_reader::read_quoted_string): ...member function. (read_braced_string): Convert to... (rtx_reader::read_braced_string): ...member function. (read_string): Convert to... (rtx_reader::read_string): ...member function. (read_skip_construct): Convert to... (rtx_reader::read_skip_construct): ...member function. (handle_constants): Convert to... (rtx_reader::handle_constants): ...member function. (traverse_md_constants): Convert to... (rtx_reader::traverse_md_constants): ...member function. (handle_enum): Convert to... (rtx_reader::handle_enum): ...member function. (lookup_enum_type): Convert to... (rtx_reader::lookup_enum_type): ...member function. (traverse_enum_types): Convert to... (rtx_reader::traverse_enum_types): ...member function. (rtx_reader::rtx_reader): Move initializations of various former global data from rtx_reader::read_md_files to here, as fields, along with the call to unlock_std_streams. (rtx_reader::~rtx_reader): Clean up m_base_dir, and clean up the new fields. (rtx_reader::read_md_files): Move initializations of various global data from here to the ctor. * read-md.h (read_name): Convert to... (rtx_reader::read_name): ...member function. (rtx_reader::read_escape): New method decl. (read_quoted_string): Convert to... (rtx_reader::read_quoted_string): ...member function. (rtx_reader::read_braced_string): New method decl. (read_string): Convert to... (rtx_reader::read_string): ...member function. (rtx_reader::read_skip_construct): New method decl. (rtx_reader::set_md_ptr_loc): New method decl. (rtx_reader::get_md_ptr_loc): New method decl. (copy_md_ptr_loc): Convert to... (rtx_reader::copy_md_ptr_loc): ...member function. (fprint_md_ptr_loc): Convert to... (rtx_reader::fprint_md_ptr_loc): ...member function. (print_md_ptr_loc): Convert to... (rtx_reader::print_md_ptr_loc): ...member function. (rtx_reader::lookup_enum_type): New method decl. (rtx_reader::traverse_enum_types): New method decl. (rtx_reader::handle_constants): New method decl. (traverse_md_constants): Convert to... (rtx_reader::traverse_md_constants): ...member function. (rtx_reader::handle_enum): New method decl. (rtx_reader::join_c_conditions): New method decl. (fprint_c_condition): Convert to... (rtx_reader::fprint_c_condition): ...member function. (print_c_condition): Convert to... (rtx_reader::print_c_condition): ...member function. (rtx_reader::apply_iterator_to_string): New method decl. (rtx_reader::copy_rtx_for_iterators): New method decl. (rtx_reader::read_conditions): New method decl. (rtx_reader::record_potential_iterator_use): New method decl. (rtx_reader::read_mapping): New method decl. (rtx_reader::read_rtx): New method decl. (rtx_reader::read_rtx_code): New method decl. (rtx_reader::read_rtx_operand): New method decl. (rtx_reader::read_nested_rtx): New method decl. (rtx_reader::read_rtx_variadic): New method decl. (rtx_reader::get_string_obstack): New method. (rtx_reader::get_md_constants): New method. (string_obstack): Convert global variable decl to... (rtx_reader::m_string_obstack): ...this new field. (rtx_reader::m_ptr_locs): New field. (rtx_reader::m_ptr_loc_obstack): New field. (rtx_reader::m_joined_conditions): New field. (rtx_reader::m_joined_conditions_obstack): New field. (rtx_reader::m_md_constants): New field. (rtx_reader::m_enum_types): New field. * read-rtl.c (apply_iterator_to_string): Convert to... (rtx_reader::apply_iterator_to_string): ...member function. (copy_rtx_for_iterators): Convert to... (rtx_reader::copy_rtx_for_iterators): ...member function. (add_condition_to_string): Use rtx_reader_ptr for calls join_c_conditions. (apply_iterators): Use rtx_reader_ptr for calls to join_c_conditions and copy_rtx_for_iterators. (read_conditions): Convert to... (rtx_reader::read_conditions): ...member function. (record_potential_iterator_use): Convert to... (rtx_reader::record_potential_iterator_use): ...member function. (read_mapping): Convert to... (rtx_reader::read_mapping): ...member function. (read_subst_mapping): Use rtx_reader_ptr for read_string call. (read_rtx): Convert to... (rtx_reader::read_rtx): ...member function. (read_rtx_code): Convert to... (rtx_reader::read_rtx_code): ...member function. (read_rtx_operand): Convert to... (rtx_reader::read_rtx_operand): ...member function. Update for move of string_obstack to a field. (read_nested_rtx): Convert to.. (rtx_reader::read_nested_rtx): ...member function. (read_rtx_variadic): Convert to.. (rtx_reader::read_rtx_variadic): ...member function. From-SVN: r241293
2016-10-18 02:19:17 +02:00
rtx_reader_ptr->print_md_ptr_loc (test->expr);
fputs (" { \"", stdout);
for (p = test->expr; *p; p++)
{
switch (*p)
{
case '\n': fputs ("\\n\\", stdout); break;
case '\\':
case '\"': putchar ('\\'); break;
default: break;
}
putchar (*p);
}
fputs ("\",\n __builtin_constant_p ", stdout);
read-md.c: Move various state to within class rtx_reader gcc/ChangeLog: * genattrtab.c (attr_string): Use rtx_reader_ptr for call to copy_md_ptr_loc. (gen_attr): Use rtx_reader_ptr for lookup_enum_type call. (write_test_expr): Use rtx_reader_ptr for calls to fprint_c_condition. (write_attr_value): Likewise. * genconditions.c (write_one_condition): Use rtx_reader_ptr for call to print_md_ptr_loc. (write_one_condition): Likewise for calls to print_c_condition. * genconstants.c: Include "statistics.h" and "vec.h". (main): Update for conversion to member functions. * genemit.c (emit_c_code): Use rtx_reader_ptr for call to print_md_ptr_loc. * genenums.c: Include "statistics.h" and "vec.h". (main): Update for conversion of traverse_enum_types to a method. * genmddeps.c: Include "statistics.h" and "vec.h". * genoutput.c (process_template): Use rtx_reader_ptr for call to print_md_ptr_loc. * genpreds.c (write_predicate_subfunction): Likewise. (write_predicate_expr): Likewise for calls to print_c_condition. * genrecog.c (print_test): Likewise. * gensupport.c (process_rtx): Likewise for calls to copy_md_ptr_loc and join_c_conditions. (alter_test_for_insn): Likewise for call to join_c_conditions. (process_substs_on_one_elem): Likewise. (gen_mnemonic_setattr): Update for move of string_obstack to a field of rtx_reader. (mnemonic_htab_callback): Likewise. Fix formatting. (gen_mnemonic_attr): Likewise. * gentarget-def.c (def_target_insn): Use rtx_reader_ptr for calls to print_c_condition. * read-md.c: Include "statistics.h" and "vec.h". (string_obstack): Convert this global to field "m_string_obstack" of class rtx_reader. (ptr_locs): Likewise, as "m_ptr_locs". (ptr_loc_obstack): Likewise, as "m_ptr_loc_obstack". (joined_conditions): Likewise, as "m_joined_conditions". (joined_conditions_obstack): Likewise, as "m_joined_conditions_obstack". (md_constants): Likewise, as "m_md_constants". (enum_types): Likewise, as "m_enum_types". (set_md_ptr_loc): Convert to... (rtx_reader::set_md_ptr_loc): ...member function. (get_md_ptr_loc): Convert to... (rtx_reader::get_md_ptr_loc): ...member function. (copy_md_ptr_loc): Convert to... (rtx_reader::copy_md_ptr_loc): ...member function. (fprint_md_ptr_loc): Convert to... (rtx_reader::fprint_md_ptr_loc): ...member function. (print_md_ptr_loc): Convert to... (rtx_reader::print_md_ptr_loc): ...member function. (join_c_conditions): Convert to... (rtx_reader::join_c_conditions): ...member function. (fprint_c_condition): Convert to... (rtx_reader::fprint_c_condition): ...member function. (print_c_condition): Convert to... (rtx_reader::print_c_condition): ...member function. (read_name): Convert to... (rtx_reader::read_name): ...member function. (read_escape): Convert to... (rtx_reader::read_escape): ...member function. (read_quoted_string): Convert to... (rtx_reader::read_quoted_string): ...member function. (read_braced_string): Convert to... (rtx_reader::read_braced_string): ...member function. (read_string): Convert to... (rtx_reader::read_string): ...member function. (read_skip_construct): Convert to... (rtx_reader::read_skip_construct): ...member function. (handle_constants): Convert to... (rtx_reader::handle_constants): ...member function. (traverse_md_constants): Convert to... (rtx_reader::traverse_md_constants): ...member function. (handle_enum): Convert to... (rtx_reader::handle_enum): ...member function. (lookup_enum_type): Convert to... (rtx_reader::lookup_enum_type): ...member function. (traverse_enum_types): Convert to... (rtx_reader::traverse_enum_types): ...member function. (rtx_reader::rtx_reader): Move initializations of various former global data from rtx_reader::read_md_files to here, as fields, along with the call to unlock_std_streams. (rtx_reader::~rtx_reader): Clean up m_base_dir, and clean up the new fields. (rtx_reader::read_md_files): Move initializations of various global data from here to the ctor. * read-md.h (read_name): Convert to... (rtx_reader::read_name): ...member function. (rtx_reader::read_escape): New method decl. (read_quoted_string): Convert to... (rtx_reader::read_quoted_string): ...member function. (rtx_reader::read_braced_string): New method decl. (read_string): Convert to... (rtx_reader::read_string): ...member function. (rtx_reader::read_skip_construct): New method decl. (rtx_reader::set_md_ptr_loc): New method decl. (rtx_reader::get_md_ptr_loc): New method decl. (copy_md_ptr_loc): Convert to... (rtx_reader::copy_md_ptr_loc): ...member function. (fprint_md_ptr_loc): Convert to... (rtx_reader::fprint_md_ptr_loc): ...member function. (print_md_ptr_loc): Convert to... (rtx_reader::print_md_ptr_loc): ...member function. (rtx_reader::lookup_enum_type): New method decl. (rtx_reader::traverse_enum_types): New method decl. (rtx_reader::handle_constants): New method decl. (traverse_md_constants): Convert to... (rtx_reader::traverse_md_constants): ...member function. (rtx_reader::handle_enum): New method decl. (rtx_reader::join_c_conditions): New method decl. (fprint_c_condition): Convert to... (rtx_reader::fprint_c_condition): ...member function. (print_c_condition): Convert to... (rtx_reader::print_c_condition): ...member function. (rtx_reader::apply_iterator_to_string): New method decl. (rtx_reader::copy_rtx_for_iterators): New method decl. (rtx_reader::read_conditions): New method decl. (rtx_reader::record_potential_iterator_use): New method decl. (rtx_reader::read_mapping): New method decl. (rtx_reader::read_rtx): New method decl. (rtx_reader::read_rtx_code): New method decl. (rtx_reader::read_rtx_operand): New method decl. (rtx_reader::read_nested_rtx): New method decl. (rtx_reader::read_rtx_variadic): New method decl. (rtx_reader::get_string_obstack): New method. (rtx_reader::get_md_constants): New method. (string_obstack): Convert global variable decl to... (rtx_reader::m_string_obstack): ...this new field. (rtx_reader::m_ptr_locs): New field. (rtx_reader::m_ptr_loc_obstack): New field. (rtx_reader::m_joined_conditions): New field. (rtx_reader::m_joined_conditions_obstack): New field. (rtx_reader::m_md_constants): New field. (rtx_reader::m_enum_types): New field. * read-rtl.c (apply_iterator_to_string): Convert to... (rtx_reader::apply_iterator_to_string): ...member function. (copy_rtx_for_iterators): Convert to... (rtx_reader::copy_rtx_for_iterators): ...member function. (add_condition_to_string): Use rtx_reader_ptr for calls join_c_conditions. (apply_iterators): Use rtx_reader_ptr for calls to join_c_conditions and copy_rtx_for_iterators. (read_conditions): Convert to... (rtx_reader::read_conditions): ...member function. (record_potential_iterator_use): Convert to... (rtx_reader::record_potential_iterator_use): ...member function. (read_mapping): Convert to... (rtx_reader::read_mapping): ...member function. (read_subst_mapping): Use rtx_reader_ptr for read_string call. (read_rtx): Convert to... (rtx_reader::read_rtx): ...member function. (read_rtx_code): Convert to... (rtx_reader::read_rtx_code): ...member function. (read_rtx_operand): Convert to... (rtx_reader::read_rtx_operand): ...member function. Update for move of string_obstack to a field. (read_nested_rtx): Convert to.. (rtx_reader::read_nested_rtx): ...member function. (read_rtx_variadic): Convert to.. (rtx_reader::read_rtx_variadic): ...member function. From-SVN: r241293
2016-10-18 02:19:17 +02:00
rtx_reader_ptr->print_c_condition (test->expr);
fputs ("\n ? (int) ", stdout);
read-md.c: Move various state to within class rtx_reader gcc/ChangeLog: * genattrtab.c (attr_string): Use rtx_reader_ptr for call to copy_md_ptr_loc. (gen_attr): Use rtx_reader_ptr for lookup_enum_type call. (write_test_expr): Use rtx_reader_ptr for calls to fprint_c_condition. (write_attr_value): Likewise. * genconditions.c (write_one_condition): Use rtx_reader_ptr for call to print_md_ptr_loc. (write_one_condition): Likewise for calls to print_c_condition. * genconstants.c: Include "statistics.h" and "vec.h". (main): Update for conversion to member functions. * genemit.c (emit_c_code): Use rtx_reader_ptr for call to print_md_ptr_loc. * genenums.c: Include "statistics.h" and "vec.h". (main): Update for conversion of traverse_enum_types to a method. * genmddeps.c: Include "statistics.h" and "vec.h". * genoutput.c (process_template): Use rtx_reader_ptr for call to print_md_ptr_loc. * genpreds.c (write_predicate_subfunction): Likewise. (write_predicate_expr): Likewise for calls to print_c_condition. * genrecog.c (print_test): Likewise. * gensupport.c (process_rtx): Likewise for calls to copy_md_ptr_loc and join_c_conditions. (alter_test_for_insn): Likewise for call to join_c_conditions. (process_substs_on_one_elem): Likewise. (gen_mnemonic_setattr): Update for move of string_obstack to a field of rtx_reader. (mnemonic_htab_callback): Likewise. Fix formatting. (gen_mnemonic_attr): Likewise. * gentarget-def.c (def_target_insn): Use rtx_reader_ptr for calls to print_c_condition. * read-md.c: Include "statistics.h" and "vec.h". (string_obstack): Convert this global to field "m_string_obstack" of class rtx_reader. (ptr_locs): Likewise, as "m_ptr_locs". (ptr_loc_obstack): Likewise, as "m_ptr_loc_obstack". (joined_conditions): Likewise, as "m_joined_conditions". (joined_conditions_obstack): Likewise, as "m_joined_conditions_obstack". (md_constants): Likewise, as "m_md_constants". (enum_types): Likewise, as "m_enum_types". (set_md_ptr_loc): Convert to... (rtx_reader::set_md_ptr_loc): ...member function. (get_md_ptr_loc): Convert to... (rtx_reader::get_md_ptr_loc): ...member function. (copy_md_ptr_loc): Convert to... (rtx_reader::copy_md_ptr_loc): ...member function. (fprint_md_ptr_loc): Convert to... (rtx_reader::fprint_md_ptr_loc): ...member function. (print_md_ptr_loc): Convert to... (rtx_reader::print_md_ptr_loc): ...member function. (join_c_conditions): Convert to... (rtx_reader::join_c_conditions): ...member function. (fprint_c_condition): Convert to... (rtx_reader::fprint_c_condition): ...member function. (print_c_condition): Convert to... (rtx_reader::print_c_condition): ...member function. (read_name): Convert to... (rtx_reader::read_name): ...member function. (read_escape): Convert to... (rtx_reader::read_escape): ...member function. (read_quoted_string): Convert to... (rtx_reader::read_quoted_string): ...member function. (read_braced_string): Convert to... (rtx_reader::read_braced_string): ...member function. (read_string): Convert to... (rtx_reader::read_string): ...member function. (read_skip_construct): Convert to... (rtx_reader::read_skip_construct): ...member function. (handle_constants): Convert to... (rtx_reader::handle_constants): ...member function. (traverse_md_constants): Convert to... (rtx_reader::traverse_md_constants): ...member function. (handle_enum): Convert to... (rtx_reader::handle_enum): ...member function. (lookup_enum_type): Convert to... (rtx_reader::lookup_enum_type): ...member function. (traverse_enum_types): Convert to... (rtx_reader::traverse_enum_types): ...member function. (rtx_reader::rtx_reader): Move initializations of various former global data from rtx_reader::read_md_files to here, as fields, along with the call to unlock_std_streams. (rtx_reader::~rtx_reader): Clean up m_base_dir, and clean up the new fields. (rtx_reader::read_md_files): Move initializations of various global data from here to the ctor. * read-md.h (read_name): Convert to... (rtx_reader::read_name): ...member function. (rtx_reader::read_escape): New method decl. (read_quoted_string): Convert to... (rtx_reader::read_quoted_string): ...member function. (rtx_reader::read_braced_string): New method decl. (read_string): Convert to... (rtx_reader::read_string): ...member function. (rtx_reader::read_skip_construct): New method decl. (rtx_reader::set_md_ptr_loc): New method decl. (rtx_reader::get_md_ptr_loc): New method decl. (copy_md_ptr_loc): Convert to... (rtx_reader::copy_md_ptr_loc): ...member function. (fprint_md_ptr_loc): Convert to... (rtx_reader::fprint_md_ptr_loc): ...member function. (print_md_ptr_loc): Convert to... (rtx_reader::print_md_ptr_loc): ...member function. (rtx_reader::lookup_enum_type): New method decl. (rtx_reader::traverse_enum_types): New method decl. (rtx_reader::handle_constants): New method decl. (traverse_md_constants): Convert to... (rtx_reader::traverse_md_constants): ...member function. (rtx_reader::handle_enum): New method decl. (rtx_reader::join_c_conditions): New method decl. (fprint_c_condition): Convert to... (rtx_reader::fprint_c_condition): ...member function. (print_c_condition): Convert to... (rtx_reader::print_c_condition): ...member function. (rtx_reader::apply_iterator_to_string): New method decl. (rtx_reader::copy_rtx_for_iterators): New method decl. (rtx_reader::read_conditions): New method decl. (rtx_reader::record_potential_iterator_use): New method decl. (rtx_reader::read_mapping): New method decl. (rtx_reader::read_rtx): New method decl. (rtx_reader::read_rtx_code): New method decl. (rtx_reader::read_rtx_operand): New method decl. (rtx_reader::read_nested_rtx): New method decl. (rtx_reader::read_rtx_variadic): New method decl. (rtx_reader::get_string_obstack): New method. (rtx_reader::get_md_constants): New method. (string_obstack): Convert global variable decl to... (rtx_reader::m_string_obstack): ...this new field. (rtx_reader::m_ptr_locs): New field. (rtx_reader::m_ptr_loc_obstack): New field. (rtx_reader::m_joined_conditions): New field. (rtx_reader::m_joined_conditions_obstack): New field. (rtx_reader::m_md_constants): New field. (rtx_reader::m_enum_types): New field. * read-rtl.c (apply_iterator_to_string): Convert to... (rtx_reader::apply_iterator_to_string): ...member function. (copy_rtx_for_iterators): Convert to... (rtx_reader::copy_rtx_for_iterators): ...member function. (add_condition_to_string): Use rtx_reader_ptr for calls join_c_conditions. (apply_iterators): Use rtx_reader_ptr for calls to join_c_conditions and copy_rtx_for_iterators. (read_conditions): Convert to... (rtx_reader::read_conditions): ...member function. (record_potential_iterator_use): Convert to... (rtx_reader::record_potential_iterator_use): ...member function. (read_mapping): Convert to... (rtx_reader::read_mapping): ...member function. (read_subst_mapping): Use rtx_reader_ptr for read_string call. (read_rtx): Convert to... (rtx_reader::read_rtx): ...member function. (read_rtx_code): Convert to... (rtx_reader::read_rtx_code): ...member function. (read_rtx_operand): Convert to... (rtx_reader::read_rtx_operand): ...member function. Update for move of string_obstack to a field. (read_nested_rtx): Convert to.. (rtx_reader::read_nested_rtx): ...member function. (read_rtx_variadic): Convert to.. (rtx_reader::read_rtx_variadic): ...member function. From-SVN: r241293
2016-10-18 02:19:17 +02:00
rtx_reader_ptr->print_c_condition (test->expr);
fputs ("\n : -1 },\n", stdout);
return 1;
}
/* Write out the complete conditions table, its size, and a flag
indicating that gensupport.c can now do insn elision. */
static void
write_conditions (void)
{
puts ("\
/* Structure definition duplicated from gensupport.h rather than\n\
drag in that file and its dependencies. */\n\
struct c_test\n\
{\n\
const char *expr;\n\
int value;\n\
};\n\
\n\
/* This table lists each condition found in the machine description.\n\
Each condition is mapped to its truth value (0 or 1), or -1 if that\n\
cannot be calculated at compile time.\n\
If we don't have __builtin_constant_p, or it's not acceptable in array\n\
r110123@banpei: zack | 2006-01-22 14:44:34 -0800 r110123@banpei: zack | 2006-01-22 14:44:34 -0800 * genconditions.c (condition_table, add_condition): Delete. (write_conditions): Don't emit n_insn_conditions nor insn_elision_unavailable. Issue the gcc version #ifdef here, inside the table, with no #else clause ... (write_header): ...not here. (write_writer): New function. (main): Don't initialize condition_table. Use add_c_test. Call write_writer. * gensupport.c (init_md_reader_args_cb): Handle multiple input files on the command line. (maybe_eval_c_test): Don't check insn_elision_unavailable. Return -1 if there is no entry in the table, don't abort. (add_c_test, traverse_c_tests): New functions. * gensupport.h (insn_elision_unavailable, insn_conditions) (n_insn_conditions): Delete declarations. (add_c_test, traverse_c_tests): Declare. * read-rtl.c: Include gensupport.h. (read_conditions): New function. (read_rtx): If read_rtx_1 returns 0, treat as EOF. (read_rtx_1): If we get EOF when we were looking for an initial open paren, return 0. Call read_conditions when appropriate. * Makefile.in: Kill BUILD_EARLY_SUPPORT and all references to dummy-conditions.o. Eliminate references to insn-conditions.o, or change them to build/gencondmd.o, as appropriate. Remove insn-constants.h from $(simple_generated_h) and insn-conditions.c from $(simple_generated_c). For all files remaining in those two lists, add insn-conditions.md to the generator command line. Give insn-constants.h/s-constants their own rules. Add rules for build/gencondmd.c, s-conditions, insn-conditions.md, s-condmd. (build/read-rtl.o): Depend on gensupport.h. (genprognormal): Include preds. (genprogearly): Rename genprognoprint; only difference is now that they don't link with $(BUILD_PRINT). * dummy-conditions.c: Delete. From-SVN: r110119
2006-01-23 16:15:05 +01:00
initializers, fall back to assuming that all conditions potentially\n\
vary at run time. It works in 3.0.1 and later; 3.0 only when not\n\
optimizing. */\n\
\n\
#if GCC_VERSION >= 3001\n\
static const struct c_test insn_conditions[] = {\n");
r110123@banpei: zack | 2006-01-22 14:44:34 -0800 r110123@banpei: zack | 2006-01-22 14:44:34 -0800 * genconditions.c (condition_table, add_condition): Delete. (write_conditions): Don't emit n_insn_conditions nor insn_elision_unavailable. Issue the gcc version #ifdef here, inside the table, with no #else clause ... (write_header): ...not here. (write_writer): New function. (main): Don't initialize condition_table. Use add_c_test. Call write_writer. * gensupport.c (init_md_reader_args_cb): Handle multiple input files on the command line. (maybe_eval_c_test): Don't check insn_elision_unavailable. Return -1 if there is no entry in the table, don't abort. (add_c_test, traverse_c_tests): New functions. * gensupport.h (insn_elision_unavailable, insn_conditions) (n_insn_conditions): Delete declarations. (add_c_test, traverse_c_tests): Declare. * read-rtl.c: Include gensupport.h. (read_conditions): New function. (read_rtx): If read_rtx_1 returns 0, treat as EOF. (read_rtx_1): If we get EOF when we were looking for an initial open paren, return 0. Call read_conditions when appropriate. * Makefile.in: Kill BUILD_EARLY_SUPPORT and all references to dummy-conditions.o. Eliminate references to insn-conditions.o, or change them to build/gencondmd.o, as appropriate. Remove insn-constants.h from $(simple_generated_h) and insn-conditions.c from $(simple_generated_c). For all files remaining in those two lists, add insn-conditions.md to the generator command line. Give insn-constants.h/s-constants their own rules. Add rules for build/gencondmd.c, s-conditions, insn-conditions.md, s-condmd. (build/read-rtl.o): Depend on gensupport.h. (genprognormal): Include preds. (genprogearly): Rename genprognoprint; only difference is now that they don't link with $(BUILD_PRINT). * dummy-conditions.c: Delete. From-SVN: r110119
2006-01-23 16:15:05 +01:00
traverse_c_tests (write_one_condition, 0);
puts ("\n};\n#endif /* gcc >= 3.0.1 */\n");
r110123@banpei: zack | 2006-01-22 14:44:34 -0800 r110123@banpei: zack | 2006-01-22 14:44:34 -0800 * genconditions.c (condition_table, add_condition): Delete. (write_conditions): Don't emit n_insn_conditions nor insn_elision_unavailable. Issue the gcc version #ifdef here, inside the table, with no #else clause ... (write_header): ...not here. (write_writer): New function. (main): Don't initialize condition_table. Use add_c_test. Call write_writer. * gensupport.c (init_md_reader_args_cb): Handle multiple input files on the command line. (maybe_eval_c_test): Don't check insn_elision_unavailable. Return -1 if there is no entry in the table, don't abort. (add_c_test, traverse_c_tests): New functions. * gensupport.h (insn_elision_unavailable, insn_conditions) (n_insn_conditions): Delete declarations. (add_c_test, traverse_c_tests): Declare. * read-rtl.c: Include gensupport.h. (read_conditions): New function. (read_rtx): If read_rtx_1 returns 0, treat as EOF. (read_rtx_1): If we get EOF when we were looking for an initial open paren, return 0. Call read_conditions when appropriate. * Makefile.in: Kill BUILD_EARLY_SUPPORT and all references to dummy-conditions.o. Eliminate references to insn-conditions.o, or change them to build/gencondmd.o, as appropriate. Remove insn-constants.h from $(simple_generated_h) and insn-conditions.c from $(simple_generated_c). For all files remaining in those two lists, add insn-conditions.md to the generator command line. Give insn-constants.h/s-constants their own rules. Add rules for build/gencondmd.c, s-conditions, insn-conditions.md, s-condmd. (build/read-rtl.o): Depend on gensupport.h. (genprognormal): Include preds. (genprogearly): Rename genprognoprint; only difference is now that they don't link with $(BUILD_PRINT). * dummy-conditions.c: Delete. From-SVN: r110119
2006-01-23 16:15:05 +01:00
}
r110123@banpei: zack | 2006-01-22 14:44:34 -0800 r110123@banpei: zack | 2006-01-22 14:44:34 -0800 * genconditions.c (condition_table, add_condition): Delete. (write_conditions): Don't emit n_insn_conditions nor insn_elision_unavailable. Issue the gcc version #ifdef here, inside the table, with no #else clause ... (write_header): ...not here. (write_writer): New function. (main): Don't initialize condition_table. Use add_c_test. Call write_writer. * gensupport.c (init_md_reader_args_cb): Handle multiple input files on the command line. (maybe_eval_c_test): Don't check insn_elision_unavailable. Return -1 if there is no entry in the table, don't abort. (add_c_test, traverse_c_tests): New functions. * gensupport.h (insn_elision_unavailable, insn_conditions) (n_insn_conditions): Delete declarations. (add_c_test, traverse_c_tests): Declare. * read-rtl.c: Include gensupport.h. (read_conditions): New function. (read_rtx): If read_rtx_1 returns 0, treat as EOF. (read_rtx_1): If we get EOF when we were looking for an initial open paren, return 0. Call read_conditions when appropriate. * Makefile.in: Kill BUILD_EARLY_SUPPORT and all references to dummy-conditions.o. Eliminate references to insn-conditions.o, or change them to build/gencondmd.o, as appropriate. Remove insn-constants.h from $(simple_generated_h) and insn-conditions.c from $(simple_generated_c). For all files remaining in those two lists, add insn-conditions.md to the generator command line. Give insn-constants.h/s-constants their own rules. Add rules for build/gencondmd.c, s-conditions, insn-conditions.md, s-condmd. (build/read-rtl.o): Depend on gensupport.h. (genprognormal): Include preds. (genprogearly): Rename genprognoprint; only difference is now that they don't link with $(BUILD_PRINT). * dummy-conditions.c: Delete. From-SVN: r110119
2006-01-23 16:15:05 +01:00
/* Emit code which will convert the C-format table to a
(define_conditions) form, which the MD reader can understand.
The result will be added to the set of files scanned by
'downstream' generators. */
static void
write_writer (void)
{
puts ("int\n"
"main(void)\n"
"{\n"
" unsigned int i;\n"
" const char *p;\n"
" puts (\"(define_conditions [\");\n"
"#if GCC_VERSION >= 3001\n"
" for (i = 0; i < ARRAY_SIZE (insn_conditions); i++)\n"
" {\n"
" printf (\" (%d \\\"\", insn_conditions[i].value);\n"
" for (p = insn_conditions[i].expr; *p; p++)\n"
" {\n"
" switch (*p)\n"
" {\n"
" case '\\\\':\n"
" case '\\\"': putchar ('\\\\'); break;\n"
" default: break;\n"
" }\n"
" putchar (*p);\n"
" }\n"
" puts (\"\\\")\");\n"
" }\n"
"#endif /* gcc >= 3.0.1 */\n"
" puts (\"])\");\n"
" fflush (stdout);\n"
"return ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE;\n"
"}");
}
int
main (int argc, const char **argv)
{
progname = "genconditions";
Makefile.in (build/genmddeps.o): Depend on $(READ_MD_H). gcc/ * Makefile.in (build/genmddeps.o): Depend on $(READ_MD_H). * genmddeps.c: Include read-md.h. (main): Call init_rtx_reader_args instead of init_md_reader_args. * genattr.c (main): Likewise. * genattrtab.c (main): Likewise. * genautomata.c (main): Likewise. * gencodes.c (main): Likewise. * genconditions.c (main): Likewise. * genconfig.c (main): Likewise. * genconstants.c (main): Likewise. * genemit.c (main): Likewise. * genextract.c (main): Likewise. * genflags.c (main): Likewise. * genopinit.c (main): Likewise. * genoutput.c (main): Likewise. * genpeep.c (main): Likewise. * genrecog.c (main): Likewise. * genpreds.c (main): Likewise. * gensupport.h (in_fname): Move to read-md.h. (init_md_reader_args_cb): Rename to... (init_rtx_reader_args_cb): ...this and return a bool. (init_md_reader_args): Rename to... (init_rtx_reader_args): ...this and return a bool. (include_callback): Move to read-md.h. * gensupport.c (in_fname, include_callback, base_dir, max_include_len) (file_name_list, first_dir_md_include): Move to read-md.c (first_bracket_include): Delete unused variable. (last_dir_md_include): Move to read-md.c. (process_include): Delete, moving code to read-md.c:handle_include. (process_rtx): Don't handle INCLUDE. (save_string): Delete. (rtx_handle_directive): New function. (init_md_reader_args_cb): Rename to... (init_rtx_reader_args_cb): ...this and return a boolean success value. Use read_md_args. (init_md_reader_args): Rename to... (init_rtx_reader_args): ...this and return a boolean success value. * rtl.def (INCLUDE): Delete. * rtl.h (read_rtx): Remove "int *" argument. Add "const char *" argument. * read-rtl.c (read_conditions): Don't gobble ')' here. (read_mapping): Likewise. (read_rtx): Remove LINENO argument. Add RTX_NAME argument. Handle top-level non-rtx constructs here rather than in read_rtx_1. Store the whole queue in *X. Remove call to init_md_reader. (read_rtx_1): Rename to... (read_rtx_code): ...this. Call read_nested_rtx to read subrtxes. Don't handle top-level non-rtx constructs here. Don't handle (nil) here. (read_nested_rtx): New function. Handle (nil) here rather than in read_rtx_code. (read_rtx_variadic): Call read_nested_rtx to read subrtxes. Don't gobble ')' here. * read-md.h (directive_handler_t): New type. (in_fname, include_callback): Moved from read-md.h. (read_constants, init_md_reader): Delete. (read_md_files): Declare. * read-md.c (file_name_list, in_fname, base_dir, first_dir_md_include) (last_dir_md_include_ptr, include_callback, max_include_len): Moved from gensupport.c. (read_constants): Rename to... (handle_constants): ...this. Don't gobble ')' here. (handle_include, handle_file, handle_toplevel_file) (parse_include): New functions, mostly taken from gensupport.c. (init_md_reader): Subsume into... (read_md_files): ...this new function. From-SVN: r160577
2010-06-10 22:23:13 +02:00
if (!init_rtx_reader_args (argc, argv))
return (FATAL_EXIT_CODE);
/* Read the machine description. */
read-md.h (message_with_line, [...]): Delete. gcc/ * read-md.h (message_with_line, error_with_line): Delete. * read-md.c (message_with_line, error_with_line): Delete. * gensupport.h: Include read-md.h. (md_rtx_info): New structure. (read_md_rtx): Use it. Return a bool success value. * gensupport.c (read_md_rtx): Likewise. * genattr-common.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattr.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattrtab.c (insn_code_number): Delete. (optimize_attrs): Add a max_insn_code parameter and use it instead of insn_code_number. (gen_attr): Take an md_rtx_info rather than an rtx and lineno. Use *_at rather than *_with_line functions. (gen_insn): Likewise. (gen_delay): Likewise. (gen_insn_reserv): Likewise. (gen_bypass): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. Use a local max_insn_code variable instead of insn_code_number. * genautomata.c (gen_cpu_unit): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_query_cpu_unit, gen_bypass, gen_excl_set) (gen_presence_absence_set, gen_presence_set, gen_final_presence_set) (gen_absence_set, gen_final_absence_set, gen_automaton) (gen_automata_option, gen_reserv, gen_insn_reserv): Likewise. (main): Update after interface changes. * gencodes.c (gen_insn): Take an md_rtx_info rather than an rtx and code number. (main): Update after interface changes. * genconditions.c (main): Use new read_md_rtx interface. * genconfig.c (gen_insn): Take an md_rtx_info rather than an rtx. (gen_expand, gen_split, gen_peephole, gen_peephole2): Likewise. (main): Update after interface changes. * genemit.c (insn_code_number, insn_index_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use fatal_at rather than fatal. (gen_expand): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_split): Likewise. (main): Update after interface changes. * genextract.c (line_no): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Update call to walk_rtx. (VEC_safe_set_locstr): Add an md_rtx_info argument. Use message_at rather than message_with_line. (walk_rtx): Add an md_rtx_info argument. Update call to VEC_safe_set_locstr. (main): Update after interface changes. * genflags.c (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use error_at rather than separate message_with_line calls and have_error assignments. (main): Update after interface changes. * genmddump.c (main): Use new read_md_rtx interface. * genopinit.c (insn): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genoutput.c (next_code_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. (gen_peephole, gen_expand, gen_split): Likewise. (note_constraint): Likewise. Use *_at rather than *_with_line functions. (main): Update after interface changes. * genpeep.c (gen_peephole): Take an md_rtx_info rather than an rtx and lineno. (main): Update after interface changes. * genpreds.c (process_define_predicate): Take an md_rtx_info rather than an rtx and lineno. (process_define_constraint): Likewise. (process_define_register_constraint): Likewise. (main): Update after interface changes. * genrecog.c (next_insn_code, pattern_lineno): Delete. (validate_pattern): Replace top-level rtx with an md_rtx_info. Use *_at rather than *_with_line functions. (match_pattern_2): Likewise. (match_pattern_1, match_pattern): Add an md_rtx_info parameter. (get_peephole2_pattern): Take an md_rtx_info rather than an rtvec. Use *_at rather than *_with_line functions. * gentarget-def.c (add_insn): New function. (main): Use it. Use new read_md_rtx interface. From-SVN: r225883
2015-07-16 15:52:22 +02:00
md_rtx_info info;
while (read_md_rtx (&info))
{
read-md.h (message_with_line, [...]): Delete. gcc/ * read-md.h (message_with_line, error_with_line): Delete. * read-md.c (message_with_line, error_with_line): Delete. * gensupport.h: Include read-md.h. (md_rtx_info): New structure. (read_md_rtx): Use it. Return a bool success value. * gensupport.c (read_md_rtx): Likewise. * genattr-common.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattr.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattrtab.c (insn_code_number): Delete. (optimize_attrs): Add a max_insn_code parameter and use it instead of insn_code_number. (gen_attr): Take an md_rtx_info rather than an rtx and lineno. Use *_at rather than *_with_line functions. (gen_insn): Likewise. (gen_delay): Likewise. (gen_insn_reserv): Likewise. (gen_bypass): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. Use a local max_insn_code variable instead of insn_code_number. * genautomata.c (gen_cpu_unit): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_query_cpu_unit, gen_bypass, gen_excl_set) (gen_presence_absence_set, gen_presence_set, gen_final_presence_set) (gen_absence_set, gen_final_absence_set, gen_automaton) (gen_automata_option, gen_reserv, gen_insn_reserv): Likewise. (main): Update after interface changes. * gencodes.c (gen_insn): Take an md_rtx_info rather than an rtx and code number. (main): Update after interface changes. * genconditions.c (main): Use new read_md_rtx interface. * genconfig.c (gen_insn): Take an md_rtx_info rather than an rtx. (gen_expand, gen_split, gen_peephole, gen_peephole2): Likewise. (main): Update after interface changes. * genemit.c (insn_code_number, insn_index_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use fatal_at rather than fatal. (gen_expand): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_split): Likewise. (main): Update after interface changes. * genextract.c (line_no): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Update call to walk_rtx. (VEC_safe_set_locstr): Add an md_rtx_info argument. Use message_at rather than message_with_line. (walk_rtx): Add an md_rtx_info argument. Update call to VEC_safe_set_locstr. (main): Update after interface changes. * genflags.c (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use error_at rather than separate message_with_line calls and have_error assignments. (main): Update after interface changes. * genmddump.c (main): Use new read_md_rtx interface. * genopinit.c (insn): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genoutput.c (next_code_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. (gen_peephole, gen_expand, gen_split): Likewise. (note_constraint): Likewise. Use *_at rather than *_with_line functions. (main): Update after interface changes. * genpeep.c (gen_peephole): Take an md_rtx_info rather than an rtx and lineno. (main): Update after interface changes. * genpreds.c (process_define_predicate): Take an md_rtx_info rather than an rtx and lineno. (process_define_constraint): Likewise. (process_define_register_constraint): Likewise. (main): Update after interface changes. * genrecog.c (next_insn_code, pattern_lineno): Delete. (validate_pattern): Replace top-level rtx with an md_rtx_info. Use *_at rather than *_with_line functions. (match_pattern_2): Likewise. (match_pattern_1, match_pattern): Add an md_rtx_info parameter. (get_peephole2_pattern): Take an md_rtx_info rather than an rtvec. Use *_at rather than *_with_line functions. * gentarget-def.c (add_insn): New function. (main): Use it. Use new read_md_rtx interface. From-SVN: r225883
2015-07-16 15:52:22 +02:00
rtx def = info.def;
add_c_test (get_c_test (def), -1);
read-md.h (message_with_line, [...]): Delete. gcc/ * read-md.h (message_with_line, error_with_line): Delete. * read-md.c (message_with_line, error_with_line): Delete. * gensupport.h: Include read-md.h. (md_rtx_info): New structure. (read_md_rtx): Use it. Return a bool success value. * gensupport.c (read_md_rtx): Likewise. * genattr-common.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattr.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattrtab.c (insn_code_number): Delete. (optimize_attrs): Add a max_insn_code parameter and use it instead of insn_code_number. (gen_attr): Take an md_rtx_info rather than an rtx and lineno. Use *_at rather than *_with_line functions. (gen_insn): Likewise. (gen_delay): Likewise. (gen_insn_reserv): Likewise. (gen_bypass): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. Use a local max_insn_code variable instead of insn_code_number. * genautomata.c (gen_cpu_unit): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_query_cpu_unit, gen_bypass, gen_excl_set) (gen_presence_absence_set, gen_presence_set, gen_final_presence_set) (gen_absence_set, gen_final_absence_set, gen_automaton) (gen_automata_option, gen_reserv, gen_insn_reserv): Likewise. (main): Update after interface changes. * gencodes.c (gen_insn): Take an md_rtx_info rather than an rtx and code number. (main): Update after interface changes. * genconditions.c (main): Use new read_md_rtx interface. * genconfig.c (gen_insn): Take an md_rtx_info rather than an rtx. (gen_expand, gen_split, gen_peephole, gen_peephole2): Likewise. (main): Update after interface changes. * genemit.c (insn_code_number, insn_index_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use fatal_at rather than fatal. (gen_expand): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_split): Likewise. (main): Update after interface changes. * genextract.c (line_no): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Update call to walk_rtx. (VEC_safe_set_locstr): Add an md_rtx_info argument. Use message_at rather than message_with_line. (walk_rtx): Add an md_rtx_info argument. Update call to VEC_safe_set_locstr. (main): Update after interface changes. * genflags.c (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use error_at rather than separate message_with_line calls and have_error assignments. (main): Update after interface changes. * genmddump.c (main): Use new read_md_rtx interface. * genopinit.c (insn): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genoutput.c (next_code_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. (gen_peephole, gen_expand, gen_split): Likewise. (note_constraint): Likewise. Use *_at rather than *_with_line functions. (main): Update after interface changes. * genpeep.c (gen_peephole): Take an md_rtx_info rather than an rtx and lineno. (main): Update after interface changes. * genpreds.c (process_define_predicate): Take an md_rtx_info rather than an rtx and lineno. (process_define_constraint): Likewise. (process_define_register_constraint): Likewise. (main): Update after interface changes. * genrecog.c (next_insn_code, pattern_lineno): Delete. (validate_pattern): Replace top-level rtx with an md_rtx_info. Use *_at rather than *_with_line functions. (match_pattern_2): Likewise. (match_pattern_1, match_pattern): Add an md_rtx_info parameter. (get_peephole2_pattern): Take an md_rtx_info rather than an rtvec. Use *_at rather than *_with_line functions. * gentarget-def.c (add_insn): New function. (main): Use it. Use new read_md_rtx interface. From-SVN: r225883
2015-07-16 15:52:22 +02:00
switch (GET_CODE (def))
{
case DEFINE_INSN:
case DEFINE_EXPAND:
/* except.h needs to know whether there is an eh_return
pattern in the machine description. */
read-md.h (message_with_line, [...]): Delete. gcc/ * read-md.h (message_with_line, error_with_line): Delete. * read-md.c (message_with_line, error_with_line): Delete. * gensupport.h: Include read-md.h. (md_rtx_info): New structure. (read_md_rtx): Use it. Return a bool success value. * gensupport.c (read_md_rtx): Likewise. * genattr-common.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattr.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattrtab.c (insn_code_number): Delete. (optimize_attrs): Add a max_insn_code parameter and use it instead of insn_code_number. (gen_attr): Take an md_rtx_info rather than an rtx and lineno. Use *_at rather than *_with_line functions. (gen_insn): Likewise. (gen_delay): Likewise. (gen_insn_reserv): Likewise. (gen_bypass): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. Use a local max_insn_code variable instead of insn_code_number. * genautomata.c (gen_cpu_unit): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_query_cpu_unit, gen_bypass, gen_excl_set) (gen_presence_absence_set, gen_presence_set, gen_final_presence_set) (gen_absence_set, gen_final_absence_set, gen_automaton) (gen_automata_option, gen_reserv, gen_insn_reserv): Likewise. (main): Update after interface changes. * gencodes.c (gen_insn): Take an md_rtx_info rather than an rtx and code number. (main): Update after interface changes. * genconditions.c (main): Use new read_md_rtx interface. * genconfig.c (gen_insn): Take an md_rtx_info rather than an rtx. (gen_expand, gen_split, gen_peephole, gen_peephole2): Likewise. (main): Update after interface changes. * genemit.c (insn_code_number, insn_index_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use fatal_at rather than fatal. (gen_expand): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_split): Likewise. (main): Update after interface changes. * genextract.c (line_no): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Update call to walk_rtx. (VEC_safe_set_locstr): Add an md_rtx_info argument. Use message_at rather than message_with_line. (walk_rtx): Add an md_rtx_info argument. Update call to VEC_safe_set_locstr. (main): Update after interface changes. * genflags.c (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use error_at rather than separate message_with_line calls and have_error assignments. (main): Update after interface changes. * genmddump.c (main): Use new read_md_rtx interface. * genopinit.c (insn): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genoutput.c (next_code_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. (gen_peephole, gen_expand, gen_split): Likewise. (note_constraint): Likewise. Use *_at rather than *_with_line functions. (main): Update after interface changes. * genpeep.c (gen_peephole): Take an md_rtx_info rather than an rtx and lineno. (main): Update after interface changes. * genpreds.c (process_define_predicate): Take an md_rtx_info rather than an rtx and lineno. (process_define_constraint): Likewise. (process_define_register_constraint): Likewise. (main): Update after interface changes. * genrecog.c (next_insn_code, pattern_lineno): Delete. (validate_pattern): Replace top-level rtx with an md_rtx_info. Use *_at rather than *_with_line functions. (match_pattern_2): Likewise. (match_pattern_1, match_pattern): Add an md_rtx_info parameter. (get_peephole2_pattern): Take an md_rtx_info rather than an rtvec. Use *_at rather than *_with_line functions. * gentarget-def.c (add_insn): New function. (main): Use it. Use new read_md_rtx interface. From-SVN: r225883
2015-07-16 15:52:22 +02:00
if (!strcmp (XSTR (def, 0), "eh_return"))
saw_eh_return = 1;
break;
read-md.h (message_with_line, [...]): Delete. gcc/ * read-md.h (message_with_line, error_with_line): Delete. * read-md.c (message_with_line, error_with_line): Delete. * gensupport.h: Include read-md.h. (md_rtx_info): New structure. (read_md_rtx): Use it. Return a bool success value. * gensupport.c (read_md_rtx): Likewise. * genattr-common.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattr.c (gen_attr): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genattrtab.c (insn_code_number): Delete. (optimize_attrs): Add a max_insn_code parameter and use it instead of insn_code_number. (gen_attr): Take an md_rtx_info rather than an rtx and lineno. Use *_at rather than *_with_line functions. (gen_insn): Likewise. (gen_delay): Likewise. (gen_insn_reserv): Likewise. (gen_bypass): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. Use a local max_insn_code variable instead of insn_code_number. * genautomata.c (gen_cpu_unit): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_query_cpu_unit, gen_bypass, gen_excl_set) (gen_presence_absence_set, gen_presence_set, gen_final_presence_set) (gen_absence_set, gen_final_absence_set, gen_automaton) (gen_automata_option, gen_reserv, gen_insn_reserv): Likewise. (main): Update after interface changes. * gencodes.c (gen_insn): Take an md_rtx_info rather than an rtx and code number. (main): Update after interface changes. * genconditions.c (main): Use new read_md_rtx interface. * genconfig.c (gen_insn): Take an md_rtx_info rather than an rtx. (gen_expand, gen_split, gen_peephole, gen_peephole2): Likewise. (main): Update after interface changes. * genemit.c (insn_code_number, insn_index_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use fatal_at rather than fatal. (gen_expand): Take an md_rtx_info rather than an rtx. Use fatal_at rather than fatal. (gen_split): Likewise. (main): Update after interface changes. * genextract.c (line_no): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Update call to walk_rtx. (VEC_safe_set_locstr): Add an md_rtx_info argument. Use message_at rather than message_with_line. (walk_rtx): Add an md_rtx_info argument. Update call to VEC_safe_set_locstr. (main): Update after interface changes. * genflags.c (gen_insn): Take an md_rtx_info rather than an rtx and lineno. Use error_at rather than separate message_with_line calls and have_error assignments. (main): Update after interface changes. * genmddump.c (main): Use new read_md_rtx interface. * genopinit.c (insn): Take an md_rtx_info rather than an rtx. (main): Update after interface changes. * genoutput.c (next_code_number): Delete. (gen_insn): Take an md_rtx_info rather than an rtx and lineno. (gen_peephole, gen_expand, gen_split): Likewise. (note_constraint): Likewise. Use *_at rather than *_with_line functions. (main): Update after interface changes. * genpeep.c (gen_peephole): Take an md_rtx_info rather than an rtx and lineno. (main): Update after interface changes. * genpreds.c (process_define_predicate): Take an md_rtx_info rather than an rtx and lineno. (process_define_constraint): Likewise. (process_define_register_constraint): Likewise. (main): Update after interface changes. * genrecog.c (next_insn_code, pattern_lineno): Delete. (validate_pattern): Replace top-level rtx with an md_rtx_info. Use *_at rather than *_with_line functions. (match_pattern_2): Likewise. (match_pattern_1, match_pattern): Add an md_rtx_info parameter. (get_peephole2_pattern): Take an md_rtx_info rather than an rtvec. Use *_at rather than *_with_line functions. * gentarget-def.c (add_insn): New function. (main): Use it. Use new read_md_rtx interface. From-SVN: r225883
2015-07-16 15:52:22 +02:00
default:
break;
}
}
write_header ();
write_conditions ();
r110123@banpei: zack | 2006-01-22 14:44:34 -0800 r110123@banpei: zack | 2006-01-22 14:44:34 -0800 * genconditions.c (condition_table, add_condition): Delete. (write_conditions): Don't emit n_insn_conditions nor insn_elision_unavailable. Issue the gcc version #ifdef here, inside the table, with no #else clause ... (write_header): ...not here. (write_writer): New function. (main): Don't initialize condition_table. Use add_c_test. Call write_writer. * gensupport.c (init_md_reader_args_cb): Handle multiple input files on the command line. (maybe_eval_c_test): Don't check insn_elision_unavailable. Return -1 if there is no entry in the table, don't abort. (add_c_test, traverse_c_tests): New functions. * gensupport.h (insn_elision_unavailable, insn_conditions) (n_insn_conditions): Delete declarations. (add_c_test, traverse_c_tests): Declare. * read-rtl.c: Include gensupport.h. (read_conditions): New function. (read_rtx): If read_rtx_1 returns 0, treat as EOF. (read_rtx_1): If we get EOF when we were looking for an initial open paren, return 0. Call read_conditions when appropriate. * Makefile.in: Kill BUILD_EARLY_SUPPORT and all references to dummy-conditions.o. Eliminate references to insn-conditions.o, or change them to build/gencondmd.o, as appropriate. Remove insn-constants.h from $(simple_generated_h) and insn-conditions.c from $(simple_generated_c). For all files remaining in those two lists, add insn-conditions.md to the generator command line. Give insn-constants.h/s-constants their own rules. Add rules for build/gencondmd.c, s-conditions, insn-conditions.md, s-condmd. (build/read-rtl.o): Depend on gensupport.h. (genprognormal): Include preds. (genprogearly): Rename genprognoprint; only difference is now that they don't link with $(BUILD_PRINT). * dummy-conditions.c: Delete. From-SVN: r110119
2006-01-23 16:15:05 +01:00
write_writer ();
fflush (stdout);
return (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
}