aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc
diff options
context:
space:
mode:
authorRong Xu <xur@google.com>2014-08-06 17:50:42 -0700
committerRong Xu <xur@google.com>2014-08-06 17:50:42 -0700
commitf1c18afafc2b321465ae6b07ede127095942d7dc (patch)
tree812093eebfa8510367718c12c02f7da03c0e73bf /gcc-4.9/gcc
parent38a8aecfb882072900434499696b5c32a2274515 (diff)
downloadtoolchain_gcc-f1c18afafc2b321465ae6b07ede127095942d7dc.tar.gz
toolchain_gcc-f1c18afafc2b321465ae6b07ede127095942d7dc.tar.bz2
toolchain_gcc-f1c18afafc2b321465ae6b07ede127095942d7dc.zip
[gcc-4.9] Merge svn r213650 from google/gcc-4_9 branch
Merge svn r213650 from google/gcc-4_9 branch. Tested with arm,x86,mips,arm64,x86_64,mips64 build in liunux/windows. Change-Id: I0c07f67d516074172aa393003eee664d01f2e0f2
Diffstat (limited to 'gcc-4.9/gcc')
-rw-r--r--gcc-4.9/gcc/ChangeLog242
-rw-r--r--gcc-4.9/gcc/DATESTAMP2
-rw-r--r--gcc-4.9/gcc/ada/ChangeLog4
-rw-r--r--gcc-4.9/gcc/c-family/ChangeLog14
-rw-r--r--gcc-4.9/gcc/c-family/c-gimplify.c4
-rw-r--r--gcc-4.9/gcc/c/ChangeLog4
-rw-r--r--gcc-4.9/gcc/cgraph.c6
-rw-r--r--gcc-4.9/gcc/common.opt4
-rw-r--r--gcc-4.9/gcc/config.gcc11
-rw-r--r--gcc-4.9/gcc/config/aarch64/aarch64-linux.h2
-rw-r--r--gcc-4.9/gcc/config/aarch64/aarch64.c14
-rw-r--r--gcc-4.9/gcc/config/alpha/elf.h4
-rw-r--r--gcc-4.9/gcc/config/arm/t-rtems-eabi124
-rw-r--r--gcc-4.9/gcc/config/cris/constraints.md4
-rw-r--r--gcc-4.9/gcc/config/cris/cris-protos.h5
-rw-r--r--gcc-4.9/gcc/config/cris/cris.c120
-rw-r--r--gcc-4.9/gcc/config/cris/cris.h11
-rw-r--r--gcc-4.9/gcc/config/cris/cris.md60
-rw-r--r--gcc-4.9/gcc/config/cris/predicates.md14
-rw-r--r--gcc-4.9/gcc/config/i386/avx512fintrin.h32
-rw-r--r--gcc-4.9/gcc/config/i386/i386.c2
-rw-r--r--gcc-4.9/gcc/config/i386/ia32intrin.h14
-rw-r--r--gcc-4.9/gcc/config/i386/sse.md14
-rw-r--r--gcc-4.9/gcc/config/rs6000/freebsd64.h2
-rw-r--r--gcc-4.9/gcc/config/rs6000/linux64.h2
-rw-r--r--gcc-4.9/gcc/config/rs6000/rs6000-protos.h1
-rw-r--r--gcc-4.9/gcc/config/rs6000/rs6000.c111
-rw-r--r--gcc-4.9/gcc/config/rs6000/sysv4.h18
-rw-r--r--gcc-4.9/gcc/config/sh/predicates.md8
-rw-r--r--gcc-4.9/gcc/config/sh/sh.c26
-rw-r--r--gcc-4.9/gcc/config/sparc/sync.md10
-rw-r--r--gcc-4.9/gcc/coverage.c46
-rw-r--r--gcc-4.9/gcc/coverage.h2
-rw-r--r--gcc-4.9/gcc/cp/ChangeLog9
-rw-r--r--gcc-4.9/gcc/cp/call.c6
-rw-r--r--gcc-4.9/gcc/cp/except.c4
-rw-r--r--gcc-4.9/gcc/expr.c2
-rw-r--r--gcc-4.9/gcc/fortran/ChangeLog12
-rw-r--r--gcc-4.9/gcc/fortran/dependency.c31
-rw-r--r--gcc-4.9/gcc/gcc.c3
-rw-r--r--gcc-4.9/gcc/gcov-tool.c27
-rw-r--r--gcc-4.9/gcc/go/ChangeLog4
-rw-r--r--gcc-4.9/gcc/ipa-inline-transform.c10
-rw-r--r--gcc-4.9/gcc/java/ChangeLog4
-rw-r--r--gcc-4.9/gcc/l-ipo.c6
-rw-r--r--gcc-4.9/gcc/lto/ChangeLog4
-rw-r--r--gcc-4.9/gcc/objc/ChangeLog4
-rw-r--r--gcc-4.9/gcc/objcp/ChangeLog4
-rw-r--r--gcc-4.9/gcc/omp-low.c1
-rw-r--r--gcc-4.9/gcc/opts.c105
-rw-r--r--gcc-4.9/gcc/opts.h2
-rw-r--r--gcc-4.9/gcc/params.c15
-rw-r--r--gcc-4.9/gcc/params.def11
-rw-r--r--gcc-4.9/gcc/params.h2
-rw-r--r--gcc-4.9/gcc/po/ChangeLog4
-rw-r--r--gcc-4.9/gcc/sched-deps.c3
-rw-r--r--gcc-4.9/gcc/testsuite/ChangeLog112
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/compat/struct-layout-1.exp3
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61160-1.C3
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61160-2.C3
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/tree-ssa/dom-invalid.C5
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050316-1.x1
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050604-1.x1
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/pr26570.c3
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/pr32773.c3
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/stack-usage-2.c17
-rw-r--r--gcc-4.9/gcc/toplev.c13
-rw-r--r--gcc-4.9/gcc/tree-profile.c13
-rw-r--r--gcc-4.9/gcc/tree-ssa-copy.c46
-rw-r--r--gcc-4.9/gcc/value-prof.c15
70 files changed, 1188 insertions, 260 deletions
diff --git a/gcc-4.9/gcc/ChangeLog b/gcc-4.9/gcc/ChangeLog
index dd6e9ad47..df98072de 100644
--- a/gcc-4.9/gcc/ChangeLog
+++ b/gcc-4.9/gcc/ChangeLog
@@ -1,3 +1,198 @@
+2014-07-31 Oleg Endo <olegendo@gcc.gnu.org>
+
+ Backport from mainline
+ 2014-07-31 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/61844
+ * config/sh/sh.c (sh_legitimate_address_p,
+ sh_legitimize_reload_address): Handle reg+reg address modes when
+ ALLOW_INDEXED_ADDRESS is false.
+ * config/sh/predicates.md (general_movsrc_operand,
+ general_movdst_operand): Likewise.
+
+2014-07-25 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2014-07-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/61656
+ * config/i386/i386.c (classify_argument): Don't merge classes above
+ number of words.
+
+2014-07-25 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/alpha/elf.h: Define TARGET_UNWIND_TABLES_DEFAULT.
+
+2014-07-24 Kyle McMartin <kyle@redhat.com>
+
+ * config/aarch64/aarch64-linux.h (TARGET_ASM_FILE_END): Define.
+
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * config/rs6000/rs6000-protos.h (rs6000_special_adjust_field_align_p):
+ Add prototype.
+ * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p): New
+ function. Issue -Wpsabi warning if future GCC releases will use
+ different field alignment rules for this type.
+ * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Call it.
+ * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
+ * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
+
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * config/rs6000/rs6000.c (rs6000_function_arg_boundary): Issue
+ -Wpsabi note when encountering a type where future GCC releases
+ will apply different alignment requirements.
+
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * config/rs6000/rs6000.c (rs6000_function_arg): If a float argument
+ does not fit fully into floating-point registers, and there is still
+ space in the register parameter area, issue -Wpsabi note that the ABI
+ will change in a future GCC release.
+
+2014-07-23 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * config/arm/t-rtems-eabi: Add
+ mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard,
+ mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard,
+ mbig-endian/mthumb/march=armv7-r, and
+ mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
+ multilibs.
+
+2014-07-23 Sebastian Huber <sebastian.huber@embedded-brains.de>
+ Chris Johns <chrisj@rtems.org>
+ Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * config.gcc: Add nios2-*-rtems*.
+ * config/nios2/rtems.h: New file.
+ * gcc/config/nios2/t-rtems: New file.
+
+2014-07-21 Peter Bergner <bergner@vnet.ibm.com>
+
+ * config/rs6000/sysv4.h (LIBASAN_EARLY_SPEC): Define.
+ (LIBTSAN_EARLY_SPEC): Likewise.
+
+2014-07-21 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2014-07-21 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/61855
+ * config/i386/avx512fintrin.h: Move constants for mantissa extraction
+ out of #ifdef __OPTIMIZE__.
+
+2014-07-20 Eric Botcazou <ebotcazou@adacore.com>
+
+ * expr.c (store_field): Handle VOIDmode for calls that return values
+ in multiple locations.
+
+2014-07-19 Eric Botcazou <ebotcazou@adacore.com>
+
+ * toplev.c (output_stack_usage): Adjust the location of the warning.
+
+2014-07-19 Daniel Cederman <cederman@gaisler.com>
+
+ * config/sparc/sync.md (*membar_storeload_leon3): New insn.
+ (*membar_storeload): Disable for LEON3.
+
+2014-07-18 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2014-07-16 David Wohlferd <dw@LimeGreenSocks.com>
+
+ PR target/61662
+ * config/i386/ia32intrin.h: Use __LP64__ to determine size of long.
+
+2014-07-18 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2014-07-18 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/61794
+ * config/i386/sse.md (avx512f_vextract<shuffletype>32x4_1_maskm):
+ Fix instruction constraint.
+ (<mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name>): Ditto.
+
+2014-07-17 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2014-07-14 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/61779
+ * tree-ssa-copy.c (copy_prop_visit_cond_stmt): Always try
+ simplifying a condition.
+
+2014-07-17 Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/61801
+ * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and ASM_INPUT
+ don't set reg_pending_barrier if it appears in a debug-insn.
+
+2014-07-17 Hans-Peter Nilsson <hp@axis.com>
+
+ Backport from trunk.
+ PR target/61737.
+ * config/cris/cris.c (TARGET_LEGITIMATE_CONSTANT_P)
+ (TARGET_CANNOT_FORCE_CONST_MEM): Define.
+ (cris_cannot_force_const_mem, cris_legitimate_constant_p): New
+ functions.
+ (cris_print_index, cris_print_operand, cris_constant_index_p)
+ (cris_side_effect_mode_ok): Replace CONSTANT_P with CRIS_CONSTANT_P.
+ (cris_address_cost): Ditto last CONSTANT_P.
+ (cris_symbol_type_of): Rename from cris_pic_symbol_type_of. All
+ callers changed. Yield cris_offsettable_symbol for non-PIC
+ constant symbolic expressions including labels. Yield cris_unspec
+ for all unspecs.
+ (cris_expand_pic_call_address): New parameter MARKERP. Set its
+ target to pic_offset_table_rtx for calls that will likely go
+ through PLT, const0_rtx when they can't. All callers changed.
+ Assert flag_pic. Use CONSTANT_P, not CONSTANT_ADDRESS_P, for
+ symbolic expressions to be PICified. Remove second, redundant,
+ assert on can_create_pseudo_p returning non-zero. Use
+ replace_equiv_address_nv, not replace_equiv_address, for final
+ operand update.
+ * config/cris/cris.md ("movsi"): Move variable t to pattern
+ toplevel. Adjust assert for new cris_symbol_type member. Use
+ CONSTANT_P instead of CONSTANT_ADDRESS_P.
+ ("*movsi_internal") <case 9>: Make check for valid unspec operands
+ for lapc stricter.
+ <case CRIS_UNSPEC_PCREL, CRIS_UNSPEC_PLT_PCREL>: Clear condition codes.
+ ("call", "call_value"): Use second incoming operand as a marker
+ for pic-offset-table-register being used.
+ ("*expanded_call_non_v32", "*expanded_call_v32")
+ ("*expanded_call_value_non_v32", "*expanded_call_value_v32"): For
+ second incoming operand to CALL, match cris_call_type_marker.
+ ("*expanded_call_value_side"): Ditto. Disable before reload_completed.
+ ("*expanded_call_side"): Ditto. Fix typo in comment.
+ (moverside, movemside peepholes): Check for CRIS_CONSTANT_P, not
+ CONSTANT_P.
+ * config/cris/predicates.md ("cris_call_type_marker"): New predicate.
+ * config/cris/cris.h (CRIS_CONSTANT_P): New macro.
+ (enum cris_symbol_type): Rename from cris_pic_symbol_type. All
+ users changed. Add members cris_offsettable_symbol and cris_unspec.
+ (cris_symbol_type): Rename from cris_pic_symbol_type.
+ * config/cris/constraints.md ("T"): Use CRIS_CONSTANT_P, not
+ just CONSTANT_P.
+ * config/cris/cris-protos.h (cris_symbol_type_of,
+ cris_expand_pic_call_address): Adjust prototypes.
+ (cris_legitimate_constant_p): New prototype.
+
+ * config.gcc (crisv32-*-linux* | cris-*-linux*): Do not override
+ an existing tmake_file. Don't add t-slibgcc and t-linux.
+
+2014-07-16 Jakub Jelinek <jakub@redhat.com>
+
+ * omp-low.c (create_omp_child_function): Don't set DECL_NAMELESS
+ on the FUNCTION_DECL.
+
+ * BASE-VER: Set to 4.9.1.
+ * DEV-PHASE: Set to prerelease.
+
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-07-11 Rong Xu <xur@google.com>
Backport r212462 trunk.
@@ -41,14 +236,14 @@
2014-07-10 Cary Coutant <ccoutant@google.com>
- Backport from trunk at r212211.
+ Backport from trunk at r212211.
* dwarf2out.c (remove_addr_table_entry): Remove unnecessary hash table
- lookup.
+ lookup.
(resolve_addr_in_expr): When replacing the rtx in a location list
- entry, get a new address table entry.
+ entry, get a new address table entry.
(dwarf2out_finish): Call index_location_lists even if there are no
- addr_index_table entries yet.
+ addr_index_table entries yet.
2014-07-10 Tom G. Christensen <tgc@jupiterrise.com>
@@ -70,13 +265,13 @@
PR target/61062
* config/arm/arm_neon.h (vtrn_s8, vtrn_s16, vtrn_u8, vtrn_u16, vtrn_p8,
vtrn_p16, vtrn_s32, vtrn_f32, vtrn_u32, vtrnq_s8, vtrnq_s16, vtrnq_s32,
- vtrnq_f32, vtrnq_u8, vtrnq_u16, vtrnq_u32, vtrnq_p8, vtrnq_p16, vzip_s8,
- vzip_s16, vzip_u8, vzip_u16, vzip_p8, vzip_p16, vzip_s32, vzip_f32,
- vzip_u32, vzipq_s8, vzipq_s16, vzipq_s32, vzipq_f32, vzipq_u8,
- vzipq_u16, vzipq_u32, vzipq_p8, vzipq_p16, vuzp_s8, vuzp_s16, vuzp_s32,
- vuzp_f32, vuzp_u8, vuzp_u16, vuzp_u32, vuzp_p8, vuzp_p16, vuzpq_s8,
- vuzpq_s16, vuzpq_s32, vuzpq_f32, vuzpq_u8, vuzpq_u16, vuzpq_u32,
- vuzpq_p8, vuzpq_p16): Correct mask for bigendian.
+ vtrnq_f32, vtrnq_u8, vtrnq_u16, vtrnq_u32, vtrnq_p8, vtrnq_p16,
+ vzip_s8, vzip_s16, vzip_u8, vzip_u16, vzip_p8, vzip_p16, vzip_s32,
+ vzip_f32, vzip_u32, vzipq_s8, vzipq_s16, vzipq_s32, vzipq_f32,
+ vzipq_u8, vzipq_u16, vzipq_u32, vzipq_p8, vzipq_p16, vuzp_s8, vuzp_s16,
+ vuzp_s32, vuzp_f32, vuzp_u8, vuzp_u16, vuzp_u32, vuzp_p8, vuzp_p16,
+ vuzpq_s8, vuzpq_s16, vuzpq_s32, vuzpq_f32, vuzpq_u8, vuzpq_u16,
+ vuzpq_u32, vuzpq_p8, vuzpq_p16): Correct mask for bigendian.
2014-07-09 Alan Lawrence <alan.lawrence@arm.com>
@@ -194,11 +389,9 @@
2014-06-24 Jakub Jelinek <jakub@redhat.com>
* gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP,
- OMP_CLAUSE_TO, OMP_CLAUSE_FROM): Make sure OMP_CLAUSE_SIZE is
- non-NULL.
+ OMP_CLAUSE_TO, OMP_CLAUSE_FROM): Make sure OMP_CLAUSE_SIZE is non-NULL.
<case OMP_CLAUSE_ALIGNED>: Gimplify OMP_CLAUSE_ALIGNED_ALIGNMENT.
- (gimplify_adjust_omp_clauses_1): Make sure OMP_CLAUSE_SIZE is
- non-NULL.
+ (gimplify_adjust_omp_clauses_1): Make sure OMP_CLAUSE_SIZE is non-NULL.
(gimplify_adjust_omp_clauses): Likewise.
* omp-low.c (lower_rec_simd_input_clauses,
lower_rec_input_clauses, expand_omp_simd): Handle non-constant
@@ -213,9 +406,8 @@
2014-06-18 Jakub Jelinek <jakub@redhat.com>
- * gimplify.c (omp_notice_variable): If n is non-NULL
- and no flags change in ORT_TARGET region, don't jump to
- do_outer.
+ * gimplify.c (omp_notice_variable): If n is non-NULL and no flags
+ change in ORT_TARGET region, don't jump to do_outer.
(struct gimplify_adjust_omp_clauses_data): New type.
(gimplify_adjust_omp_clauses_1): Adjust for data being
a struct gimplify_adjust_omp_clauses_data pointer instead
@@ -233,14 +425,12 @@
gimple_seq * argument to omp_finish_clause hook.
* omp-low.c (scan_sharing_clauses): Call scan_omp_op on
non-DECL_P OMP_CLAUSE_DECL if ctx->outer.
- (scan_omp_parallel, lower_omp_for): When adding
- _LOOPTEMP_ clause var, add it to outer ctx's decl_map
- as identity.
+ (scan_omp_parallel, lower_omp_for): When adding _LOOPTEMP_ clause var,
+ add it to outer ctx's decl_map as identity.
* tree-core.h (OMP_CLAUSE_MAP_TO_PSET): New map kind.
* tree-nested.c (convert_nonlocal_omp_clauses,
convert_local_omp_clauses): Handle various OpenMP 4.0 clauses.
- * tree-pretty-print.c (dump_omp_clause): Handle
- OMP_CLAUSE_MAP_TO_PSET.
+ * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE_MAP_TO_PSET.
2014-06-10 Jakub Jelinek <jakub@redhat.com>
@@ -264,8 +454,7 @@
OMP_CLAUSE_LINEAR_STMT.
* omp-low.c (lower_rec_input_clauses): Fix typo.
(maybe_add_implicit_barrier_cancel, lower_omp_1): Add
- cast between Fortran boolean_type_node and C _Bool if
- needed.
+ cast between Fortran boolean_type_node and C _Bool if needed.
2014-06-30 Jason Merrill <jason@redhat.com>
@@ -316,8 +505,7 @@
(aarch64_sqdmlsl_lane<mode>): Likewise.
(aarch64_sqdmull_lane<mode>): Likewise.
(aarch64_sqdmull2_lane<mode>): Likewise.
- (aarch64_sqdmlal_laneq<mode>):
- Replace VCON usage with VCONQ.
+ (aarch64_sqdmlal_laneq<mode>): Replace VCON usage with VCONQ.
Emit aarch64_sqdmlal_laneq<mode>_internal insn.
(aarch64_sqdmlal2_laneq<mode>): Emit
aarch64_sqdmlal2_laneq<mode>_internal insn.
diff --git a/gcc-4.9/gcc/DATESTAMP b/gcc-4.9/gcc/DATESTAMP
index e48f0e7c4..06fdc7792 100644
--- a/gcc-4.9/gcc/DATESTAMP
+++ b/gcc-4.9/gcc/DATESTAMP
@@ -1 +1 @@
-20140711
+20140801
diff --git a/gcc-4.9/gcc/ada/ChangeLog b/gcc-4.9/gcc/ada/ChangeLog
index f979c34d4..27d4ad7cb 100644
--- a/gcc-4.9/gcc/ada/ChangeLog
+++ b/gcc-4.9/gcc/ada/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-05-19 Eric Botcazou <ebotcazou@adacore.com>
Backport from mainline
diff --git a/gcc-4.9/gcc/c-family/ChangeLog b/gcc-4.9/gcc/c-family/ChangeLog
index 1fa0dd088..cbe8b06cf 100644
--- a/gcc-4.9/gcc/c-family/ChangeLog
+++ b/gcc-4.9/gcc/c-family/ChangeLog
@@ -1,3 +1,17 @@
+2014-07-17 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2014-07-09 Richard Biener <rguenther@suse.de>
+
+ PR c-family/61741
+ * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
+ using unsigned arithmetic if overflow does not wrap instead of
+ if overflow is undefined.
+
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-06-30 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
diff --git a/gcc-4.9/gcc/c-family/c-gimplify.c b/gcc-4.9/gcc/c-family/c-gimplify.c
index d385f3a40..0bf93fcd7 100644
--- a/gcc-4.9/gcc/c-family/c-gimplify.c
+++ b/gcc-4.9/gcc/c-family/c-gimplify.c
@@ -197,9 +197,7 @@ c_gimplify_expr (tree *expr_p, gimple_seq *pre_p ATTRIBUTE_UNUSED,
tree type = TREE_TYPE (TREE_OPERAND (*expr_p, 0));
if (INTEGRAL_TYPE_P (type) && c_promoting_integer_type_p (type))
{
- if (TYPE_OVERFLOW_UNDEFINED (type)
- || ((flag_sanitize & SANITIZE_SI_OVERFLOW)
- && !TYPE_OVERFLOW_WRAPS (type)))
+ if (!TYPE_OVERFLOW_WRAPS (type))
type = unsigned_type_for (type);
return gimplify_self_mod_expr (expr_p, pre_p, post_p, 1, type);
}
diff --git a/gcc-4.9/gcc/c/ChangeLog b/gcc-4.9/gcc/c/ChangeLog
index e31d4a8a3..4816d5c67 100644
--- a/gcc-4.9/gcc/c/ChangeLog
+++ b/gcc-4.9/gcc/c/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-06-30 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
diff --git a/gcc-4.9/gcc/cgraph.c b/gcc-4.9/gcc/cgraph.c
index 180a63656..63b7b4d60 100644
--- a/gcc-4.9/gcc/cgraph.c
+++ b/gcc-4.9/gcc/cgraph.c
@@ -677,7 +677,11 @@ cgraph_node_for_asm (tree asmname)
{
cgraph_node *cn = dyn_cast <cgraph_node> (node);
if (cn && !cn->global.inlined_to)
- return cn;
+ {
+ if (L_IPO_COMP_MODE && cgraph_pre_profiling_inlining_done)
+ return cgraph_lipo_get_resolved_node (cn->decl);
+ return cn;
+ }
}
return NULL;
}
diff --git a/gcc-4.9/gcc/common.opt b/gcc-4.9/gcc/common.opt
index 6614228b8..40607738a 100644
--- a/gcc-4.9/gcc/common.opt
+++ b/gcc-4.9/gcc/common.opt
@@ -1259,6 +1259,10 @@ fexceptions
Common Report Var(flag_exceptions) Optimization
Enable exception handling
+fdefault-noexcept
+Common Report Var(flag_default_noexcept) Optimization Init(0)
+Make functions no-throw/noexcept by default
+
fexpensive-optimizations
Common Report Var(flag_expensive_optimizations) Optimization
Perform a number of minor, expensive optimizations
diff --git a/gcc-4.9/gcc/config.gcc b/gcc-4.9/gcc/config.gcc
index c4851d37f..0250fd181 100644
--- a/gcc-4.9/gcc/config.gcc
+++ b/gcc-4.9/gcc/config.gcc
@@ -432,7 +432,7 @@ nds32*)
nios2-*-*)
cpu_type=nios2
extra_options="${extra_options} g.opt"
- ;;
+ ;;
picochip-*-*)
cpu_type=picochip
;;
@@ -1156,8 +1156,7 @@ cris-*-elf | cris-*-none)
;;
crisv32-*-linux* | cris-*-linux*)
tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h cris/linux.h"
- # We need to avoid using t-linux, so override default tmake_file
- tmake_file="cris/t-cris cris/t-linux t-slibgcc t-linux"
+ tmake_file="${tmake_file} cris/t-cris cris/t-linux"
extra_options="${extra_options} cris/linux.opt"
case $target in
cris-*-*)
@@ -2245,6 +2244,10 @@ nios2-*-*)
tm_file="${tm_file} newlib-stdint.h nios2/elf.h"
extra_options="${extra_options} nios2/elf.opt"
;;
+ nios2-*-rtems*)
+ tm_file="${tm_file} newlib-stdint.h nios2/rtems.h rtems.h"
+ tmake_file="${tmake_file} t-rtems nios2/t-rtems"
+ ;;
esac
;;
pdp11-*-*)
@@ -2351,7 +2354,7 @@ powerpc-*-rtems*)
tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
;;
powerpc*-*-linux*)
- tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h"
+ tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h linux-android.h"
extra_options="${extra_options} rs6000/sysv4.opt"
extra_options="${extra_options} linux-android.opt"
tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
diff --git a/gcc-4.9/gcc/config/aarch64/aarch64-linux.h b/gcc-4.9/gcc/config/aarch64/aarch64-linux.h
index f8a97c899..3a180bb89 100644
--- a/gcc-4.9/gcc/config/aarch64/aarch64-linux.h
+++ b/gcc-4.9/gcc/config/aarch64/aarch64-linux.h
@@ -47,4 +47,6 @@
} \
while (0)
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+
#endif /* GCC_AARCH64_LINUX_H */
diff --git a/gcc-4.9/gcc/config/aarch64/aarch64.c b/gcc-4.9/gcc/config/aarch64/aarch64.c
index bf35031ec..07430a48d 100644
--- a/gcc-4.9/gcc/config/aarch64/aarch64.c
+++ b/gcc-4.9/gcc/config/aarch64/aarch64.c
@@ -5257,6 +5257,20 @@ aarch64_override_options (void)
aarch64_tune_params = selected_tune->tune;
aarch64_override_options_after_change ();
+
+ if (TARGET_ANDROID)
+ {
+ /* Lower the complete unroll code size limits.
+ Loop unroll needs some tuning in arm and aarch64. */
+ maybe_set_param_value (PARAM_MAX_DEFAULT_COMPLETELY_PEELED_INSNS, 50,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
+
+ /* Disable array_bound warning. Work around isses
+ introduced in complete unroll. */
+ global_options.x_warn_array_bounds = 0;
+ }
+
}
/* Implement targetm.override_options_after_change. */
diff --git a/gcc-4.9/gcc/config/alpha/elf.h b/gcc-4.9/gcc/config/alpha/elf.h
index 6ae4065bc..e334fc4ec 100644
--- a/gcc-4.9/gcc/config/alpha/elf.h
+++ b/gcc-4.9/gcc/config/alpha/elf.h
@@ -126,6 +126,10 @@ do { \
"%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
+/* This variable should be set to 'true' if the target ABI requires
+ unwinding tables even when exceptions are not used. */
+#define TARGET_UNWIND_TABLES_DEFAULT true
+
/* Select a format to encode pointers in exception handling data. CODE
is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
true if the symbol may be affected by dynamic relocations.
diff --git a/gcc-4.9/gcc/config/arm/t-rtems-eabi b/gcc-4.9/gcc/config/arm/t-rtems-eabi
index d81fbf7ec..92c4dcb12 100644
--- a/gcc-4.9/gcc/config/arm/t-rtems-eabi
+++ b/gcc-4.9/gcc/config/arm/t-rtems-eabi
@@ -1,47 +1,167 @@
# Custom RTEMS EABI multilibs
-MULTILIB_OPTIONS = mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m mfpu=neon mfloat-abi=hard
-MULTILIB_DIRNAMES = thumb armv6-m armv7-a armv7-r armv7-m neon hard
+MULTILIB_OPTIONS = mbig-endian mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m mfpu=neon/mfpu=vfpv3-d16/mfpu=fpv4-sp-d16 mfloat-abi=hard
+MULTILIB_DIRNAMES = eb thumb armv6-m armv7-a armv7-r armv7-m neon vfpv3-d16 fpv4-sp-d16 hard
# Enumeration of multilibs
MULTILIB_EXCEPTIONS =
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfloat-abi=hard
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfloat-abi=hard
# MULTILIB_EXCEPTIONS += mthumb/march=armv6-m
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16
MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfloat-abi=hard
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-a
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfloat-abi=hard
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfloat-abi=hard
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m
MULTILIB_EXCEPTIONS += mthumb/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += mthumb/mfpu=neon
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16
MULTILIB_EXCEPTIONS += mthumb/mfloat-abi=hard
# MULTILIB_EXCEPTIONS += mthumb
MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16
MULTILIB_EXCEPTIONS += march=armv6-m/mfloat-abi=hard
MULTILIB_EXCEPTIONS += march=armv6-m
MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16
MULTILIB_EXCEPTIONS += march=armv7-a/mfloat-abi=hard
MULTILIB_EXCEPTIONS += march=armv7-a
MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16
MULTILIB_EXCEPTIONS += march=armv7-r/mfloat-abi=hard
MULTILIB_EXCEPTIONS += march=armv7-r
MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16
MULTILIB_EXCEPTIONS += march=armv7-m/mfloat-abi=hard
MULTILIB_EXCEPTIONS += march=armv7-m
MULTILIB_EXCEPTIONS += mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += mfpu=neon
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16
MULTILIB_EXCEPTIONS += mfloat-abi=hard
diff --git a/gcc-4.9/gcc/config/cris/constraints.md b/gcc-4.9/gcc/config/cris/constraints.md
index 651fbedb0..f927ccaaa 100644
--- a/gcc-4.9/gcc/config/cris/constraints.md
+++ b/gcc-4.9/gcc/config/cris/constraints.md
@@ -118,7 +118,7 @@
reload_in_progress
|| reload_completed)"))
;; Just an explicit indirect reference: [const]?
- (match_test "CONSTANT_P (XEXP (op, 0))")
+ (match_test "CRIS_CONSTANT_P (XEXP (op, 0))")
;; Something that is indexed; [...+...]?
(and (match_code "plus" "0")
;; A BDAP constant: [reg+(8|16|32)bit offset]?
@@ -159,6 +159,8 @@
(define_constraint "U"
"@internal"
(and (match_test "flag_pic")
+ ;; We're just interested in the ..._or_callable_symbol part.
+ ;; (Using CRIS_CONSTANT_P would exclude that too.)
(match_test "CONSTANT_P (op)")
(match_operand 0 "cris_nonmemory_operand_or_callable_symbol")))
diff --git a/gcc-4.9/gcc/config/cris/cris-protos.h b/gcc-4.9/gcc/config/cris/cris-protos.h
index 0fdcafe52..b09babd69 100644
--- a/gcc-4.9/gcc/config/cris/cris-protos.h
+++ b/gcc-4.9/gcc/config/cris/cris-protos.h
@@ -31,8 +31,9 @@ extern bool cris_cc0_user_requires_cmp (rtx);
extern rtx cris_return_addr_rtx (int, rtx);
extern rtx cris_split_movdx (rtx *);
extern int cris_legitimate_pic_operand (rtx);
-extern enum cris_pic_symbol_type cris_pic_symbol_type_of (const_rtx);
+extern enum cris_symbol_type cris_symbol_type_of (const_rtx);
extern bool cris_valid_pic_const (const_rtx, bool);
+extern bool cris_legitimate_constant_p (enum machine_mode, rtx);
extern bool cris_constant_index_p (const_rtx);
extern bool cris_base_p (const_rtx, bool);
extern bool cris_base_or_autoincr_p (const_rtx, bool);
@@ -46,7 +47,7 @@ extern int cris_cfun_uses_pic_table (void);
extern void cris_asm_output_case_end (FILE *, int, rtx);
extern rtx cris_gen_movem_load (rtx, rtx, int);
extern rtx cris_emit_movem_store (rtx, rtx, int, bool);
-extern void cris_expand_pic_call_address (rtx *);
+extern void cris_expand_pic_call_address (rtx *, rtx *);
extern void cris_order_for_addsi3 (rtx *, int);
extern void cris_emit_trap_for_misalignment (rtx);
#endif /* RTX_CODE */
diff --git a/gcc-4.9/gcc/config/cris/cris.c b/gcc-4.9/gcc/config/cris/cris.c
index 209f127a6..c15139f51 100644
--- a/gcc-4.9/gcc/config/cris/cris.c
+++ b/gcc-4.9/gcc/config/cris/cris.c
@@ -147,6 +147,7 @@ static rtx cris_function_incoming_arg (cumulative_args_t,
static void cris_function_arg_advance (cumulative_args_t, enum machine_mode,
const_tree, bool);
static tree cris_md_asm_clobbers (tree, tree, tree);
+static bool cris_cannot_force_const_mem (enum machine_mode, rtx);
static void cris_option_override (void);
@@ -214,6 +215,9 @@ int cris_cpu_version = CRIS_DEFAULT_CPU_VERSION;
#undef TARGET_LEGITIMATE_ADDRESS_P
#define TARGET_LEGITIMATE_ADDRESS_P cris_legitimate_address_p
+#undef TARGET_LEGITIMATE_CONSTANT_P
+#define TARGET_LEGITIMATE_CONSTANT_P cris_legitimate_constant_p
+
#undef TARGET_PREFERRED_RELOAD_CLASS
#define TARGET_PREFERRED_RELOAD_CLASS cris_preferred_reload_class
@@ -248,6 +252,10 @@ int cris_cpu_version = CRIS_DEFAULT_CPU_VERSION;
#define TARGET_FUNCTION_ARG_ADVANCE cris_function_arg_advance
#undef TARGET_MD_ASM_CLOBBERS
#define TARGET_MD_ASM_CLOBBERS cris_md_asm_clobbers
+
+#undef TARGET_CANNOT_FORCE_CONST_MEM
+#define TARGET_CANNOT_FORCE_CONST_MEM cris_cannot_force_const_mem
+
#undef TARGET_FRAME_POINTER_REQUIRED
#define TARGET_FRAME_POINTER_REQUIRED cris_frame_pointer_required
@@ -506,6 +514,21 @@ cris_cfun_uses_pic_table (void)
return crtl->uses_pic_offset_table;
}
+/* Worker function for TARGET_CANNOT_FORCE_CONST_MEM.
+ We can't put PIC addresses in the constant pool, not even the ones that
+ can be reached as pc-relative as we can't tell when or how to do that. */
+
+static bool
+cris_cannot_force_const_mem (enum machine_mode mode ATTRIBUTE_UNUSED, rtx x)
+{
+ enum cris_symbol_type t = cris_symbol_type_of (x);
+
+ return
+ t == cris_unspec
+ || t == cris_got_symbol
+ || t == cris_rel_symbol;
+}
+
/* Given an rtx, return the text string corresponding to the CODE of X.
Intended for use in the assembly language output section of a
define_insn. */
@@ -601,7 +624,7 @@ cris_print_index (rtx index, FILE *file)
if (REG_P (index))
fprintf (file, "$%s.b", reg_names[REGNO (index)]);
- else if (CONSTANT_P (index))
+ else if (CRIS_CONSTANT_P (index))
cris_output_addr_const (file, index);
else if (GET_CODE (index) == MULT)
{
@@ -1041,7 +1064,7 @@ cris_print_operand (FILE *file, rtx x, int code)
/* If this is a GOT symbol, force it to be emitted as :GOT and
:GOTPLT regardless of -fpic (i.e. not as :GOT16, :GOTPLT16).
Avoid making this too much of a special case. */
- if (flag_pic == 1 && CONSTANT_P (operand))
+ if (flag_pic == 1 && CRIS_CONSTANT_P (operand))
{
int flag_pic_save = flag_pic;
@@ -1161,7 +1184,7 @@ cris_print_operand (FILE *file, rtx x, int code)
default:
/* No need to handle all strange variants, let output_addr_const
do it for us. */
- if (CONSTANT_P (operand))
+ if (CRIS_CONSTANT_P (operand))
{
cris_output_addr_const (file, operand);
return;
@@ -1358,7 +1381,7 @@ reg_ok_for_index_p (const_rtx x, bool strict)
bool
cris_constant_index_p (const_rtx x)
{
- return (CONSTANT_P (x) && (!flag_pic || cris_valid_pic_const (x, true)));
+ return (CRIS_CONSTANT_P (x) && (!flag_pic || cris_valid_pic_const (x, true)));
}
/* True if X is a valid base register. */
@@ -1467,6 +1490,29 @@ cris_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
return false;
}
+/* Worker function for TARGET_LEGITIMATE_CONSTANT_P. We have to handle
+ PIC constants that aren't legitimized. FIXME: there used to be a
+ guarantee that the target LEGITIMATE_CONSTANT_P didn't have to handle
+ PIC constants, but no more (4.7 era); testcase: glibc init-first.c.
+ While that may be seen as a bug, that guarantee seems a wart by design,
+ so don't bother; fix the documentation instead. */
+
+bool
+cris_legitimate_constant_p (enum machine_mode mode ATTRIBUTE_UNUSED, rtx x)
+{
+ enum cris_symbol_type t;
+
+ if (flag_pic)
+ return LEGITIMATE_PIC_OPERAND_P (x);
+
+ t = cris_symbol_type_of (x);
+
+ return
+ t == cris_no_symbol
+ || t == cris_offsettable_symbol
+ || t == cris_unspec;
+}
+
/* Worker function for LEGITIMIZE_RELOAD_ADDRESS. */
bool
@@ -2214,7 +2260,7 @@ cris_address_cost (rtx x, enum machine_mode mode ATTRIBUTE_UNUSED,
return (2 + 2) / 2;
/* A BDAP with some other constant is 2 bytes extra. */
- if (CONSTANT_P (tem2))
+ if (CRIS_CONSTANT_P (tem2))
return (2 + 2 + 2) / 2;
/* BDAP with something indirect should have a higher cost than
@@ -2312,7 +2358,7 @@ cris_side_effect_mode_ok (enum rtx_code code, rtx *ops,
return 0;
/* Check allowed cases, like [r(+)?].[bwd] and const. */
- if (CONSTANT_P (val_rtx))
+ if (CRIS_CONSTANT_P (val_rtx))
return 1;
if (MEM_P (val_rtx)
@@ -2464,32 +2510,34 @@ cris_valid_pic_const (const_rtx x, bool any_operand)
gcc_unreachable ();
}
- return cris_pic_symbol_type_of (x) == cris_no_symbol;
+ return cris_symbol_type_of (x) == cris_no_symbol;
}
-/* Helper function to find the right PIC-type symbol to generate,
+/* Helper function to find the right symbol-type to generate,
given the original (non-PIC) representation. */
-enum cris_pic_symbol_type
-cris_pic_symbol_type_of (const_rtx x)
+enum cris_symbol_type
+cris_symbol_type_of (const_rtx x)
{
switch (GET_CODE (x))
{
case SYMBOL_REF:
- return SYMBOL_REF_LOCAL_P (x)
- ? cris_rel_symbol : cris_got_symbol;
+ return flag_pic
+ ? (SYMBOL_REF_LOCAL_P (x)
+ ? cris_rel_symbol : cris_got_symbol)
+ : cris_offsettable_symbol;
case LABEL_REF:
- return cris_rel_symbol;
+ return flag_pic ? cris_rel_symbol : cris_offsettable_symbol;
case CONST:
- return cris_pic_symbol_type_of (XEXP (x, 0));
+ return cris_symbol_type_of (XEXP (x, 0));
case PLUS:
case MINUS:
{
- enum cris_pic_symbol_type t1 = cris_pic_symbol_type_of (XEXP (x, 0));
- enum cris_pic_symbol_type t2 = cris_pic_symbol_type_of (XEXP (x, 1));
+ enum cris_symbol_type t1 = cris_symbol_type_of (XEXP (x, 0));
+ enum cris_symbol_type t2 = cris_symbol_type_of (XEXP (x, 1));
gcc_assert (t1 == cris_no_symbol || t2 == cris_no_symbol);
@@ -2504,9 +2552,7 @@ cris_pic_symbol_type_of (const_rtx x)
return cris_no_symbol;
case UNSPEC:
- /* Likely an offsettability-test attempting to add a constant to
- a GOTREAD symbol, which can't be handled. */
- return cris_invalid_pic_symbol;
+ return cris_unspec;
default:
fatal_insn ("unrecognized supposed constant", x);
@@ -3714,19 +3760,19 @@ cris_emit_movem_store (rtx dest, rtx nregs_rtx, int increment,
/* Worker function for expanding the address for PIC function calls. */
void
-cris_expand_pic_call_address (rtx *opp)
+cris_expand_pic_call_address (rtx *opp, rtx *markerp)
{
rtx op = *opp;
- gcc_assert (MEM_P (op));
+ gcc_assert (flag_pic && MEM_P (op));
op = XEXP (op, 0);
/* It might be that code can be generated that jumps to 0 (or to a
specific address). Don't die on that. (There is a
testcase.) */
- if (CONSTANT_ADDRESS_P (op) && !CONST_INT_P (op))
+ if (CONSTANT_P (op) && !CONST_INT_P (op))
{
- enum cris_pic_symbol_type t = cris_pic_symbol_type_of (op);
+ enum cris_symbol_type t = cris_symbol_type_of (op);
CRIS_ASSERT (can_create_pseudo_p ());
@@ -3752,18 +3798,21 @@ cris_expand_pic_call_address (rtx *opp)
}
else
op = force_reg (Pmode, op);
+
+ /* A local call. */
+ *markerp = const0_rtx;
}
else if (t == cris_got_symbol)
{
if (TARGET_AVOID_GOTPLT)
{
/* Change a "jsr sym" into (allocate register rM, rO)
- "move.d (const (unspec [sym rPIC] CRIS_UNSPEC_PLT_GOTREL)),rM"
+ "move.d (const (unspec [sym] CRIS_UNSPEC_PLT_GOTREL)),rM"
"add.d rPIC,rM,rO", "jsr rO" for pre-v32 and
- "jsr (const (unspec [sym rPIC] CRIS_UNSPEC_PLT_PCREL))"
+ "jsr (const (unspec [sym] CRIS_UNSPEC_PLT_PCREL))"
for v32. */
rtx tem, rm, ro;
- gcc_assert (can_create_pseudo_p ());
+
crtl->uses_pic_offset_table = 1;
tem = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, op),
TARGET_V32
@@ -3817,14 +3866,27 @@ cris_expand_pic_call_address (rtx *opp)
MEM_NOTRAP_P (mem) = 1;
op = mem;
}
+
+ /* We need to prepare this call to go through the PLT; we
+ need to make GOT available. */
+ *markerp = pic_offset_table_rtx;
}
else
- /* Can't possibly get a GOT-needing-fixup for a function-call,
- right? */
+ /* Can't possibly get anything else for a function-call, right? */
fatal_insn ("unidentifiable call op", op);
- *opp = replace_equiv_address (*opp, op);
+ /* If the validizing variant is called, it will try to validize
+ the address as a valid any-operand constant, but as it's only
+ valid for calls and moves, it will fail and always be forced
+ into a register. */
+ *opp = replace_equiv_address_nv (*opp, op);
}
+ else
+ /* Can't tell what locality a call to a non-constant address has;
+ better make the GOT register alive at it.
+ FIXME: Can we see whether the register has known constant
+ contents? */
+ *markerp = pic_offset_table_rtx;
}
/* Make sure operands are in the right order for an addsi3 insn as
diff --git a/gcc-4.9/gcc/config/cris/cris.h b/gcc-4.9/gcc/config/cris/cris.h
index 37b562e5d..c5aa83edb 100644
--- a/gcc-4.9/gcc/config/cris/cris.h
+++ b/gcc-4.9/gcc/config/cris/cris.h
@@ -794,6 +794,12 @@ struct cum_args {int regs;};
} \
while (0)
+/* The mode argument to cris_legitimate_constant_p isn't used, so just
+ pass a cheap dummy. N.B. we have to cast away const from the
+ parameter rather than adjust the parameter, as it's type is mandated
+ by the TARGET_LEGITIMATE_CONSTANT_P target hook interface. */
+#define CRIS_CONSTANT_P(X) \
+ (CONSTANT_P (X) && cris_legitimate_constant_p (VOIDmode, CONST_CAST_RTX (X)))
/* Node: Condition Code */
@@ -833,13 +839,14 @@ struct cum_args {int regs;};
/* Helper type. */
-enum cris_pic_symbol_type
+enum cris_symbol_type
{
cris_no_symbol = 0,
cris_got_symbol = 1,
cris_rel_symbol = 2,
cris_got_symbol_needing_fixup = 3,
- cris_invalid_pic_symbol = 4
+ cris_unspec = 7,
+ cris_offsettable_symbol = 8
};
#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? CRIS_GOT_REGNUM : INVALID_REGNUM)
diff --git a/gcc-4.9/gcc/config/cris/cris.md b/gcc-4.9/gcc/config/cris/cris.md
index 47f64512a..18b978786 100644
--- a/gcc-4.9/gcc/config/cris/cris.md
+++ b/gcc-4.9/gcc/config/cris/cris.md
@@ -919,6 +919,8 @@
(match_operand:SI 1 "cris_general_operand_or_symbol" ""))]
""
{
+ enum cris_symbol_type t;
+
/* If the output goes to a MEM, make sure we have zero or a register as
input. */
if (MEM_P (operands[0])
@@ -934,12 +936,12 @@
valid symbol? Can we exclude global PIC addresses with an added
offset? */
if (flag_pic
- && CONSTANT_ADDRESS_P (operands[1])
+ && CONSTANT_P (operands[1])
&& !cris_valid_pic_const (operands[1], false))
{
- enum cris_pic_symbol_type t = cris_pic_symbol_type_of (operands[1]);
+ t = cris_symbol_type_of (operands[1]);
- gcc_assert (t != cris_no_symbol);
+ gcc_assert (t != cris_no_symbol && t != cris_offsettable_symbol);
if (! REG_S_P (operands[0]))
{
@@ -1086,7 +1088,12 @@
if (!flag_pic
&& (GET_CODE (operands[1]) == SYMBOL_REF
|| GET_CODE (operands[1]) == LABEL_REF
- || GET_CODE (operands[1]) == CONST))
+ || (GET_CODE (operands[1]) == CONST
+ && (GET_CODE (XEXP (operands[1], 0)) != UNSPEC
+ || (XINT (XEXP (operands[1], 0), 1)
+ == CRIS_UNSPEC_PLT_PCREL)
+ || (XINT (XEXP (operands[1], 0), 1)
+ == CRIS_UNSPEC_PCREL)))))
{
/* FIXME: Express this through (set_attr cc none) instead,
since we can't express the ``none'' at this point. FIXME:
@@ -1169,6 +1176,12 @@
case CRIS_UNSPEC_PCREL:
case CRIS_UNSPEC_PLT_PCREL:
gcc_assert (TARGET_V32);
+ /* LAPC doesn't set condition codes; clear them to make the
+ (equivalence-marked) result of this insn not presumed
+ present. This instruction can be a PIC symbol load (for
+ a hidden symbol) which for weak symbols will be followed
+ by a test for NULL. */
+ CC_STATUS_INIT;
return "lapc %1,%0";
default:
@@ -3710,15 +3723,16 @@
{
gcc_assert (MEM_P (operands[0]));
if (flag_pic)
- cris_expand_pic_call_address (&operands[0]);
+ cris_expand_pic_call_address (&operands[0], &operands[1]);
+ else
+ operands[1] = const0_rtx;
})
-;; Accept *anything* as operand 1. Accept operands for operand 0 in
-;; order of preference.
+;; Accept operands for operand 0 in order of preference.
(define_insn "*expanded_call_non_v32"
[(call (mem:QI (match_operand:SI 0 "general_operand" "r,Q>,g"))
- (match_operand 1 "" ""))
+ (match_operand:SI 1 "cris_call_type_marker" "rM,rM,rM"))
(clobber (reg:SI CRIS_SRP_REGNUM))]
"!TARGET_V32"
"jsr %0")
@@ -3727,7 +3741,7 @@
[(call
(mem:QI
(match_operand:SI 0 "cris_nonmemory_operand_or_callable_symbol" "n,r,U,i"))
- (match_operand 1 "" ""))
+ (match_operand:SI 1 "cris_call_type_marker" "rM,rM,rM,rM"))
(clobber (reg:SI CRIS_SRP_REGNUM))]
"TARGET_V32"
"@
@@ -3740,19 +3754,21 @@
;; Parallel when calculating and reusing address of indirect pointer
;; with simple offset. (Makes most sense with PIC.) It looks a bit
;; wrong not to have the clobber last, but that's the way combine
-;; generates it (except it doesn' look into the *inner* mem, so this
+;; generates it (except it doesn't look into the *inner* mem, so this
;; just matches a peephole2). FIXME: investigate that.
(define_insn "*expanded_call_side"
[(call (mem:QI
(mem:SI
(plus:SI (match_operand:SI 0 "cris_bdap_operand" "%r, r,r")
(match_operand:SI 1 "cris_bdap_operand" "r>Rn,r,>Rn"))))
- (match_operand 2 "" ""))
+ (match_operand:SI 2 "cris_call_type_marker" "rM,rM,rM"))
(clobber (reg:SI CRIS_SRP_REGNUM))
(set (match_operand:SI 3 "register_operand" "=*0,r,r")
(plus:SI (match_dup 0)
(match_dup 1)))]
- "!TARGET_AVOID_GOTPLT && !TARGET_V32"
+ ;; Disabled until after reload until we can avoid an output reload for
+ ;; operand 3 (being forbidden for call insns).
+ "reload_completed && !TARGET_AVOID_GOTPLT && !TARGET_V32"
"jsr [%3=%0%S1]")
(define_expand "call_value"
@@ -3764,10 +3780,12 @@
{
gcc_assert (MEM_P (operands[1]));
if (flag_pic)
- cris_expand_pic_call_address (&operands[1]);
+ cris_expand_pic_call_address (&operands[1], &operands[2]);
+ else
+ operands[2] = const0_rtx;
})
-;; Accept *anything* as operand 2. The validity other than "general" of
+;; The validity other than "general" of
;; operand 0 will be checked elsewhere. Accept operands for operand 1 in
;; order of preference (Q includes r, but r is shorter, faster).
;; We also accept a PLT symbol. We output it as [rPIC+sym:GOTPLT] rather
@@ -3776,7 +3794,7 @@
(define_insn "*expanded_call_value_non_v32"
[(set (match_operand 0 "nonimmediate_operand" "=g,g,g")
(call (mem:QI (match_operand:SI 1 "general_operand" "r,Q>,g"))
- (match_operand 2 "" "")))
+ (match_operand:SI 2 "cris_call_type_marker" "rM,rM,rM")))
(clobber (reg:SI CRIS_SRP_REGNUM))]
"!TARGET_V32"
"Jsr %1"
@@ -3790,12 +3808,14 @@
(mem:SI
(plus:SI (match_operand:SI 1 "cris_bdap_operand" "%r, r,r")
(match_operand:SI 2 "cris_bdap_operand" "r>Rn,r,>Rn"))))
- (match_operand 3 "" "")))
+ (match_operand:SI 3 "cris_call_type_marker" "rM,rM,rM")))
(clobber (reg:SI CRIS_SRP_REGNUM))
(set (match_operand:SI 4 "register_operand" "=*1,r,r")
(plus:SI (match_dup 1)
(match_dup 2)))]
- "!TARGET_AVOID_GOTPLT && !TARGET_V32"
+ ;; Disabled until after reload until we can avoid an output reload for
+ ;; operand 4 (being forbidden for call insns).
+ "reload_completed && !TARGET_AVOID_GOTPLT && !TARGET_V32"
"Jsr [%4=%1%S2]"
[(set_attr "cc" "clobber")])
@@ -3805,7 +3825,7 @@
(call
(mem:QI
(match_operand:SI 1 "cris_nonmemory_operand_or_callable_symbol" "n,r,U,i"))
- (match_operand 2 "" "")))
+ (match_operand:SI 2 "cris_call_type_marker" "rM,rM,rM,rM")))
(clobber (reg:SI 16))]
"TARGET_V32"
"@
@@ -4827,7 +4847,7 @@
/* Make sure we have canonical RTX so we match the insn pattern -
not a constant in the first operand. We also require the order
(plus reg mem) to match the final pattern. */
- if (CONSTANT_P (otherop) || MEM_P (otherop))
+ if (CRIS_CONSTANT_P (otherop) || MEM_P (otherop))
{
operands[7] = operands[1];
operands[8] = otherop;
@@ -4878,7 +4898,7 @@
/* Make sure we have canonical RTX so we match the insn pattern -
not a constant in the first operand. We also require the order
(plus reg mem) to match the final pattern. */
- if (CONSTANT_P (otherop) || MEM_P (otherop))
+ if (CRIS_CONSTANT_P (otherop) || MEM_P (otherop))
{
operands[7] = operands[1];
operands[8] = otherop;
diff --git a/gcc-4.9/gcc/config/cris/predicates.md b/gcc-4.9/gcc/config/cris/predicates.md
index 0169b0b71..ddb090eab 100644
--- a/gcc-4.9/gcc/config/cris/predicates.md
+++ b/gcc-4.9/gcc/config/cris/predicates.md
@@ -142,7 +142,7 @@
(ior (match_operand 0 "general_operand")
(and (match_code "const, symbol_ref, label_ref")
; The following test is actually just an assertion.
- (match_test "cris_pic_symbol_type_of (op) != cris_no_symbol"))))
+ (match_test "cris_symbol_type_of (op) != cris_no_symbol"))))
;; A predicate for the anon movsi expansion, one that fits a PCREL
;; operand as well as general_operand.
@@ -176,3 +176,15 @@
(ior (match_operand 0 "memory_operand")
(match_test "cris_general_operand_or_symbol (XEXP (op, 0),
Pmode)"))))
+
+;; A marker for the call-insn: (const_int 0) for a call to a
+;; hidden or static function and non-pic and
+;; pic_offset_table_rtx for a call that *might* go through the
+;; PLT.
+
+(define_predicate "cris_call_type_marker"
+ (ior (and (match_operand 0 "const_int_operand")
+ (match_test "op == const0_rtx"))
+ (and (and (match_operand 0 "register_operand")
+ (match_test "op == pic_offset_table_rtx"))
+ (match_test "flag_pic != 0"))))
diff --git a/gcc-4.9/gcc/config/i386/avx512fintrin.h b/gcc-4.9/gcc/config/i386/avx512fintrin.h
index 314895ad7..c4caa5ae6 100644
--- a/gcc-4.9/gcc/config/i386/avx512fintrin.h
+++ b/gcc-4.9/gcc/config/i386/avx512fintrin.h
@@ -8103,6 +8103,22 @@ _mm512_stream_load_si512 (void *__P)
return __builtin_ia32_movntdqa512 ((__v8di *)__P);
}
+/* Constants for mantissa extraction */
+typedef enum
+{
+ _MM_MANT_NORM_1_2, /* interval [1, 2) */
+ _MM_MANT_NORM_p5_2, /* interval [0.5, 2) */
+ _MM_MANT_NORM_p5_1, /* interval [0.5, 1) */
+ _MM_MANT_NORM_p75_1p5 /* interval [0.75, 1.5) */
+} _MM_MANTISSA_NORM_ENUM;
+
+typedef enum
+{
+ _MM_MANT_SIGN_src, /* sign = sign(SRC) */
+ _MM_MANT_SIGN_zero, /* sign = 0 */
+ _MM_MANT_SIGN_nan /* DEST = NaN if sign(SRC) = 1 */
+} _MM_MANTISSA_SIGN_ENUM;
+
#ifdef __OPTIMIZE__
extern __inline __m128
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
@@ -8182,22 +8198,6 @@ _mm512_maskz_getexp_round_pd (__mmask8 __U, __m512d __A, const int __R)
(__mmask8) __U, __R);
}
-/* Constants for mantissa extraction */
-typedef enum
-{
- _MM_MANT_NORM_1_2, /* interval [1, 2) */
- _MM_MANT_NORM_p5_2, /* interval [0.5, 2) */
- _MM_MANT_NORM_p5_1, /* interval [0.5, 1) */
- _MM_MANT_NORM_p75_1p5 /* interval [0.75, 1.5) */
-} _MM_MANTISSA_NORM_ENUM;
-
-typedef enum
-{
- _MM_MANT_SIGN_src, /* sign = sign(SRC) */
- _MM_MANT_SIGN_zero, /* sign = 0 */
- _MM_MANT_SIGN_nan /* DEST = NaN if sign(SRC) = 1 */
-} _MM_MANTISSA_SIGN_ENUM;
-
extern __inline __m512d
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_getmant_round_pd (__m512d __A, _MM_MANTISSA_NORM_ENUM __B,
diff --git a/gcc-4.9/gcc/config/i386/i386.c b/gcc-4.9/gcc/config/i386/i386.c
index df504335e..70f18ad7b 100644
--- a/gcc-4.9/gcc/config/i386/i386.c
+++ b/gcc-4.9/gcc/config/i386/i386.c
@@ -6556,7 +6556,7 @@ classify_argument (enum machine_mode mode, const_tree type,
bit_offset);
if (!num)
return 0;
- for (i = 0; i < num; i++)
+ for (i = 0; i < num && i < words; i++)
classes[i] = merge_classes (subclasses[i], classes[i]);
}
}
diff --git a/gcc-4.9/gcc/config/i386/ia32intrin.h b/gcc-4.9/gcc/config/i386/ia32intrin.h
index 5e7c893fe..614b0fab2 100644
--- a/gcc-4.9/gcc/config/i386/ia32intrin.h
+++ b/gcc-4.9/gcc/config/i386/ia32intrin.h
@@ -256,11 +256,7 @@ __writeeflags (unsigned long long X)
#define _bswap64(a) __bswapq(a)
#define _popcnt64(a) __popcntq(a)
-#define _lrotl(a,b) __rolq((a), (b))
-#define _lrotr(a,b) __rorq((a), (b))
#else
-#define _lrotl(a,b) __rold((a), (b))
-#define _lrotr(a,b) __rord((a), (b))
/* Read flags register */
extern __inline unsigned int
@@ -280,6 +276,16 @@ __writeeflags (unsigned int X)
#endif
+/* On LP64 systems, longs are 64-bit. Use the appropriate rotate
+ * function. */
+#ifdef __LP64__
+#define _lrotl(a,b) __rolq((a), (b))
+#define _lrotr(a,b) __rorq((a), (b))
+#else
+#define _lrotl(a,b) __rold((a), (b))
+#define _lrotr(a,b) __rord((a), (b))
+#endif
+
#define _bit_scan_forward(a) __bsfd(a)
#define _bit_scan_reverse(a) __bsrd(a)
#define _bswap(a) __bswapd(a)
diff --git a/gcc-4.9/gcc/config/i386/sse.md b/gcc-4.9/gcc/config/i386/sse.md
index 27ade1964..b60a8226d 100644
--- a/gcc-4.9/gcc/config/i386/sse.md
+++ b/gcc-4.9/gcc/config/i386/sse.md
@@ -5887,9 +5887,10 @@
(match_operand 5 "const_0_to_15_operand")]))
(match_operand:<ssequartermode> 6 "memory_operand" "0")
(match_operand:QI 7 "register_operand" "Yk")))]
- "TARGET_AVX512F && (INTVAL (operands[2]) = INTVAL (operands[3]) - 1)
- && (INTVAL (operands[3]) = INTVAL (operands[4]) - 1)
- && (INTVAL (operands[4]) = INTVAL (operands[5]) - 1)"
+ "TARGET_AVX512F
+ && (INTVAL (operands[2]) == (INTVAL (operands[3]) - 1)
+ && INTVAL (operands[3]) == (INTVAL (operands[4]) - 1)
+ && INTVAL (operands[4]) == (INTVAL (operands[5]) - 1))"
{
operands[2] = GEN_INT ((INTVAL (operands[2])) >> 2);
return "vextract<shuffletype>32x4\t{%2, %1, %0%{%7%}|%0%{%7%}, %1, %2}";
@@ -5909,9 +5910,10 @@
(match_operand 3 "const_0_to_15_operand")
(match_operand 4 "const_0_to_15_operand")
(match_operand 5 "const_0_to_15_operand")])))]
- "TARGET_AVX512F && (INTVAL (operands[2]) = INTVAL (operands[3]) - 1)
- && (INTVAL (operands[3]) = INTVAL (operands[4]) - 1)
- && (INTVAL (operands[4]) = INTVAL (operands[5]) - 1)"
+ "TARGET_AVX512F
+ && (INTVAL (operands[2]) == (INTVAL (operands[3]) - 1)
+ && INTVAL (operands[3]) == (INTVAL (operands[4]) - 1)
+ && INTVAL (operands[4]) == (INTVAL (operands[5]) - 1))"
{
operands[2] = GEN_INT ((INTVAL (operands[2])) >> 2);
return "vextract<shuffletype>32x4\t{%2, %1, %0<mask_operand6>|%0<mask_operand6>, %1, %2}";
diff --git a/gcc-4.9/gcc/config/rs6000/freebsd64.h b/gcc-4.9/gcc/config/rs6000/freebsd64.h
index 4f678f6f4..1f3ef199e 100644
--- a/gcc-4.9/gcc/config/rs6000/freebsd64.h
+++ b/gcc-4.9/gcc/config/rs6000/freebsd64.h
@@ -367,7 +367,7 @@ extern int dot_symbols;
/* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */
#undef ADJUST_FIELD_ALIGN
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
? 128 \
: (TARGET_64BIT \
&& TARGET_ALIGN_NATURAL == 0 \
diff --git a/gcc-4.9/gcc/config/rs6000/linux64.h b/gcc-4.9/gcc/config/rs6000/linux64.h
index 52c233b7d..a198af186 100644
--- a/gcc-4.9/gcc/config/rs6000/linux64.h
+++ b/gcc-4.9/gcc/config/rs6000/linux64.h
@@ -246,7 +246,7 @@ extern int dot_symbols;
/* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */
#undef ADJUST_FIELD_ALIGN
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
? 128 \
: (TARGET_64BIT \
&& TARGET_ALIGN_NATURAL == 0 \
diff --git a/gcc-4.9/gcc/config/rs6000/rs6000-protos.h b/gcc-4.9/gcc/config/rs6000/rs6000-protos.h
index 785f6ce1b..067a74aa6 100644
--- a/gcc-4.9/gcc/config/rs6000/rs6000-protos.h
+++ b/gcc-4.9/gcc/config/rs6000/rs6000-protos.h
@@ -155,6 +155,7 @@ extern void rs6000_split_logical (rtx [], enum rtx_code, bool, bool, bool, rtx);
#ifdef TREE_CODE
extern unsigned int rs6000_data_alignment (tree, unsigned int, enum data_align);
+extern bool rs6000_special_adjust_field_align_p (tree, unsigned int);
extern unsigned int rs6000_special_round_type_align (tree, unsigned int,
unsigned int);
extern unsigned int darwin_rs6000_special_round_type_align (tree, unsigned int,
diff --git a/gcc-4.9/gcc/config/rs6000/rs6000.c b/gcc-4.9/gcc/config/rs6000/rs6000.c
index bf67e7298..d7cbc6cde 100644
--- a/gcc-4.9/gcc/config/rs6000/rs6000.c
+++ b/gcc-4.9/gcc/config/rs6000/rs6000.c
@@ -5871,6 +5871,34 @@ rs6000_data_alignment (tree type, unsigned int align, enum data_align how)
return align;
}
+/* Previous GCC releases forced all vector types to have 16-byte alignment. */
+
+bool
+rs6000_special_adjust_field_align_p (tree field, unsigned int computed)
+{
+ if (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (field)) == VECTOR_TYPE)
+ {
+ if (computed != 128)
+ {
+ static bool warned;
+ if (!warned && warn_psabi)
+ {
+ warned = true;
+ inform (input_location,
+ "the layout of aggregates containing vectors with"
+ " %d-byte alignment will change in a future GCC release",
+ computed / BITS_PER_UNIT);
+ }
+ }
+ /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
+ keep the special treatment of vector types, but warn if there will
+ be differences in future GCC releases. */
+ return true;
+ }
+
+ return false;
+}
+
/* AIX increases natural record alignment to doubleword if the first
field is an FP double while the FP fields remain word aligned. */
@@ -9180,14 +9208,51 @@ rs6000_function_arg_boundary (enum machine_mode mode, const_tree type)
|| (type && TREE_CODE (type) == VECTOR_TYPE
&& int_size_in_bytes (type) >= 16))
return 128;
- else if (((TARGET_MACHO && rs6000_darwin64_abi)
- || DEFAULT_ABI == ABI_ELFv2
- || (DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm))
- && mode == BLKmode
- && type && TYPE_ALIGN (type) > 64)
+
+ /* Aggregate types that need > 8 byte alignment are quadword-aligned
+ in the parameter area in the ELFv2 ABI, and in the AIX ABI unless
+ -mcompat-align-parm is used. */
+ if (((DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm)
+ || DEFAULT_ABI == ABI_ELFv2)
+ && type && TYPE_ALIGN (type) > 64)
+ {
+ /* "Aggregate" means any AGGREGATE_TYPE except for single-element
+ or homogeneous float/vector aggregates here. We already handled
+ vector aggregates above, but still need to check for float here. */
+ bool aggregate_p = (AGGREGATE_TYPE_P (type)
+ && !SCALAR_FLOAT_MODE_P (elt_mode));
+
+ /* We used to check for BLKmode instead of the above aggregate type
+ check. Warn when this results in any difference to the ABI. */
+ if (aggregate_p != (mode == BLKmode))
+ {
+ static bool warned;
+ if (!warned && warn_psabi)
+ {
+ warned = true;
+ inform (input_location,
+ "the ABI of passing aggregates with %d-byte alignment"
+ " will change in a future GCC release",
+ (int) TYPE_ALIGN (type) / BITS_PER_UNIT);
+ }
+ }
+
+ /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
+ keep using the BLKmode check, but warn if there will be differences
+ in future GCC releases. */
+ if (mode == BLKmode)
+ return 128;
+ }
+
+ /* Similar for the Darwin64 ABI. Note that for historical reasons we
+ implement the "aggregate type" check as a BLKmode check here; this
+ means certain aggregate types are in fact not aligned. */
+ if (TARGET_MACHO && rs6000_darwin64_abi
+ && mode == BLKmode
+ && type && TYPE_ALIGN (type) > 64)
return 128;
- else
- return PARM_BOUNDARY;
+
+ return PARM_BOUNDARY;
}
/* The offset in words to the start of the parameter save area. */
@@ -10225,6 +10290,7 @@ rs6000_function_arg (cumulative_args_t cum_v, enum machine_mode mode,
rtx r, off;
int i, k = 0;
unsigned long n_fpreg = (GET_MODE_SIZE (elt_mode) + 7) >> 3;
+ int fpr_words;
/* Do we also need to pass this argument in the parameter
save area? */
@@ -10253,6 +10319,37 @@ rs6000_function_arg (cumulative_args_t cum_v, enum machine_mode mode,
rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, off);
}
+ /* If there were not enough FPRs to hold the argument, the rest
+ usually goes into memory. However, if the current position
+ is still within the register parameter area, a portion may
+ actually have to go into GPRs.
+
+ Note that it may happen that the portion of the argument
+ passed in the first "half" of the first GPR was already
+ passed in the last FPR as well.
+
+ For unnamed arguments, we already set up GPRs to cover the
+ whole argument in rs6000_psave_function_arg, so there is
+ nothing further to do at this point.
+
+ GCC 4.8/4.9 Note: This was implemented incorrectly in earlier
+ GCC releases. To avoid any ABI change on the release branch,
+ we retain that original implementation here, but warn if we
+ encounter a case where the ABI will change in the future. */
+ fpr_words = (i * GET_MODE_SIZE (elt_mode)) / (TARGET_32BIT ? 4 : 8);
+ if (i < n_elts && align_words + fpr_words < GP_ARG_NUM_REG
+ && cum->nargs_prototype > 0)
+ {
+ static bool warned;
+ if (!warned && warn_psabi)
+ {
+ warned = true;
+ inform (input_location,
+ "the ABI of passing homogeneous float aggregates"
+ " will change in a future GCC release");
+ }
+ }
+
return rs6000_finish_function_arg (mode, rvec, k);
}
else if (align_words < GP_ARG_NUM_REG)
diff --git a/gcc-4.9/gcc/config/rs6000/sysv4.h b/gcc-4.9/gcc/config/rs6000/sysv4.h
index afbd2892e..7cc543319 100644
--- a/gcc-4.9/gcc/config/rs6000/sysv4.h
+++ b/gcc-4.9/gcc/config/rs6000/sysv4.h
@@ -292,7 +292,7 @@ do { \
/* An expression for the alignment of a structure field FIELD if the
alignment computed in the usual way is COMPUTED. */
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
? 128 : COMPUTED)
#undef BIGGEST_FIELD_ALIGNMENT
@@ -962,3 +962,19 @@ ncrtn.o%s"
#define TARGET_USES_SYSV4_OPT 1
#undef DBX_REGISTER_NUMBER
+
+/* Link -lasan early on the command line. For -static-libasan, don't link
+ it for -shared link, the executable should be compiled with -static-libasan
+ in that case, and for executable link link with --{,no-}whole-archive around
+ it to force everything into the executable. And similarly for -ltsan. */
+#if defined(HAVE_LD_STATIC_DYNAMIC)
+#undef LIBASAN_EARLY_SPEC
+#define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \
+ "%{static-libasan:%{!shared:" \
+ LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \
+ LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
+#undef LIBTSAN_EARLY_SPEC
+#define LIBTSAN_EARLY_SPEC "%{static-libtsan:%{!shared:" \
+ LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
+ LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}"
+#endif
diff --git a/gcc-4.9/gcc/config/sh/predicates.md b/gcc-4.9/gcc/config/sh/predicates.md
index 31f2e1f5a..73bb880d6 100644
--- a/gcc-4.9/gcc/config/sh/predicates.md
+++ b/gcc-4.9/gcc/config/sh/predicates.md
@@ -489,6 +489,10 @@
rtx mem_rtx = MEM_P (op) ? op : SUBREG_REG (op);
rtx x = XEXP (mem_rtx, 0);
+ if (! ALLOW_INDEXED_ADDRESS
+ && GET_CODE (x) == PLUS && REG_P (XEXP (x, 0)) && REG_P (XEXP (x, 1)))
+ return false;
+
if ((mode == QImode || mode == HImode)
&& GET_CODE (x) == PLUS
&& REG_P (XEXP (x, 0))
@@ -567,6 +571,10 @@
rtx mem_rtx = MEM_P (op) ? op : SUBREG_REG (op);
rtx x = XEXP (mem_rtx, 0);
+ if (! ALLOW_INDEXED_ADDRESS
+ && GET_CODE (x) == PLUS && REG_P (XEXP (x, 0)) && REG_P (XEXP (x, 1)))
+ return false;
+
if ((mode == QImode || mode == HImode)
&& GET_CODE (x) == PLUS
&& REG_P (XEXP (x, 0))
diff --git a/gcc-4.9/gcc/config/sh/sh.c b/gcc-4.9/gcc/config/sh/sh.c
index 12724a20d..62dcf0cb3 100644
--- a/gcc-4.9/gcc/config/sh/sh.c
+++ b/gcc-4.9/gcc/config/sh/sh.c
@@ -10207,6 +10207,10 @@ sh_legitimate_index_p (enum machine_mode mode, rtx op, bool consider_sh2a,
static bool
sh_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
{
+ if (! ALLOW_INDEXED_ADDRESS
+ && GET_CODE (x) == PLUS && REG_P (XEXP (x, 0)) && REG_P (XEXP (x, 1)))
+ return false;
+
if (REG_P (x) && REGNO (x) == GBR_REG)
return true;
@@ -10436,6 +10440,28 @@ sh_legitimize_reload_address (rtx *p, enum machine_mode mode, int opnum,
enum reload_type type = (enum reload_type) itype;
const int mode_sz = GET_MODE_SIZE (mode);
+ if (! ALLOW_INDEXED_ADDRESS
+ && GET_CODE (*p) == PLUS
+ && REG_P (XEXP (*p, 0)) && REG_P (XEXP (*p, 1)))
+ {
+ *p = copy_rtx (*p);
+ push_reload (*p, NULL_RTX, p, NULL,
+ BASE_REG_CLASS, Pmode, VOIDmode, 0, 0, opnum, type);
+ return true;
+ }
+
+ if (! ALLOW_INDEXED_ADDRESS
+ && GET_CODE (*p) == PLUS
+ && GET_CODE (XEXP (*p, 0)) == PLUS)
+ {
+ rtx sum = gen_rtx_PLUS (Pmode, XEXP (XEXP (*p, 0), 0),
+ XEXP (XEXP (*p, 0), 1));
+ *p = gen_rtx_PLUS (Pmode, sum, XEXP (*p, 1));
+ push_reload (sum, NULL_RTX, &XEXP (*p, 0), NULL,
+ BASE_REG_CLASS, Pmode, VOIDmode, 0, 0, opnum, type);
+ return true;
+ }
+
if (TARGET_SHMEDIA)
return false;
diff --git a/gcc-4.9/gcc/config/sparc/sync.md b/gcc-4.9/gcc/config/sparc/sync.md
index e6e237f25..98ac0d3d6 100644
--- a/gcc-4.9/gcc/config/sparc/sync.md
+++ b/gcc-4.9/gcc/config/sparc/sync.md
@@ -64,11 +64,19 @@
"stbar"
[(set_attr "type" "multi")])
+;; For LEON3, STB has the effect of membar #StoreLoad.
+(define_insn "*membar_storeload_leon3"
+ [(set (match_operand:BLK 0 "" "")
+ (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
+ "TARGET_LEON3"
+ "stb\t%%g0, [%%sp-1]"
+ [(set_attr "type" "store")])
+
;; For V8, LDSTUB has the effect of membar #StoreLoad.
(define_insn "*membar_storeload"
[(set (match_operand:BLK 0 "" "")
(unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
- "TARGET_V8"
+ "TARGET_V8 && !TARGET_LEON3"
"ldstub\t[%%sp-1], %%g0"
[(set_attr "type" "multi")])
diff --git a/gcc-4.9/gcc/coverage.c b/gcc-4.9/gcc/coverage.c
index a7f183d0c..6b1d0d6cd 100644
--- a/gcc-4.9/gcc/coverage.c
+++ b/gcc-4.9/gcc/coverage.c
@@ -720,7 +720,18 @@ read_counts_file (const char *da_file_name, unsigned module_id)
return;
}
else
- return;
+ {
+ inform (input_location, "file %s not found, disabling profile use",
+ da_file_name);
+ set_profile_use_options (&global_options, &global_options_set,
+ false, true);
+ /* RESET is invoked during covrerage_init when process_options is done.
+ Need to reset optimization_default_node and optimization_current_node. */
+ /* Save the current optimization options. */
+ optimization_default_node = build_optimization_node (&global_options);
+ optimization_current_node = optimization_default_node;
+ return;
+ }
}
if (!gcov_magic (gcov_read_unsigned (), GCOV_DATA_MAGIC))
@@ -1023,7 +1034,10 @@ get_coverage_counts_entry (struct function *func, unsigned counter)
if (PARAM_VALUE (PARAM_PROFILE_FUNC_INTERNAL_ID))
elt.ident = FUNC_DECL_GLOBAL_ID (func);
else
- elt.ident = coverage_compute_profile_id (cgraph_get_node (func->decl));
+ {
+ gcc_assert (coverage_node_map_initialized_p ());
+ elt.ident = cgraph_get_node (func->decl)->profile_id;
+ }
elt.ctr = counter;
entry = counts_hash.find (&elt);
@@ -1131,7 +1145,10 @@ get_coverage_counts_no_warn (struct function *f, unsigned counter, unsigned *n_c
if (PARAM_VALUE (PARAM_PROFILE_FUNC_INTERNAL_ID))
elt.ident = FUNC_DECL_GLOBAL_ID (f);
else
- elt.ident = coverage_compute_profile_id (cgraph_get_node (f->decl));
+ {
+ gcc_assert (coverage_node_map_initialized_p ());
+ elt.ident = cgraph_get_node (f->decl)->profile_id;
+ }
elt.ctr = counter;
entry = counts_hash.find (&elt);
if (!entry)
@@ -1325,8 +1342,15 @@ coverage_compute_lineno_checksum (void)
/* Note: it is a bad design that C++ FE associate the convertion function type
with the name of the decl. This leads to cross contamination between different
conversion operators in different modules (If conv_type_names map is cleared
- at the end of parsing of each module). */
- if (flag_dyn_ipa && lang_hooks.user_conv_function_p (current_function_decl))
+ at the end of parsing of each module).
+
+ For LIPO always use the full mangled name to help disambiguate different
+ template instantiations. This is important for LIPO because we use the
+ checksums to identify matching copies of the same COMDAT to handle
+ missing profiles in the copies not selected by the linker, and to update
+ indirect call profiles when the target COMDAT is a copy that is not
+ in the module group. */
+ if (flag_dyn_ipa)
name = DECL_ASSEMBLER_NAME (current_function_decl);
else
name = DECL_NAME (current_function_decl);
@@ -1411,8 +1435,11 @@ coverage_begin_function (unsigned lineno_checksum, unsigned cfg_checksum)
if (PARAM_VALUE (PARAM_PROFILE_FUNC_INTERNAL_ID))
gcov_write_unsigned (FUNC_DECL_FUNC_ID (cfun));
else
- gcov_write_unsigned (coverage_compute_profile_id (
- cgraph_get_node (cfun->decl)));
+ {
+ gcc_assert (coverage_node_map_initialized_p ());
+ gcov_write_unsigned (
+ cgraph_get_node (current_function_decl)->profile_id);
+ }
gcov_write_unsigned (lineno_checksum);
gcov_write_unsigned (cfg_checksum);
@@ -1458,8 +1485,9 @@ coverage_end_function (unsigned lineno_checksum, unsigned cfg_checksum)
if (flag_dyn_ipa)
error ("param=profile-func-internal-id=0 is not"
" supported in LIPO mode. ");
- item->ident = coverage_compute_profile_id (
- cgraph_get_node (cfun->decl));
+ gcc_assert (coverage_node_map_initialized_p ());
+ item->ident = cgraph_get_node (cfun->decl)->profile_id;
+
}
item->lineno_checksum = lineno_checksum;
item->cfg_checksum = cfg_checksum;
diff --git a/gcc-4.9/gcc/coverage.h b/gcc-4.9/gcc/coverage.h
index 408cd66e6..0049d1318 100644
--- a/gcc-4.9/gcc/coverage.h
+++ b/gcc-4.9/gcc/coverage.h
@@ -75,6 +75,8 @@ extern void coverage_dc_end_function (void);
is present in the coverage internal data structures. */
extern bool coverage_function_present (unsigned fn_ident);
+extern bool coverage_node_map_initialized_p (void);
+
extern void emit_function_name (void);
extern tree get_gcov_type (void);
diff --git a/gcc-4.9/gcc/cp/ChangeLog b/gcc-4.9/gcc/cp/ChangeLog
index f406b27b7..b0a474daf 100644
--- a/gcc-4.9/gcc/cp/ChangeLog
+++ b/gcc-4.9/gcc/cp/ChangeLog
@@ -1,3 +1,12 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
+2014-07-13 Jason Merrill <jason@redhat.com>
+
+ PR c++/58636
+ * call.c (build_list_conv): Don't try to build a list of references.
+
2014-07-10 Jason Merrill <jason@redhat.com>
PR c++/61661
diff --git a/gcc-4.9/gcc/cp/call.c b/gcc-4.9/gcc/cp/call.c
index 2f24fd49b..2c67c03e4 100644
--- a/gcc-4.9/gcc/cp/call.c
+++ b/gcc-4.9/gcc/cp/call.c
@@ -805,6 +805,12 @@ build_list_conv (tree type, tree ctor, int flags, tsubst_flags_t complain)
/* But no narrowing conversions. */
flags |= LOOKUP_NO_NARROWING;
+ /* Can't make an array of these types. */
+ if (TREE_CODE (elttype) == REFERENCE_TYPE
+ || TREE_CODE (elttype) == FUNCTION_TYPE
+ || VOID_TYPE_P (elttype))
+ return NULL;
+
FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (ctor), i, val)
{
conversion *sub
diff --git a/gcc-4.9/gcc/cp/except.c b/gcc-4.9/gcc/cp/except.c
index 221971ac9..3a66c678b 100644
--- a/gcc-4.9/gcc/cp/except.c
+++ b/gcc-4.9/gcc/cp/except.c
@@ -1269,6 +1269,8 @@ bool
nothrow_spec_p (const_tree spec)
{
gcc_assert (!DEFERRED_NOEXCEPT_SPEC_P (spec));
+ if (spec == NULL_TREE && flag_default_noexcept)
+ return true;
if (spec == NULL_TREE
|| TREE_VALUE (spec) != NULL_TREE
|| spec == noexcept_false_spec)
@@ -1290,7 +1292,7 @@ type_noexcept_p (const_tree type)
{
tree spec = TYPE_RAISES_EXCEPTIONS (type);
gcc_assert (!DEFERRED_NOEXCEPT_SPEC_P (spec));
- if (flag_nothrow_opt)
+ if (flag_nothrow_opt || flag_default_noexcept)
return nothrow_spec_p (spec);
else
return spec == noexcept_true_spec;
diff --git a/gcc-4.9/gcc/expr.c b/gcc-4.9/gcc/expr.c
index 94e90172e..ad8c05a90 100644
--- a/gcc-4.9/gcc/expr.c
+++ b/gcc-4.9/gcc/expr.c
@@ -6605,7 +6605,7 @@ store_field (rtx target, HOST_WIDE_INT bitsize, HOST_WIDE_INT bitpos,
{
HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp));
rtx temp_target;
- if (mode == BLKmode)
+ if (mode == BLKmode || mode == VOIDmode)
mode = smallest_mode_for_size (size * BITS_PER_UNIT, MODE_INT);
temp_target = gen_reg_rtx (mode);
emit_group_store (temp_target, temp, TREE_TYPE (exp), size);
diff --git a/gcc-4.9/gcc/fortran/ChangeLog b/gcc-4.9/gcc/fortran/ChangeLog
index b96c61224..d2e070b78 100644
--- a/gcc-4.9/gcc/fortran/ChangeLog
+++ b/gcc-4.9/gcc/fortran/ChangeLog
@@ -1,3 +1,15 @@
+2014-07-19 Paul Thomas <pault@gcc.gnu.org>
+
+ Backport from mainline
+ PR fortran/61780
+ * dependency.c (gfc_dep_resolver): Index the 'reverse' array so
+ that elements are skipped. This then correctly aligns 'reverse'
+ with the scalarizer loops.
+
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-07-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/61459
diff --git a/gcc-4.9/gcc/fortran/dependency.c b/gcc-4.9/gcc/fortran/dependency.c
index a24a4709e..f9b975ad9 100644
--- a/gcc-4.9/gcc/fortran/dependency.c
+++ b/gcc-4.9/gcc/fortran/dependency.c
@@ -2023,6 +2023,7 @@ int
gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc_reverse *reverse)
{
int n;
+ int m;
gfc_dependency fin_dep;
gfc_dependency this_dep;
@@ -2072,6 +2073,8 @@ gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc_reverse *reverse)
break;
}
+ /* Index for the reverse array. */
+ m = -1;
for (n=0; n < lref->u.ar.dimen; n++)
{
/* Handle dependency when either of array reference is vector
@@ -2118,38 +2121,44 @@ gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc_reverse *reverse)
The ability to reverse or not is set by previous conditions
in this dimension. If reversal is not activated, the
value GFC_DEP_BACKWARD is reset to GFC_DEP_OVERLAP. */
+
+ /* Get the indexing right for the scalarizing loop. If this
+ is an element, there is no corresponding loop. */
+ if (lref->u.ar.dimen_type[n] != DIMEN_ELEMENT)
+ m++;
+
if (rref->u.ar.dimen_type[n] == DIMEN_RANGE
&& lref->u.ar.dimen_type[n] == DIMEN_RANGE)
{
/* Set reverse if backward dependence and not inhibited. */
- if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
- reverse[n] = (this_dep == GFC_DEP_BACKWARD) ?
- GFC_REVERSE_SET : reverse[n];
+ if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
+ reverse[m] = (this_dep == GFC_DEP_BACKWARD) ?
+ GFC_REVERSE_SET : reverse[m];
/* Set forward if forward dependence and not inhibited. */
- if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
- reverse[n] = (this_dep == GFC_DEP_FORWARD) ?
- GFC_FORWARD_SET : reverse[n];
+ if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
+ reverse[m] = (this_dep == GFC_DEP_FORWARD) ?
+ GFC_FORWARD_SET : reverse[m];
/* Flag up overlap if dependence not compatible with
the overall state of the expression. */
- if (reverse && reverse[n] == GFC_REVERSE_SET
+ if (reverse && reverse[m] == GFC_REVERSE_SET
&& this_dep == GFC_DEP_FORWARD)
{
- reverse[n] = GFC_INHIBIT_REVERSE;
+ reverse[m] = GFC_INHIBIT_REVERSE;
this_dep = GFC_DEP_OVERLAP;
}
- else if (reverse && reverse[n] == GFC_FORWARD_SET
+ else if (reverse && reverse[m] == GFC_FORWARD_SET
&& this_dep == GFC_DEP_BACKWARD)
{
- reverse[n] = GFC_INHIBIT_REVERSE;
+ reverse[m] = GFC_INHIBIT_REVERSE;
this_dep = GFC_DEP_OVERLAP;
}
/* If no intention of reversing or reversing is explicitly
inhibited, convert backward dependence to overlap. */
if ((reverse == NULL && this_dep == GFC_DEP_BACKWARD)
- || (reverse != NULL && reverse[n] == GFC_INHIBIT_REVERSE))
+ || (reverse != NULL && reverse[m] == GFC_INHIBIT_REVERSE))
this_dep = GFC_DEP_OVERLAP;
}
diff --git a/gcc-4.9/gcc/gcc.c b/gcc-4.9/gcc/gcc.c
index efca49bfb..297d985f4 100644
--- a/gcc-4.9/gcc/gcc.c
+++ b/gcc-4.9/gcc/gcc.c
@@ -772,7 +772,8 @@ proper position among the other output files. */
%{fcilkplus:%:include(libcilkrts.spec)%(link_cilkrts)}\
%{fgnu-tm:%:include(libitm.spec)%(link_itm)}\
%(mflib) " STACK_SPLIT_SPEC "\
- %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \
+ %{fprofile-arcs|fprofile-generate*|coverage:-lgcov " \
+ LINUX_OR_ANDROID_LD("", "-lgcc") "}" SANITIZER_SPEC " \
%{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
%{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}"
#endif
diff --git a/gcc-4.9/gcc/gcov-tool.c b/gcc-4.9/gcc/gcov-tool.c
index f15e6f33f..e7b551e3b 100644
--- a/gcc-4.9/gcc/gcov-tool.c
+++ b/gcc-4.9/gcc/gcov-tool.c
@@ -61,17 +61,22 @@ extern void lipo_set_substitute_string (const char *);
-- otherwise we get duplicated defintions.
Make the defines weak to link with other objects/libraries
that potentially compiled with -fprofile-generate. */
+#if !defined(_WIN32)
+#define WEAK_ATTR __attribute__ ((weak))
+#else
+#define WEAK_ATTR
+#endif
-__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_grouping_algorithm;
-__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_merge_modu_edges;
-__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_weak_inclusion;
-__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_max_mem;
-__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_comdat_algorithm;
-__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_random_group_size;
-__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_cutoff;
-__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_random_seed;
-__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_dump_cgraph;
-__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_propagate_scale;
+WEAK_ATTR gcov_unsigned_t __gcov_lipo_grouping_algorithm;
+WEAK_ATTR gcov_unsigned_t __gcov_lipo_merge_modu_edges;
+WEAK_ATTR gcov_unsigned_t __gcov_lipo_weak_inclusion;
+WEAK_ATTR gcov_unsigned_t __gcov_lipo_max_mem;
+WEAK_ATTR gcov_unsigned_t __gcov_lipo_comdat_algorithm;
+WEAK_ATTR gcov_unsigned_t __gcov_lipo_random_group_size;
+WEAK_ATTR gcov_unsigned_t __gcov_lipo_cutoff;
+WEAK_ATTR gcov_unsigned_t __gcov_lipo_random_seed;
+WEAK_ATTR gcov_unsigned_t __gcov_lipo_dump_cgraph;
+WEAK_ATTR gcov_unsigned_t __gcov_lipo_propagate_scale;
#else
gcov_unsigned_t __gcov_lipo_grouping_algorithm;
gcov_unsigned_t __gcov_lipo_merge_modu_edges;
@@ -85,6 +90,8 @@ gcov_unsigned_t __gcov_lipo_dump_cgraph;
gcov_unsigned_t __gcov_lipo_propagate_scale;
#endif
+#undef WEAK_ATTR
+
/* Set to verbose output mode. */
static bool verbose;
diff --git a/gcc-4.9/gcc/go/ChangeLog b/gcc-4.9/gcc/go/ChangeLog
index 1c1505a38..1af11e486 100644
--- a/gcc-4.9/gcc/go/ChangeLog
+++ b/gcc-4.9/gcc/go/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
diff --git a/gcc-4.9/gcc/ipa-inline-transform.c b/gcc-4.9/gcc/ipa-inline-transform.c
index aaf427d12..69598b3c8 100644
--- a/gcc-4.9/gcc/ipa-inline-transform.c
+++ b/gcc-4.9/gcc/ipa-inline-transform.c
@@ -186,8 +186,14 @@ clone_inlined_nodes (struct cgraph_edge *e, bool duplicate,
else
{
struct cgraph_node *n;
- if (flag_auto_profile && L_IPO_COMP_MODE
- && cgraph_pre_profiling_inlining_done)
+ /* Disable updating of callee count if caller is not the resolved node
+ to avoid multiple updates of the callee's profile when inlining
+ into COMDAT copies. Both AutoFDO and regular FDO will have the
+ same edge counts for all unresolved nodes. In AutoFDO this is due
+ to profile correlation by function name and source position. In
+ regular FDO this is due to COMDAT profile merging performed on the
+ dynamic callgraph at the end of LIPO profiling. */
+ if (L_IPO_COMP_MODE && cgraph_pre_profiling_inlining_done)
{
struct cgraph_node *caller = e->caller;
if (caller->global.inlined_to)
diff --git a/gcc-4.9/gcc/java/ChangeLog b/gcc-4.9/gcc/java/ChangeLog
index c806f6255..b9185f119 100644
--- a/gcc-4.9/gcc/java/ChangeLog
+++ b/gcc-4.9/gcc/java/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
diff --git a/gcc-4.9/gcc/l-ipo.c b/gcc-4.9/gcc/l-ipo.c
index 843ad557d..59a9636d2 100644
--- a/gcc-4.9/gcc/l-ipo.c
+++ b/gcc-4.9/gcc/l-ipo.c
@@ -1566,7 +1566,11 @@ resolve_cgraph_node (struct cgraph_sym **slot, struct cgraph_node *node)
}
has_prof1 = has_profile_info (decl1);
- if (has_prof1)
+ bool is_aux1 = cgraph_is_auxiliary (decl1);
+ bool is_aux2 = cgraph_is_auxiliary (decl2);
+ /* Pick the copy from the primary module if multiple copies
+ have profile. */
+ if (has_prof1 && (!is_aux1 || is_aux2))
return;
has_prof2 = has_profile_info (decl2);
if (has_prof2)
diff --git a/gcc-4.9/gcc/lto/ChangeLog b/gcc-4.9/gcc/lto/ChangeLog
index 47a5924c1..c029da671 100644
--- a/gcc-4.9/gcc/lto/ChangeLog
+++ b/gcc-4.9/gcc/lto/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Jan Hubicka <hubicka@ucw.cz>
PR lto/61012
diff --git a/gcc-4.9/gcc/objc/ChangeLog b/gcc-4.9/gcc/objc/ChangeLog
index de619aeea..2443c6197 100644
--- a/gcc-4.9/gcc/objc/ChangeLog
+++ b/gcc-4.9/gcc/objc/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
diff --git a/gcc-4.9/gcc/objcp/ChangeLog b/gcc-4.9/gcc/objcp/ChangeLog
index 19f43bc88..cba09a4be 100644
--- a/gcc-4.9/gcc/objcp/ChangeLog
+++ b/gcc-4.9/gcc/objcp/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
diff --git a/gcc-4.9/gcc/omp-low.c b/gcc-4.9/gcc/omp-low.c
index a605c45f0..1753cad45 100644
--- a/gcc-4.9/gcc/omp-low.c
+++ b/gcc-4.9/gcc/omp-low.c
@@ -1872,7 +1872,6 @@ create_omp_child_function (omp_context *ctx, bool task_copy)
TREE_STATIC (decl) = 1;
TREE_USED (decl) = 1;
DECL_ARTIFICIAL (decl) = 1;
- DECL_NAMELESS (decl) = 1;
DECL_IGNORED_P (decl) = 0;
TREE_PUBLIC (decl) = 0;
DECL_UNINLINABLE (decl) = 1;
diff --git a/gcc-4.9/gcc/opts.c b/gcc-4.9/gcc/opts.c
index 3ed603a53..a588d2ec8 100644
--- a/gcc-4.9/gcc/opts.c
+++ b/gcc-4.9/gcc/opts.c
@@ -1288,6 +1288,75 @@ print_specific_help (unsigned int include_flags,
opts->x_help_columns, opts, lang_mask);
}
+/* Set options implied by -f[no-]profile-use[=...]. If RESET is
+ true, it means the profile data is not available, so it is better
+ to turn off the options unless explicitly set. The default
+ values are not checked. */
+
+void
+set_profile_use_options (struct gcc_options *opts,
+ struct gcc_options *opts_set,
+ bool value, bool reset)
+{
+ if (reset)
+ {
+ opts->x_flag_profile_use = false;
+ maybe_set_param_value
+ (PARAM_MAX_INLINE_INSNS_SINGLE,
+ default_param_value (PARAM_MAX_INLINE_INSNS_SINGLE),
+ opts->x_param_values, opts_set->x_param_values);
+ maybe_set_param_value
+ (PARAM_MAX_INLINE_INSNS_AUTO,
+ default_param_value (PARAM_MAX_INLINE_INSNS_AUTO),
+ opts->x_param_values, opts_set->x_param_values);
+ }
+
+ if (!opts_set->x_flag_branch_probabilities || reset)
+ opts->x_flag_branch_probabilities = value;
+ if (!opts_set->x_flag_profile_values || reset)
+ opts->x_flag_profile_values = value;
+ if (!opts_set->x_flag_unroll_loops)
+ opts->x_flag_unroll_loops = value;
+ if (!opts_set->x_flag_peel_loops)
+ opts->x_flag_peel_loops = value;
+ if (!opts_set->x_flag_value_profile_transformations || reset)
+ opts->x_flag_value_profile_transformations = value;
+ if (!opts_set->x_flag_inline_functions)
+ opts->x_flag_inline_functions = value;
+ if (!opts_set->x_flag_ipa_cp)
+ opts->x_flag_ipa_cp = value;
+ if (!opts_set->x_flag_ipa_cp_clone
+ && value && opts->x_flag_ipa_cp || reset)
+ opts->x_flag_ipa_cp_clone = value;
+ if (!opts_set->x_flag_predictive_commoning)
+ opts->x_flag_predictive_commoning = value;
+ if (!opts_set->x_flag_unswitch_loops)
+ opts->x_flag_unswitch_loops = value;
+ if (!opts_set->x_flag_gcse_after_reload)
+ opts->x_flag_gcse_after_reload = value;
+ if (!opts_set->x_flag_tree_loop_vectorize
+ && !opts_set->x_flag_tree_vectorize)
+ opts->x_flag_tree_loop_vectorize = value;
+ if (!opts_set->x_flag_tree_loop_distribute_patterns)
+ opts->x_flag_tree_loop_distribute_patterns = value;
+ if (!opts_set->x_flag_profile_reorder_functions || reset)
+ opts->x_flag_profile_reorder_functions = value;
+ /* Indirect call profiling should do all useful transformations
+ speculative devirtualization does. */
+ if (!opts_set->x_flag_devirtualize_speculatively
+ && opts->x_flag_value_profile_transformations)
+ opts->x_flag_devirtualize_speculatively = false;
+
+ /* See how AUTODECT flag_web is set in toplev.c. */
+ if (reset && !opts->x_flag_unroll_loops
+ && !opts->x_flag_peel_loops)
+ {
+ if(!opts_set->x_flag_web)
+ opts->x_flag_web = false;
+ if (!opts_set->x_flag_rename_registers)
+ opts->x_flag_rename_registers = false;
+ }
+}
/* Handle target- and language-independent options. Return zero to
generate an "unknown option" message. Only options that need
@@ -1735,41 +1804,7 @@ common_handle_option (struct gcc_options *opts,
value = true;
/* No break here - do -fprofile-use processing. */
case OPT_fprofile_use:
- if (!opts_set->x_flag_branch_probabilities)
- opts->x_flag_branch_probabilities = value;
- if (!opts_set->x_flag_profile_values)
- opts->x_flag_profile_values = value;
- if (!opts_set->x_flag_unroll_loops)
- opts->x_flag_unroll_loops = value;
- if (!opts_set->x_flag_peel_loops)
- opts->x_flag_peel_loops = value;
- if (!opts_set->x_flag_value_profile_transformations)
- opts->x_flag_value_profile_transformations = value;
- if (!opts_set->x_flag_inline_functions)
- opts->x_flag_inline_functions = value;
- if (!opts_set->x_flag_ipa_cp)
- opts->x_flag_ipa_cp = value;
- if (!opts_set->x_flag_ipa_cp_clone
- && value && opts->x_flag_ipa_cp)
- opts->x_flag_ipa_cp_clone = value;
- if (!opts_set->x_flag_predictive_commoning)
- opts->x_flag_predictive_commoning = value;
- if (!opts_set->x_flag_unswitch_loops)
- opts->x_flag_unswitch_loops = value;
- if (!opts_set->x_flag_gcse_after_reload)
- opts->x_flag_gcse_after_reload = value;
- if (!opts_set->x_flag_tree_loop_vectorize
- && !opts_set->x_flag_tree_vectorize)
- opts->x_flag_tree_loop_vectorize = value;
- if (!opts_set->x_flag_tree_loop_distribute_patterns)
- opts->x_flag_tree_loop_distribute_patterns = value;
- if (!opts_set->x_flag_profile_reorder_functions)
- opts->x_flag_profile_reorder_functions = value;
- /* Indirect call profiling should do all useful transformations
- speculative devirtualization does. */
- if (!opts_set->x_flag_devirtualize_speculatively
- && opts->x_flag_value_profile_transformations)
- opts->x_flag_devirtualize_speculatively = false;
+ set_profile_use_options (opts, opts_set, value, false);
break;
case OPT_fauto_profile_:
diff --git a/gcc-4.9/gcc/opts.h b/gcc-4.9/gcc/opts.h
index 3f07ec203..74e7622db 100644
--- a/gcc-4.9/gcc/opts.h
+++ b/gcc-4.9/gcc/opts.h
@@ -417,4 +417,6 @@ extern bool opt_enum_arg_to_value (size_t opt_index, const char *arg,
int *value, unsigned int lang_mask);
extern void write_compilation_info_to_asm (void);
extern void write_compilation_flags_to_asm (void);
+extern void set_profile_use_options (struct gcc_options *,
+ struct gcc_options *, bool, bool);
#endif
diff --git a/gcc-4.9/gcc/params.c b/gcc-4.9/gcc/params.c
index ab3c7c761..03b769cfd 100644
--- a/gcc-4.9/gcc/params.c
+++ b/gcc-4.9/gcc/params.c
@@ -190,3 +190,18 @@ get_num_compiler_params (void)
{
return num_compiler_params;
}
+
+/* Dump values of parameters. */
+
+void
+dump_params (int *params, int *params_set)
+{
+ size_t i;
+
+ /* Scan the parameter table to find a matching entry. */
+ for (i = 0; i < num_compiler_params; ++i)
+ {
+ fprintf (stderr, "%s\t%d (%s)\n", compiler_params[i].option,
+ params[i], params_set[i] ? "explicit" : "implicit");
+ }
+}
diff --git a/gcc-4.9/gcc/params.def b/gcc-4.9/gcc/params.def
index fd38e8fed..f59656933 100644
--- a/gcc-4.9/gcc/params.def
+++ b/gcc-4.9/gcc/params.def
@@ -1071,6 +1071,17 @@ DEFPARAM (PARAM_LIPO_WEAK_INCLUSION,
"Default is 0.",
0, 0, 1)
+/* Choose different COMDAT profile fixup algorithm. This only affects
+ LIPO profile-gen. */
+DEFPARAM (PARAM_LIPO_COMDAT_ALGORITHM,
+ "lipo-comdat-algorithm",
+ "Algorithm 0 performs no fixup."
+ "Algorithm 1 fixes up only indirect call profile targets."
+ "Algorithm 2 fixes up only missing counters."
+ "Algorithm 3 (1|2) fixes up both."
+ "The default algorithm is 3.",
+ 3, 0, 3)
+
/* In LIPO profile-use, use this parameter to enable the dumping of module id
in inline message. */
DEFPARAM (PARAM_INLINE_DUMP_MODULE_ID,
diff --git a/gcc-4.9/gcc/params.h b/gcc-4.9/gcc/params.h
index 0d6daa205..b1bac4067 100644
--- a/gcc-4.9/gcc/params.h
+++ b/gcc-4.9/gcc/params.h
@@ -92,6 +92,8 @@ enum compiler_param
#define PARAM_VALUE(ENUM) \
((int) global_options.x_param_values[(int) ENUM])
+extern void dump_params (int *params, int *params_set);
+
/* Set the value of the parameter given by NUM to VALUE, implicitly,
if it has not been set explicitly by the user, in the table PARAMS
using PARAMS_SET to indicate which have been explicitly set. */
diff --git a/gcc-4.9/gcc/po/ChangeLog b/gcc-4.9/gcc/po/ChangeLog
index 631f64ad1..399d6b5fa 100644
--- a/gcc-4.9/gcc/po/ChangeLog
+++ b/gcc-4.9/gcc/po/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-05-14 Joseph Myers <joseph@codesourcery.com>
* zh_CN.po: Update.
diff --git a/gcc-4.9/gcc/sched-deps.c b/gcc-4.9/gcc/sched-deps.c
index efc422308..df29bd30b 100644
--- a/gcc-4.9/gcc/sched-deps.c
+++ b/gcc-4.9/gcc/sched-deps.c
@@ -2750,7 +2750,8 @@ sched_analyze_2 (struct deps_desc *deps, rtx x, rtx insn)
Consider for instance a volatile asm that changes the fpu rounding
mode. An insn should not be moved across this even if it only uses
pseudo-regs because it might give an incorrectly rounded result. */
- if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
+ if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x))
+ && !DEBUG_INSN_P (insn))
reg_pending_barrier = TRUE_BARRIER;
/* For all ASM_OPERANDS, we must traverse the vector of input operands.
diff --git a/gcc-4.9/gcc/testsuite/ChangeLog b/gcc-4.9/gcc/testsuite/ChangeLog
index 20212cd73..790319955 100644
--- a/gcc-4.9/gcc/testsuite/ChangeLog
+++ b/gcc-4.9/gcc/testsuite/ChangeLog
@@ -1,3 +1,108 @@
+2014-07-28 Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/61801
+ * gcc.target/i386/pr61801.c: Fix testcase.
+
+2014-07-28 Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/61801
+ * gcc.target/i386/pr61801.c: New testcase.
+
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ Backport from mainline
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * gcc.target/powerpc/ppc64-abi-warn-3.c: New test.
+
+ * gcc.c-torture/execute/20050316-1.x: Add -Wno-psabi.
+ * gcc.c-torture/execute/20050604-1.x: Add -Wno-psabi.
+ * gcc.c-torture/execute/20050316-3.x: New file. Add -Wno-psabi.
+ * gcc.c-torture/execute/pr23135.x: Likewise.
+
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ Backport from mainline
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * gcc.target/powerpc/ppc64-abi-warn-2.c: New test.
+
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ Backport from mainline
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * gcc.target/powerpc/ppc64-abi-warn-1.c: New test.
+
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ Backport from mainline
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * g++.dg/compat/struct-layout-1.exp: Load g++-dg.exp.
+
+2014-07-24 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/61160
+ * g++.dg/ipa/pr61160-2.C (main): Return zero.
+ * g++.dg/ipa/pr61160-3.C (main): Likewise.
+
+2014-07-21 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2014-07-21 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/61855
+ * gcc.target/i386/pr61855.c: New test.
+
+2014-07-20 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/pack20.ad[sb]: New test.
+ * gnat.dg/pack20_pkg.ads: New helper.
+
+2014-07-19 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/stack-usage-2.c: Adjust.
+
+2014-07-19 Paul Thomas <pault@gcc.gnu.org>
+
+ Backport from mainline
+ PR fortran/61780
+ * gfortran.dg/dependency_44.f90 : New test
+
+2014-07-18 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2014-07-18 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/61794
+ * gcc.target/i386/pr61794.c: New test.
+
+2014-07-17 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2014-07-10 Richard Biener <rguenther@suse.de>
+
+ PR c-family/61741
+ * c-c++-common/torture/pr61741.c: Use signed char.
+
+ 2014-07-09 Richard Biener <rguenther@suse.de>
+
+ PR c-family/61741
+ * c-c++-common/torture/pr61741.c: New testcase.
+
+2014-07-17 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2014-07-14 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/61779
+ * gcc.dg/tree-ssa/ssa-copyprop-2.c: New testcase.
+
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-07-10 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/opt39.adb: New test.
@@ -13,7 +118,8 @@
2014-06-09 Alan Lawrence <alan.lawrence@arm.com>
PR target/61062
- * gcc.target/arm/pr48252.c (main): Expect same result as endian-neutral.
+ * gcc.target/arm/pr48252.c (main): Expect same result as
+ endian-neutral.
2014-07-08 Jakub Jelinek <jakub@redhat.com>
@@ -30,8 +136,8 @@
2014-07-08 Alan Lawrence <alan.lawrence@arm.com>
- Backport r211502 from mainline.
- 2014-06-10 Alan Lawrence <alan.lawrence@arm.com>
+ Backport r211502 from mainline.
+ 2014-06-10 Alan Lawrence <alan.lawrence@arm.com>
PR target/59843
* gcc.dg/vect/vect-singleton_1.c: New file.
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/compat/struct-layout-1.exp b/gcc-4.9/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
index 13211c2fa..4c7d4c43f 100644
--- a/gcc-4.9/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
+++ b/gcc-4.9/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
@@ -89,6 +89,9 @@ proc compat-use-tst-compiler { } {
# This must be done after the compat-use-*-compiler definitions.
load_lib compat.exp
+# Provide the g++-dg-prune routine (gcc-dp.exp is loaded by compat.exp)
+load_lib g++-dg.exp
+
g++_init
# Save variables for the C++ compiler under test, which each test will
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61160-1.C b/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61160-1.C
index a0fbb5f42..69bd6a61d 100644
--- a/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61160-1.C
+++ b/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61160-1.C
@@ -27,5 +27,6 @@ void *test (MMixin & anExample)
int main ()
{
CExample c;
- return (test (c) != &c);
+ test (c);
+ return 0;
}
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61160-2.C b/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61160-2.C
index 1011bd1ef..dd925d25c 100644
--- a/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61160-2.C
+++ b/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61160-2.C
@@ -39,5 +39,6 @@ void *test (MMixin & anExample)
int main ()
{
CExample c;
- return (test (c) != &c);
+ test (c);
+ return 0;
}
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/tree-ssa/dom-invalid.C b/gcc-4.9/gcc/testsuite/g++.dg/tree-ssa/dom-invalid.C
index 91f43ae8c..68fc48c2c 100644
--- a/gcc-4.9/gcc/testsuite/g++.dg/tree-ssa/dom-invalid.C
+++ b/gcc-4.9/gcc/testsuite/g++.dg/tree-ssa/dom-invalid.C
@@ -1,7 +1,8 @@
+// { dg-message "note: file" "" }
// PR tree-optimization/39557
// invalid post-dom info leads to infinite loop
// { dg-do run }
-// { dg-options "-Wall -fno-exceptions -O2 -fprofile-use -fopt-info -fno-rtti" }
+// { dg-options "-Wall -fno-exceptions -O2 -fprofile-use -fno-rtti -fno-diagnostics-show-caret" }
struct C
{
@@ -49,4 +50,4 @@ main ()
{
E e;
e.bar ();
-} // { dg-message "note: file" "" }
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050316-1.x b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050316-1.x
index 121fcfecc..cb2d28fd9 100644
--- a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050316-1.x
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050316-1.x
@@ -4,4 +4,5 @@ if { [check_effective_target_int16] } {
return 1
}
+set additional_flags "-Wno-psabi"
return 0;
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050604-1.x b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050604-1.x
index f5b4aaae3..756242d23 100644
--- a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050604-1.x
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050604-1.x
@@ -6,4 +6,5 @@ if { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } {
set additional_flags "-mno-mmx"
}
+set additional_flags "-Wno-psabi"
return 0
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/pr26570.c b/gcc-4.9/gcc/testsuite/gcc.dg/pr26570.c
index 71c16f207..b1222578a 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/pr26570.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/pr26570.c
@@ -1,7 +1,8 @@
+/* { dg-message "note: file" "" } */
/* { dg-do compile } */
/* { dg-options "-O2 -fprofile-generate -fprofile-use -fopt-info" } */
unsigned test (unsigned a, unsigned b)
{
return a / b;
-} /* { dg-message "note: \[^\n\]*execution counts estimated" } */
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/pr32773.c b/gcc-4.9/gcc/testsuite/gcc.dg/pr32773.c
index 19a90195a..c9bcb4392 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/pr32773.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/pr32773.c
@@ -1,3 +1,4 @@
+/* { dg-message "note: file" "" } */
/* { dg-do compile } */
/* { dg-options "-O -fprofile-use -fopt-info" } */
/* { dg-options "-O -m4 -fprofile-use -fopt-info" { target sh-*-* } } */
@@ -6,4 +7,4 @@ void foo (int *p)
{
if (p)
*p = 0;
-} /* { dg-message "note: \[^\n\]*execution counts estimated" } */
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/stack-usage-2.c b/gcc-4.9/gcc/testsuite/gcc.dg/stack-usage-2.c
index d3c17a84d..df7e55f05 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/stack-usage-2.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/stack-usage-2.c
@@ -1,33 +1,32 @@
/* { dg-do compile } */
/* { dg-options "-Wstack-usage=512" } */
-int foo1 (void)
+int foo1 (void) /* { dg-bogus "stack usage" } */
{
char arr[16];
arr[0] = 1;
return 0;
-} /* { dg-bogus "stack usage" } */
+}
-int foo2 (void)
+int foo2 (void) /* { dg-warning "stack usage is \[0-9\]* bytes" } */
{
char arr[1024];
arr[0] = 1;
return 0;
-} /* { dg-warning "stack usage is \[0-9\]* bytes" } */
+}
-int foo3 (void)
+int foo3 (void) /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
{
char arr[1024] __attribute__((aligned (512)));
arr[0] = 1;
/* Force dynamic realignment of argument pointer. */
__builtin_apply ((void (*)()) foo2, 0, 0);
return 0;
+}
-} /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
-
-int foo4 (int n)
+int foo4 (int n) /* { dg-warning "stack usage might be unbounded" } */
{
char arr[n];
arr[0] = 1;
return 0;
-} /* { dg-warning "stack usage might be unbounded" } */
+}
diff --git a/gcc-4.9/gcc/toplev.c b/gcc-4.9/gcc/toplev.c
index 528087302..9b8d31342 100644
--- a/gcc-4.9/gcc/toplev.c
+++ b/gcc-4.9/gcc/toplev.c
@@ -1073,16 +1073,19 @@ output_stack_usage (void)
if (warn_stack_usage >= 0)
{
+ const location_t loc = DECL_SOURCE_LOCATION (current_function_decl);
+
if (stack_usage_kind == DYNAMIC)
- warning (OPT_Wstack_usage_, "stack usage might be unbounded");
+ warning_at (loc, OPT_Wstack_usage_, "stack usage might be unbounded");
else if (stack_usage > warn_stack_usage)
{
if (stack_usage_kind == DYNAMIC_BOUNDED)
- warning (OPT_Wstack_usage_, "stack usage might be %wd bytes",
- stack_usage);
+ warning_at (loc,
+ OPT_Wstack_usage_, "stack usage might be %wd bytes",
+ stack_usage);
else
- warning (OPT_Wstack_usage_, "stack usage is %wd bytes",
- stack_usage);
+ warning_at (loc, OPT_Wstack_usage_, "stack usage is %wd bytes",
+ stack_usage);
}
}
}
diff --git a/gcc-4.9/gcc/tree-profile.c b/gcc-4.9/gcc/tree-profile.c
index 4e2e8741e..b16525181 100644
--- a/gcc-4.9/gcc/tree-profile.c
+++ b/gcc-4.9/gcc/tree-profile.c
@@ -256,6 +256,9 @@ static tree GTY(()) gcov_lipo_merge_modu_edges = NULL_TREE;
/* extern gcov_unsigned_t __gcov_lipo_strict_inclusion */
static tree GTY(()) gcov_lipo_strict_inclusion = NULL_TREE;
+/* extern gcov_unsigned_t __gcov_lipo_comdat_algorithm */
+static tree GTY(()) gcov_lipo_comdat_algorithm = NULL_TREE;
+
/* Insert STMT_IF around given sequence of consecutive statements in the
same basic block starting with STMT_START, ending with STMT_END.
PROB is the probability of the taken branch. */
@@ -493,6 +496,13 @@ tree_init_dyn_ipa_parameters (void)
get_gcov_unsigned_t ());
init_comdat_decl (gcov_lipo_strict_inclusion,
PARAM_LIPO_WEAK_INCLUSION);
+ gcov_lipo_comdat_algorithm = build_decl (
+ UNKNOWN_LOCATION,
+ VAR_DECL,
+ get_identifier ("__gcov_lipo_comdat_algorithm"),
+ get_gcov_unsigned_t ());
+ init_comdat_decl (gcov_lipo_comdat_algorithm,
+ PARAM_LIPO_COMDAT_ALGORITHM);
}
}
@@ -1264,7 +1274,8 @@ tree_profiling (void)
function body from being deleted) won't be needed. */
if (L_IPO_COMP_MODE)
lipo_link_and_fixup ();
- init_node_map (true);
+ else
+ init_node_map (true);
FOR_EACH_DEFINED_FUNCTION (node)
diff --git a/gcc-4.9/gcc/tree-ssa-copy.c b/gcc-4.9/gcc/tree-ssa-copy.c
index 02f474355..a3d83921d 100644
--- a/gcc-4.9/gcc/tree-ssa-copy.c
+++ b/gcc-4.9/gcc/tree-ssa-copy.c
@@ -235,38 +235,26 @@ copy_prop_visit_cond_stmt (gimple stmt, edge *taken_edge_p)
enum ssa_prop_result retval = SSA_PROP_VARYING;
location_t loc = gimple_location (stmt);
- tree op0 = gimple_cond_lhs (stmt);
- tree op1 = gimple_cond_rhs (stmt);
+ tree op0 = valueize_val (gimple_cond_lhs (stmt));
+ tree op1 = valueize_val (gimple_cond_rhs (stmt));
- /* The only conditionals that we may be able to compute statically
- are predicates involving two SSA_NAMEs. */
- if (TREE_CODE (op0) == SSA_NAME && TREE_CODE (op1) == SSA_NAME)
+ /* See if we can determine the predicate's value. */
+ if (dump_file && (dump_flags & TDF_DETAILS))
{
- op0 = valueize_val (op0);
- op1 = valueize_val (op1);
-
- /* See if we can determine the predicate's value. */
- if (dump_file && (dump_flags & TDF_DETAILS))
- {
- fprintf (dump_file, "Trying to determine truth value of ");
- fprintf (dump_file, "predicate ");
- print_gimple_stmt (dump_file, stmt, 0, 0);
- }
+ fprintf (dump_file, "Trying to determine truth value of ");
+ fprintf (dump_file, "predicate ");
+ print_gimple_stmt (dump_file, stmt, 0, 0);
+ }
- /* We can fold COND and get a useful result only when we have
- the same SSA_NAME on both sides of a comparison operator. */
- if (op0 == op1)
- {
- tree folded_cond = fold_binary_loc (loc, gimple_cond_code (stmt),
- boolean_type_node, op0, op1);
- if (folded_cond)
- {
- basic_block bb = gimple_bb (stmt);
- *taken_edge_p = find_taken_edge (bb, folded_cond);
- if (*taken_edge_p)
- retval = SSA_PROP_INTERESTING;
- }
- }
+ /* Fold COND and see whether we get a useful result. */
+ tree folded_cond = fold_binary_loc (loc, gimple_cond_code (stmt),
+ boolean_type_node, op0, op1);
+ if (folded_cond)
+ {
+ basic_block bb = gimple_bb (stmt);
+ *taken_edge_p = find_taken_edge (bb, folded_cond);
+ if (*taken_edge_p)
+ retval = SSA_PROP_INTERESTING;
}
if (dump_file && (dump_flags & TDF_DETAILS) && *taken_edge_p)
diff --git a/gcc-4.9/gcc/value-prof.c b/gcc-4.9/gcc/value-prof.c
index c0bd06538..62046de03 100644
--- a/gcc-4.9/gcc/value-prof.c
+++ b/gcc-4.9/gcc/value-prof.c
@@ -1276,7 +1276,17 @@ gimple_mod_subtract_transform (gimple_stmt_iterator *si)
return true;
}
-static pointer_map_t *cgraph_node_map;
+static pointer_map_t *cgraph_node_map = 0;
+
+/* Returns true if node graph is initialized. This
+ * is used to test if profile_id has been created
+ * for cgraph_nodes. */
+
+bool
+coverage_node_map_initialized_p (void)
+{
+ return cgraph_node_map != 0;
+}
/* Initialize map from PROFILE_ID to CGRAPH_NODE.
When LOCAL is true, the PROFILE_IDs are computed. when it is false we assume
@@ -1292,8 +1302,7 @@ init_node_map (bool local)
return;
FOR_EACH_DEFINED_FUNCTION (n)
- if (cgraph_function_with_gimple_body_p (n)
- && !cgraph_only_called_directly_p (n))
+ if (cgraph_function_with_gimple_body_p (n))
{
void **val;
if (local)