Commit Graph

145085 Commits

Author SHA1 Message Date
Uros Bizjak
bf867841b4 re PR target/70510 (ICE: output_operand: invalid %-code with -mavx512bw -masm=intel when emitting vpbroatcast)
PR target/70510
	* config/i386/sse.md (iptr): Add V64QI, V32HI, V16SI and V8DI modes.

testsuite/ChangeLog:

	PR target/70510
	* gcc.target/i386/pr70510.c: New test.

From-SVN: r234752
2016-04-05 18:26:40 +02:00
Richard Biener
3022186ac4 re PR middle-end/70526 (GCC 6 miscompiles Firefox JIT compiler)
2016-04-05  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/70526
	* tree-sra.c (build_ref_for_offset): Use prev_base to
	extract the alias pointer type.

	* g++.dg/torture/pr70526.C: New testcase.

From-SVN: r234749
2016-04-05 14:26:59 +00:00
Richard Biener
ac6929b567 dse.c (struct store_info): Remove alias_set member.
2016-04-05  Richard Biener  <rguenther@suse.de>

	* dse.c (struct store_info): Remove alias_set member.
	(struct read_info_type): Likewise.
	(clear_alias_group, clear_alias_mode_table, clear_alias_mode_holder,
	spill_deleted, clear_alias_set_lookup): Remove.
	(get_group_info): Remove dead base == NULL_RTX case.
	(dse_step0): Remove initialization of removed variables.
	(delete_dead_store_insn): Reomve alias set dumping.
	(free_read_records): Remove alias_set handling.
	(canon_address): Remove alias_set_out parameter.
	(record_store): Remove spill_alias_set, it's always zero.
	(check_mem_read_rtx): Likewise.
	(dse_step2): Rename from ...
	(dse_step2_nospill): ... this.  Adjust.
	(scan_stores): Rename from ...
	(scan_stores_nospill): ... this.
	(scan_reads): Rename from ...
	(scan_reads_nospill): ... this.
	(scan_stores_spill, scan_reads_spill): Remove.
	(dse_step3_scan): Remove for_spills argument which is always false.
	(dse_step3): Likewise.
	(dse_step5): Rename from ...
	(dse_step5_nospill): ... this.  Remove alias_set handling.
	(rest_of_handle_dse): Adjust.

From-SVN: r234748
2016-04-05 14:25:35 +00:00
Jonathan Wakely
87cec93ee0 Ensure std::thread helpers have internal linkage
PR libstdc++/70503
	* src/c++11/thread.cc (execute_native_thread_routine,
	execute_native_thread_routine_compat): Give internal linkage.
	* testsuite/30_threads/thread/70503.cc: New test.

From-SVN: r234746
2016-04-05 14:35:32 +01:00
Ville Voutilainen
7b3318c41e re PR libstdc++/70437 (Instantiation loop with pair and is_constructible)
PR libstdc++/70437
 	* include/bits/stl_pair.h (_ConstructiblePair,
	_ImplicitlyConvertiblePair, _MoveConstructiblePair,
	_ImplicitlyMoveConvertiblePair): Add shortcut conditions
	for same-type cases.
	* testsuite/20_util/pair/70437.cc: New.

From-SVN: r234743
2016-04-05 14:31:30 +03:00
Jakub Jelinek
55fc79b2a6 re PR target/70525 (generating 'vpandn' without the mode suffix, gnu as fails to assemble (-mavx512bw))
PR target/70525
	* config/i386/sse.md (*andnot<mode>3): Simplify assertions.
	Use vpandn<ssemodesuffix> for V16SI/V8DImode, vpandnq for
	V32HI/V64QImode, don't use <mask_operand3_1>, fix up formatting.
	(*andnot<mode>3_mask): Remove insn with VI12_AVX512VL iterator.

	* gcc.target/i386/pr70525.c: New test.

From-SVN: r234739
2016-04-05 10:15:09 +02:00
Richard Biener
62b233f224 re PR middle-end/70499 (internal compiler error: in make_ssa_name_fn, at tree-ssanames.c:266)
2016-04-05  Richard Biener  <rguenther@suse.de>

	PR middle-end/70499
	* gimplify-me.c (gimple_regimplify_operands): Do not rewrite
	non-register type temporaries into SSA.

	* g++.dg/torture/pr70499.C: New testcase.

From-SVN: r234738
2016-04-05 08:05:06 +00:00
Richard Biener
cc05759d4c 20030814-6.c: Fix testcase, disable FRE, remove XFAIL.
2016-04-05  Richard Biener  <rguenther@suse.de>

	* gcc.dg/tree-ssa/20030814-6.c: Fix testcase, disable FRE,
	remove XFAIL.

From-SVN: r234737
2016-04-05 07:23:49 +00:00
Patrick Palka
7a7ac32ac6 Remove class cache_map and use ggc hash_maps instead (PR c++/70452)
gcc/cp/ChangeLog:

	PR c++/70452
	* cp-tree.h (class cache_map): Remove.
	* constexpr.c (cv_cache): Change type to
	GTY((deletable)) hash_map<tree, tree> *.
	(maybe_constant_value): Adjust following the change to cv_cache.
	(clear_cv_cache): New static function.
	(clear_cv_and_fold_caches): Use it.
	* cp-gimplify.c (fold_cache): Change type to
	GTY((deletable)) hash_map<tree, tree> *.
	(clear_fold_cache): Adjust following the change to fold_cache.
	(cp_fold): Likewise.

From-SVN: r234732
2016-04-05 01:20:00 +00:00
GCC Administrator
cefb34aaf0 Daily bump.
From-SVN: r234731
2016-04-05 00:16:15 +00:00
Eric Botcazou
72d1a48d2b re PR target/67172 (i686-w64-mingw32 dwarf2 bootstrap fails with undefined reference to __EH_FRAME_BEGIN__)
PR target/67172
	* libgcc2.c (L__main): Undefine __LIBGCC_EH_FRAME_SECTION_NAME__ if
	__MINGW32__ is defined.

From-SVN: r234727
2016-04-04 22:29:02 +00:00
Bill Seurer
7134713caa MAINTAINERS (Write After Approval): Add myself.
2016-04-04  Bill Seurer  <seurer@linux.vnet.ibm.com>

	* MAINTAINERS (Write After Approval): Add myself.

From-SVN: r234724
2016-04-04 18:46:05 +00:00
Jakub Jelinek
f23f16d458 re PR middle-end/70307 (ICE: in gimplify_expr, at gimplify.c:10915 on valid code)
PR middle-end/70307
	* gcc.dg/torture/pr70307.c: Add -Wno-psabi to dg-options.  Prune
	rs6000 ABI warnings.

From-SVN: r234723
2016-04-04 19:20:53 +02:00
Segher Boessenkool
123451d73f gnattools: Clean config.cache (PR70173)
The config.cache file should be deleted by "make distclean", just like
config.log and config.status .  The directory itself is still not deleted
(just like the gotools and libcc1 directories).


gnattools/
	PR bootstrap/70173
	* Makefile.in (distclean): Also delete config.cache .

From-SVN: r234721
2016-04-04 18:37:58 +02:00
Jan Hubicka
d27ecc497c re PR ipa/66223 (Diagnostic of pure virtual function call broken, including __cxa_pure_virtual)
PR ipa/66223
	* ipa-devirt.c (maybe_record_node): Do not optimize cxa_pure_virtual
	calls when sanitizing.
	(possible_polymorphic_call_target_p)" FIx formating.
	* g++.dg/ipa/devirt-51.C: New testcase.

From-SVN: r234719
2016-04-04 15:54:39 +00:00
Bill Schmidt
c974c96edf re PR middle-end/70457 (ICE (segfault) in gimple_expand_builtin_pow on powerpc64le-linux-gnu)
[gcc]

2016-04-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
	    Jakub Jelinek <jakub@redhat.com>

	PR middle-end/70457
	* tree-inline.c (estimate_num_insn): Use gimple_call_builtin_p
	to ensure a call statement is compatible with a built-in's
	prototype.
	* tree-ssa-math-opts.c (pass_optimize_windening_mul::execute):
	Likewise.

[gcc/testsuite]

2016-04-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
	    Jakub Jelinek <jakub@redhat.com>

	PR middle-end/70457
	* gcc.dg/torture/pr70457.c: New.


Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r234716
2016-04-04 15:42:19 +00:00
Andre Vehreschild
7a85da896a re PR fortran/67538 (ICE with invalid source allocation)
gcc/fortran/ChangeLog:

2016-04-04  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/67538
	* resolve.c (resolve_allocate_expr): Emit error message when no
	array spec and no array valued source= expression is given in an
	F2008 allocate() for an array to allocate.

gcc/testsuite/ChangeLog:

2016-04-04  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/67538
	* gfortran.dg/allocate_with_source_19.f08: New test.

From-SVN: r234714
2016-04-04 12:32:32 +02:00
Andre Vehreschild
de517e644a re PR fortran/65795 (Segfault (invalid write) for ALLOCATE statement involving COARRAYS)
gcc/fortran/ChangeLog:

2016-04-04  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/65795
	* trans-array.c (gfc_array_allocate): When the array is a coarray,
	do not nullyfing its allocatable components in array_allocate, because
	the nullify missed the array ref and nullifies the wrong component.
	Cosmetics.

gcc/testsuite/ChangeLog:

2016-04-04  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/65795
	* gfortran.dg/coarray_allocate_6.f08: New test.

From-SVN: r234710
2016-04-04 11:32:28 +02:00
Richard Biener
43b9f49910 re PR rtl-optimization/70484 (Wrong optimization with aliasing and access via char)
2016-04-04  Richard Biener  <rguenther@suse.de>

	PR rtl-optimization/70484
	* rtl.h (canon_output_dependence): Declare.
	* alias.c (canon_output_dependence): New function.
	* dse.c (record_store): Use canon_output_dependence rather
	than canon_true_dependence.

	* gcc.dg/torture/pr70484.c: New testcase.

From-SVN: r234709
2016-04-04 09:30:16 +00:00
Jan Hubicka
ed2a53e7ca re PR lto/68881 (UNRESOLVED/FAIL: gcc.dg/lto/attr-weakref-1 -O2 -flto)
PR ipa/68881
	* cgraph.h (symtab_node::copy_visibility_from): New function.
	* symtab.c (symtab_node::copy_visibility_from): New function.
	* ipa-visibility.c (optimize_weakref): New function.
	(function_and_variable_visibility): Use it.

From-SVN: r234708
2016-04-04 09:26:29 +00:00
Martin Liska
e8661ad6cf re PR hsa/70402 (HSA: SBR instruction can be undefined)
Fix PR hsa/70402

	PR hsa/70402
	* hsa-gen.c (gen_hsa_insns_for_switch_stmt): Guard index
	value that is really in range handled by SBR instruction.
	* hsa-brig.c (emit_switch_insn): Do not emit unconditional
	jump.
	* hsa-dump.c (dump_hsa_insn_1): Do not dump default BB.
	* hsa.h (hsa_insn_sbr::m_default_bb): Remove field.

From-SVN: r234707
2016-04-04 08:46:51 +00:00
Marek Polacek
f13355da30 re PR middle-end/70307 (ICE: in gimplify_expr, at gimplify.c:10915 on valid code)
PR c/70307
	* c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.

	* gcc.dg/torture/pr70307.c: New test.

From-SVN: r234706
2016-04-04 08:11:46 +00:00
GCC Administrator
dbc3f12558 Daily bump.
From-SVN: r234705
2016-04-04 00:16:16 +00:00
Oleg Endo
6cc6ed50e2 re PR target/70416 ([SH]: error: 'asm' operand requires impossible reload when building ruby2.3)
gcc/
	PR target/70416
	PR target/67391
	* config/sh/sh.md (*addsi3): Allow pattern when reload_in_progress is
	set, but not for SP_REG operands.

gcc/testsuite/
	PR target/70416
	PR target/67391
	* gcc.target/sh/torture/pr70416.c: New.

From-SVN: r234702
2016-04-03 12:50:54 +00:00
GCC Administrator
34d40e88a9 Daily bump.
From-SVN: r234701
2016-04-03 00:16:17 +00:00
Martin Sebor
abdc16c867 PR c++/67376 - [5/6 regression] Comparison with pointer to past-the-end
PR c++/67376 - [5/6 regression] Comparison with pointer to past-the-end
        of array fails inside constant expression
PR c++/70170 - [6 regression] bogus not a constant expression error comparing
        pointer to array to null
PR c++/70172 - incorrect reinterpret_cast from integer to pointer error
        on invalid constexpr initialization
PR c++/70228 - insufficient detail in diagnostics for a constexpr out of bounds
        array subscript

gcc/testsuite/ChangeLog:
2016-04-02  Martin Sebor  <msebor@redhat.com>

        PR c++/67376
        PR c++/70170
        PR c++/70172
        PR c++/70228
        * g++.dg/cpp0x/constexpr-array-ptr10.C: New test.
        * g++.dg/cpp0x/constexpr-array-ptr9.C: New test.
        * g++.dg/cpp0x/constexpr-nullptr-1.C: New test.
        * g++.dg/cpp0x/constexpr-array5.C: Adjust text of expected diagnostic.
        * g++.dg/cpp0x/constexpr-string.C: Same.
        * g++.dg/cpp0x/constexpr-wstring2.C: Same.
        * g++.dg/cpp0x/pr65398.C: Same.
        * g++.dg/ext/constexpr-vla1.C: Same.
        * g++.dg/ext/constexpr-vla2.C: Same.
        * g++.dg/ext/constexpr-vla3.C: Same.
        * g++.dg/ubsan/pr63956.C: Same.

gcc/cp/ChangeLog:
2016-04-02  Martin Sebor  <msebor@redhat.com>

        PR c++/67376
        PR c++/70170
        PR c++/70172
        PR c++/70228
        * constexpr.c (diag_array_subscript): New function.
        (cxx_eval_array_reference): Detect out of bounds array indices.

gcc/ChangeLog:
2016-04-02  Martin Sebor  <msebor@redhat.com>

        PR c++/67376
        * fold-const.c (maybe_nonzero_address): New function.
        (fold_comparison): Call it.  Fold equality and relational
        expressions involving null pointers.
        (tree_single_nonzero_warnv_p): Call maybe_nonzero_address.

From-SVN: r234698
2016-04-02 11:14:48 -06:00
Eric Botcazou
7d9979e629 decl.c (components_to_record): Restrict the previous change to fields with variable size.
* gcc-interface/decl.c (components_to_record): Restrict the previous
	change to fields with variable size.

From-SVN: r234696
2016-04-02 08:56:19 +00:00
Jason Merrill
ddd6d4211a re PR c++/70449 (ICE with -Wall on valid code on x86_64-linux-gnu in pp_string, at pretty-print.c:928)
PR c++/70449

	PR c++/70344
	* pt.c (instantiate_decl): A function isn't fully defined if
	DECL_INITIAL is error_mark_node.
	* constexpr.c (cxx_eval_call_expression): Likewise.

From-SVN: r234695
2016-04-01 21:35:45 -04:00
Ian Lance Taylor
bb72703282 runtime: Use atomic load for in entersyscall.
Reportedly fixes PPC64 deadlock.
    
    From a comment by Gabriel Russell.
    
    Fixes golang/go#15051.
    
    Reviewed-on: https://go-review.googlesource.com/21450

From-SVN: r234694
2016-04-02 00:47:53 +00:00
H.J. Lu
2e816b993d Add missing ChangeLog entry for PR target/70439
From-SVN: r234693
2016-04-01 17:24:44 -07:00
H.J. Lu
5ce43b77b9 Add missing ChangeLog entry for PR testsuite/70364
From-SVN: r234692
2016-04-01 17:18:41 -07:00
GCC Administrator
b7b937e8ec Daily bump.
From-SVN: r234691
2016-04-02 00:16:13 +00:00
Evandro Menezes
907e22e847 [AArch64] Fix SIMD predicate
Fix the predicate "aarch64_simd_reg_or_zero" to correctly validate the
"Y" constraint (scalar FP 0.0 immediate).

	* gcc/config/aarch64/predicates.md (aarch64_simd_reg_or_zero):
	Add the "const_double" to the list of operand constraints.

From-SVN: r234685
2016-04-01 19:55:52 +00:00
Jakub Jelinek
763cd859a1 re PR rtl-optimization/70467 (Useless "and [esp],-1" emitted on AND with uint64_t variable)
PR rtl-optimization/70467
	* config/i386/i386.md (*add<dwi>3_doubleword, *sub<dwi>3_doubleword):
	If low word of the last operand is 0, just emit addition/subtraction
	for the high word.

	* gcc.target/i386/pr70467-2.c: New test.

From-SVN: r234679
2016-04-01 18:08:21 +02:00
Andreas Krebbel
e7067fcdb5 PR70404 S/390: Fix insv expansion.
While the expander accepts general_operand as src operand the risbg
pattern only immediate_operand.  Unfortunately the expander called
force_reg only for VOIDmode constants missing things like
e.g. symbol_refs.  Fixed with the attached patch.

gcc/ChangeLog:

2016-04-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	PR target/70404
	* config/s390/s390.c (s390_expand_insv): Check for everything
	constant instead of just VOIDmode stuff.

From-SVN: r234678
2016-04-01 15:35:54 +00:00
Jakub Jelinek
0f87543524 re PR c++/70488 (ICE in tree.c:7345 triggered by warning of placement new too small on VLA)
PR c++/70488
	* init.c (warn_placement_new_too_small): Test whether
	DECL_SIZE_UNIT or TYPE_SIZE_UNIT are integers that fit into uhwi.

	* g++.dg/init/new47.C: New test.

Co-Authored-By: Marek Polacek <polacek@redhat.com>

From-SVN: r234676
2016-04-01 17:27:11 +02:00
Ramana Radhakrishnan
41d146597c re PR target/70496 (inadvertent change to ASM_APP_OFF for .arm / .thumb directives.)
Fix PR target/70496

While doing the unified asm rewrite - I inadvertently changed the
meaning of ASM_APP_OFF which causes failures when folks who know what
they are doing switch between arm and thumb states within a
function. The intent of the unified asm rewrite was not to affect any
inline assembler code in that it would remain in divided syntax by
default and switching back to unified asm in normal compiled code
after the inline assembler block. Thanks to Jim Wilson for pointing it
out on the linaro list.

Fixed thusly and a test is added. Tested arm-none-eabi cross and
applied.

Ramana

2016-04-01  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	PR target/70496
	* config/arm/arm.h (ASM_APP_OFF): Handle TARGET_ARM
	and TARGET_THUMB.

2016-04-01  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	PR target/70496
	* gcc.target/arm/pr70496.c: New test.

From-SVN: r234675
2016-04-01 14:58:53 +00:00
Nathan Sidwell
9553dd73e1 * tree.def (TRY_CATCH_EXPR): Correct documentation.
From-SVN: r234671
2016-04-01 12:57:52 +00:00
Nathan Sidwell
73b9085d70 fix flubbed changelog
From-SVN: r234668
2016-04-01 12:12:27 +00:00
Nathan Sidwell
f9bf89bb6a re PR c++/68475 (ICE: in merge_exception_specifiers, at cp/typeck2.c:2115 with -fno-exceptions on invalid code)
PR c++/68475
	* decl.c (check_redeclaration_exception_specification): Check
	regardless of -fno-exceptions.
	* typeck2.c (merge_exception_specifiers): Relax assert by checking
	flag_exceptions too.

	* g++.dg/g++.dg/cpp0x/noexcept29.C: New.

From-SVN: r234667
2016-04-01 12:10:17 +00:00
Ilya Enkovich
4afdcfaa6f re PR target/69890 (FAIL: gcc.target/i386/chkp-* on x86_64-apple-darwin15)
gcc/testsuite/

	PR target/69890
	* gcc.dg/strlenopt.h (memmove): New.
	* gcc.target/i386/chkp-strlen-1.c: Include "../../gcc.dg/strlenopt.h"
	instead of "string.h".
	* gcc.target/i386/chkp-strlen-2.c: Likewise.
	* gcc.target/i386/chkp-strlen-3.c: Likewise.
	* gcc.target/i386/chkp-strlen-4.c: Likewise.
	* gcc.target/i386/chkp-strlen-5.c: Likewise.
	* gcc.target/i386/chkp-stropt-1.c: Likewise.
	* gcc.target/i386/chkp-stropt-10.c: Likewise.
	* gcc.target/i386/chkp-stropt-11.c: Likewise.
	* gcc.target/i386/chkp-stropt-12.c: Likewise.
	* gcc.target/i386/chkp-stropt-13.c: Likewise.
	* gcc.target/i386/chkp-stropt-14.c: Likewise.
	* gcc.target/i386/chkp-stropt-15.c: Likewise.
	* gcc.target/i386/chkp-stropt-16.c: Likewise.
	* gcc.target/i386/chkp-stropt-2.c: Likewise.
	* gcc.target/i386/chkp-stropt-3.c: Likewise.
	* gcc.target/i386/chkp-stropt-4.c: Likewise.
	* gcc.target/i386/chkp-stropt-5.c: Likewise.
	* gcc.target/i386/chkp-stropt-6.c: Likewise.
	* gcc.target/i386/chkp-stropt-7.c: Likewise.
	* gcc.target/i386/chkp-stropt-8.c: Likewise.
	* gcc.target/i386/chkp-stropt-9.c: Likewise.

From-SVN: r234666
2016-04-01 10:40:51 +00:00
GCC Administrator
dad820dfa4 Daily bump.
From-SVN: r234661
2016-04-01 00:16:13 +00:00
Rainer Orth
b5d7a29ca5 Fix g++.dg/template/ptrmem30.C with Solaris ld
* g++.dg/template/ptrmem30.C (read): Rename to data_read.
	(Holder::foo): Reflect this.

From-SVN: r234652
2016-03-31 20:06:38 +00:00
Vladimir Makarov
c4b1942cb7 re PR rtl-optimization/70461 (Performance regression after r234527)
2016-03-31  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/70461
	* ira-color.c (allocno_copy_cost_saving): Use allocno class if it
	is necessary.

From-SVN: r234649
2016-03-31 17:51:13 +00:00
Martin Liska
6f652a5072 re PR hsa/70399 (HSA: Wrong emission of st_align(4)_u8 HSAIL insn)
Fix PR hsa/70399

	PR hsa/70399
	* hsa-brig.c (hsa_op_immed::emit_to_buffer): Emit either
	a tree value or an immediate integer value to a buffer
	that is eventually copied to a BRIG section.
	(emit_immediate_operand): Call the function here.
	* hsa-dump.c (dump_hsa_immed): Remove checking assert.
	* hsa-gen.c (hsa_op_immed::hsa_op_immed): Remove initialization
	of class' fields that are removed.
	(hsa_op_immed::~hsa_op_immed): Remove deinitialization.
	* hsa.h (class hsa_op_immed): Remove m_brig_repr and
	m_brig_repr_size fields.

From-SVN: r234647
2016-03-31 17:28:29 +00:00
Jeff Law
c1c341ab92 Add BZ markers to last commit
From-SVN: r234646
2016-03-31 11:23:21 -06:00
Mikhail Maltsev
916268f1f2 cplus-dem.c (squangle_mop_up): Zero bsize/ksize after freeing btypevec/ktypevec.
* cplus-dem.c (squangle_mop_up): Zero bsize/ksize after freeing
	btypevec/ktypevec.
	* testsuite/demangle-expected: Add coverage tests.

From-SVN: r234645
2016-03-31 11:20:53 -06:00
Martin Liska
65e2146726 HSA: handle alignment of string builtins (PR hsa/70391)
PR hsa/70391
	* hsa-gen.c (hsa_function_representation::update_dominance): New
	function.
	(convert_addr_to_flat_segment): Likewise.
	(gen_hsa_memory_set): New alignment argument.
	(gen_hsa_ctor_assignment): Likewise.
	(gen_hsa_insns_for_single_assignment): Provide alignment
	to gen_hsa_ctor_assignment.
	(gen_hsa_insns_for_direct_call): Add new argument.
	(expand_lhs_of_string_op): New function.
	(expand_string_operation_builtin): Likewise.
	(expand_memory_copy): New function.
	(expand_memory_set): New function.
	(gen_hsa_insns_for_call): Use HOST_WIDE_INT.
	(convert_switch_statements): Change signature.
	(generate_hsa): Use a return value of the function.
	(pass_gen_hsail::execute): Do not call
	convert_switch_statements here.
	* hsa-regalloc.c (hsa_regalloc): Call update_dominance.
	* hsa.h (hsa_function_representation::m_modified_cfg):
	New flag.
	(hsa_function_representation::update_dominance): New function.

From-SVN: r234644
2016-03-31 17:10:48 +00:00
Martin Liska
320c1a3679 HSA: support alignment for hsa_symbols (PR hsa/70391)
PR hsa/70391
	* hsa-brig.c (emit_directive_variable): Emit alignment
	according to hsa_symbol::m_align.
	* hsa-dump.c (hsa_byte_alignment): Move the function to
	another file.
	(dump_hsa_symbol): Dump alignment of HSA symbols.
	* hsa-gen.c (get_symbol_for_decl): Set-up alignment
	of a symbol.
	(gen_hsa_addr_with_align): New function.
	(hsa_bitmemref_alignment): Use newly added function.
	(gen_hsa_insns_for_load): Likewise.
	(gen_hsa_insns_for_store): Likewise.
	(gen_hsa_memory_copy): New argument added.
	(gen_hsa_insns_for_single_assignment): Respect
	alignment for assignments processed via
	gen_hsa_memory_copy.
	(gen_hsa_insns_for_direct_call): Likewise.
	(gen_hsa_insns_for_return): Likewise.
	(gen_function_def_parameters): Set default
	alignment.
	* hsa.c (hsa_object_alignment): New function.
	(hsa_byte_alignment): Pasted function.
	* hsa.h (hsa_symbol::m_align): New field.

From-SVN: r234643
2016-03-31 17:10:15 +00:00
Nathan Sidwell
8f80cbdb26 decl.c (start_preparsed_function): Remove unnecessary bracing.
* decl.c (start_preparsed_function): Remove unnecessary bracing.
	(finish_destructor_body): Don't emit operator delete here.

From-SVN: r234640
2016-03-31 16:18:27 +00:00