aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog74
-rw-r--r--gcc/Makefile.in2
-rw-r--r--gcc/ada/ChangeLog4
-rw-r--r--gcc/ada/gcc-interface/utils2.c1
-rw-r--r--gcc/alias.c1
-rw-r--r--gcc/asan.c1
-rw-r--r--gcc/auto-inc-dec.c1
-rw-r--r--gcc/bb-reorder.c1
-rw-r--r--gcc/bt-load.c1
-rw-r--r--gcc/c-family/ChangeLog7
-rw-r--r--gcc/c-family/c-cppbuiltin.c1
-rw-r--r--gcc/c-family/c-opts.c1
-rw-r--r--gcc/c-family/c-pragma.c1
-rw-r--r--gcc/c-family/c-warn.c1
-rw-r--r--gcc/c/ChangeLog4
-rw-r--r--gcc/c/c-typeck.c1
-rw-r--r--gcc/caller-save.c1
-rw-r--r--gcc/calls.c1
-rw-r--r--gcc/ccmp.c1
-rw-r--r--gcc/cfgbuild.c1
-rw-r--r--gcc/cfgcleanup.c1
-rw-r--r--gcc/cfgexpand.c1
-rw-r--r--gcc/cfgloopanal.c1
-rw-r--r--gcc/cfgrtl.c1
-rw-r--r--gcc/cilk-common.c1
-rw-r--r--gcc/combine-stack-adj.c1
-rw-r--r--gcc/combine.c1
-rw-r--r--gcc/common/config/aarch64/aarch64-common.c1
-rw-r--r--gcc/common/config/arm/arm-common.c1
-rw-r--r--gcc/common/config/bfin/bfin-common.c1
-rw-r--r--gcc/common/config/c6x/c6x-common.c1
-rw-r--r--gcc/common/config/i386/i386-common.c1
-rw-r--r--gcc/common/config/ia64/ia64-common.c1
-rw-r--r--gcc/common/config/nvptx/nvptx-common.c1
-rw-r--r--gcc/compare-elim.c1
-rw-r--r--gcc/config/aarch64/aarch64-builtins.c1
-rw-r--r--gcc/config/aarch64/aarch64-c.c1
-rw-r--r--gcc/config/aarch64/cortex-a57-fma-steering.c1
-rw-r--r--gcc/config/arc/arc-c.c1
-rw-r--r--gcc/config/arc/arc.c1
-rw-r--r--gcc/config/arm/arm-builtins.c1
-rw-r--r--gcc/config/arm/arm-c.c1
-rw-r--r--gcc/config/avr/avr-c.c1
-rw-r--r--gcc/config/avr/avr-log.c1
-rw-r--r--gcc/config/avr/avr.c1
-rw-r--r--gcc/config/bfin/bfin.c1
-rw-r--r--gcc/config/c6x/c6x.c1
-rw-r--r--gcc/config/cr16/cr16.c1
-rw-r--r--gcc/config/cris/cris.c1
-rw-r--r--gcc/config/darwin-c.c1
-rw-r--r--gcc/config/darwin.c1
-rw-r--r--gcc/config/epiphany/epiphany.c1
-rw-r--r--gcc/config/epiphany/mode-switch-use.c1
-rw-r--r--gcc/config/epiphany/resolve-sw-modes.c1
-rw-r--r--gcc/config/fr30/fr30.c1
-rw-r--r--gcc/config/frv/frv.c1
-rw-r--r--gcc/config/ft32/ft32.c1
-rw-r--r--gcc/config/h8300/h8300.c1
-rw-r--r--gcc/config/i386/i386-c.c1
-rw-r--r--gcc/config/i386/winnt.c1
-rw-r--r--gcc/config/iq2000/iq2000.c1
-rw-r--r--gcc/config/lm32/lm32.c1
-rw-r--r--gcc/config/m32c/m32c.c1
-rw-r--r--gcc/config/m32r/m32r.c1
-rw-r--r--gcc/config/m68k/m68k.c1
-rw-r--r--gcc/config/mcore/mcore.c1
-rw-r--r--gcc/config/microblaze/microblaze.c1
-rw-r--r--gcc/config/mmix/mmix.c1
-rw-r--r--gcc/config/mn10300/mn10300.c1
-rw-r--r--gcc/config/moxie/moxie.c1
-rw-r--r--gcc/config/msp430/msp430.c1
-rw-r--r--gcc/config/nds32/nds32-cost.c1
-rw-r--r--gcc/config/nds32/nds32-intrinsic.c1
-rw-r--r--gcc/config/nds32/nds32-md-auxiliary.c1
-rw-r--r--gcc/config/nds32/nds32-memory-manipulation.c1
-rw-r--r--gcc/config/nds32/nds32-predicates.c1
-rw-r--r--gcc/config/nds32/nds32.c1
-rw-r--r--gcc/config/nios2/nios2.c1
-rw-r--r--gcc/config/nvptx/nvptx.c1
-rw-r--r--gcc/config/pa/pa.c1
-rw-r--r--gcc/config/pdp11/pdp11.c1
-rw-r--r--gcc/config/rl78/rl78.c1
-rw-r--r--gcc/config/rs6000/rs6000-c.c1
-rw-r--r--gcc/config/rx/rx.c1
-rw-r--r--gcc/config/s390/s390-c.c1
-rw-r--r--gcc/config/s390/s390.c1
-rw-r--r--gcc/config/sh/sh-c.c1
-rw-r--r--gcc/config/sh/sh-mem.cc1
-rw-r--r--gcc/config/sh/sh.c1
-rw-r--r--gcc/config/sh/sh_treg_combine.cc1
-rw-r--r--gcc/config/sol2.c1
-rw-r--r--gcc/config/spu/spu.c1
-rw-r--r--gcc/config/stormy16/stormy16.c1
-rw-r--r--gcc/config/tilegx/tilegx.c1
-rw-r--r--gcc/config/tilepro/tilepro.c1
-rw-r--r--gcc/config/v850/v850.c1
-rw-r--r--gcc/config/vax/vax.c1
-rw-r--r--gcc/config/visium/visium.c1
-rw-r--r--gcc/config/vms/vms-c.c1
-rw-r--r--gcc/config/xtensa/xtensa.c1
-rw-r--r--gcc/coretypes.h28
-rw-r--r--gcc/coverage.c1
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl2.c1
-rw-r--r--gcc/cp/rtti.c1
-rw-r--r--gcc/cppbuiltin.c1
-rw-r--r--gcc/cprop.c1
-rw-r--r--gcc/cse.c1
-rw-r--r--gcc/cselib.c1
-rw-r--r--gcc/dbxout.c1
-rw-r--r--gcc/dce.c1
-rw-r--r--gcc/df-core.c1
-rw-r--r--gcc/df-problems.c1
-rw-r--r--gcc/df-scan.c1
-rw-r--r--gcc/dojump.c1
-rw-r--r--gcc/dse.c1
-rw-r--r--gcc/dwarf2asm.c1
-rw-r--r--gcc/dwarf2cfi.c1
-rw-r--r--gcc/dwarf2out.c1
-rw-r--r--gcc/emit-rtl.c1
-rw-r--r--gcc/except.c1
-rw-r--r--gcc/explow.c1
-rw-r--r--gcc/expmed.c1
-rw-r--r--gcc/expr.c1
-rw-r--r--gcc/final.c1
-rw-r--r--gcc/fold-const.c1
-rw-r--r--gcc/fortran/ChangeLog4
-rw-r--r--gcc/fortran/trans-intrinsic.c1
-rw-r--r--gcc/function.c1
-rw-r--r--gcc/fwprop.c1
-rw-r--r--gcc/gcse.c1
-rw-r--r--gcc/genattrtab.c1
-rw-r--r--gcc/genautomata.c1
-rw-r--r--gcc/genconditions.c2
-rw-r--r--gcc/genemit.c2
-rw-r--r--gcc/gengtype.c16
-rw-r--r--gcc/genopinit.c1
-rw-r--r--gcc/genoutput.c2
-rw-r--r--gcc/genpeep.c2
-rw-r--r--gcc/genpreds.c2
-rw-r--r--gcc/genrecog.c2
-rw-r--r--gcc/ggc-page.c1
-rw-r--r--gcc/go/ChangeLog4
-rw-r--r--gcc/go/go-backend.c1
-rw-r--r--gcc/haifa-sched.c1
-rw-r--r--gcc/hsa-brig.c1
-rw-r--r--gcc/hsa-gen.c1
-rw-r--r--gcc/hw-doloop.c1
-rw-r--r--gcc/ifcvt.c1
-rw-r--r--gcc/init-regs.c1
-rw-r--r--gcc/internal-fn.c1
-rw-r--r--gcc/ira-build.c1
-rw-r--r--gcc/ira-color.c1
-rw-r--r--gcc/ira-conflicts.c1
-rw-r--r--gcc/ira-costs.c1
-rw-r--r--gcc/ira-emit.c1
-rw-r--r--gcc/ira-lives.c1
-rw-r--r--gcc/ira.c1
-rw-r--r--gcc/jump.c1
-rw-r--r--gcc/loop-doloop.c1
-rw-r--r--gcc/loop-invariant.c1
-rw-r--r--gcc/loop-iv.c1
-rw-r--r--gcc/loop-unroll.c1
-rw-r--r--gcc/lower-subreg.c1
-rw-r--r--gcc/lra-assigns.c1
-rw-r--r--gcc/lra-coalesce.c1
-rw-r--r--gcc/lra-constraints.c1
-rw-r--r--gcc/lra-eliminations.c1
-rw-r--r--gcc/lra-lives.c1
-rw-r--r--gcc/lra-remat.c1
-rw-r--r--gcc/lra-spills.c1
-rw-r--r--gcc/lra.c1
-rw-r--r--gcc/memmodel.h30
-rw-r--r--gcc/mode-switching.c1
-rw-r--r--gcc/modulo-sched.c1
-rw-r--r--gcc/omp-low.c1
-rw-r--r--gcc/passes.c1
-rw-r--r--gcc/postreload-gcse.c1
-rw-r--r--gcc/postreload.c1
-rw-r--r--gcc/predict.c1
-rw-r--r--gcc/print-rtl-function.c1
-rw-r--r--gcc/recog.c1
-rw-r--r--gcc/ree.c1
-rw-r--r--gcc/reg-stack.c1
-rw-r--r--gcc/regcprop.c1
-rw-r--r--gcc/reginfo.c1
-rw-r--r--gcc/regrename.c1
-rw-r--r--gcc/reload.c1
-rw-r--r--gcc/reload1.c1
-rw-r--r--gcc/reorg.c1
-rw-r--r--gcc/resource.c1
-rw-r--r--gcc/rtl-chkp.c1
-rw-r--r--gcc/rtl-tests.c1
-rw-r--r--gcc/rtlanal.c1
-rw-r--r--gcc/rtlhooks.c1
-rw-r--r--gcc/sched-deps.c1
-rw-r--r--gcc/sched-rgn.c1
-rw-r--r--gcc/sdbout.c1
-rw-r--r--gcc/sel-sched-ir.c1
-rw-r--r--gcc/sel-sched.c1
-rw-r--r--gcc/shrink-wrap.c1
-rw-r--r--gcc/simplify-rtx.c1
-rw-r--r--gcc/stack-ptr-mod.c1
-rw-r--r--gcc/stmt.c1
-rw-r--r--gcc/stor-layout.c1
-rw-r--r--gcc/target-globals.c1
-rw-r--r--gcc/targhooks.c1
-rw-r--r--gcc/toplev.c1
-rw-r--r--gcc/tree-nested.c1
-rw-r--r--gcc/tree-outof-ssa.c1
-rw-r--r--gcc/tree-profile.c1
-rw-r--r--gcc/tree-ssa-coalesce.c1
-rw-r--r--gcc/tree-ssa-ifcombine.c1
-rw-r--r--gcc/tree-ssa-loop-ivopts.c1
-rw-r--r--gcc/tree-ssa-loop.c1
-rw-r--r--gcc/tree-ssa-reassoc.c1
-rw-r--r--gcc/tree-ssa-sccvn.c1
-rw-r--r--gcc/tree-vect-data-refs.c1
-rw-r--r--gcc/ubsan.c1
-rw-r--r--gcc/valtrack.c1
-rw-r--r--gcc/var-tracking.c1
-rw-r--r--gcc/varasm.c1
-rw-r--r--libgcc/ChangeLog7
-rw-r--r--libgcc/config/tilepro/atomic.c16
-rw-r--r--libgcc/libgcov-profiler.c20
225 files changed, 376 insertions, 62 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ced5897..dfd16fe 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,77 @@
+2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * 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 <dmalcolm@redhat.com>
* function-tests.c (selftest::test_expansion_to_rtl): Add "true"
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index f1ff782..76b77ab 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 b2c29fd..91a783d 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,7 @@
+2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * gcc-interface/utils2.c: Include memmodel.h.
+
2016-10-13 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch6.adb (Analyze_Expression_Function):
diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c
index 9ace387..c0d831f 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 19e9208..f4a0a29 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 3a4b5f7..c6d9240 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 eb2dc21..e80244b 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 bb8435f..ef1c476 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 5b1bcec..6747845 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 64619fc..285ef04 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,10 @@
+2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * c-cppbuiltin.c: Include memmodel.h.
+ * c-opts.c: Likewise.
+ * c-pragma.c: Likewise.
+ * c-warn.c: Likewise.
+
2016-10-12 Jakub Jelinek <jakub@redhat.com>
* 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 97eda67..94af585 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 da62b55..a0c0c62 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 1a9a9f3..58ef5c9 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 cac5b36e..88544ce 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 63fba12..725afcf 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,7 @@
+2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * c-typeck.c: Include memmodel.h.
+
2016-10-13 Jakub Jelinek <jakub@redhat.com>
PR target/77957
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index e5c7256..f0917ed 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 caf6486..24546bf 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 86369e9..66b34b8 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 6f95ace..615b7e6 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 edecab5..40c011d 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 2e2a635..1c9691d 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 c62e920..1619765 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 001cf45..9ea48b1 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 de07fcd..c1f0322 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 9a2ed9d..ecd7abe 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 a74b65a..3302550 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 b27aae5..2727683 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 09debee..90f5f6b 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 a9abd6b..f3b6743 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 770aa1c..ceee72f 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 758358d..38be5ba 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 ce1b5f7..d201154 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 47c71de..65879fc 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 2582e98..2790412 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 e7fdce8..329f18f 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 b362580..594a615 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 3380ed6..422e322 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 1bf804b..214db4a 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 3bf3fd2..e89bc5c 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 5e8d6b4..21bba0c 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 cbc1794..e73043d 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 a6fc60b..df930f4 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 270b803..6d363c9 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 fe2cae4..46578d6 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 7310b54..3945122 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 a91e47e..9b81868 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 305f31e..f8c3d66 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 13e8e47..530ccba 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 7532b8e..a825219 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 23ec180..ed032b9 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 f8da959..ff8600c 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 b871ccb..a7854e7 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 d7fbae3..9f1c56a 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 603886b..f1aafdc 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 741a013..187302b 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 60c3863..352bcff 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 216a804..6ac8701 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 9433567..3d06014 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 d4d2674..9bb80c0 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 e2b2f4b..fdc89e0 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 c7e5f19..7be7ee5 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 8a10220..99e2695 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 1db1ef7..7d64c49 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 dda3961..17e48f5 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 a104193..8e7dbf3 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 3afe42c..b8dc2d0 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 e32fa0e..0fb273f 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 bf06e3b..7029c3d 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 81c8506a..dbbc4db 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 9d376f1..0de591e8 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 9343176..50f6815 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 e6a29fc..a38e348 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 fabf262..d3428ca 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 def8eda..c4f3aac 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 4c26dcc..0b0acf7 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 361d001..251219f 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 7b0d747..6a0e53f 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 632adad..8afb468 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 16e04a4..6ec8eb41 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 a02010c..e04abd4 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 7fa08cbf..1dc3eef 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 a4e4be2..08ab899 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 c98a54f..b7ca472 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 8dfc885..44c6b68 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 cd3584b..fcf7477 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 04d6d44..f69b470 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 b854a69..595b530 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 6128adf..1773f1d 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 4152ecf..cf5231e 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 4d40715..5de3338 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 30c525a..fcab9de 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 28173e5..5b59b72 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 1eb95f5..531a7e9 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 0ef7559..76a7455 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 505c7a4..5a75349 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 f1716d1..47344fc 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 06ab571..732ebee 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 a0035c6..c04b345 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 392b2db..12c9c78 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 07c9e8f..60e5029 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 fe1e984..70f909d 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 a759831..8810710 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 b01e196..d792fb4 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * decl2.c: Include memmodel.h.
+ * rtti.c: Likewise.
+
2016-10-11 Jason Merrill <jason@redhat.com>
PR c++/77742
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 5a04bc7..ea9d379 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 a882761..cfbc3d4 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 69ccdb9..3a86b2a 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 199e990..6b4c0b8 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 7069fab..8b9e4a1 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 24e15bc..3e1e9e7 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 52307f3..3301417 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 d510287..154469c 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 e531d58..f84d274 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 290281c..6dbc126 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 c8dbf8d..7cfd34b 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 d437b97..5a32c34 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 9d222a9..95d5757 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 cad5509..4733538 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 6491d5a..da9da52 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 a84deb7..4376751 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 2d6d1eb..387438c 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 800ca2a..f0a1be0 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 b56aea6..fbebcbd 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 2f789a2..fec0bbd 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 e6d110d..b587da8 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 29c12fd..52d1589 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 02aa484..e2e0554 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 899e15e..82ab03d 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,7 @@
+2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * trans-intrinsic.c: Include memmodel.h.
+
2016-10-13 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/72832
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
index 9d5e33c..a9825ea 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 6f906ab..c71ddcc 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 30d5739..4365ff0 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 c2c0e8e..9e396fe 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 6e0a9b9..dbcdcfc 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 92c8b5c..f4c125e 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 d8b0ebb..923b23c 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 d5e07a9..fe29895 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 cecd552..760f985 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 5f4f354..b0e013c 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 f792cb4..9b6dd09 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 e1997e0..a0a7a3b 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 6db1b7b..23a7e18 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 7786107..3e5b0f7 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 2b42b6e..2148595 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 93bf4c1..28d4f6f 100644
--- a/gcc/go/ChangeLog
+++ b/gcc/go/ChangeLog
@@ -1,3 +1,7 @@
+2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * go-backend.c: Include memmodel.h.
+
2016-10-10 Than McIntosh <thanm@google.com>
* go-gcc.h: New file.
diff --git a/gcc/go/go-backend.c b/gcc/go/go-backend.c
index 99609f0..3a56f0a4 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 0ad080f..fea9f50 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 4dc568c..66ff8f9 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 6f7083a..21c35e6 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 c73b106..a046c24 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 24542f0..68c7c3f 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 bb20978..3fbaee1 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 029a534..0b32d5f 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 caa770e..4df78d6 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 8433479..5bbb33af 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 06a3eb5..17e478039 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 f3d31e1..bdd5cb5 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 691bd1d..c1c69490 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 ff6d100..6389796 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 c2e04c2..94cfe2a 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 2164c3b..e4bb93f 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 17a968f..a805519 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 d550a84..551103f 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 78bec9e..9e13938 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 2d5fe48..494504d 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 4ea763b..9675eed 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 7248f89..936a1699 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 178ed3f..0a9f779 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 bf5b521..117d84d 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 03b315e..b90cbed 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 f761da5..5573ff8 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 245c6de..f01c664 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 768ae82..6e044cd 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 cb2bd35..4165492 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 d53eb7b..f21f5f5 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 121b970..3751417 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 6e87a6f..3a58f8b 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 202f0bd..77f89d5 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 881f229..e78f9ed 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 da04fb7..139da37 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 4f3a526..26871e8 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 463fd0b..9950c09 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 90a0ff7..2abae84 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 6a95d7f..22b5aaa 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 2929277..4ab2ad0 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 907f28d..4e86fa9 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 6d2581b..fc8297e 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 0cda6aa..3171559 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 e0d2dd1..3b95a06 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 cd0d661..9a859e5 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 55aafe4..89da84d 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 40f143f..2ad3a4e 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 32e3e44..1aa2f8c 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 e2a34b3..45cf8f1 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 3e9ebae..723efa5 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 2a0a1d2..a882200 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 32a994f..49f54bc 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 dc46351..6cd8332 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 f6d1c91..08956a0 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 039d945..71b46d0 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 210b1e4..26bc142 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 2968bdf..9c33b51 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 7285775..7345d25 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 cd3e2d0..5c3dea1 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 ff67dec..549c463 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 39fa5e1..f1bf6e4 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 63a1454..f904d75 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 45d5880..f17cdc1 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 c7977be..d6fd8b8 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 570f4cf..1df80d0 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 465ae31..3aab8e1 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 be57ce4..7a35c1e 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 1f45b99..abeee92 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 01f6c5f..6423cdd 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 79fe3a8..8e5258f 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 93626fd..f9211ad 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 06354e3..24c0585 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 7b844dd..99e1b41 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 fc8bf74..00c1c23 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 6cf26d9..c99fa406 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 5fe6f3d..6594dd1 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 26a15ea..9a1ae2d 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 e405f0d..89788f1 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 99dd4cb..30fbbc5 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 d9949a1..c861ca6 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,10 @@
+2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * 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 <joseph@codesourcery.com>
PR target/77586
diff --git a/libgcc/config/tilepro/atomic.c b/libgcc/config/tilepro/atomic.c
index 87665f7..f8a4ef5 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 d9217b9..38ed5f1 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