From 4d0cdd0ce64e8821ad218054ccd317f195eb3cc8 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Thu, 13 Oct 2016 14:17:52 +0000 Subject: [PATCH] Move MEMMODEL_* from coretypes.h to memmodel.h 2016-10-13 Thomas Preud'homme 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 --- gcc/ChangeLog | 74 ++++++++++++++++++++ gcc/Makefile.in | 2 +- gcc/ada/ChangeLog | 4 ++ gcc/ada/gcc-interface/utils2.c | 1 + gcc/alias.c | 1 + gcc/asan.c | 1 + gcc/auto-inc-dec.c | 1 + gcc/bb-reorder.c | 1 + gcc/bt-load.c | 1 + gcc/c-family/ChangeLog | 7 ++ gcc/c-family/c-cppbuiltin.c | 1 + gcc/c-family/c-opts.c | 1 + gcc/c-family/c-pragma.c | 1 + gcc/c-family/c-warn.c | 1 + gcc/c/ChangeLog | 4 ++ gcc/c/c-typeck.c | 1 + gcc/caller-save.c | 1 + gcc/calls.c | 1 + gcc/ccmp.c | 1 + gcc/cfgbuild.c | 1 + gcc/cfgcleanup.c | 1 + gcc/cfgexpand.c | 1 + gcc/cfgloopanal.c | 1 + gcc/cfgrtl.c | 1 + gcc/cilk-common.c | 1 + gcc/combine-stack-adj.c | 1 + gcc/combine.c | 1 + gcc/common/config/aarch64/aarch64-common.c | 1 + gcc/common/config/arm/arm-common.c | 1 + gcc/common/config/bfin/bfin-common.c | 1 + gcc/common/config/c6x/c6x-common.c | 1 + gcc/common/config/i386/i386-common.c | 1 + gcc/common/config/ia64/ia64-common.c | 1 + gcc/common/config/nvptx/nvptx-common.c | 1 + gcc/compare-elim.c | 1 + gcc/config/aarch64/aarch64-builtins.c | 1 + gcc/config/aarch64/aarch64-c.c | 1 + gcc/config/aarch64/cortex-a57-fma-steering.c | 1 + gcc/config/arc/arc-c.c | 1 + gcc/config/arc/arc.c | 1 + gcc/config/arm/arm-builtins.c | 1 + gcc/config/arm/arm-c.c | 1 + gcc/config/avr/avr-c.c | 1 + gcc/config/avr/avr-log.c | 1 + gcc/config/avr/avr.c | 1 + gcc/config/bfin/bfin.c | 1 + gcc/config/c6x/c6x.c | 1 + gcc/config/cr16/cr16.c | 1 + gcc/config/cris/cris.c | 1 + gcc/config/darwin-c.c | 1 + gcc/config/darwin.c | 1 + gcc/config/epiphany/epiphany.c | 1 + gcc/config/epiphany/mode-switch-use.c | 1 + gcc/config/epiphany/resolve-sw-modes.c | 1 + gcc/config/fr30/fr30.c | 1 + gcc/config/frv/frv.c | 1 + gcc/config/ft32/ft32.c | 1 + gcc/config/h8300/h8300.c | 1 + gcc/config/i386/i386-c.c | 1 + gcc/config/i386/winnt.c | 1 + gcc/config/iq2000/iq2000.c | 1 + gcc/config/lm32/lm32.c | 1 + gcc/config/m32c/m32c.c | 1 + gcc/config/m32r/m32r.c | 1 + gcc/config/m68k/m68k.c | 1 + gcc/config/mcore/mcore.c | 1 + gcc/config/microblaze/microblaze.c | 1 + gcc/config/mmix/mmix.c | 1 + gcc/config/mn10300/mn10300.c | 1 + gcc/config/moxie/moxie.c | 1 + gcc/config/msp430/msp430.c | 1 + gcc/config/nds32/nds32-cost.c | 1 + gcc/config/nds32/nds32-intrinsic.c | 1 + gcc/config/nds32/nds32-md-auxiliary.c | 1 + gcc/config/nds32/nds32-memory-manipulation.c | 1 + gcc/config/nds32/nds32-predicates.c | 1 + gcc/config/nds32/nds32.c | 1 + gcc/config/nios2/nios2.c | 1 + gcc/config/nvptx/nvptx.c | 1 + gcc/config/pa/pa.c | 1 + gcc/config/pdp11/pdp11.c | 1 + gcc/config/rl78/rl78.c | 1 + gcc/config/rs6000/rs6000-c.c | 1 + gcc/config/rx/rx.c | 1 + gcc/config/s390/s390-c.c | 1 + gcc/config/s390/s390.c | 1 + gcc/config/sh/sh-c.c | 1 + gcc/config/sh/sh-mem.cc | 1 + gcc/config/sh/sh.c | 1 + gcc/config/sh/sh_treg_combine.cc | 1 + gcc/config/sol2.c | 1 + gcc/config/spu/spu.c | 1 + gcc/config/stormy16/stormy16.c | 1 + gcc/config/tilegx/tilegx.c | 1 + gcc/config/tilepro/tilepro.c | 1 + gcc/config/v850/v850.c | 1 + gcc/config/vax/vax.c | 1 + gcc/config/visium/visium.c | 1 + gcc/config/vms/vms-c.c | 1 + gcc/config/xtensa/xtensa.c | 1 + gcc/coretypes.h | 28 -------- gcc/coverage.c | 1 + gcc/cp/ChangeLog | 5 ++ gcc/cp/decl2.c | 1 + gcc/cp/rtti.c | 1 + gcc/cppbuiltin.c | 1 + gcc/cprop.c | 1 + gcc/cse.c | 1 + gcc/cselib.c | 1 + gcc/dbxout.c | 1 + gcc/dce.c | 1 + gcc/df-core.c | 1 + gcc/df-problems.c | 1 + gcc/df-scan.c | 1 + gcc/dojump.c | 1 + gcc/dse.c | 1 + gcc/dwarf2asm.c | 1 + gcc/dwarf2cfi.c | 1 + gcc/dwarf2out.c | 1 + gcc/emit-rtl.c | 1 + gcc/except.c | 1 + gcc/explow.c | 1 + gcc/expmed.c | 1 + gcc/expr.c | 1 + gcc/final.c | 1 + gcc/fold-const.c | 1 + gcc/fortran/ChangeLog | 4 ++ gcc/fortran/trans-intrinsic.c | 1 + gcc/function.c | 1 + gcc/fwprop.c | 1 + gcc/gcse.c | 1 + gcc/genattrtab.c | 1 + gcc/genautomata.c | 1 + gcc/genconditions.c | 2 +- gcc/genemit.c | 2 +- gcc/gengtype.c | 16 ++--- gcc/genopinit.c | 1 + gcc/genoutput.c | 2 +- gcc/genpeep.c | 2 +- gcc/genpreds.c | 2 +- gcc/genrecog.c | 2 +- gcc/ggc-page.c | 1 + gcc/go/ChangeLog | 4 ++ gcc/go/go-backend.c | 1 + gcc/haifa-sched.c | 1 + gcc/hsa-brig.c | 1 + gcc/hsa-gen.c | 1 + gcc/hw-doloop.c | 1 + gcc/ifcvt.c | 1 + gcc/init-regs.c | 1 + gcc/internal-fn.c | 1 + gcc/ira-build.c | 1 + gcc/ira-color.c | 1 + gcc/ira-conflicts.c | 1 + gcc/ira-costs.c | 1 + gcc/ira-emit.c | 1 + gcc/ira-lives.c | 1 + gcc/ira.c | 1 + gcc/jump.c | 1 + gcc/loop-doloop.c | 1 + gcc/loop-invariant.c | 1 + gcc/loop-iv.c | 1 + gcc/loop-unroll.c | 1 + gcc/lower-subreg.c | 1 + gcc/lra-assigns.c | 1 + gcc/lra-coalesce.c | 1 + gcc/lra-constraints.c | 1 + gcc/lra-eliminations.c | 1 + gcc/lra-lives.c | 1 + gcc/lra-remat.c | 1 + gcc/lra-spills.c | 1 + gcc/lra.c | 1 + gcc/memmodel.h | 30 +++++++- gcc/mode-switching.c | 1 + gcc/modulo-sched.c | 1 + gcc/omp-low.c | 1 + gcc/passes.c | 1 + gcc/postreload-gcse.c | 1 + gcc/postreload.c | 1 + gcc/predict.c | 1 + gcc/print-rtl-function.c | 1 + gcc/recog.c | 1 + gcc/ree.c | 1 + gcc/reg-stack.c | 1 + gcc/regcprop.c | 1 + gcc/reginfo.c | 1 + gcc/regrename.c | 1 + gcc/reload.c | 1 + gcc/reload1.c | 1 + gcc/reorg.c | 1 + gcc/resource.c | 1 + gcc/rtl-chkp.c | 1 + gcc/rtl-tests.c | 1 + gcc/rtlanal.c | 1 + gcc/rtlhooks.c | 1 + gcc/sched-deps.c | 1 + gcc/sched-rgn.c | 1 + gcc/sdbout.c | 1 + gcc/sel-sched-ir.c | 1 + gcc/sel-sched.c | 1 + gcc/shrink-wrap.c | 1 + gcc/simplify-rtx.c | 1 + gcc/stack-ptr-mod.c | 1 + gcc/stmt.c | 1 + gcc/stor-layout.c | 1 + gcc/target-globals.c | 1 + gcc/targhooks.c | 1 + gcc/toplev.c | 1 + gcc/tree-nested.c | 1 + gcc/tree-outof-ssa.c | 1 + gcc/tree-profile.c | 1 + gcc/tree-ssa-coalesce.c | 1 + gcc/tree-ssa-ifcombine.c | 1 + gcc/tree-ssa-loop-ivopts.c | 1 + gcc/tree-ssa-loop.c | 1 + gcc/tree-ssa-reassoc.c | 1 + gcc/tree-ssa-sccvn.c | 1 + gcc/tree-vect-data-refs.c | 1 + gcc/ubsan.c | 1 + gcc/valtrack.c | 1 + gcc/var-tracking.c | 1 + gcc/varasm.c | 1 + libgcc/ChangeLog | 7 ++ libgcc/config/tilepro/atomic.c | 16 ++--- libgcc/libgcov-profiler.c | 20 +++--- 225 files changed, 376 insertions(+), 62 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ced58977447..dfd16fe0763 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,77 @@ +2016-10-13 Thomas Preud'homme + + * 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 + 2016-10-13 David Malcolm * function-tests.c (selftest::test_expansion_to_rtl): Add "true" diff --git a/gcc/Makefile.in b/gcc/Makefile.in index f1ff782f10b..76b77ab2137 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -3382,7 +3382,7 @@ s-params.options: $(srcdir)/params-options.h $(srcdir)/params.def PLUGIN_HEADERS = $(TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ toplev.h $(DIAGNOSTIC_CORE_H) $(BASIC_BLOCK_H) $(HASH_TABLE_H) \ tree-ssa-alias.h $(INTERNAL_FN_H) gimple-fold.h tree-eh.h gimple-expr.h \ - gimple.h is-a.h $(TREE_PASS_H) $(GCC_PLUGIN_H) \ + gimple.h is-a.h memmodel.h $(TREE_PASS_H) $(GCC_PLUGIN_H) \ $(GGC_H) $(TREE_DUMP_H) $(PRETTY_PRINT_H) $(OPTS_H) $(PARAMS_H) \ $(tm_file_list) $(tm_include_list) $(tm_p_file_list) $(tm_p_include_list) \ $(host_xm_file_list) $(host_xm_include_list) $(xm_include_list) \ diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index b2c29fdd053..91a783dbcbb 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2016-10-13 Thomas Preud'homme + + * gcc-interface/utils2.c: Include memmodel.h. + 2016-10-13 Hristian Kirtchev * sem_ch6.adb (Analyze_Expression_Function): diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c index 9ace387b85a..c0d831fb1e5 100644 --- a/gcc/ada/gcc-interface/utils2.c +++ b/gcc/ada/gcc-interface/utils2.c @@ -26,6 +26,7 @@ #include "config.h" #include "system.h" #include "coretypes.h" +#include "memmodel.h" #include "tm.h" #include "vec.h" #include "alias.h" diff --git a/gcc/alias.c b/gcc/alias.c index 19e9208ac97..f4a0a2978c3 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "gimple.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "gimple-ssa.h" #include "emit-rtl.h" diff --git a/gcc/asan.c b/gcc/asan.c index 3a4b5f708dc..c6d924014b6 100644 --- a/gcc/asan.c +++ b/gcc/asan.c @@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see #include "cfghooks.h" #include "alloc-pool.h" #include "tree-pass.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "tree-vrp.h" diff --git a/gcc/auto-inc-dec.c b/gcc/auto-inc-dec.c index eb2dc21f801..e80244b0f50 100644 --- a/gcc/auto-inc-dec.c +++ b/gcc/auto-inc-dec.c @@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see #include "predict.h" #include "df.h" #include "insn-config.h" +#include "memmodel.h" #include "emit-rtl.h" #include "recog.h" #include "cfgrtl.h" diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index bb8435f131c..ef1c476f318 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -100,6 +100,7 @@ #include "tree.h" #include "cfghooks.h" #include "df.h" +#include "memmodel.h" #include "optabs.h" #include "regs.h" #include "emit-rtl.h" diff --git a/gcc/bt-load.c b/gcc/bt-load.c index 5b1bcecd5c3..6747845be7a 100644 --- a/gcc/bt-load.c +++ b/gcc/bt-load.c @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see #include "df.h" #include "insn-config.h" #include "regs.h" +#include "memmodel.h" #include "emit-rtl.h" #include "recog.h" #include "diagnostic-core.h" diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 64619fc6082..285ef04e6f1 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,10 @@ +2016-10-13 Thomas Preud'homme + + * c-cppbuiltin.c: Include memmodel.h. + * c-opts.c: Likewise. + * c-pragma.c: Likewise. + * c-warn.c: Likewise. + 2016-10-12 Jakub Jelinek * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option. diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c index 97eda67e93b..94af585eafe 100644 --- a/gcc/c-family/c-cppbuiltin.c +++ b/gcc/c-family/c-cppbuiltin.c @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see #include "coretypes.h" #include "target.h" #include "c-common.h" +#include "memmodel.h" #include "tm_p.h" /* For TARGET_CPU_CPP_BUILTINS & friends. */ #include "stringpool.h" #include "stor-layout.h" diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index da62b55fea3..a0c0c624f96 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see #include "tm.h" #include "c-target.h" #include "c-common.h" +#include "memmodel.h" #include "tm_p.h" /* For C_COMMON_OVERRIDE_OPTIONS. */ #include "diagnostic.h" #include "c-pragma.h" diff --git a/gcc/c-family/c-pragma.c b/gcc/c-family/c-pragma.c index 1a9a9f3f3eb..58ef5c9c80b 100644 --- a/gcc/c-family/c-pragma.c +++ b/gcc/c-family/c-pragma.c @@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see #include "target.h" #include "function.h" /* For cfun. */ #include "c-common.h" +#include "memmodel.h" #include "tm_p.h" /* For REGISTER_TARGET_PRAGMAS. */ #include "stringpool.h" #include "cgraph.h" diff --git a/gcc/c-family/c-warn.c b/gcc/c-family/c-warn.c index cac5b36e478..88544ce2a92 100644 --- a/gcc/c-family/c-warn.c +++ b/gcc/c-family/c-warn.c @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see #include "function.h" #include "tree.h" #include "c-common.h" +#include "memmodel.h" #include "tm_p.h" #include "diagnostic.h" #include "intl.h" diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index 63fba12d818..725afcfefa0 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,7 @@ +2016-10-13 Thomas Preud'homme + + * c-typeck.c: Include memmodel.h. + 2016-10-13 Jakub Jelinek PR target/77957 diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c index e5c72560397..f0917ed788c 100644 --- a/gcc/c/c-typeck.c +++ b/gcc/c/c-typeck.c @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" #include "coretypes.h" +#include "memmodel.h" #include "target.h" #include "function.h" #include "bitmap.h" diff --git a/gcc/caller-save.c b/gcc/caller-save.c index caf6486a5a8..24546bf9db3 100644 --- a/gcc/caller-save.c +++ b/gcc/caller-save.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "predict.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "regs.h" diff --git a/gcc/calls.c b/gcc/calls.c index 86369e9cfdc..66b34b8f143 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "gimple.h" #include "predict.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "expmed.h" diff --git a/gcc/ccmp.c b/gcc/ccmp.c index 6f95acec95b..615b7e653f2 100644 --- a/gcc/ccmp.c +++ b/gcc/ccmp.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "gimple.h" +#include "memmodel.h" #include "tm_p.h" #include "ssa.h" #include "expmed.h" diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c index edecab52f5d..40c011d9aea 100644 --- a/gcc/cfgbuild.c +++ b/gcc/cfgbuild.c @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see #include "backend.h" #include "rtl.h" #include "cfghooks.h" +#include "memmodel.h" #include "emit-rtl.h" #include "cfgrtl.h" #include "cfganal.h" diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index 2e2a63559f5..1c9691dfa12 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -38,6 +38,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "cfghooks.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "emit-rtl.h" diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index c62e92046ff..161976542e4 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see #include "gimple.h" #include "cfghooks.h" #include "tree-pass.h" +#include "memmodel.h" #include "tm_p.h" #include "ssa.h" #include "optabs.h" diff --git a/gcc/cfgloopanal.c b/gcc/cfgloopanal.c index 001cf45ee9c..9ea48b1eb2b 100644 --- a/gcc/cfgloopanal.c +++ b/gcc/cfgloopanal.c @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "predict.h" +#include "memmodel.h" #include "emit-rtl.h" #include "cfgloop.h" #include "explow.h" diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index de07fcd4b1d..c1f0322a601 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -47,6 +47,7 @@ along with GCC; see the file COPYING3. If not see #include "cfghooks.h" #include "df.h" #include "insn-config.h" +#include "memmodel.h" #include "emit-rtl.h" #include "cfgrtl.h" #include "cfganal.h" diff --git a/gcc/cilk-common.c b/gcc/cilk-common.c index 9a2ed9d3b53..ecd7abe0adf 100644 --- a/gcc/cilk-common.c +++ b/gcc/cilk-common.c @@ -31,6 +31,7 @@ along with GCC; see the file COPYING3. If not see #include "expmed.h" #include "optabs-query.h" #include "insn-config.h" +#include "memmodel.h" #include "emit-rtl.h" #include "recog.h" #include "fold-const.h" diff --git a/gcc/combine-stack-adj.c b/gcc/combine-stack-adj.c index a74b65ab095..3302550fc27 100644 --- a/gcc/combine-stack-adj.c +++ b/gcc/combine-stack-adj.c @@ -45,6 +45,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "df.h" #include "insn-config.h" +#include "memmodel.h" #include "emit-rtl.h" #include "recog.h" #include "cfgrtl.h" diff --git a/gcc/combine.c b/gcc/combine.c index b27aae5f02f..272768398b4 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -84,6 +84,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "predict.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" #include "regs.h" diff --git a/gcc/common/config/aarch64/aarch64-common.c b/gcc/common/config/aarch64/aarch64-common.c index 09debee06b8..90f5f6bce32 100644 --- a/gcc/common/config/aarch64/aarch64-common.c +++ b/gcc/common/config/aarch64/aarch64-common.c @@ -23,6 +23,7 @@ #include "system.h" #include "coretypes.h" #include "tm.h" +#include "memmodel.h" #include "tm_p.h" #include "common/common-target.h" #include "common/common-target-def.h" diff --git a/gcc/common/config/arm/arm-common.c b/gcc/common/config/arm/arm-common.c index a9abd6b026e..f3b674339a5 100644 --- a/gcc/common/config/arm/arm-common.c +++ b/gcc/common/config/arm/arm-common.c @@ -21,6 +21,7 @@ #include "system.h" #include "coretypes.h" #include "tm.h" +#include "memmodel.h" #include "tm_p.h" #include "common/common-target.h" #include "common/common-target-def.h" diff --git a/gcc/common/config/bfin/bfin-common.c b/gcc/common/config/bfin/bfin-common.c index 770aa1c3eaa..ceee72f7cb9 100644 --- a/gcc/common/config/bfin/bfin-common.c +++ b/gcc/common/config/bfin/bfin-common.c @@ -22,6 +22,7 @@ #include "coretypes.h" #include "diagnostic-core.h" #include "tm.h" +#include "memmodel.h" #include "tm_p.h" #include "common/common-target.h" #include "common/common-target-def.h" diff --git a/gcc/common/config/c6x/c6x-common.c b/gcc/common/config/c6x/c6x-common.c index 758358d8596..38be5ba6a4e 100644 --- a/gcc/common/config/c6x/c6x-common.c +++ b/gcc/common/config/c6x/c6x-common.c @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see #include "coretypes.h" #include "diagnostic-core.h" #include "tm.h" +#include "memmodel.h" #include "tm_p.h" #include "common/common-target.h" #include "common/common-target-def.h" diff --git a/gcc/common/config/i386/i386-common.c b/gcc/common/config/i386/i386-common.c index ce1b5f74d9f..d20115439a0 100644 --- a/gcc/common/config/i386/i386-common.c +++ b/gcc/common/config/i386/i386-common.c @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see #include "coretypes.h" #include "diagnostic-core.h" #include "tm.h" +#include "memmodel.h" #include "tm_p.h" #include "common/common-target.h" #include "common/common-target-def.h" diff --git a/gcc/common/config/ia64/ia64-common.c b/gcc/common/config/ia64/ia64-common.c index 47c71dea342..65879fc41fb 100644 --- a/gcc/common/config/ia64/ia64-common.c +++ b/gcc/common/config/ia64/ia64-common.c @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see #include "coretypes.h" #include "diagnostic-core.h" #include "tm.h" +#include "memmodel.h" #include "tm_p.h" #include "common/common-target.h" #include "common/common-target-def.h" diff --git a/gcc/common/config/nvptx/nvptx-common.c b/gcc/common/config/nvptx/nvptx-common.c index 2582e988fe5..27904120b6e 100644 --- a/gcc/common/config/nvptx/nvptx-common.c +++ b/gcc/common/config/nvptx/nvptx-common.c @@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see #include "coretypes.h" #include "diagnostic-core.h" #include "tm.h" +#include "memmodel.h" #include "tm_p.h" #include "common/common-target.h" #include "common/common-target-def.h" diff --git a/gcc/compare-elim.c b/gcc/compare-elim.c index e7fdce83734..329f18f8be7 100644 --- a/gcc/compare-elim.c +++ b/gcc/compare-elim.c @@ -61,6 +61,7 @@ along with GCC; see the file COPYING3. If not see #include "target.h" #include "rtl.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "recog.h" diff --git a/gcc/config/aarch64/aarch64-builtins.c b/gcc/config/aarch64/aarch64-builtins.c index b3625801761..594a6151e69 100644 --- a/gcc/config/aarch64/aarch64-builtins.c +++ b/gcc/config/aarch64/aarch64-builtins.c @@ -27,6 +27,7 @@ #include "rtl.h" #include "tree.h" #include "gimple.h" +#include "memmodel.h" #include "tm_p.h" #include "expmed.h" #include "optabs.h" diff --git a/gcc/config/aarch64/aarch64-c.c b/gcc/config/aarch64/aarch64-c.c index 3380ed6f2cd..422e3221eea 100644 --- a/gcc/config/aarch64/aarch64-c.c +++ b/gcc/config/aarch64/aarch64-c.c @@ -22,6 +22,7 @@ #include "coretypes.h" #include "tm.h" #include "input.h" +#include "memmodel.h" #include "tm_p.h" #include "flags.h" #include "c-family/c-common.h" diff --git a/gcc/config/aarch64/cortex-a57-fma-steering.c b/gcc/config/aarch64/cortex-a57-fma-steering.c index 1bf804b4873..214db4a1010 100644 --- a/gcc/config/aarch64/cortex-a57-fma-steering.c +++ b/gcc/config/aarch64/cortex-a57-fma-steering.c @@ -28,6 +28,7 @@ #include "df.h" #include "insn-config.h" #include "regs.h" +#include "memmodel.h" #include "emit-rtl.h" #include "recog.h" #include "cfganal.h" diff --git a/gcc/config/arc/arc-c.c b/gcc/config/arc/arc-c.c index 3bf3fd26c2c..e89bc5c51e9 100644 --- a/gcc/config/arc/arc-c.c +++ b/gcc/config/arc/arc-c.c @@ -22,6 +22,7 @@ #include "coretypes.h" #include "tm.h" #include "tree.h" +#include "memmodel.h" #include "tm_p.h" #include "cpplib.h" #include "c-family/c-common.h" diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index 5e8d6b4209d..21bba0cc2db 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -31,6 +31,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" #include "coretypes.h" +#include "memmodel.h" #include "backend.h" #include "target.h" #include "rtl.h" diff --git a/gcc/config/arm/arm-builtins.c b/gcc/config/arm/arm-builtins.c index cbc17944e24..e73043db6db 100644 --- a/gcc/config/arm/arm-builtins.c +++ b/gcc/config/arm/arm-builtins.c @@ -25,6 +25,7 @@ #include "rtl.h" #include "tree.h" #include "gimple-expr.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" #include "emit-rtl.h" diff --git a/gcc/config/arm/arm-c.c b/gcc/config/arm/arm-c.c index a6fc60b0e44..df930f44801 100644 --- a/gcc/config/arm/arm-c.c +++ b/gcc/config/arm/arm-c.c @@ -21,6 +21,7 @@ #include "coretypes.h" #include "target.h" #include "c-family/c-common.h" +#include "memmodel.h" #include "tm_p.h" #include "c-family/c-pragma.h" #include "stringpool.h" diff --git a/gcc/config/avr/avr-c.c b/gcc/config/avr/avr-c.c index 270b803edf0..6d363c9d20c 100644 --- a/gcc/config/avr/avr-c.c +++ b/gcc/config/avr/avr-c.c @@ -26,6 +26,7 @@ #include "c-family/c-common.h" #include "stor-layout.h" #include "langhooks.h" +#include "memmodel.h" #include "tm_p.h" /* IDs for all the AVR builtins. */ diff --git a/gcc/config/avr/avr-log.c b/gcc/config/avr/avr-log.c index fe2cae46eff..46578d608f3 100644 --- a/gcc/config/avr/avr-log.c +++ b/gcc/config/avr/avr-log.c @@ -26,6 +26,7 @@ #include "rtl.h" #include "tree.h" #include "tree-pass.h" /* for current_pass */ +#include "memmodel.h" #include "tm_p.h" #include "print-tree.h" diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 7310b54f9ed..3945122e2f3 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -27,6 +27,7 @@ #include "c-family/c-common.h" #include "cfghooks.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" #include "regs.h" diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index a91e47ed163..9b81868984a 100644 --- a/gcc/config/bfin/bfin.c +++ b/gcc/config/bfin/bfin.c @@ -27,6 +27,7 @@ #include "tree.h" #include "cfghooks.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" #include "regs.h" diff --git a/gcc/config/c6x/c6x.c b/gcc/config/c6x/c6x.c index 305f31ea0b3..f8c3d668dbe 100644 --- a/gcc/config/c6x/c6x.c +++ b/gcc/config/c6x/c6x.c @@ -29,6 +29,7 @@ #include "gimple-expr.h" #include "cfghooks.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "optabs.h" diff --git a/gcc/config/cr16/cr16.c b/gcc/config/cr16/cr16.c index 13e8e475ae9..530ccba44da 100644 --- a/gcc/config/cr16/cr16.c +++ b/gcc/config/cr16/cr16.c @@ -26,6 +26,7 @@ #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "regs.h" #include "emit-rtl.h" diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c index 7532b8e501a..a8252193b58 100644 --- a/gcc/config/cris/cris.c +++ b/gcc/config/cris/cris.c @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "cfghooks.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" #include "regs.h" diff --git a/gcc/config/darwin-c.c b/gcc/config/darwin-c.c index 23ec1804195..ed032b971df 100644 --- a/gcc/config/darwin-c.c +++ b/gcc/config/darwin-c.c @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see #include "target.h" #include "c-family/c-target.h" #include "c-family/c-target-def.h" +#include "memmodel.h" #include "tm_p.h" #include "cgraph.h" #include "incpath.h" diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index f8da9591be8..ff8600c7441 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see #include "gimple.h" #include "cfghooks.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "insn-config.h" diff --git a/gcc/config/epiphany/epiphany.c b/gcc/config/epiphany/epiphany.c index b871ccb3feb..a7854e7bacc 100644 --- a/gcc/config/epiphany/epiphany.c +++ b/gcc/config/epiphany/epiphany.c @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "optabs.h" diff --git a/gcc/config/epiphany/mode-switch-use.c b/gcc/config/epiphany/mode-switch-use.c index d7fbae31868..9f1c56ae0da 100644 --- a/gcc/config/epiphany/mode-switch-use.c +++ b/gcc/config/epiphany/mode-switch-use.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "backend.h" #include "rtl.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "emit-rtl.h" #include "tree-pass.h" diff --git a/gcc/config/epiphany/resolve-sw-modes.c b/gcc/config/epiphany/resolve-sw-modes.c index 603886b57ce..f1aafdc66ea 100644 --- a/gcc/config/epiphany/resolve-sw-modes.c +++ b/gcc/config/epiphany/resolve-sw-modes.c @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see #include "backend.h" #include "rtl.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "emit-rtl.h" diff --git a/gcc/config/fr30/fr30.c b/gcc/config/fr30/fr30.c index 741a0136640..187302bc025 100644 --- a/gcc/config/fr30/fr30.c +++ b/gcc/config/fr30/fr30.c @@ -28,6 +28,7 @@ #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "emit-rtl.h" #include "stor-layout.h" #include "varasm.h" diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c index 60c3863bbad..352bcff681d 100644 --- a/gcc/config/frv/frv.c +++ b/gcc/config/frv/frv.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "optabs.h" diff --git a/gcc/config/ft32/ft32.c b/gcc/config/ft32/ft32.c index 216a8040428..6ac87017f64 100644 --- a/gcc/config/ft32/ft32.c +++ b/gcc/config/ft32/ft32.c @@ -26,6 +26,7 @@ #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "regs.h" #include "emit-rtl.h" diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c index 943356781e7..3d06014c23b 100644 --- a/gcc/config/h8300/h8300.c +++ b/gcc/config/h8300/h8300.c @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "optabs.h" diff --git a/gcc/config/i386/i386-c.c b/gcc/config/i386/i386-c.c index d4d2674eb64..9bb80c00afc 100644 --- a/gcc/config/i386/i386-c.c +++ b/gcc/config/i386/i386-c.c @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see #include "coretypes.h" #include "target.h" #include "c-family/c-common.h" +#include "memmodel.h" #include "tm_p.h" #include "c-family/c-pragma.h" diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c index e2b2f4b516c..fdc89e0e972 100644 --- a/gcc/config/i386/winnt.c +++ b/gcc/config/i386/winnt.c @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "gimple.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "emit-rtl.h" diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c index c7e5f199b8f..7be7ee52186 100644 --- a/gcc/config/iq2000/iq2000.c +++ b/gcc/config/iq2000/iq2000.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" #include "regs.h" diff --git a/gcc/config/lm32/lm32.c b/gcc/config/lm32/lm32.c index 8a102207f0d..99e2695dd48 100644 --- a/gcc/config/lm32/lm32.c +++ b/gcc/config/lm32/lm32.c @@ -27,6 +27,7 @@ #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" #include "regs.h" diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c index 1db1ef7ade1..7d64c49d3bf 100644 --- a/gcc/config/m32c/m32c.c +++ b/gcc/config/m32c/m32c.c @@ -26,6 +26,7 @@ #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" #include "regs.h" diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c index dda3961bf30..17e48f545bf 100644 --- a/gcc/config/m32r/m32r.c +++ b/gcc/config/m32r/m32r.c @@ -25,6 +25,7 @@ #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "insn-config.h" diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index a104193c23c..8e7dbf38fa3 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -41,6 +41,7 @@ along with GCC; see the file COPYING3. If not see #include "expmed.h" #include "dojump.h" #include "explow.h" +#include "memmodel.h" #include "emit-rtl.h" #include "stmt.h" #include "expr.h" diff --git a/gcc/config/mcore/mcore.c b/gcc/config/mcore/mcore.c index 3afe42c0c86..b8dc2d02591 100644 --- a/gcc/config/mcore/mcore.c +++ b/gcc/config/mcore/mcore.c @@ -25,6 +25,7 @@ #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "emit-rtl.h" diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c index e32fa0eca75..0fb273f24d0 100644 --- a/gcc/config/microblaze/microblaze.c +++ b/gcc/config/microblaze/microblaze.c @@ -27,6 +27,7 @@ #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" #include "regs.h" diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c index bf06e3b1933..7029c3d2a67 100644 --- a/gcc/config/mmix/mmix.c +++ b/gcc/config/mmix/mmix.c @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "regs.h" diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c index 81c8506a0ff..dbbc4db1410 100644 --- a/gcc/config/mn10300/mn10300.c +++ b/gcc/config/mn10300/mn10300.c @@ -28,6 +28,7 @@ #include "cfghooks.h" #include "cfgloop.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" #include "regs.h" diff --git a/gcc/config/moxie/moxie.c b/gcc/config/moxie/moxie.c index 9d376f1959b..0de591e8d18 100644 --- a/gcc/config/moxie/moxie.c +++ b/gcc/config/moxie/moxie.c @@ -27,6 +27,7 @@ #include "tree.h" #include "df.h" #include "regs.h" +#include "memmodel.h" #include "emit-rtl.h" #include "diagnostic-core.h" #include "output.h" diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c index 93431765562..50f6815e32f 100644 --- a/gcc/config/msp430/msp430.c +++ b/gcc/config/msp430/msp430.c @@ -27,6 +27,7 @@ #include "tree.h" #include "gimple-expr.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "regs.h" #include "emit-rtl.h" diff --git a/gcc/config/nds32/nds32-cost.c b/gcc/config/nds32/nds32-cost.c index e6a29fc9dbf..a38e3483fa3 100644 --- a/gcc/config/nds32/nds32-cost.c +++ b/gcc/config/nds32/nds32-cost.c @@ -27,6 +27,7 @@ #include "target.h" #include "rtl.h" #include "tree.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" /* For GEN_FCN. */ #include "recog.h" diff --git a/gcc/config/nds32/nds32-intrinsic.c b/gcc/config/nds32/nds32-intrinsic.c index fabf262e3cb..d3428ca2e43 100644 --- a/gcc/config/nds32/nds32-intrinsic.c +++ b/gcc/config/nds32/nds32-intrinsic.c @@ -27,6 +27,7 @@ #include "target.h" #include "rtl.h" #include "tree.h" +#include "memmodel.h" #include "optabs.h" /* For GEN_FCN. */ #include "diagnostic-core.h" #include "stor-layout.h" diff --git a/gcc/config/nds32/nds32-md-auxiliary.c b/gcc/config/nds32/nds32-md-auxiliary.c index def8eda417e..c4f3aac3dfc 100644 --- a/gcc/config/nds32/nds32-md-auxiliary.c +++ b/gcc/config/nds32/nds32-md-auxiliary.c @@ -28,6 +28,7 @@ #include "target.h" #include "rtl.h" #include "tree.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" /* For GEN_FCN. */ #include "recog.h" diff --git a/gcc/config/nds32/nds32-memory-manipulation.c b/gcc/config/nds32/nds32-memory-manipulation.c index 4c26dcc7bbc..0b0acf757d2 100644 --- a/gcc/config/nds32/nds32-memory-manipulation.c +++ b/gcc/config/nds32/nds32-memory-manipulation.c @@ -27,6 +27,7 @@ #include "backend.h" #include "target.h" #include "rtl.h" +#include "memmodel.h" #include "emit-rtl.h" #include "explow.h" diff --git a/gcc/config/nds32/nds32-predicates.c b/gcc/config/nds32/nds32-predicates.c index 361d0018627..251219f95ab 100644 --- a/gcc/config/nds32/nds32-predicates.c +++ b/gcc/config/nds32/nds32-predicates.c @@ -27,6 +27,7 @@ #include "target.h" #include "rtl.h" #include "tree.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" /* For GEN_FCN. */ #include "emit-rtl.h" diff --git a/gcc/config/nds32/nds32.c b/gcc/config/nds32/nds32.c index 7b0d7474517..6a0e53fc180 100644 --- a/gcc/config/nds32/nds32.c +++ b/gcc/config/nds32/nds32.c @@ -28,6 +28,7 @@ #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" /* For GEN_FCN. */ #include "regs.h" diff --git a/gcc/config/nios2/nios2.c b/gcc/config/nios2/nios2.c index 632adadb072..8afb46838c4 100644 --- a/gcc/config/nios2/nios2.c +++ b/gcc/config/nios2/nios2.c @@ -28,6 +28,7 @@ #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" #include "regs.h" diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index 16e04a4f726..6ec8eb41eaa 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -28,6 +28,7 @@ #include "tree.h" #include "cfghooks.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "expmed.h" #include "optabs.h" diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index a02010c9ccf..e04abd43cd0 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" #include "coretypes.h" +#include "memmodel.h" #include "backend.h" #include "target.h" #include "rtl.h" diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c index 7fa08cbf66a..1dc3eefab30 100644 --- a/gcc/config/pdp11/pdp11.c +++ b/gcc/config/pdp11/pdp11.c @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "regs.h" diff --git a/gcc/config/rl78/rl78.c b/gcc/config/rl78/rl78.c index a4e4be27a6a..08ab8996f4c 100644 --- a/gcc/config/rl78/rl78.c +++ b/gcc/config/rl78/rl78.c @@ -26,6 +26,7 @@ #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "optabs.h" diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c index c98a54f9957..b7ca47286fb 100644 --- a/gcc/config/rs6000/rs6000-c.c +++ b/gcc/config/rs6000/rs6000-c.c @@ -25,6 +25,7 @@ #include "coretypes.h" #include "target.h" #include "c-family/c-common.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "stor-layout.h" diff --git a/gcc/config/rx/rx.c b/gcc/config/rx/rx.c index 8dfc8856abe..44c6b68ce7c 100644 --- a/gcc/config/rx/rx.c +++ b/gcc/config/rx/rx.c @@ -31,6 +31,7 @@ #include "tree.h" #include "cfghooks.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "regs.h" #include "emit-rtl.h" diff --git a/gcc/config/s390/s390-c.c b/gcc/config/s390/s390-c.c index cd3584bfdda..fcf74774340 100644 --- a/gcc/config/s390/s390-c.c +++ b/gcc/config/s390/s390-c.c @@ -34,6 +34,7 @@ #include "tree.h" #include "c-family/c-common.h" #include "c/c-tree.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "c-family/c-pragma.h" diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 04d6d44bce3..f69b470685e 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see #include "cfghooks.h" #include "cfgloop.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "expmed.h" diff --git a/gcc/config/sh/sh-c.c b/gcc/config/sh/sh-c.c index b854a69c8ce..595b5307f59 100644 --- a/gcc/config/sh/sh-c.c +++ b/gcc/config/sh/sh-c.c @@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see #include "coretypes.h" #include "target.h" #include "c-family/c-common.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "attribs.h" diff --git a/gcc/config/sh/sh-mem.cc b/gcc/config/sh/sh-mem.cc index 6128adfde7e..1773f1df4d3 100644 --- a/gcc/config/sh/sh-mem.cc +++ b/gcc/config/sh/sh-mem.cc @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "basic-block.h" #include "rtl.h" #include "tree.h" +#include "memmodel.h" #include "tm_p.h" #include "emit-rtl.h" #include "explow.h" diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 4152ecf28f4..cf5231ef16d 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see #include "gimple.h" #include "cfghooks.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "optabs.h" diff --git a/gcc/config/sh/sh_treg_combine.cc b/gcc/config/sh/sh_treg_combine.cc index 4d40715db79..5de3338e43b 100644 --- a/gcc/config/sh/sh_treg_combine.cc +++ b/gcc/config/sh/sh_treg_combine.cc @@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see #include "target.h" #include "rtl.h" #include "tree.h" +#include "memmodel.h" #include "optabs.h" #include "emit-rtl.h" #include "recog.h" diff --git a/gcc/config/sol2.c b/gcc/config/sol2.c index 30c525acbc3..fcab9de054c 100644 --- a/gcc/config/sol2.c +++ b/gcc/config/sol2.c @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see #include "target.h" #include "rtl.h" #include "tree.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "diagnostic-core.h" diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c index 28173e5123c..5b59b7270a9 100644 --- a/gcc/config/spu/spu.c +++ b/gcc/config/spu/spu.c @@ -25,6 +25,7 @@ #include "cfghooks.h" #include "cfgloop.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "expmed.h" diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c index 1eb95f57f9f..531a7e92505 100644 --- a/gcc/config/stormy16/stormy16.c +++ b/gcc/config/stormy16/stormy16.c @@ -27,6 +27,7 @@ #include "tree.h" #include "gimple.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "optabs.h" diff --git a/gcc/config/tilegx/tilegx.c b/gcc/config/tilegx/tilegx.c index 0ef7559e887..76a74551581 100644 --- a/gcc/config/tilegx/tilegx.c +++ b/gcc/config/tilegx/tilegx.c @@ -21,6 +21,7 @@ #include "config.h" #include "system.h" #include "coretypes.h" +#include "memmodel.h" #include "backend.h" #include "target.h" #include "rtl.h" diff --git a/gcc/config/tilepro/tilepro.c b/gcc/config/tilepro/tilepro.c index 505c7a4e582..5a75349d70a 100644 --- a/gcc/config/tilepro/tilepro.c +++ b/gcc/config/tilepro/tilepro.c @@ -27,6 +27,7 @@ #include "tree.h" #include "gimple.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "expmed.h" diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c index f1716d1a9cd..47344fc68e7 100644 --- a/gcc/config/v850/v850.c +++ b/gcc/config/v850/v850.c @@ -26,6 +26,7 @@ #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "insn-config.h" diff --git a/gcc/config/vax/vax.c b/gcc/config/vax/vax.c index 06ab5715ec3..732ebeeb36a 100644 --- a/gcc/config/vax/vax.c +++ b/gcc/config/vax/vax.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" #include "regs.h" diff --git a/gcc/config/visium/visium.c b/gcc/config/visium/visium.c index a0035c6bd1e..c04b345479a 100644 --- a/gcc/config/visium/visium.c +++ b/gcc/config/visium/visium.c @@ -27,6 +27,7 @@ #include "tree.h" #include "gimple-expr.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "expmed.h" diff --git a/gcc/config/vms/vms-c.c b/gcc/config/vms/vms-c.c index 392b2db8778..12c9c78a03c 100644 --- a/gcc/config/vms/vms-c.c +++ b/gcc/config/vms/vms-c.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "c-family/c-common.h" #include "c/c-tree.h" +#include "memmodel.h" #include "tm_p.h" #include "c-family/c-pragma.h" #include "toplev.h" diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c index 07c9e8f1fb2..60e50296d34 100644 --- a/gcc/config/xtensa/xtensa.c +++ b/gcc/config/xtensa/xtensa.c @@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see #include "gimple.h" #include "cfghooks.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "optabs.h" diff --git a/gcc/coretypes.h b/gcc/coretypes.h index fe1e984311c..70f909dbf7f 100644 --- a/gcc/coretypes.h +++ b/gcc/coretypes.h @@ -331,34 +331,6 @@ enum symbol_visibility VISIBILITY_INTERNAL }; -/* Suppose that higher bits are target dependent. */ -#define MEMMODEL_MASK ((1<<16)-1) - -/* Legacy sync operations set this upper flag in the memory model. This allows - targets that need to do something stronger for sync operations to - differentiate with their target patterns and issue a more appropriate insn - sequence. See bugzilla 65697 for background. */ -#define MEMMODEL_SYNC (1<<15) - -/* Memory model without SYNC bit for targets/operations that do not care. */ -#define MEMMODEL_BASE_MASK (MEMMODEL_SYNC-1) - -/* Memory model types for the __atomic* builtins. - This must match the order in libstdc++-v3/include/bits/atomic_base.h. */ -enum memmodel -{ - MEMMODEL_RELAXED = 0, - MEMMODEL_CONSUME = 1, - MEMMODEL_ACQUIRE = 2, - MEMMODEL_RELEASE = 3, - MEMMODEL_ACQ_REL = 4, - MEMMODEL_SEQ_CST = 5, - MEMMODEL_LAST = 6, - MEMMODEL_SYNC_ACQUIRE = MEMMODEL_ACQUIRE | MEMMODEL_SYNC, - MEMMODEL_SYNC_RELEASE = MEMMODEL_RELEASE | MEMMODEL_SYNC, - MEMMODEL_SYNC_SEQ_CST = MEMMODEL_SEQ_CST | MEMMODEL_SYNC -}; - /* Support for user-provided GGC and PCH markers. The first parameter is a pointer to a pointer, the second a cookie. */ typedef void (*gt_pointer_operator) (void *, void *); diff --git a/gcc/coverage.c b/gcc/coverage.c index a759831ab1a..8810710be4f 100644 --- a/gcc/coverage.c +++ b/gcc/coverage.c @@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "tree-pass.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "cgraph.h" diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b01e196667d..d792fb4e79a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2016-10-13 Thomas Preud'homme + + * decl2.c: Include memmodel.h. + * rtti.c: Likewise. + 2016-10-11 Jason Merrill PR c++/77742 diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 5a04bc7e31e..ea9d379989d 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" #include "coretypes.h" +#include "memmodel.h" #include "target.h" #include "cp-tree.h" #include "c-family/c-common.h" diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c index a8827615a7c..cfbc3d40680 100644 --- a/gcc/cp/rtti.c +++ b/gcc/cp/rtti.c @@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see #include "coretypes.h" #include "target.h" #include "cp-tree.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "intl.h" diff --git a/gcc/cppbuiltin.c b/gcc/cppbuiltin.c index 69ccdb91846..3a86b2a10c8 100644 --- a/gcc/cppbuiltin.c +++ b/gcc/cppbuiltin.c @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" #include "coretypes.h" +#include "memmodel.h" #include "target.h" #include "tree.h" #include "version.h" diff --git a/gcc/cprop.c b/gcc/cprop.c index 199e990a15d..6b4c0b8fa38 100644 --- a/gcc/cprop.c +++ b/gcc/cprop.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "cfghooks.h" #include "df.h" #include "insn-config.h" +#include "memmodel.h" #include "emit-rtl.h" #include "recog.h" #include "diagnostic-core.h" diff --git a/gcc/cse.c b/gcc/cse.c index 7069fab6b38..8b9e4a116ac 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "cfghooks.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "regs.h" diff --git a/gcc/cselib.c b/gcc/cselib.c index 24e15bca211..3e1e9e75a2e 100644 --- a/gcc/cselib.c +++ b/gcc/cselib.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "regs.h" #include "emit-rtl.h" diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 52307f3cd3e..33014174dab 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -73,6 +73,7 @@ along with GCC; see the file COPYING3. If not see #include "function.h" #include "rtl.h" #include "tree.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "insn-config.h" diff --git a/gcc/dce.c b/gcc/dce.c index d5102873f60..154469c2f0a 100644 --- a/gcc/dce.c +++ b/gcc/dce.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "predict.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "emit-rtl.h" /* FIXME: Can go away once crtl is moved to rtl.h. */ #include "cfgrtl.h" diff --git a/gcc/df-core.c b/gcc/df-core.c index e531d581c23..f84d2742d4d 100644 --- a/gcc/df-core.c +++ b/gcc/df-core.c @@ -380,6 +380,7 @@ are write-only operations. #include "backend.h" #include "rtl.h" #include "df.h" +#include "memmodel.h" #include "emit-rtl.h" #include "cfganal.h" #include "tree-pass.h" diff --git a/gcc/df-problems.c b/gcc/df-problems.c index 290281ccd4f..6dbc126b698 100644 --- a/gcc/df-problems.c +++ b/gcc/df-problems.c @@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see #include "target.h" #include "rtl.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "cfganal.h" diff --git a/gcc/df-scan.c b/gcc/df-scan.c index c8dbf8ddb00..7cfd34b5419 100644 --- a/gcc/df-scan.c +++ b/gcc/df-scan.c @@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "regs.h" #include "emit-rtl.h" /* FIXME: Can go away once crtl is moved to rtl.h. */ diff --git a/gcc/dojump.c b/gcc/dojump.c index d437b974526..5a32c34aee6 100644 --- a/gcc/dojump.c +++ b/gcc/dojump.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "predict.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" #include "emit-rtl.h" diff --git a/gcc/dse.c b/gcc/dse.c index 9d222a947a1..95d5757140e 100644 --- a/gcc/dse.c +++ b/gcc/dse.c @@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see #include "gimple.h" #include "predict.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "gimple-ssa.h" #include "expmed.h" diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c index cad550916d4..47335388500 100644 --- a/gcc/dwarf2asm.c +++ b/gcc/dwarf2asm.c @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see #include "target.h" #include "rtl.h" #include "tree.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "varasm.h" diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c index 6491d5aaf4c..da9da52353e 100644 --- a/gcc/dwarf2cfi.c +++ b/gcc/dwarf2cfi.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "tree-pass.h" +#include "memmodel.h" #include "tm_p.h" #include "emit-rtl.h" #include "stor-layout.h" diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index a84deb70f98..4376751a529 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -62,6 +62,7 @@ along with GCC; see the file COPYING3. If not see #include "function.h" #include "rtl.h" #include "tree.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "insn-config.h" diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 2d6d1eb6c13..387438ce7f8 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -34,6 +34,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" #include "coretypes.h" +#include "memmodel.h" #include "backend.h" #include "target.h" #include "rtl.h" diff --git a/gcc/except.c b/gcc/except.c index 800ca2a27ba..f0a1be0099f 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -118,6 +118,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "cfghooks.h" #include "tree-pass.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "expmed.h" diff --git a/gcc/explow.c b/gcc/explow.c index b56aea69477..fbebcbd8e47 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "function.h" #include "rtl.h" #include "tree.h" +#include "memmodel.h" #include "tm_p.h" #include "expmed.h" #include "optabs.h" diff --git a/gcc/expmed.c b/gcc/expmed.c index 2f789a2f075..fec0bbde8e8 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "predict.h" +#include "memmodel.h" #include "tm_p.h" #include "expmed.h" #include "optabs.h" diff --git a/gcc/expr.c b/gcc/expr.c index e6d110dd027..b587da82180 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "gimple.h" #include "predict.h" +#include "memmodel.h" #include "tm_p.h" #include "ssa.h" #include "expmed.h" diff --git a/gcc/final.c b/gcc/final.c index 29c12fddc67..52d1589ad6f 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -52,6 +52,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "cfghooks.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "regs.h" diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 02aa484a727..e2e05545fc0 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -49,6 +49,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "gimple.h" #include "predict.h" +#include "memmodel.h" #include "tm_p.h" #include "tree-ssa-operands.h" #include "optabs-query.h" diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 899e15ecf1f..82ab03de14d 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2016-10-13 Thomas Preud'homme + + * trans-intrinsic.c: Include memmodel.h. + 2016-10-13 Andre Vehreschild PR fortran/72832 diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c index 9d5e33c2114..a9825ea7c49 100644 --- a/gcc/fortran/trans-intrinsic.c +++ b/gcc/fortran/trans-intrinsic.c @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" #include "coretypes.h" +#include "memmodel.h" #include "tm.h" /* For UNITS_PER_WORD. */ #include "tree.h" #include "gfortran.h" diff --git a/gcc/function.c b/gcc/function.c index 6f906ab0f42..c71ddcc3ab8 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -41,6 +41,7 @@ along with GCC; see the file COPYING3. If not see #include "gimple-expr.h" #include "cfghooks.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "expmed.h" diff --git a/gcc/fwprop.c b/gcc/fwprop.c index 30d5739f0e3..4365ff0db90 100644 --- a/gcc/fwprop.c +++ b/gcc/fwprop.c @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "predict.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "emit-rtl.h" diff --git a/gcc/gcse.c b/gcc/gcse.c index c2c0e8ec690..9e396fea581 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -141,6 +141,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "predict.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "print-rtl.h" diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c index 6e0a9b9b626..dbcdcfcca71 100644 --- a/gcc/genattrtab.c +++ b/gcc/genattrtab.c @@ -5159,6 +5159,7 @@ write_header (FILE *outf) fprintf (outf, "#include \"stor-layout.h\"\n"); fprintf (outf, "#include \"calls.h\"\n"); fprintf (outf, "#include \"insn-attr.h\"\n"); + fprintf (outf, "#include \"memmodel.h\"\n"); fprintf (outf, "#include \"tm_p.h\"\n"); fprintf (outf, "#include \"insn-config.h\"\n"); fprintf (outf, "#include \"recog.h\"\n"); diff --git a/gcc/genautomata.c b/gcc/genautomata.c index 92c8b5c390f..f4c125eca8b 100644 --- a/gcc/genautomata.c +++ b/gcc/genautomata.c @@ -9651,6 +9651,7 @@ main (int argc, const char **argv) "#include \"stor-layout.h\"\n" "#include \"calls.h\"\n" "#include \"rtl.h\"\n" + "#include \"memmodel.h\"\n" "#include \"tm_p.h\"\n" "#include \"insn-config.h\"\n" "#include \"recog.h\"\n" diff --git a/gcc/genconditions.c b/gcc/genconditions.c index d8b0ebba56b..923b23c81d9 100644 --- a/gcc/genconditions.c +++ b/gcc/genconditions.c @@ -72,6 +72,7 @@ write_header (void) #include \"tm.h\"\n\ #include \"insn-constants.h\"\n\ #include \"rtl.h\"\n\ +#include \"memmodel.h\"\n\ #include \"tm_p.h\"\n\ #include \"hard-reg-set.h\"\n\ #include \"function.h\"\n\ @@ -94,7 +95,6 @@ write_header (void) #include \"resource.h\"\n\ #include \"diagnostic-core.h\"\n\ #include \"reload.h\"\n\ -#include \"memmodel.h\"\n\ #include \"tm-constrs.h\"\n"); if (saw_eh_return) diff --git a/gcc/genemit.c b/gcc/genemit.c index d5e07a97a6d..fe298951c78 100644 --- a/gcc/genemit.c +++ b/gcc/genemit.c @@ -773,6 +773,7 @@ from the machine description file `md'. */\n\n"); printf ("#include \"varasm.h\"\n"); printf ("#include \"stor-layout.h\"\n"); printf ("#include \"calls.h\"\n"); + printf ("#include \"memmodel.h\"\n"); printf ("#include \"tm_p.h\"\n"); printf ("#include \"flags.h\"\n"); printf ("#include \"insn-config.h\"\n"); @@ -792,7 +793,6 @@ from the machine description file `md'. */\n\n"); printf ("#include \"reload.h\"\n"); printf ("#include \"diagnostic-core.h\"\n"); printf ("#include \"regs.h\"\n"); - printf ("#include \"memmodel.h\"\n"); printf ("#include \"tm-constrs.h\"\n"); printf ("#include \"ggc.h\"\n"); printf ("#include \"dumpfile.h\"\n"); diff --git a/gcc/gengtype.c b/gcc/gengtype.c index cecd552f714..760f9859184 100644 --- a/gcc/gengtype.c +++ b/gcc/gengtype.c @@ -1710,14 +1710,14 @@ open_base_files (void) "config.h", "system.h", "coretypes.h", "backend.h", "predict.h", "tree.h", "rtl.h", "gimple.h", "fold-const.h", "insn-codes.h", "splay-tree.h", "alias.h", "insn-config.h", "flags.h", "expmed.h", "dojump.h", - "explow.h", "calls.h", "cilk.h", "emit-rtl.h", "varasm.h", "stmt.h", - "expr.h", "alloc-pool.h", "cselib.h", "insn-addr.h", "optabs.h", - "libfuncs.h", "debug.h", "internal-fn.h", "gimple-fold.h", "tree-eh.h", - "gimple-iterator.h", "gimple-ssa.h", "tree-cfg.h", "tree-vrp.h", - "tree-phinodes.h", "ssa-iterators.h", "stringpool.h", "tree-ssanames.h", - "tree-ssa-loop.h", "tree-ssa-loop-ivopts.h", "tree-ssa-loop-manip.h", - "tree-ssa-loop-niter.h", "tree-into-ssa.h", "tree-dfa.h", - "tree-ssa.h", "reload.h", "cpp-id-data.h", "tree-chrec.h", + "explow.h", "calls.h", "cilk.h", "memmodel.h", "emit-rtl.h", "varasm.h", + "stmt.h", "expr.h", "alloc-pool.h", "cselib.h", "insn-addr.h", + "optabs.h", "libfuncs.h", "debug.h", "internal-fn.h", "gimple-fold.h", + "tree-eh.h", "gimple-iterator.h", "gimple-ssa.h", "tree-cfg.h", + "tree-vrp.h", "tree-phinodes.h", "ssa-iterators.h", "stringpool.h", + "tree-ssanames.h", "tree-ssa-loop.h", "tree-ssa-loop-ivopts.h", + "tree-ssa-loop-manip.h", "tree-ssa-loop-niter.h", "tree-into-ssa.h", + "tree-dfa.h", "tree-ssa.h", "reload.h", "cpp-id-data.h", "tree-chrec.h", "except.h", "output.h", "cfgloop.h", "target.h", "lto-streamer.h", "target-globals.h", "ipa-ref.h", "cgraph.h", "symbol-summary.h", "ipa-prop.h", "ipa-inline.h", "dwarf2out.h", "omp-low.h", NULL diff --git a/gcc/genopinit.c b/gcc/genopinit.c index 5f4f354384e..b0e013c533e 100644 --- a/gcc/genopinit.c +++ b/gcc/genopinit.c @@ -257,6 +257,7 @@ main (int argc, const char **argv) "#include \"varasm.h\"\n" "#include \"stor-layout.h\"\n" "#include \"calls.h\"\n" + "#include \"memmodel.h\"\n" "#include \"tm_p.h\"\n" "#include \"flags.h\"\n" "#include \"insn-config.h\"\n" diff --git a/gcc/genoutput.c b/gcc/genoutput.c index f792cb462bf..9b6dd09b655 100644 --- a/gcc/genoutput.c +++ b/gcc/genoutput.c @@ -219,6 +219,7 @@ output_prologue (void) printf ("#include \"expmed.h\"\n"); printf ("#include \"dojump.h\"\n"); printf ("#include \"explow.h\"\n"); + printf ("#include \"memmodel.h\"\n"); printf ("#include \"emit-rtl.h\"\n"); printf ("#include \"stmt.h\"\n"); printf ("#include \"expr.h\"\n"); @@ -231,7 +232,6 @@ output_prologue (void) printf ("#include \"diagnostic-core.h\"\n"); printf ("#include \"output.h\"\n"); printf ("#include \"target.h\"\n"); - printf ("#include \"memmodel.h\"\n"); printf ("#include \"tm-constrs.h\"\n"); } diff --git a/gcc/genpeep.c b/gcc/genpeep.c index e1997e03e47..a0a7a3b21ad 100644 --- a/gcc/genpeep.c +++ b/gcc/genpeep.c @@ -366,6 +366,7 @@ from the machine description file `md'. */\n\n"); printf ("#include \"varasm.h\"\n"); printf ("#include \"stor-layout.h\"\n"); printf ("#include \"calls.h\"\n"); + printf ("#include \"memmodel.h\"\n"); printf ("#include \"tm_p.h\"\n"); printf ("#include \"regs.h\"\n"); printf ("#include \"output.h\"\n"); @@ -373,7 +374,6 @@ from the machine description file `md'. */\n\n"); printf ("#include \"except.h\"\n"); printf ("#include \"diagnostic-core.h\"\n"); printf ("#include \"flags.h\"\n"); - printf ("#include \"memmodel.h\"\n"); printf ("#include \"tm-constrs.h\"\n\n"); printf ("extern rtx peep_operand[];\n\n"); diff --git a/gcc/genpreds.c b/gcc/genpreds.c index 6db1b7b0301..23a7e1841d5 100644 --- a/gcc/genpreds.c +++ b/gcc/genpreds.c @@ -1569,6 +1569,7 @@ write_insn_preds_c (void) #include \"varasm.h\"\n\ #include \"stor-layout.h\"\n\ #include \"calls.h\"\n\ +#include \"memmodel.h\"\n\ #include \"tm_p.h\"\n\ #include \"insn-config.h\"\n\ #include \"recog.h\"\n\ @@ -1580,7 +1581,6 @@ write_insn_preds_c (void) #include \"reload.h\"\n\ #include \"regs.h\"\n\ #include \"emit-rtl.h\"\n\ -#include \"memmodel.h\"\n\ #include \"tm-constrs.h\"\n"); FOR_ALL_PREDICATES (p) diff --git a/gcc/genrecog.c b/gcc/genrecog.c index 77861074492..3e5b0f7a9e0 100644 --- a/gcc/genrecog.c +++ b/gcc/genrecog.c @@ -4181,6 +4181,7 @@ write_header (void) #include \"backend.h\"\n\ #include \"predict.h\"\n\ #include \"rtl.h\"\n\ +#include \"memmodel.h\"\n\ #include \"tm_p.h\"\n\ #include \"emit-rtl.h\"\n\ #include \"insn-config.h\"\n\ @@ -4192,7 +4193,6 @@ write_header (void) #include \"diagnostic-core.h\"\n\ #include \"reload.h\"\n\ #include \"regs.h\"\n\ -#include \"memmodel.h\"\n\ #include \"tm-constrs.h\"\n\ \n"); diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c index 2b42b6e4f39..2148595394d 100644 --- a/gcc/ggc-page.c +++ b/gcc/ggc-page.c @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see #include "alias.h" #include "tree.h" #include "rtl.h" +#include "memmodel.h" #include "tm_p.h" #include "diagnostic-core.h" #include "flags.h" diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog index 93bf4c12c2b..28d4f6f295b 100644 --- a/gcc/go/ChangeLog +++ b/gcc/go/ChangeLog @@ -1,3 +1,7 @@ +2016-10-13 Thomas Preud'homme + + * go-backend.c: Include memmodel.h. + 2016-10-10 Than McIntosh * go-gcc.h: New file. diff --git a/gcc/go/go-backend.c b/gcc/go/go-backend.c index 99609f0fc16..3a56f0a45df 100644 --- a/gcc/go/go-backend.c +++ b/gcc/go/go-backend.c @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see #include "coretypes.h" #include "target.h" #include "tree.h" +#include "memmodel.h" #include "tm_p.h" #include "diagnostic.h" #include "simple-object.h" diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index 0ad080f253c..fea9f509216 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -130,6 +130,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "cfghooks.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "regs.h" diff --git a/gcc/hsa-brig.c b/gcc/hsa-brig.c index 4dc568c54e4..66ff8f97e07 100644 --- a/gcc/hsa-brig.c +++ b/gcc/hsa-brig.c @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see #include "coretypes.h" #include "tm.h" #include "target.h" +#include "memmodel.h" #include "tm_p.h" #include "is-a.h" #include "vec.h" diff --git a/gcc/hsa-gen.c b/gcc/hsa-gen.c index 6f7083a15c9..21c35e6089f 100644 --- a/gcc/hsa-gen.c +++ b/gcc/hsa-gen.c @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" #include "coretypes.h" +#include "memmodel.h" #include "tm.h" #include "is-a.h" #include "hash-table.h" diff --git a/gcc/hw-doloop.c b/gcc/hw-doloop.c index c73b1060da1..a046c24c9d3 100644 --- a/gcc/hw-doloop.c +++ b/gcc/hw-doloop.c @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see #include "df.h" #include "insn-config.h" #include "regs.h" +#include "memmodel.h" #include "emit-rtl.h" #include "recog.h" #include "cfgrtl.h" diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 24542f00848..68c7c3f7664 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -26,6 +26,7 @@ #include "tree.h" #include "cfghooks.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "expmed.h" #include "optabs.h" diff --git a/gcc/init-regs.c b/gcc/init-regs.c index bb20978b2c2..3fbaee1cc44 100644 --- a/gcc/init-regs.c +++ b/gcc/init-regs.c @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "emit-rtl.h" #include "expr.h" #include "tree-pass.h" diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c index 029a534e9eb..0b32d5f635b 100644 --- a/gcc/internal-fn.c +++ b/gcc/internal-fn.c @@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-vrp.h" #include "tree-ssanames.h" #include "expmed.h" +#include "memmodel.h" #include "optabs.h" #include "emit-rtl.h" #include "diagnostic-core.h" diff --git a/gcc/ira-build.c b/gcc/ira-build.c index caa770e849f..4df78d67789 100644 --- a/gcc/ira-build.c +++ b/gcc/ira-build.c @@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see #include "df.h" #include "insn-config.h" #include "regs.h" +#include "memmodel.h" #include "ira.h" #include "ira-int.h" #include "params.h" diff --git a/gcc/ira-color.c b/gcc/ira-color.c index 84334791e2a..5bbb33af747 100644 --- a/gcc/ira-color.c +++ b/gcc/ira-color.c @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "predict.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "regs.h" diff --git a/gcc/ira-conflicts.c b/gcc/ira-conflicts.c index 06a3eb56e94..17e47803922 100644 --- a/gcc/ira-conflicts.c +++ b/gcc/ira-conflicts.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "target.h" #include "rtl.h" #include "predict.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "regs.h" diff --git a/gcc/ira-costs.c b/gcc/ira-costs.c index f3d31e178af..bdd5cb5ceb6 100644 --- a/gcc/ira-costs.c +++ b/gcc/ira-costs.c @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "predict.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "regs.h" diff --git a/gcc/ira-emit.c b/gcc/ira-emit.c index 691bd1d20c4..c1c69490fac 100644 --- a/gcc/ira-emit.c +++ b/gcc/ira-emit.c @@ -75,6 +75,7 @@ along with GCC; see the file COPYING3. If not see #include "df.h" #include "insn-config.h" #include "regs.h" +#include "memmodel.h" #include "ira.h" #include "ira-int.h" #include "cfgrtl.h" diff --git a/gcc/ira-lives.c b/gcc/ira-lives.c index ff6d1006802..6389796962f 100644 --- a/gcc/ira-lives.c +++ b/gcc/ira-lives.c @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "predict.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "regs.h" diff --git a/gcc/ira.c b/gcc/ira.c index c2e04c2b7a8..94cfe2a04a1 100644 --- a/gcc/ira.c +++ b/gcc/ira.c @@ -371,6 +371,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "regs.h" diff --git a/gcc/jump.c b/gcc/jump.c index 2164c3b8626..e4bb93ff5eb 100644 --- a/gcc/jump.c +++ b/gcc/jump.c @@ -42,6 +42,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "cfghooks.h" #include "tree-pass.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "regs.h" diff --git a/gcc/loop-doloop.c b/gcc/loop-doloop.c index 17a968fe6ab..a8055196014 100644 --- a/gcc/loop-doloop.c +++ b/gcc/loop-doloop.c @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "cfghooks.h" +#include "memmodel.h" #include "emit-rtl.h" #include "dojump.h" #include "expr.h" diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c index d550a841d06..551103fcf46 100644 --- a/gcc/loop-invariant.c +++ b/gcc/loop-invariant.c @@ -43,6 +43,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "cfghooks.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "regs.h" diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c index 78bec9e8521..9e13938d950 100644 --- a/gcc/loop-iv.c +++ b/gcc/loop-iv.c @@ -53,6 +53,7 @@ along with GCC; see the file COPYING3. If not see #include "backend.h" #include "rtl.h" #include "df.h" +#include "memmodel.h" #include "emit-rtl.h" #include "diagnostic-core.h" #include "cfgloop.h" diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c index 2d5fe48411b..494504d61e6 100644 --- a/gcc/loop-unroll.c +++ b/gcc/loop-unroll.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "cfghooks.h" +#include "memmodel.h" #include "optabs.h" #include "emit-rtl.h" #include "recog.h" diff --git a/gcc/lower-subreg.c b/gcc/lower-subreg.c index 4ea763b1e27..9675eedeca8 100644 --- a/gcc/lower-subreg.c +++ b/gcc/lower-subreg.c @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "cfghooks.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "expmed.h" #include "insn-config.h" diff --git a/gcc/lra-assigns.c b/gcc/lra-assigns.c index 7248f89869e..936a16990ef 100644 --- a/gcc/lra-assigns.c +++ b/gcc/lra-assigns.c @@ -83,6 +83,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "predict.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "regs.h" diff --git a/gcc/lra-coalesce.c b/gcc/lra-coalesce.c index 178ed3ff5cb..0a9f7793ee8 100644 --- a/gcc/lra-coalesce.c +++ b/gcc/lra-coalesce.c @@ -51,6 +51,7 @@ along with GCC; see the file COPYING3. If not see #include "df.h" #include "insn-config.h" #include "regs.h" +#include "memmodel.h" #include "ira.h" #include "recog.h" #include "lra-int.h" diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index bf5b521f51c..117d84dc837 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -115,6 +115,7 @@ #include "tree.h" #include "predict.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "expmed.h" #include "optabs.h" diff --git a/gcc/lra-eliminations.c b/gcc/lra-eliminations.c index 03b315e7199..b90cbed4716 100644 --- a/gcc/lra-eliminations.c +++ b/gcc/lra-eliminations.c @@ -59,6 +59,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" #include "regs.h" diff --git a/gcc/lra-lives.c b/gcc/lra-lives.c index f761da53e45..5573ff80a53 100644 --- a/gcc/lra-lives.c +++ b/gcc/lra-lives.c @@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "predict.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "regs.h" diff --git a/gcc/lra-remat.c b/gcc/lra-remat.c index 245c6de6b44..f01c6644c42 100644 --- a/gcc/lra-remat.c +++ b/gcc/lra-remat.c @@ -60,6 +60,7 @@ along with GCC; see the file COPYING3. If not see #include "df.h" #include "insn-config.h" #include "regs.h" +#include "memmodel.h" #include "ira.h" #include "recog.h" #include "lra.h" diff --git a/gcc/lra-spills.c b/gcc/lra-spills.c index 768ae82f772..6e044cdfced 100644 --- a/gcc/lra-spills.c +++ b/gcc/lra-spills.c @@ -64,6 +64,7 @@ along with GCC; see the file COPYING3. If not see #include "df.h" #include "insn-config.h" #include "regs.h" +#include "memmodel.h" #include "ira.h" #include "recog.h" #include "output.h" diff --git a/gcc/lra.c b/gcc/lra.c index cb2bd35cffd..4165492796c 100644 --- a/gcc/lra.c +++ b/gcc/lra.c @@ -109,6 +109,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "predict.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" #include "regs.h" diff --git a/gcc/memmodel.h b/gcc/memmodel.h index d53eb7bc9d9..f21f5f5557e 100644 --- a/gcc/memmodel.h +++ b/gcc/memmodel.h @@ -1,5 +1,5 @@ /* Prototypes of memory model helper functions. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This file is part of GCC. @@ -20,6 +20,34 @@ along with GCC; see the file COPYING3. If not see #ifndef GCC_MEMMODEL_H #define GCC_MEMMODEL_H +/* Suppose that higher bits are target dependent. */ +#define MEMMODEL_MASK ((1<<16)-1) + +/* Legacy sync operations set this upper flag in the memory model. This allows + targets that need to do something stronger for sync operations to + differentiate with their target patterns and issue a more appropriate insn + sequence. See bugzilla 65697 for background. */ +#define MEMMODEL_SYNC (1<<15) + +/* Memory model without SYNC bit for targets/operations that do not care. */ +#define MEMMODEL_BASE_MASK (MEMMODEL_SYNC-1) + +/* Memory model types for the __atomic* builtins. + This must match the order in libstdc++-v3/include/bits/atomic_base.h. */ +enum memmodel +{ + MEMMODEL_RELAXED = 0, + MEMMODEL_CONSUME = 1, + MEMMODEL_ACQUIRE = 2, + MEMMODEL_RELEASE = 3, + MEMMODEL_ACQ_REL = 4, + MEMMODEL_SEQ_CST = 5, + MEMMODEL_LAST = 6, + MEMMODEL_SYNC_ACQUIRE = MEMMODEL_ACQUIRE | MEMMODEL_SYNC, + MEMMODEL_SYNC_RELEASE = MEMMODEL_RELEASE | MEMMODEL_SYNC, + MEMMODEL_SYNC_SEQ_CST = MEMMODEL_SEQ_CST | MEMMODEL_SYNC +}; + /* Return the memory model from a host integer. */ static inline enum memmodel memmodel_from_int (unsigned HOST_WIDE_INT val) diff --git a/gcc/mode-switching.c b/gcc/mode-switching.c index 121b9704905..37514177f66 100644 --- a/gcc/mode-switching.c +++ b/gcc/mode-switching.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "cfghooks.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "regs.h" #include "emit-rtl.h" diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c index 6e87a6f2607..3a58f8ba583 100644 --- a/gcc/modulo-sched.c +++ b/gcc/modulo-sched.c @@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "cfghooks.h" #include "df.h" +#include "memmodel.h" #include "optabs.h" #include "regs.h" #include "emit-rtl.h" diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 202f0bd5f2a..77f89d5ef61 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" #include "coretypes.h" +#include "memmodel.h" #include "backend.h" #include "target.h" #include "rtl.h" diff --git a/gcc/passes.c b/gcc/passes.c index 881f2293dae..e78f9ed79af 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see #include "gimple.h" #include "cfghooks.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "ssa.h" #include "emit-rtl.h" diff --git a/gcc/postreload-gcse.c b/gcc/postreload-gcse.c index da04fb74706..139da3796ea 100644 --- a/gcc/postreload-gcse.c +++ b/gcc/postreload-gcse.c @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "predict.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "emit-rtl.h" diff --git a/gcc/postreload.c b/gcc/postreload.c index 4f3a526981e..26871e8d12b 100644 --- a/gcc/postreload.c +++ b/gcc/postreload.c @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "predict.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" #include "regs.h" diff --git a/gcc/predict.c b/gcc/predict.c index 463fd0b610e..9950c095cc0 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -37,6 +37,7 @@ along with GCC; see the file COPYING3. If not see #include "cfghooks.h" #include "tree-pass.h" #include "ssa.h" +#include "memmodel.h" #include "emit-rtl.h" #include "cgraph.h" #include "coverage.h" diff --git a/gcc/print-rtl-function.c b/gcc/print-rtl-function.c index 90a0ff75620..2abae849ab9 100644 --- a/gcc/print-rtl-function.c +++ b/gcc/print-rtl-function.c @@ -31,6 +31,7 @@ along with GCC; see the file COPYING3. If not see #include "basic-block.h" #include "print-rtl.h" #include "langhooks.h" +#include "memmodel.h" #include "emit-rtl.h" extern bool flag_compact; diff --git a/gcc/recog.c b/gcc/recog.c index 6a95d7f9402..22b5aaa265a 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "cfghooks.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "regs.h" diff --git a/gcc/ree.c b/gcc/ree.c index 2929277bfd0..4ab2ad088c3 100644 --- a/gcc/ree.c +++ b/gcc/ree.c @@ -223,6 +223,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" #include "emit-rtl.h" diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index 907f28de581..4e86fa924a0 100644 --- a/gcc/reg-stack.c +++ b/gcc/reg-stack.c @@ -161,6 +161,7 @@ #include "tree.h" #include "df.h" #include "insn-config.h" +#include "memmodel.h" #include "emit-rtl.h" /* FIXME: Can go away once crtl is moved to rtl.h. */ #include "recog.h" #include "varasm.h" diff --git a/gcc/regcprop.c b/gcc/regcprop.c index 6d2581bc88e..fc8297ed53b 100644 --- a/gcc/regcprop.c +++ b/gcc/regcprop.c @@ -23,6 +23,7 @@ #include "backend.h" #include "rtl.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "regs.h" diff --git a/gcc/reginfo.c b/gcc/reginfo.c index 0cda6aa6200..31715593f1a 100644 --- a/gcc/reginfo.c +++ b/gcc/reginfo.c @@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "regs.h" diff --git a/gcc/regrename.c b/gcc/regrename.c index e0d2dd1f74c..3b95a062a10 100644 --- a/gcc/regrename.c +++ b/gcc/regrename.c @@ -24,6 +24,7 @@ #include "target.h" #include "rtl.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "regs.h" diff --git a/gcc/reload.c b/gcc/reload.c index cd0d661e224..9a859e5b45b 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -96,6 +96,7 @@ a register with any other reload. */ #include "rtl.h" #include "tree.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" #include "regs.h" diff --git a/gcc/reload1.c b/gcc/reload1.c index 55aafe46e87..89da84d0007 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "predict.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" #include "regs.h" diff --git a/gcc/reorg.c b/gcc/reorg.c index 40f143feddf..2ad3a4e8db6 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -108,6 +108,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "predict.h" +#include "memmodel.h" #include "tm_p.h" #include "expmed.h" #include "insn-config.h" diff --git a/gcc/resource.c b/gcc/resource.c index 32e3e44856d..1aa2f8cf309 100644 --- a/gcc/resource.c +++ b/gcc/resource.c @@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see #include "backend.h" #include "rtl.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "regs.h" #include "emit-rtl.h" diff --git a/gcc/rtl-chkp.c b/gcc/rtl-chkp.c index e2a34b371f0..45cf8f1eee1 100644 --- a/gcc/rtl-chkp.c +++ b/gcc/rtl-chkp.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "target.h" #include "rtl.h" #include "tree.h" +#include "memmodel.h" #include "emit-rtl.h" #include "expr.h" #include "rtl-chkp.h" diff --git a/gcc/rtl-tests.c b/gcc/rtl-tests.c index 3e9ebae02bb..723efa5a0f6 100644 --- a/gcc/rtl-tests.c +++ b/gcc/rtl-tests.c @@ -39,6 +39,7 @@ along with GCC; see the file COPYING3. If not see #include "print-rtl.h" #include "selftest.h" #include "function.h" +#include "memmodel.h" #include "emit-rtl.h" #if CHECKING_P diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 2a0a1d2d99d..a882200a4b4 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "predict.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "regs.h" diff --git a/gcc/rtlhooks.c b/gcc/rtlhooks.c index 32a994f6f3c..49f54bc97b6 100644 --- a/gcc/rtlhooks.c +++ b/gcc/rtlhooks.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "insn-config.h" +#include "memmodel.h" #include "emit-rtl.h" #include "recog.h" #include "rtlhooks-def.h" diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c index dc46351ccd2..6cd833272b8 100644 --- a/gcc/sched-deps.c +++ b/gcc/sched-deps.c @@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see #include "df.h" #include "insn-config.h" #include "regs.h" +#include "memmodel.h" #include "ira.h" #include "ira-int.h" #include "insn-attr.h" diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c index f6d1c91f768..08956a0ff96 100644 --- a/gcc/sched-rgn.c +++ b/gcc/sched-rgn.c @@ -50,6 +50,7 @@ along with GCC; see the file COPYING3. If not see #include "target.h" #include "rtl.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "emit-rtl.h" diff --git a/gcc/sdbout.c b/gcc/sdbout.c index 039d945d12a..71b46d0aa05 100644 --- a/gcc/sdbout.c +++ b/gcc/sdbout.c @@ -69,6 +69,7 @@ static GTY(()) bool sdbout_initialized; #include "rtl.h" #include "regs.h" #include "function.h" +#include "memmodel.h" #include "emit-rtl.h" #include "flags.h" #include "insn-config.h" diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c index 210b1e4edfb..26bc1422167 100644 --- a/gcc/sel-sched-ir.c +++ b/gcc/sel-sched-ir.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "rtl.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "cfgrtl.h" #include "cfganal.h" diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c index 2968bdfe797..9c33b51efe1 100644 --- a/gcc/sel-sched.c +++ b/gcc/sel-sched.c @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "rtl.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "regs.h" #include "cfgbuild.h" diff --git a/gcc/shrink-wrap.c b/gcc/shrink-wrap.c index 7285775e5e0..7345d2573ef 100644 --- a/gcc/shrink-wrap.c +++ b/gcc/shrink-wrap.c @@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "cfghooks.h" #include "df.h" +#include "memmodel.h" #include "tm_p.h" #include "regs.h" #include "insn-config.h" diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index cd3e2d08d6f..5c3dea1a349 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "predict.h" +#include "memmodel.h" #include "optabs.h" #include "emit-rtl.h" #include "recog.h" diff --git a/gcc/stack-ptr-mod.c b/gcc/stack-ptr-mod.c index ff67dec5c74..549c4637a78 100644 --- a/gcc/stack-ptr-mod.c +++ b/gcc/stack-ptr-mod.c @@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see #include "backend.h" #include "rtl.h" #include "df.h" +#include "memmodel.h" #include "emit-rtl.h" #include "tree-pass.h" diff --git a/gcc/stmt.c b/gcc/stmt.c index 39fa5e19db3..f1bf6e4f90f 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see #include "gimple.h" #include "predict.h" #include "alloc-pool.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs.h" #include "regs.h" diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 63a1454b629..f904d759e1d 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "function.h" #include "rtl.h" #include "tree.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "regs.h" diff --git a/gcc/target-globals.c b/gcc/target-globals.c index 45d5880be4d..f17cdc12282 100644 --- a/gcc/target-globals.c +++ b/gcc/target-globals.c @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see #include "optabs-query.h" #include "insn-config.h" #include "regs.h" +#include "memmodel.h" #include "ira.h" #include "ira-int.h" #include "toplev.h" diff --git a/gcc/targhooks.c b/gcc/targhooks.c index c7977be57d4..d6fd8b8a77f 100644 --- a/gcc/targhooks.c +++ b/gcc/targhooks.c @@ -55,6 +55,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "tree-ssa-alias.h" #include "gimple-expr.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "tree-vrp.h" diff --git a/gcc/toplev.c b/gcc/toplev.c index 570f4cfee6c..1df80d04442 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see #include "gimple.h" #include "alloc-pool.h" #include "timevar.h" +#include "memmodel.h" #include "tm_p.h" #include "optabs-libfuncs.h" #include "insn-config.h" diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c index 465ae310b17..3aab8e10a88 100644 --- a/gcc/tree-nested.c +++ b/gcc/tree-nested.c @@ -24,6 +24,7 @@ #include "rtl.h" #include "tree.h" #include "gimple.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "cgraph.h" diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c index be57ce4e242..7a35c1e59d3 100644 --- a/gcc/tree-outof-ssa.c +++ b/gcc/tree-outof-ssa.c @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see #include "gimple.h" #include "cfghooks.h" #include "ssa.h" +#include "memmodel.h" #include "emit-rtl.h" #include "gimple-pretty-print.h" #include "diagnostic-core.h" diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c index 1f45b995d0f..abeee92204e 100644 --- a/gcc/tree-profile.c +++ b/gcc/tree-profile.c @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" #include "coretypes.h" +#include "memmodel.h" #include "backend.h" #include "target.h" #include "tree.h" diff --git a/gcc/tree-ssa-coalesce.c b/gcc/tree-ssa-coalesce.c index 01f6c5f8239..6423cdd3cbb 100644 --- a/gcc/tree-ssa-coalesce.c +++ b/gcc/tree-ssa-coalesce.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "gimple.h" #include "predict.h" +#include "memmodel.h" #include "tm_p.h" #include "ssa.h" #include "tree-pretty-print.h" diff --git a/gcc/tree-ssa-ifcombine.c b/gcc/tree-ssa-ifcombine.c index 79fe3a8b2d0..8e5258f8879 100644 --- a/gcc/tree-ssa-ifcombine.c +++ b/gcc/tree-ssa-ifcombine.c @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see #include "gimple.h" #include "cfghooks.h" #include "tree-pass.h" +#include "memmodel.h" #include "tm_p.h" #include "ssa.h" #include "tree-pretty-print.h" diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 93626fd028f..f9211ad1ff3 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -75,6 +75,7 @@ along with GCC; see the file COPYING3. If not see #include "gimple.h" #include "cfghooks.h" #include "tree-pass.h" +#include "memmodel.h" #include "tm_p.h" #include "ssa.h" #include "expmed.h" diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c index 06354e39e78..24c05852b06 100644 --- a/gcc/tree-ssa-loop.c +++ b/gcc/tree-ssa-loop.c @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "gimple.h" #include "tree-pass.h" +#include "memmodel.h" #include "tm_p.h" #include "fold-const.h" #include "gimple-iterator.h" diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c index 7b844ddd83d..99e1b414070 100644 --- a/gcc/tree-ssa-reassoc.c +++ b/gcc/tree-ssa-reassoc.c @@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see #include "cfghooks.h" #include "alloc-pool.h" #include "tree-pass.h" +#include "memmodel.h" #include "tm_p.h" #include "ssa.h" #include "optabs-tree.h" diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index fc8bf74766b..00c1c230543 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see #include "ssa.h" #include "expmed.h" #include "insn-config.h" +#include "memmodel.h" #include "emit-rtl.h" #include "cgraph.h" #include "gimple-pretty-print.h" diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index 6cf26d9c367..c99fa4069be 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "gimple.h" #include "predict.h" +#include "memmodel.h" #include "tm_p.h" #include "ssa.h" #include "optabs-tree.h" diff --git a/gcc/ubsan.c b/gcc/ubsan.c index 5fe6f3d0e2a..6594dd17183 100644 --- a/gcc/ubsan.c +++ b/gcc/ubsan.c @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see #include "gimple.h" #include "cfghooks.h" #include "tree-pass.h" +#include "memmodel.h" #include "tm_p.h" #include "ssa.h" #include "cgraph.h" diff --git a/gcc/valtrack.c b/gcc/valtrack.c index 26a15ea42cd..9a1ae2def17 100644 --- a/gcc/valtrack.c +++ b/gcc/valtrack.c @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see #include "df.h" #include "valtrack.h" #include "regs.h" +#include "memmodel.h" #include "emit-rtl.h" /* gen_lowpart_no_emit hook implementation for DEBUG_INSNs. In DEBUG_INSNs, diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index e405f0d81b3..89788f12443 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -95,6 +95,7 @@ #include "cfghooks.h" #include "alloc-pool.h" #include "tree-pass.h" +#include "memmodel.h" #include "tm_p.h" #include "insn-config.h" #include "regs.h" diff --git a/gcc/varasm.c b/gcc/varasm.c index 99dd4cb3cfc..30fbbc5969b 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "predict.h" +#include "memmodel.h" #include "tm_p.h" #include "stringpool.h" #include "regs.h" diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index d9949a1b725..c861ca6d9e7 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,10 @@ +2016-10-13 Thomas Preud'homme + + * libgcov-profiler.c: Replace MEMMODEL_* macros by their __ATOMIC_* + equivalent. + * config/tilepro/atomic.c: Likewise and stop casting model to + enum memmodel. + 2016-10-10 Joseph Myers PR target/77586 diff --git a/libgcc/config/tilepro/atomic.c b/libgcc/config/tilepro/atomic.c index 87665f7eccb..f8a4ef53e41 100644 --- a/libgcc/config/tilepro/atomic.c +++ b/libgcc/config/tilepro/atomic.c @@ -33,11 +33,11 @@ static inline void pre_atomic_barrier (int model) { - switch ((enum memmodel) model) + switch (model) { - case MEMMODEL_RELEASE: - case MEMMODEL_ACQ_REL: - case MEMMODEL_SEQ_CST: + case __ATOMIC_RELEASE: + case __ATOMIC_ACQ_REL: + case __ATOMIC_SEQ_CST: __atomic_thread_fence (model); break; default: @@ -49,11 +49,11 @@ pre_atomic_barrier (int model) static inline void post_atomic_barrier (int model) { - switch ((enum memmodel) model) + switch (model) { - case MEMMODEL_ACQUIRE: - case MEMMODEL_ACQ_REL: - case MEMMODEL_SEQ_CST: + case __ATOMIC_ACQUIRE: + case __ATOMIC_ACQ_REL: + case __ATOMIC_SEQ_CST: __atomic_thread_fence (model); break; default: diff --git a/libgcc/libgcov-profiler.c b/libgcc/libgcov-profiler.c index d9217b9885b..38ed5f113e7 100644 --- a/libgcc/libgcov-profiler.c +++ b/libgcc/libgcov-profiler.c @@ -69,11 +69,11 @@ __gcov_interval_profiler_atomic (gcov_type *counters, gcov_type value, { gcov_type delta = value - start; if (delta < 0) - __atomic_fetch_add (&counters[steps + 1], 1, MEMMODEL_RELAXED); + __atomic_fetch_add (&counters[steps + 1], 1, __ATOMIC_RELAXED); else if (delta >= steps) - __atomic_fetch_add (&counters[steps], 1, MEMMODEL_RELAXED); + __atomic_fetch_add (&counters[steps], 1, __ATOMIC_RELAXED); else - __atomic_fetch_add (&counters[delta], 1, MEMMODEL_RELAXED); + __atomic_fetch_add (&counters[delta], 1, __ATOMIC_RELAXED); } #endif @@ -99,9 +99,9 @@ void __gcov_pow2_profiler_atomic (gcov_type *counters, gcov_type value) { if (value == 0 || (value & (value - 1))) - __atomic_fetch_add (&counters[0], 1, MEMMODEL_RELAXED); + __atomic_fetch_add (&counters[0], 1, __ATOMIC_RELAXED); else - __atomic_fetch_add (&counters[1], 1, MEMMODEL_RELAXED); + __atomic_fetch_add (&counters[1], 1, __ATOMIC_RELAXED); } #endif @@ -132,7 +132,7 @@ __gcov_one_value_profiler_body (gcov_type *counters, gcov_type value, counters[1]--; if (use_atomic) - __atomic_fetch_add (&counters[2], 1, MEMMODEL_RELAXED); + __atomic_fetch_add (&counters[2], 1, __ATOMIC_RELAXED); else counters[2]++; } @@ -361,7 +361,7 @@ void __gcov_time_profiler_atomic (gcov_type* counters) { if (!counters[0]) - counters[0] = __atomic_add_fetch (&function_counter, 1, MEMMODEL_RELAXED); + counters[0] = __atomic_add_fetch (&function_counter, 1, __ATOMIC_RELAXED); } #endif #endif @@ -386,8 +386,8 @@ __gcov_average_profiler (gcov_type *counters, gcov_type value) void __gcov_average_profiler_atomic (gcov_type *counters, gcov_type value) { - __atomic_fetch_add (&counters[0], value, MEMMODEL_RELAXED); - __atomic_fetch_add (&counters[1], 1, MEMMODEL_RELAXED); + __atomic_fetch_add (&counters[0], value, __ATOMIC_RELAXED); + __atomic_fetch_add (&counters[1], 1, __ATOMIC_RELAXED); } #endif @@ -407,7 +407,7 @@ __gcov_ior_profiler (gcov_type *counters, gcov_type value) void __gcov_ior_profiler_atomic (gcov_type *counters, gcov_type value) { - __atomic_fetch_or (&counters[0], value, MEMMODEL_RELAXED); + __atomic_fetch_or (&counters[0], value, __ATOMIC_RELAXED); } #endif