aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2015-08-05re PR tree-optimization/67055 (Segmentation fault in ↵Richard Biener4-0/+58
fold_builtin_alloca_with_align in tree-ssa-ccp.c) 2015-08-05 Richard Biener <rguenther@suse.de> PR tree-optimization/67055 * tree-ssa-ccp.c (fold_builtin_alloca_with_align): Handle NULL gimple_block. * g++.dg/torture/pr67055.C: New testcase. From-SVN: r226616
2015-08-05Disable AVX-512VL insns for scalar mode operands on -march=knl.Kirill Yukhin3-14/+32
gcc/ * config/i386/i386.md (define_attr "isa"): Addd avx512vl and noavx512vl. (define_attr "enabled"): Handle avx521vl and noavx512vl. * config/i386/sse.md (define_insn "vec_dupv2df<mask_name>"): Split AVX-512 alternative out of SSE. (define_insn "*vec_concatv2df"): Ditto. From-SVN: r226612
2015-08-05Merge SSE and AVX ptest patterns.Kirill Yukhin3-25/+39
gcc/ * config/i386/i386.c (bdesc_args): Rename CODE_FOR_sse4_1_ptest into CODE_FOR_sse4_1_ptestv2di and CODE_FOR_avx_vtestps256 into CODE_FOR_avx_ptestv4di. * config/i386/sse.md (define_mode_iterator V_AVX): New. (define_mode_attr sse4_1): Extend to other 128/256-bit modes. (define_insn "avx_ptest256"): Merge this ... (define_insn "sse4_1_ptest"): And this ... (define_insn "<sse4_1>_ptest<mode>"): Into this. Use V_AVX iterator. From-SVN: r226611
2015-08-05re PR tree-optimization/67109 (ICE at -O3 on x86_64-linux-gnu in ↵Richard Biener5-7/+85
vect_analyze_slp_instance, at tree-vect-slp.c:1793) 2015-08-05 Richard Biener <rguenther@suse.de> PR tree-optimization/67109 * tree-vect-data-refs.c (vect_analyze_group_access_1): Check against too big groups. Print whether this is a load or store group. Rename from ... (vect_analyze_group_access): ... this which is now a wrapper dissolving an invalid group. (vect_analyze_data_ref_accesses): Print whether this is a load or store group. * gcc.dg/torture/pr67109.c: New testcase. * gcc.dg/vect/vect-119.c: Adjust. From-SVN: r226610
2015-08-05re PR c/67107 (ICE: SIGSEGV in tree_class_check with -frounding-math ↵Richard Biener4-2/+20
-funsafe-math-optimizations) 2015-08-05 Richard Biener <rguenther@suse.de> PR middle-end/67107 * match.pd: Guard const_binop result checking against NULL_TREE result. * gcc.dg/pr67107.c: New testcase. From-SVN: r226609
2015-08-05cse.c (cse_insn): Restoring old behaviour for src_eqv when dest and value in ↵Kugan Vivekanandarajah2-4/+11
the REG_EQUAL are... gcc/ChangeLog: 2015-08-05 Kugan Vivekanandarajah <kuganv@linaro.org> * cse.c (cse_insn): Restoring old behaviour for src_eqv when dest and value in the REG_EQUAL are same and dest is STRICT_LOW_PART. From-SVN: r226606
2015-08-05Daily bump.GCC Administrator1-1/+1
From-SVN: r226601
2015-08-04compiler: Verify pointer type's underlying type.Ian Lance Taylor2-1/+5
Fixes golang/go#11547. Reviewed-on: https://go-review.googlesource.com/13031 From-SVN: r226598
2015-08-04compiler: Use context to determine types of complex expressions.Ian Lance Taylor2-4/+3
When determining the type of a complex expression, it is important to recognize cases where a complex value can be represented as a real number. Fixes golang/go#11572. Reviewed-on: https://go-review.googlesource.com/12541 From-SVN: r226596
2015-08-04[MOXIE] Hookize PRINT_OPERAND and PRINT_OPERAND_ADDRESSAnatoly Sokolov4-10/+17
From-SVN: r226594
2015-08-04re PR c++/66197 (c++1z generic function wrong type for auto)Paolo Carlini3-1/+27
2015-08-04 Paolo Carlini <paolo.carlini@oracle.com> PR c++/66197 * g++.dg/cpp1z/abbrev2.C: New. 2015-08-04 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/cpp1z/static_assert-nomsg.C: Fix DejaGnu directive. From-SVN: r226591
2015-08-04[AArch64] PR target/66731 Fix fnmul insn with -frounding-math (rtx costs)Szabolcs Nagy2-5/+23
2015-08-04 Szabolcs Nagy <szabolcs.nagy@arm.com> PR target/66731 * config/aarch64/aarch64.c (aarch64_rtx_costs): Fix NEG cost for FNMUL. (aarch64_rtx_mult_cost): Fix MULT cost with -frounding-math. From-SVN: r226586
2015-08-04* pt.c (lookup_template_class_1): Clear elt.spec.Jason Merrill2-0/+3
From-SVN: r226581
2015-08-04* tree.c (build_target_expr): Copy the location from value.Jason Merrill2-0/+6
From-SVN: r226580
2015-08-04re PR c++/66392 (rejects-valid: copy-initialization through user-defined ↵Paolo Carlini2-0/+17
conversion sequence fails) 2015-08-04 Paolo Carlini <paolo.carlini@oracle.com> PR c++/66392 * g++.dg/init/explicit4.C: New. From-SVN: r226579
2015-08-04vec-cmp-sel.c: Avoid test failure on machines without VSX an Power8 vector ↵Bill Schmidt2-1/+7
support. 2015-08-04 Bill Schmidt <wschmidt@vnet.linux.ibm.com> * gcc.target/powerpc/vec-cmp-sel.c: Avoid test failure on machines without VSX an Power8 vector support. From-SVN: r226578
2015-08-04genmatch.c (dt_node::gen_kids_1): Use gassign and gcall in generated code.Richard Biener2-12/+17
2015-08-04 Richard Biener <rguenther@suse.de> * genmatch.c (dt_node::gen_kids_1): Use gassign and gcall in generated code. (dt_operand::gen_gimple_expr): Adjust. From-SVN: r226577
2015-08-04gimple-fold.c (gimple_fold_stmt_to_constant_1): Canonicalize bool compares ↵Richard Biener5-2/+60
on RHS. 2015-08-04 Richard Biener <rguenther@suse.de> * gimple-fold.c (gimple_fold_stmt_to_constant_1): Canonicalize bool compares on RHS. * match.pd: Add X ==/!= !X is false/true pattern. * gcc.dg/tree-ssa/ssa-ccp-38.c: New testcase. From-SVN: r226576
2015-08-04aarch64.c: Change inner loop statement cost to be consistent with other targets.Pawel Kupidura2-8/+7
gcc/ 2015-08-04 Pawel Kupidura <pawel.kupidura@arm.com> * config/aarch64/aarch64.c: Change inner loop statement cost to be consistent with other targets. From-SVN: r226575
2015-08-04neon.md (neon_vget_lanev2di): Handle big-endian targets.Christophe Lyon2-1/+21
2015-08-04 Christophe Lyon <christophe.lyon@linaro.org> * config/arm/neon.md (neon_vget_lanev2di): Handle big-endian targets. From-SVN: r226574
2015-08-04nvptx.h (struct nvptx_pseudo_info): Delete.Nathan Sidwell2-7/+5
* config/nvptx/nvptx.h (struct nvptx_pseudo_info): Delete. (machine_function): Remove pseudos field. From-SVN: r226573
2015-08-04Compile IAMCU tests with -fno-pie -no-pieH.J. Lu2-1/+7
Since IAMCU tests clear all scratch integer registers with: asm __volatile__ ("xor %%eax, %%eax\n\t" \ "xor %%edx, %%edx\n\t" \ "xor %%ecx, %%ecx\n\t" \ ::: "eax", "edx", "ecx"); PIC register may be trashed between setting PIC register and using it. This patch compiles AMCU tests with -fno-pie -no-pie. PR target/67110 * gcc.target/i386/iamcu/abi-iamcu.exp (additional_flags): Add -fno-pie -no-pie. From-SVN: r226570
2015-08-04re PR c++/66427 (The compiler rejects too complex variable templates)Paolo Carlini2-0/+25
2015-08-04 Paolo Carlini <paolo.carlini@oracle.com> PR c++/66427 * g++.dg/cpp1y/var-templ34.C: New. From-SVN: r226568
2015-08-04[AArch64][14/14] Reuse target_option_current_node when passing pragma string ↵Kyrylo Tkachov2-0/+18
to target attribute * config/aarch64/aarch64.c (aarch64_option_valid_attribute_p): Exit early and use target_option_current_node if processing current pragma. From-SVN: r226567
2015-08-04[doc][13/14] Document AArch64 target attributes and pragmasKyrylo Tkachov2-0/+159
* doc/extend.texi (AArch64 Function Attributes): New node. (AArch64 Pragmas): Likewise. From-SVN: r226566
2015-08-04[AArch64][12/14] Target attributes and target pragmas testsKyrylo Tkachov17-0/+592
* gcc.target/aarch64/pragma_cpp_predefs_1.c: New test. * gcc.target/aarch64/target_attr_1.c: Likewise. * gcc.target/aarch64/target_attr_2.c: Likewise. * gcc.target/aarch64/target_attr_3.c: Likewise. * gcc.target/aarch64/target_attr_4.c: Likewise. * gcc.target/aarch64/target_attr_5.c: Likewise. * gcc.target/aarch64/target_attr_6.c: Likewise. * gcc.target/aarch64/target_attr_7.c: Likewise. * gcc.target/aarch64/target_attr_8.c: Likewise. * gcc.target/aarch64/target_attr_9.c: Likewise. * gcc.target/aarch64/target_attr_10.c: Likewise. * gcc.target/aarch64/target_attr_11.c: Likewise. * gcc.target/aarch64/target_attr_12.c: Likewise. * gcc.target/aarch64/target_attr_13.c: Likewise. * gcc.target/aarch64/target_attr_14.c: Likewise. * gcc.target/aarch64/target_attr_15.c: Likewise. From-SVN: r226565
2015-08-04[AArch64][11/14] Re-layout SIMD builtin types on builtin expansionKyrylo Tkachov7-3/+104
* config/aarch64/aarch64.c (aarch64_option_valid_attribute_p): Initialize simd builtins if TARGET_SIMD. * config/aarch64/aarch64-builtins.c (aarch64_init_simd_builtins): Make sure that the builtins are initialized only once no matter how many times the function is called. (aarch64_init_builtins): Unconditionally initialize crc builtins. (aarch64_relayout_simd_param): New function. (aarch64_simd_expand_args): Use above during argument expansion. * config/aarch64/aarch64-c.c (aarch64_pragma_target_parse): Initialize simd builtins if TARGET_SIMD. * config/aarch64/aarch64-protos.h (aarch64_init_simd_builtins): New prototype. (aarch64_relayout_simd_types): Likewise. * gcc.target/aarch64/target_attr_crypto_ice_1.c: New test. From-SVN: r226564
2015-08-04[AArch64][10/14] Implement target pragmasKyrylo Tkachov11-101/+267
* config.gcc (aarch64*-*-*): Specify c_target_objs and cxx_target_objs. * config/aarch64/aarch64.h (REGISTER_TARGET_PRAGMAS): Define. (TARGET_CPU_CPP_BUILTINS): Redefine to call aarch64_cpu_cpp_builtins. * config/aarch64/aarch64.c (aarch64_override_options_internal): Remove static keyword. (aarch64_reset_previous_fndecl): New function. (aarch64_handle_attr_isa_flags): Handle "+nothing" in the beginning of the string. * config/aarch64/aarch64-c.c: New file. * config/aarch64/arm_acle.h: Add pragma +crc+nofp at the top. Push and pop options at beginning and end. Remove ifdef __ARM_FEATURE_CRC32. * config/aarch64/arm_neon.h: Remove #ifdef check on __ARM_NEON. Add pragma +nothing+simd and +nothing+crypto where appropriate. * config/aarch64/t-aarch64 (aarch64-c.o): New rule. * config/aarch64/aarch64-protos.h (aarch64_cpu_cpp_builtins): Define prototype. (aarch64_register_pragmas): Likewise. (aarch64_reset_previous_fndecl): Likewise. (aarch64_process_target_attr): Likewise. (aarch64_override_options_internal): Likewise. * gcc.target/aarch64/arm_neon-nosimd-error.c: Delete. From-SVN: r226563
2015-08-04[AArch64][9/14] Implement TARGET_CAN_INLINE_PKyrylo Tkachov2-0/+117
* config/aarch64/aarch64.c (aarch64_tribools_ok_for_inlining_p): New function. (aarch64_can_inline_p): Likewise. (TARGET_CAN_INLINE_P): Define. From-SVN: r226561
2015-08-04[AArch64][8/14] Implement TARGET_OPTION_VALID_ATTRIBUTE_PKyrylo Tkachov4-1/+542
* common/config/aarch64/aarch64-common.c (aarch64_handle_option): Remove static. Handle OPT_mgeneral_regs_only, OPT_mfix_cortex_a53_835769, OPT_mstrict_align, OPT_momit_leaf_frame_pointer. * config/aarch64/aarch64.c: Include opts.h and diagnostic.h (aarch64_attr_opt_type): New enum. (aarch64_attribute_info): New struct. (aarch64_handle_attr_arch): New function. (aarch64_handle_attr_cpu): Likewise. (aarch64_handle_attr_tune): Likewise. (aarch64_handle_attr_isa_flags): Likewise. (aarch64_attributes): New table. (aarch64_process_one_target_attr): New function. (num_occurences_in_str): Likewise. (aarch64_process_target_attr): Likewise. (aarch64_option_valid_attribute_p): Likewise. (TARGET_OPTION_VALID_ATTRIBUTE_P): Define. * config/aarch64/aarch64-protos.h: Include input.h (aarch64_handle_option): Declare prototype. From-SVN: r226560
2015-08-04[AArch64][7/14] Implement TARGET_SET_CURRENT_FUNCTIONKyrylo Tkachov3-0/+67
* config/aarch64/aarch64.h (SWITCHABLE_TARGET): Define. * config/aarch64/aarch64.c: Include target-globals.h (aarch64_previous_fndecl): New variable. (aarch64_set_current_function): New function. (TARGET_SET_CURRENT_FUNCTION): Define. From-SVN: r226559
2015-08-04[AArch64][6/14] Implement TARGET_OPTION_SAVE/TARGET_OPTION_RESTOREKyrylo Tkachov5-59/+242
* config/aarch64/aarch64.opt (explicit_tune_core): New TargetVariable. (explicit_arch): Likewise. (x_aarch64_isa_flags): Likewise. (mgeneral-regs-only): Mark as Save. (mfix-cortex-a53-835769): Likewise. (mcmodel=): Likewise. (mstrict-align): Likewise. (momit-leaf-frame-pointer): Likewise. (mtls-dialect): Likewise. (master=): Likewise. * config/aarch64/aarch64.h (ASM_DECLARE_FUNCTION_NAME): Define. (aarch64_isa_flags): Remove extern declaration. * config/aarch64/aarch64.c (aarch64_validate_mcpu): Return a bool to indicate success or failure. (aarch64_validate_march): Likewise. (aarch64_validate_mtune): Likewise. (aarch64_isa_flags): Delete. (aarch64_override_options_internal): Access opts->x_aarch64_isa_flags instead of aarch64_isa_flags. (aarch64_get_tune_cpu): New function. (aarch64_get_arch): Likewise. (aarch64_override_options): Use above and set up explicit_tune_core and explicit_arch. (aarch64_print_extension): Move earlier in file. Add isa_flags argument and use that instead of the global aarch64_isa_flags. (aarch64_option_save): New function. (aarch64_option_restore): Likewise. (aarch64_option_print): Likewise. (aarch64_declare_function_name): Likewise. (aarch64_start_file): Delete. (TARGET_ASM_FILE_START): Do not define. (TARGET_OPTION_RESTORE, TARGET_OPTION_PRINT): Define. * config/aarch64/aarch64-protos.h (aarch64_declare_function_name): Declare prototype. From-SVN: r226558
2015-08-04[AArch64][5/14] Make flag_omit_leaf_frame_pointer intialize to 2. Define and ↵Kyrylo Tkachov2-1/+6
use TARGET_OMIT_LEAF_FRAME_POINTER * config/aarch64/aarch64.opt (momit-leaf-frame-pointer): Initialize flag_omit_leaf_frame_pointer to 2. From-SVN: r226557
2015-08-04[AArch64][4/14] Create TARGET_FIX_ERR_A53_835769 and use that instead of ↵Kyrylo Tkachov5-12/+29
aarch64_fix_a53_err835769 * config/aarch64/aarch64.h (TARGET_FIX_ERR_A53_835769_DEFAULT): Always define to 0 or 1. (TARGET_FIX_ERR_A53_835769): New macro. * config/aarch64/aarch64.c (aarch64_override_options_internal): Remove handling of opts->x_aarch64_fix_a53_err835769. (aarch64_madd_needs_nop): Check for TARGET_FIX_ERR_A53_835769 rather than aarch64_fix_a53_err835769. * config/aarch64/aarch64-elf-raw.h: Update for above changes. * config/aarch64/aarch64-linux.h: Likewise. From-SVN: r226556
2015-08-04i386.c (ix86_expand_int_movcc): Check result of ix86_expand_int_movcc as ↵Uros Bizjak2-2/+7
boolean. * config/i386/i386.c (ix86_expand_int_movcc): Check result of ix86_expand_int_movcc as boolean. From-SVN: r226555
2015-08-04[AArch64][3/14] Refactor option override codeKyrylo Tkachov5-146/+339
* config/aarch64/aarch64.opt (aarch64_arch_string): Delete. (aarch64_cpu_string): Likewise. (aarch64_tune_string): Likewise. * config/aarch64/aarch64.c (aarch64_parse_opt_result): New enum. (aarch64_parse_extension): Return aarch64_parse_opt_result. Add extra argument to put result into. (aarch64_parse_arch): Likewise. Do not set selected_cpu. (aarch64_parse_cpu): Add arguments to put results into. Return aarch64_parse_opt_result. (aarch64_parse_tune): Likewise. (aarch64_override_options_after_change_1): New function. (aarch64_override_options_internal): New function. (aarch64_validate_mcpu): Likewise. (aarch64_validate_march): Likewise. (aarch64_validate_mtune): Likewise. (aarch64_override_options): Update to reflect above changes. Move some logic into aarch64_override_options_internal. Initialize target_option_default_node and target_option_current_node. (aarch64_override_options_after_change): Move logic into aarch64_override_options_after_change_1 and call it with global_options. (initialize_aarch64_code_model): Take a gcc_options pointer and use the flag values from that. * gcc.target/aarch64/cpu-diagnostics-3.c: Update expected error message. From-SVN: r226554
2015-08-04[AArch64][2/14] Refactor arches handling, add arch enum identifierKyrylo Tkachov7-37/+72
* config/aarch64/aarch64.h (TARGET_CPU_CPP_BUILTINS): Define __ARM_ARCH_8A directly rather than with cpp_define_formatted. * config/aarch64/aarch64.c (struct processor): Add arch field. (all_architectures): Handle above, move above all_cores. (all_cores): Handle above. (aarch64_parse_arch): Handle above changes. * config/aarch64/aarch64-arches.def (armv8-a): Extend according to above. Update comments. (armv8.1-a): Likewise. * config/aarch64/aarch64-cores.def: Update according to above. * config/aarch64/aarch64-opts.h (aarch64_arch): New enum. * config/aarch64/driver-aarch64.c (struct aarch64_arch): Rename to aarch64_arch_driver_info. From-SVN: r226553
2015-08-04[AArch64][1/14] Add ident field to struct processorKyrylo Tkachov2-8/+19
* config/aarch64/aarch64.c (struct processor): Add ident field. Rename core sched_core. (all_cores): Handle above changes. (all_architectures): Likewise. (aarch64_parse_arch): Likewise. (aarch64_override_options): Likewise. From-SVN: r226552
2015-08-04gimple-fold.c (gimple_fold_stmt_to_constant_1): Remove dispatching to ↵Richard Biener2-35/+25
fold_binary for GIMPLE_BINARY_RHS and for comparisons... 2015-08-04 Richard Biener <rguenther@suse.de> * gimple-fold.c (gimple_fold_stmt_to_constant_1): Remove dispatching to fold_binary for GIMPLE_BINARY_RHS and for comparisons embedded in [VEC_]COND_EXPRs. From-SVN: r226551
2015-08-04re PR fortran/64022 ([F2003][IEEE] ieee_support_flag does not handle kind=10 ↵Francois-Xavier Coudert5-76/+165
and kind=16 REAL variables) PR fortran/64022 * simplify.c (gfc_simplify_ieee_selected_real_kind): Extend IEEE support to all real kinds. * ieee/ieee_exceptions.F90: Support all real kinds. * ieee/ieee_arithmetic.F90: Likewise. * ieee/ieee_helper.c (ieee_class_helper_10, ieee_class_helper_16): New functions * gfortran.map (GFORTRAN_1.7): Add entries. * gfortran.dg/ieee/ieee_7.f90: Adjust test. * gfortran.dg/ieee/large_1.f90: New test. From-SVN: r226548
2015-08-03tree-if-conv.c: Fix various typos in comments.Abe Skolnik3-8/+13
* tree-if-conv.c: Fix various typos in comments. * tree-vect-stmts.c: Likewise. From-SVN: r226544
2015-08-04runtime: initialize variable to avoid compiler warningIan Lance Taylor1-1/+1
Reviewed-on: https://go-review.googlesource.com/13095 From-SVN: r226543
2015-08-04re PR debug/67043 (-fcompare-debug failure with -O3)Thomas Preud'homme4-0/+47
2015-08-04 Thomas Preud'homme <thomas.preudhomme@arm.com> gcc/ PR tree-optimization/67043 * loop-invariant.c (move_invariant_reg): Recompute luids in loop preheader after hoisting invariant in it. (find_defs): Force recomputation of all luids. gcc/testsuite/ PR tree-optimization/67043 * gcc.dg/pr67043.c: New test. From-SVN: r226540
2015-08-04Daily bump.GCC Administrator1-1/+1
From-SVN: r226538
2015-08-03syscall: RawSockaddr fix for ppc64, ppc64leIan Lance Taylor1-1/+1
The struct RawSockaddr contains a field Data which should be uint8 on ppc64 and ppc64le, but is declared as int8 in gccgo. This change adds a two new files which contain the structure declaration for RawSockaddr, one with the correct types for for ppc64 and ppc64le, and the other for non-ppc64 platforms. Fixes golang/go#11469 Reviewed-on: https://go-review.googlesource.com/11946 From-SVN: r226533
2015-08-03htm.md (tabort.): Restrict the source operand to using a base register.Peter Bergner4-1/+22
gcc/ * config/rs6000/htm.md (tabort.): Restrict the source operand to using a base register. gcc/testsuite/ * gcc.target/powerpc/htm-tabort-no-r0.c: New test. From-SVN: r226532
2015-08-03Refactoring of timevar APIDavid Malcolm25-320/+1667
gcc/ChangeLog: * main.c (main): Pass in NULL for toplev's external_timer. * timevar.c: Include coretypes.h. (class timer::named_items): New. (timer::named_items::named_items): New. (timer::named_items::~named_items): New. (timer::named_items::push): New. (timer::named_items::pop): New. (timer::named_items::print): New. (timer::timer): Initialize field "m_jit_client_items". (timer::~timer): New. (timer::push): Move bulk of implementation to... (timer::push_internal): ...here. New function. (timer::pop): Move bulk of implementation to... (timer::pop_internal): ...here. New function. (timer::push_client_item): New. (timer::pop_client_item): New. (timer::print_row): New function, taken from timer::print. (timer::print): Print "GCC items" header if we also have client items. Move row-printing to timer::print_row. Print any client items. (timer::get_topmost_item_name): New method. * timevar.def (TV_JIT_ACQUIRING_MUTEX): New. (TV_JIT_CLIENT_CODE): New. * timevar.h (timer::push_client_item): New declaration. (timer::pop_client_item): New declaration. (timer::get_topmost_item_name): New method. (timer::push_internal): New declaration. (timer::pop_internal): New declaration. (timer::print_row): New declaration. (timer::named_items): New declaration. (timer::m_jit_client_items): New field. (timer): Add friend class named_items. (auto_timevar::auto_timevar): Add timer param. (auto_timevar::~auto_timevar): Use field "m_timer". (auto_timevar::m_timer): New field. * toplev.c (initialize_rtl): Add g_timer as param when constructing auto_timevar instance. (toplev::toplev): Add "external_timer" param, and use it to initialize the "g_timer" global if non-NULL. (toplev::~toplev): If this created "g_timer", delete it. * toplev.h (toplev::toplev): Replace "use_TV_TOTAL" bool param with "external_timer" timer *. gcc/jit/ChangeLog: * docs/topics/compatibility.rst (LIBGCCJIT_ABI_4): New. * docs/topics/contexts.rst (GCC_JIT_BOOL_OPTION_DUMP_SUMMARY): We no longer show a profile. * docs/topics/index.rst (Topic Reference): Add performance.rst. * docs/topics/performance.rst: New file. * docs/_build/texinfo/libgccjit.texi: Regenerate. * jit-playback.c (gcc::jit::playback::context::compile): Add timer param when constructing the "toplev" instance. (gcc::jit::playback::context::acquire_mutex): Add timer param when constructing auto_timevar instance. (gcc::jit::playback::context::make_fake_args): If we have a timer, add "-ftime-report". (gcc::jit::playback::context::invoke_driver): Add timer param when constructing auto_timevar instance. (gcc::jit::playback::context::dlopen_built_dso): Likewise. * jit-playback.h (gcc::jit::playback::context::get_timer): New accessor. * jit-recording.c: Include timevar.h. (gcc::jit::recording::context::context): Initialize field "m_timer". * jit-recording.h: Add forward declaration of class timer. (gcc::jit::recording::context::set_timer): New method. (gcc::jit::recording::context::get_timer): New method. (gcc::jit::recording::context::m_timer): New field. * libgccjit++.h (gccjit::timer): New class. (gccjit::auto_time): New class. (gccjit::context::set_timer): New method. (gccjit::context::get_timer): New. (gccjit::timer::timer): New. (gccjit::timer::push): New. (gccjit::timer::pop): New. (timer::print): New. (timer::get_inner_timer): New. (timer::release): New. (auto_time::auto_time): New. (auto_time::~auto_time): New. * libgccjit.c: Include timevar.h. (struct gcc_jit_timer): New. (gcc_jit_timer_new): New function. (gcc_jit_timer_release): New function. (gcc_jit_context_set_timer): New function. (gcc_jit_context_get_timer): New function. (gcc_jit_timer_push): New function. (gcc_jit_timer_pop): New function. (gcc_jit_timer_print): New function. * libgccjit.h (LIBGCCJIT_HAVE_TIMING_API): New macro. (gcc_jit_timer): New typedef. (gcc_jit_timer_new): New function. (gcc_jit_timer_release): New function. (gcc_jit_context_set_timer): New function. (gcc_jit_context_get_timer): New function. (gcc_jit_timer_push): New function. (gcc_jit_timer_pop): New function. (gcc_jit_timer_print): New function. * libgccjit.map (LIBGCCJIT_ABI_4): New. (gcc_jit_timer_new): New function. (gcc_jit_timer_release): New function. (gcc_jit_context_set_timer): New function. (gcc_jit_context_get_timer): New function. (gcc_jit_timer_push): New function. (gcc_jit_timer_pop): New function. (gcc_jit_timer_print): New function. gcc/testsuite/ChangeLog: * jit.dg/test-benchmark.c (test_jit): Add param "timer" and use it to push/pop timing items. (main): For each optimization level, create a gcc_jit_timer, and time all of the iteration within that level cumulatively. * jit.dg/test-error-gcc_jit_timer_pop-mismatch.c: New test case. * jit.dg/test-error-gcc_jit_timer_pop-too-many.c: New test case. From-SVN: r226530
2015-08-03compiler: Don't allow multiple function declarations.Ian Lance Taylor3-10/+7
Fixes golang/go#11573. Reviewed-on: https://go-review.googlesource.com/12508 From-SVN: r226529
2015-08-03re PR middle-end/64744 (ARM: gcc internal compiler error: in store_field, at ↵Alexander Basov9-13/+110
expr.c:6659) PR middle-end/64744 PR middle-end/48470 PR middle-end/43404 * cfgexpand.c (expand_one_var): Add check if stack is going to be used in naked function. * expr.c (expand_expr_addr_expr_1): Remove excess checking whether expression should not reside in MEM. * function.c (use_register_for_decl): Do not use registers for non-register things (volatile, float, BLKMode) in naked functions. PR middle-end/64744 PR middle-end/48470 PR middle-end/43404 * gcc.target/arm/pr43404.c : New testcase. * gcc.target/arm/pr48470.c : New testcase. * gcc.target/arm/pr64744-1.c : New testcase. * gcc.target/arm/pr64744-2.c : New testcase. From-SVN: r226528
2015-08-03compiler: Don't make erroneous type descriptors.Ian Lance Taylor2-2/+2
There is no need to make type descriptors for named types when there are errors during package compilation. Particularly, if the error in package compilation is from a malformed named type, there is no guarantee a type descriptor can be created. Fixes golang/go#11560. Reviewed-on: https://go-review.googlesource.com/12792 From-SVN: r226527