[hsa] Switch from bittype_for_type to hsa_type_bit_size

2015-06-19 Thread Martin Jambor
Hi, except for one use, from bittype_for_type was used as a poor-man's type size function. That is confusing, so I added a real type size function. The new implementation of hsa_bittype_for_type then uses that as its basis too. Martin 2015-06-18 Martin Jambor *

[hsa] Support for local aggregate variables

2015-06-19 Thread Martin Jambor
arrays, records as arrays of bytes. Martin 2015-06-19 Martin Jambor * hsa-gen.c (hsa_type_for_scalar_tree_type): Use hsa_get_segment_addr_type. Assert type is not scalar. Rename last argument. (hsa_type_for_tree_type): Handle aggregates. Return dimension in

[hsa] Unify two copies of hsa_sanitize_name

2015-06-19 Thread Martin Jambor
Hi, sanitize_hsa_name attracted my attention because it had no comment but then I found out we had two copies of the function in two different files. So I moved the definition to hsa.c. Martin 2015-06-19 Martin Jambor * hsa.c (hsa_sanitize_name): Moved here from... * hsa

[hsa] Fix spelling and coding style errors

2015-06-19 Thread Martin Jambor
Hi, I've run comments through spell-checker, added a few missing comments and also fixed some other coding-style errors such as lines exceeding 80 characters. Martin 2015-06-19 Martin Jambor * hsa.h: Fixed spelling and coding style errors, added missing com

[hsa] Unify two implementations of hsa_type_float_p

2015-06-19 Thread Martin Jambor
Hi, hsa_type_float_p is another function that we had implemented twice on the HSA branch, unified thusly. Martin 2015-06-19 Martin Jambor * hsa-brig.c (float_type_p): Moved from here... * hsa-gen.c (hsa_type_float_p): ...and here... * hsa.c (hsa_type_float_p): ...to

Cleanup of hsa_spill_out

2015-06-19 Thread Martin Jambor
Hi, hsa_spill_out appends two HSA instructions after another one and is not the last function that is going to do that, so I factored that code out. I also updated the comment to fit reality. Conversly for hsa_insert_insn_before and hsa_spill_in. Martin 2015-06-19 Martin Jambor

[hsa] C++ification of operands and instructions

2015-06-26 Thread Martin Jambor
which will change how we do some necessary destruction of the HSAIL representation soon. Thanks, Martin 2015-06-26 Martin Jambor * hsa.h (hsa_bb): Made a class with constructors, destructor and a new operator. (hsa_function_representation): Turned into a class, added

[hsa 10/12] HSAIL BRIG description header file (hopefully not a licensing issue)

2015-11-05 Thread Martin Jambor
tandards. I hope that is reasonable. Thanks, Martin 2015-11-05 Martin Jambor * hsa-brig-format.h: New file. diff --git a/gcc/hsa-brig-format.h b/gcc/hsa-brig-format.h new file mode 100644 index 000..f099fc6 --- /dev/null +++ b/gcc/hsa-brig-format.h @@ -0,0 +1,1283 @@ +/* HSAIL an

[hsa 12/12] HSA register allocator

2015-11-05 Thread Martin Jambor
2015-11-05 Michael Matz Martin Jambor * hsa-regalloc.c: New file. diff --git a/gcc/hsa-regalloc.c b/gcc/hsa-regalloc.c new file mode 100644 index 000..3919258 --- /dev/null +++ b/gcc/hsa-regalloc.c @@ -0,0 +1,711 @@ +/* HSAIL IL Register allocation and out-of-SSA

Re: [hsa 4/12] OpenMP lowering/expansion changes (gridification)

2015-11-09 Thread Martin Jambor
Hi, On Thu, Nov 05, 2015 at 10:57:33PM +0100, Martin Jambor wrote: > ... > > For convenience of anybody reviewing the code, I'm attaching a very > simple testcase with selection of dumps that illustrate the whole > process. > My apologies, I have forgotten to att

Re: [hsa 1/12] Configuration and offloading-related changes

2015-11-09 Thread Martin Jambor
On Thu, Nov 05, 2015 at 10:47:15PM +, Joseph Myers wrote: > On Thu, 5 Nov 2015, Martin Jambor wrote: > > > libgomp plugin to be built. Because the plugin needs to use HSA > > run-time library, I have introduced options --with-hsa-runtime (and > > more precise --wit

Re: [hsa 3/12] HSA libgomp plugin

2015-11-09 Thread Martin Jambor
Hi, On Thu, Nov 05, 2015 at 10:47:44PM +, Joseph Myers wrote: > This new file should have the standard libgomp copyright / license notice. > Oops, thanks for pointing this out. I am about to commit the following remedy to the branch. Thanks, Martin 2015-11-09 Martin

Re: [hsa 5/12] New HSA-related GCC options

2015-11-09 Thread Martin Jambor
Hi, On Fri, Nov 06, 2015 at 09:42:25AM +0100, Richard Biener wrote: > On Thu, 5 Nov 2015, Martin Jambor wrote: > > > Hi, > > > > the following small part of the merge deals with new options. It adds > > four independent things: > > > > 1) flag_dis

Re: [hsa 7/12] Disabling the vectorizer for GPU kernels/functions

2015-11-10 Thread Martin Jambor
On Fri, Nov 06, 2015 at 09:38:21AM +0100, Richard Biener wrote: > On Thu, 5 Nov 2015, Martin Jambor wrote: > > > Hi, > > > > in the previous email I wrote we need to "change behavior" of a few > > optimization passes. One was the flattening of GPU fu

[hsa] Merged trunk revision 230248 into the hsa branch

2015-11-12 Thread Martin Jambor
Hi I have just Merged trunk revision 230248 into the hsa branch. I will prepare a new submission for inclusion to trunk tomorrow. Thanks, Martin

Re: [hsa 5/12] New HSA-related GCC options

2015-11-13 Thread Martin Jambor
On Thu, Nov 12, 2015 at 12:19:50PM +0100, Jakub Jelinek wrote: > On Mon, Nov 09, 2015 at 05:58:56PM +0100, Martin Jambor wrote: > > > But I don't see any way to disable it on the command line? (no switch?) > > > > No, the switch is -foffload, which has missing docume

[RFC] Device-specific OpenMP target arguments

2015-11-13 Thread Martin Jambor
ll be an identifier and the second one the value itself. As suggested by Jakub, the first two elements will be common NUM_TEAMS and THREAD_LIMIT from the teams construct, if present. Any comments welcome, Thanks, Martin 2015-11-13 Martin Jambor include/ * gomp-consta

[hsa] Pass kernel launch attributes through a device-specific argument

2015-11-13 Thread Martin Jambor
Hi, this hsa patch is analogous to the for-trunk RFC I have sent a while ago and implements passing HSA-specific grid sizes through a device-specific argument. Committed to the branch. Thanks, Martin 2015-11-13 Martin Jambor include/ * gomp-constants.h

Re: Enable pointer TBAA for LTO

2015-11-23 Thread Martin Jambor
Hi, On Mon, Nov 23, 2015 at 12:00:25AM +0100, Jan Hubicka wrote: > Hi, > here is updated patch which I finally comitted today. It addresses all the > comments > and also fixes one nasty bug that really cost me a lot of time to understand. > > + /* LTO type merging does not make any diffe

[hsa] Fix operand and instruction types for bit-ops

2015-11-23 Thread Martin Jambor
Hi, I have applied the following patch tot he HSA branch to fix some rather unexpected type requirements of the HSA finalizer we discovered when running the target-3[34].c libgomp tests. Thanks, Martin 2015-11-23 Martin Jambor * hsa-gen.c (gen_hsa_binary_operation): Make immediate

[hsa] depend nowait support for target

2015-11-23 Thread Martin Jambor
ew places where libgomp has to treat shared memory devices like it treats host, and so I added that to the patch too. The hunk in gomp_create_target_task should have been in the previous merge from trunk but I forgot to add it then. Any feedback welcome, Martin 2015-11-23 Martin Jambor libgom

[hsa] Use new format of device-specific target arguments

2015-11-23 Thread Martin Jambor
part of this one, then there are 8 bits for an ID of the argument and then up to 16 bits for a value. Thanks, Martin 2015-11-20 Martin Jambor gcc/ * omp-low.c (get_target_argument_identifier_1): New function. (get_target_argument_identifier): Likewise

[hsa] Perform version checks in HSA plugin

2015-11-23 Thread Martin Jambor
welcome, Martin 2015-11-23 Martin Jambor gcc/ * builtin-types.def (BT_FN_VOID_PTR_INT_PTR): Removed. (BT_FN_VOID_UINT_PTR_INT_PTR): New. * fortran/types.def (BT_FN_VOID_PTR_INT_PTR): Removed. (BT_FN_VOID_UINT_PTR_INT_PTR): New. * hsa-brig.c: Include

Re: Fix alignment propagation

2015-05-21 Thread Martin Jambor
linux without any issues. So, OK for trunk now? Thanks, Martin On Wed, Feb 25, 2015 at 08:38:26PM +0100, Martin Jambor wrote: > Hi, > > On Fri, Feb 20, 2015 at 07:22:02PM +0100, Jan Hubicka wrote: > > > > +/* Decrease alignment info DEST to be at most CUR. */ >

[PATCH, PR 67133] Always change gimple fntype in cgraph_edge::redirect_call_stmt_to_callee

2015-08-17 Thread Martin Jambor
08-17 Martin Jambor PR middle-end/67133 * cgraph.c (redirect_call_stmt_to_callee): Set gimple call fntype also when redirecting without removing any parameters. diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 22a9852..5e5b308 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -1

Re: Forwarding -foffload=[...] from the driver (compile-time) to libgomp (run-time) (was: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming)

2015-08-17 Thread Martin Jambor
Hi, On Fri, Aug 14, 2015 at 03:19:26PM +0200, Ilya Verbin wrote: > 2015-08-14 11:47 GMT+02:00 Thomas Schwinge : > > On Wed, 5 Aug 2015 18:09:04 +0300, Ilya Verbin wrote: > >> > > @@ -1095,6 +1092,8 @@ GOMP_target (int device, void (*fn) (void *), > >> > > const void *unused, > >> > > return

[hsa] Fixes in gen_hsa_{unary,binary}_operation

2015-08-25 Thread Martin Jambor
, but in our own representation, we use negative values for instructions which are not actual HSA instructions, such as PHI nodes). Committed to the HSA branch. Martin 2015-08-25 Martin Jambor * hsa-gen.c (gen_hsa_unary_operation): Use int for the opcode. Add instruction to uses

[hsa] Support unary FP operations implementable with a single HSA instruction

2015-08-25 Thread Martin Jambor
. Martin 2015-08-25 Martin Jambor * hsa-gen.c (gen_hsa_unaryop_for_builtin): New function. (gen_hsa_insns_for_call): Add support for a few unary fp operations. --- gcc/ChangeLog.hsa | 4 +++ gcc/hsa-gen.c | 86 +++ 2

[hsa] Fix omp declare target support

2015-08-25 Thread Martin Jambor
branch. Thanks, Martin 2015-08-25 Martin Jambor * hsa.h (hsa_callable_function_p): Declare. * hsa.c (hsa_callable_function_p): New function. * hsa-gen.c (gen_hsa_insns_for_call): Use it. (pass_gen_hsail::execute): Likewise. --- gcc/ChangeLog.hsa | 7 +++ gcc

Re: [PATCH 1/5] Refactor completely_scalarize_var

2015-08-25 Thread Martin Jambor
Hi, On Tue, Aug 25, 2015 at 12:06:13PM +0100, Alan Lawrence wrote: > This is a small refactoring/renaming patch, it just moves the call to > "completely_scalarize_record" out from completely_scalarize_var, and renames > the latter to create_total_scalarization_access. > > This is because the next

Re: [PATCH 2/5] completely_scalarize arrays as well as records

2015-08-25 Thread Martin Jambor
Hi, On Tue, Aug 25, 2015 at 12:06:14PM +0100, Alan Lawrence wrote: > This changes the completely_scalarize_record path to also work on arrays (thus > allowing records containing arrays, etc.). This just required extending the > existing type_consists_of_records_p and completely_scalarize_record me

Re: [PATCH 3/5] Build ARRAY_REFs when the base is of ARRAY_TYPE.

2015-08-25 Thread Martin Jambor
Hi, On Tue, Aug 25, 2015 at 12:06:15PM +0100, Alan Lawrence wrote: > When SRA completely scalarizes an array, this patch changes the > generated accesses from e.g. > >MEM[(int[8] *)&a + 4B] = 1; > > to > >a[1] = 1; > > This overcomes a limitation in dom2, that accesses to equivalent >

Re: [PATCH 2/5] completely_scalarize arrays as well as records

2015-08-26 Thread Martin Jambor
Hi, On Wed, Aug 26, 2015 at 09:07:33AM +0200, Richard Biener wrote: > On Tue, Aug 25, 2015 at 11:44 PM, Jeff Law wrote: > > On 08/25/2015 03:42 PM, Martin Jambor wrote: > >> > >> Hi, > >> > >> On Tue, Aug 25, 2015 at 12:06:14PM +0100, Alan

Re: [RFC 4/5] Handle constant-pool entries

2015-08-26 Thread Martin Jambor
Hi, On Tue, Aug 25, 2015 at 12:06:16PM +0100, Alan Lawrence wrote: > This makes SRA replace loads of records/arrays from constant pool entries, > with elementwise assignments of the constant values, hence, overcoming the > fundamental problem in PR/63679. > > As a first pass, the approach I took

[HSA] Add support for unordered comparions codes

2015-08-28 Thread Martin Jambor
Hi, I've committed the following simple patch to the branch to add missing support for unordered compariosn codes. Martin 2015-08-28 Martin Jambor * hsa-gen.c (gen_hsa_cmp_insn_from_gimple): Add unordered comparison codes. (gen_hsa_insns_for_operation_assig

[hsa] Create a special omp statement for gpu kernels

2015-08-28 Thread Martin Jambor
expansion and put into a separate function. Thanks, Martin 2015-08-28 Martin Jambor * omp-low.c (expand_omp_for_kernel): Do not insert return statement. (expand_target_kernel_body): Handle kernels encapsulated in GIMPLE_OMP_GPUKERNEL statements

[hsa] Stricter target_follows_kernelizable_pattern

2015-09-02 Thread Martin Jambor
Hi, the patch below makes target_follows_kernelizable_pattern stricter by adding a few checks for clauses that have to preclude kernelization. Committed to the branch. Thanks, Martin 2015-09-02 Martin Jambor * omp-low.c (target_follows_kernelizable_pattern): Parallel

[hsa] Represent atomic loads with atomic insn, introduce set_op

2015-09-03 Thread Martin Jambor
instruction operands. It has the advantage of automatically keeping SSA form of pseudoregisters. Committed to the branch after rudimantary HSA testing. Thanks, Martin 2015-09-03 Martin Jambor * hsa.h (hsa_insn_mem): Move fields memoryorder and memoryscope

[hsa] Implement a number of atomic builtins

2015-09-03 Thread Martin Jambor
Hi, The patch below implements expansion of a number of atomic builtin calls into HSA atomic instructions. Committed to the branch. Thanks, Martin 2015-09-03 Martin Jambor * hsa-gen.c (gen_hsa_ternary_atomic_for_builtin): New function. (gen_hsa_insns_for_call): Use it to

Re: [PATCH 2/5] completely_scalarize arrays as well as records.

2015-09-08 Thread Martin Jambor
Hi, On Mon, Sep 07, 2015 at 02:15:45PM +0100, Alan Lawrence wrote: > In-Reply-To: <55e0697d.2010...@arm.com> > > On 28/08/15 16:08, Alan Lawrence wrote: > > Alan Lawrence wrote: > >> > >> Right. I think VLA's are the problem with pr64312.C also. I'm testing a fix > >> (that declares arrays with a

[hsa] Avoid setting register definitions when adding operands to a phi node

2015-09-09 Thread Martin Jambor
artin 2015-09-09 Martin Jambor * hsa.c (hsa_opcode_op_output_p): Handle HSA_OPCODE_PHI, change type of the opcode argument to int. * hsa.h (hsa_opcode_op_output_p): Change declaration accordingly. diff --git a/gcc/hsa.c b/gcc/hsa.c index 017b4ca..2dac448 100644 ---

[hsa] Treat address values specially

2015-09-10 Thread Martin Jambor
are really separate things, so I introduced a special function for the former. Consequently, I had to fix a bit bit-field access signaling in gen_hsa_addr. Committed to the branch after the standard testing I do. Martin 2015-09-10 Martin Jambor * hsa-gen.c (get_address_from_value):

[hsa] Fix insn type in gen_hsa_ternary_atomic_for_builtin

2015-09-10 Thread Martin Jambor
Hi, it turns out I got the HSA types wrong in gen_hsa_ternary_atomic_for_builtin. The following patch makes the disassembler/verifier happy. Committed to the branch. Martin 2015-09-10 Martin Jambor * hsa-gen.c (gen_hsa_ternary_atomic_for_builtin): Fix instruction type

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Martin Jambor
Hi, On Wed, Oct 15, 2014 at 06:26:34PM +0200, Martin Liska wrote: > Hello. > > Following patch introduces a new class called callgraph_annotation. Idea > behind the patch is to provide a generic interface one can use to register > custom info related to a cgraph_node. As you know, symbol_table

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Martin Jambor
Hi, On Thu, Oct 16, 2014 at 01:44:05PM +0200, Richard Biener wrote: > On Thu, Oct 16, 2014 at 1:40 PM, Jan Hubicka wrote: > >> > >> I don't like "generic annotation" facilities at all. Would it be possible > > > > Why? > > Because it's the way to hell if the IL has "magic" things only one > pas

Re: Add polymorphic call context propagation to ipa-prop

2014-10-21 Thread Martin Jambor
Hi, On Thu, Oct 02, 2014 at 09:00:12AM +0200, Jan Hubicka wrote: > Hi, > this patch makes ipa-prop to use ipa-polymorphic-call-context infrastructure > for forward propagation (in a very minimal and simple way). > > At the moment only static type info is propagated and it is used only > specula

[hsa] Simple cleanup of different offsets in hsa-gen.h

2014-10-24 Thread Martin Jambor
Hi, this is a very simple cleanup, renaming two fields of different classes called offset to a more descriptive name and removal of one which is no longer used. Committed to the branch. Thanks, Martin 2014-10-24 Martin Jambor * hsa.h (hsa_symbol): Renamed offset to

[hsa] Better workaround in locating the file with HSAIL

2014-10-24 Thread Martin Jambor
. Committed to the branch. Thanks, Martin 2014-10-24 Ganesh Gopalasubramanian Martin Jambor gcc/ * README.hsa: Removed the part about extracting the HSA ELF sections. * hsa-gen.c (wrap_hsa): Deduce the file name and pass it to libgomp. libgomp

Re: [PATCH, PR 61540] Do not ICE on impossible devirtualization

2014-06-25 Thread Martin Jambor
Hi, On Mon, Jun 23, 2014 at 01:38:03PM +0100, James Greenhalgh wrote: > On Thu, Jun 19, 2014 at 12:49:55PM +0100, Martin Jambor wrote: > > Hi, > > > > On Wed, Jun 18, 2014 at 06:12:34PM +0200, Bernhard Reutner-Fischer wrote: > > > On 18 June 2014

Re: [PATCH] Change default for --param allow-...-data-races to off

2014-06-25 Thread Martin Jambor
Hi, On Wed, Jun 25, 2014 at 03:14:31PM -0600, Jeff Law wrote: > On 06/24/14 14:19, Martin Jambor wrote: > >On Mon, Jun 23, 2014 at 03:35:01PM +0200, Bernd Edlinger wrote: > >>Hi Martin, > >> > >>>> > >>>>Well actually, I am not su

[PATCH] Fix the "inconsident" devirtualization typo and consolidate the related code

2014-06-25 Thread Martin Jambor
2014-06-25 Martin Jambor * ipa-prop.c (ipa_impossible_devirt_target): No longer static, renamed to ipa_impossible_devirt_target. Fix typo. * ipa-prop.h (ipa_impossible_devirt_target): Declare. * ipa-cp.c (ipa_get_indirect_edge_target_1): Use ipa_impossible_dev

Re: [PATCH, PR 61160] Artificial thunks need combined_args_to_skip

2014-06-27 Thread Martin Jambor
On Sat, May 31, 2014 at 01:08:31AM +0200, Martin Jambor wrote: > Hi, > > the second issue in PR 61160 is that because artificial thunks > (produced by duplicate_thunk_for_node) do not have > combined_args_to_skip, calls to them do not get actual arguments > removed, while the a

Re: [PATCH 1/7] Add missing documentation of four IPA-CP params

2014-07-15 Thread Martin Jambor
On Mon, Jun 30, 2014 at 01:06:55AM +0200, Gerald Pfeifer wrote: > On Tue, 10 Jun 2014, Gerald Pfeifer wrote: > > On Wed, 21 May 2014, Martin Jambor wrote: > >> +@item ipa-cp-loop-hint-bonus > >> +When IPA-CP determines that a cloning candidate would make the number &g

[PATCH, testcase, committed] Exit with zero status from g++.dg/ipa/pr61160-3.C

2014-07-22 Thread Martin Jambor
Hi, in order to avoid spurious testsuite failures, I've checked in the following obvious patch so that the testcase always returns zero. I have verified it still properly tests for non-existence of the bug. Thanks, Martin 2014-07-22 Martin Jambor PR ipa/61160 * g++.d

Re: [PATCH, PR61776] verify_flow_info failed: control flow in the middle of basic block with -fprofile-generate

2014-07-23 Thread Martin Jambor
Hi, On Wed, Jul 23, 2014 at 11:51:37AM +0200, Richard Biener wrote: > On Mon, Jul 21, 2014 at 7:06 PM, Wei Mi wrote: > > Hi, > > > > This patch is to fix: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61776 > > > > It records func decls whose const/pure flags are reset during > > instrumentati

Re: Regimplification enhancements 3/3

2014-07-24 Thread Martin Jambor
Hi, sorry for late reply, I've been on vacation and then preparing for Cauldron. Anyway... On Mon, Jun 30, 2014 at 05:13:13PM +0200, Bernd Schmidt wrote: > On 06/17/2014 04:54 PM, Martin Jambor wrote: > >Weird... does the following (untested) patch help? > > > >diff --

Re: [PATCH, testcase, committed] Exit with zero status from g++.dg/ipa/pr61160-3.C

2014-07-24 Thread Martin Jambor
On Tue, Jul 22, 2014 at 06:31:32PM +0200, Martin Jambor wrote: > Hi, > > in order to avoid spurious testsuite failures, I've checked in the > following obvious patch so that the testcase always returns zero. I > have verified it still properly tests for non-existence of t

[PATCH] Make sra_modify_assign's stmt prameter gimple (as opposed to gimple *)

2014-07-25 Thread Martin Jambor
? Thanks, Martin 2014-07-25 Martin Jambor * tree-sra.c (sra_modify_constructor_assign): Change type of stmt parameter to gimple. (sra_modify_assign): Likewise. diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 7fa6b4f..ba7d159 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree

Re: [PATCH] Make sra_modify_assign's stmt prameter gimple (as opposed to gimple *)

2014-07-30 Thread Martin Jambor
Hi, On Fri, Jul 25, 2014 at 10:56:10AM -0700, Sebastian Pop wrote: > On Fri, Jul 25, 2014 at 9:50 AM, Martin Jambor wrote: > > Hi, > > > > parameter stmt of sra_modify_assign and sra_modify_constructor_assign > > is currently gimple*, although there is no

[PATCH, trans-mem, PR 61393] Copy tm_clone field of cgraph_node when cloning the node

2014-07-30 Thread Martin Jambor
thing breaks. Hopefully nothing will. Bootstrapped and tested on x86_64-linux. OK for trunk? Thanks, Martin 2014-07-29 Martin Jambor PR ipa/61393 * cgraphclones.c (cgraph_node::create_clone): Also copy tm_clone. diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c index f0

[PATCH, PR 60647] Check that actual argument types match those of formal parameters before IPA-SRA

2014-03-28 Thread Martin Jambor
on x86_64-linux. OK for trunk? Thanks, Martin 2014-03-28 Martin Jambor PR middle-end/60647 * tree-sra.c (callsite_has_enough_arguments_p): Renamed to callsite_arguments_match_p. Updated all callers. Also check types of corresponding formal parameters and

[PATCH, PR 60640] When creating virtual clones, clone thunks too

2014-03-28 Thread Martin Jambor
fixable that it) and passes bootstrap and testing on x86_64-linux. OK for trunk? Thanks, Martin 2014-03-26 Martin Jambor * cgraph.h (cgraph_clone_node): New parameter added to declaration. Adjust all callers. * cgraphclones.c (build_function_type_skip_args): Moved upwards

Re: [PATCH, PR 60640] When creating virtual clones, clone thunks too

2014-04-01 Thread Martin Jambor
e_function does to thunks. It > > fixes the testcases on trunk (it does not apply to 4.8, I have not > > looked how easily fixable that it) and passes bootstrap and testing on > > x86_64-linux. > > > > OK for trunk? > > > > Thanks, > > > > Martin

[PATCH] Simple enhancements to dumping in ipa.c and ipa-cp.c

2014-04-02 Thread Martin Jambor
ke e.g. PR 60727. I included the patch in a recent bootstrap and testing and it of course passes. OK for trunk now? Or later? Thanks, Martin 2014-04-01 Martin Jambor * ipa-cp.c (ipcp_verify_propagated_values): Also dump symtab and mention gcc_unreachable before failing.

[PATCH] Disable IPA-SRA for always_inline functions

2014-04-02 Thread Martin Jambor
ng on x86_64-linux. OK for trunk now or in the next stsge1? Thanks, Martin 2014-04-01 Martin Jambor * tree-sra.c (ipa_sra_preliminary_function_checks): Skip always_inline functions. Index: src/gcc/tree-

Re: [PATCH] Simple enhancements to dumping in ipa.c and ipa-cp.c

2014-04-02 Thread Martin Jambor
Hi, On Wed, Apr 02, 2014 at 06:08:27PM +0200, Jan Hubicka wrote: > > On Wed, 2 Apr 2014, Martin Jambor wrote: > > > > > Hi, > > > > > > recently I've been looking into a number of bugs involving > > > symtab_remove_unreachable_nodes in

Re: [PATCH, PR 60640] When creating virtual clones, clone thunks too

2014-04-04 Thread Martin Jambor
and is OK with it. > > You can probably play with anonymous namespaces and final flags to get > it devirtualized unconditnally. The third testcase uses anonymous namespaces and ipa-devirt correctly reports that its list of possible targets is final, but even though the list has only two

[PATCH, 4.8, PR 60640] Disable IPA-CP through thunks

2014-04-04 Thread Martin Jambor
Hi, on the 4.8 branch, I'd like to fix the bug by simply never propagating through thunks. There is very little pre-IPA devirtualization going on and so this should have minimal impact. Bootstrapped and tested on x86_64. OK for the branch? Thanks, Martin 2014-04-01 Martin J

[PATCH, 4.7, PR 60640] Disable IPA-CP through thunks

2014-04-04 Thread Martin Jambor
04-01 Martin Jambor PR ipa/60640 * ipa-cp.c (propagate_constants_accross_call): Do not propagate accross thunks. testsuite/ * g++.dg/ipa/pr60640-1.C: New test. * g++.dg/ipa/pr60640-2.C: Likewise. * g++.dg/ipa/pr60640-3.C: Likewise. diff --git a/gc

Re: Fix wrong code issue in ipa-devirt

2014-04-08 Thread Martin Jambor
Hi, On Tue, Apr 08, 2014 at 06:13:27AM +0200, Jan Hubicka wrote: > Hi, > while looking into devirtualization dumps, I noticed that I got one "false" > typed out as "true". Not sure what I was thinking of. > > Martin, this may fix the wrong code issue you see in Firefox, hopefully. it did not seg

Re: [PATCH][C++] Fix PR60761, diagnostics in clones

2014-04-09 Thread Martin Jambor
Hi, On Tue, Apr 08, 2014 at 01:58:06PM +0200, Richard Biener wrote: > > This fixes PR60761 by dumping decl context of function clones > as origin with appended instead of that now > appears after we (compared to 4.8) clear DECL_LANG_SPECIFIC. > > Thus for the testcase in PR60761 we now print >

Re: [PATCH] Disable IPA-SRA for always_inline functions

2014-04-14 Thread Martin Jambor
Hi, On Wed, Apr 02, 2014 at 02:29:55PM +0200, Richard Biener wrote: > On Wed, 2 Apr 2014, Martin Jambor wrote: > > > Hi, > > > > when dealing with a PR yesterday I have noticed that IPA-SRA was > > modifying an always_inline function which is useless work since

[PATCH] Do not run IPA transform phases multiple times

2014-04-14 Thread Martin Jambor
onger call transformation of IPA-CP multiple times when we previously did and added asserts to check that no other caller of tree_function_versioning expects to have the vector copied. Bootstrapped and tested on x86_64-linux, OK for trunk? Thanks, Martin 2014-04-10 Martin Jambor * cgra

[PATCH] Make SRA tolerate most throwing statements

2014-04-15 Thread Martin Jambor
on x86_64-linux, bootstrap and testing of this exact one is currently underway. OK for trunk? Eric, if and once this gets in, can you please add the testcase from your original post to the suite? Thanks, Martin 2014-04-15 Martin Jambor * tree-sra.c (single_non_eh_succ): New function

Re: [PATCH] Make SRA tolerate most throwing statements

2014-04-17 Thread Martin Jambor
On Wed, Apr 16, 2014 at 11:22:28AM +0200, Richard Biener wrote: > On Tue, 15 Apr 2014, Martin Jambor wrote: > > > Hi, > > > > back in January in > > http://gcc.gnu.org/ml/gcc-patches/2014-01/msg00848.html Eric pointed > > out a testcase where the problem

Re: [PATCH] Do not run IPA transform phases multiple times

2014-04-18 Thread Martin Jambor
re. The tests pass on x86_64 host and the only i686 host I use is gcc45 on gcc farm where these tests are skipped. It is very likely that the patch below is the proper fix but it's cumbersome to propose patches without having the testcase. And of course I cannot test it because the v

Re: [PATCH] Do not run IPA transform phases multiple times

2014-04-18 Thread Martin Jambor
it earlier to test these testcases). Honza, is it OK for trunk if it passes? Thanks, Martin 2014-04-18 Martin Jambor * cgraphclones.c (cgraph_function_versioning): Copy ipa_transforms_to_apply instead of asserting it is em

Re: [PATCH] Do not run IPA transform phases multiple times

2014-04-22 Thread Martin Jambor
On Fri, Apr 18, 2014 at 03:08:09PM +0200, Martin Jambor wrote: > On Fri, Apr 18, 2014 at 01:49:36PM +0200, Jakub Jelinek wrote: > > It reproduces on x86_64 too, I guess the reason why you aren't seeing this > > is that you might have too old assembler that doesn't supp

[PATCH] Make SRA create statements with the correct alias type

2014-04-25 Thread Martin Jambor
strapped and tested on x86_64-linux. OK for trunk? Thanks, Martin 2014-04-24 Martin Jambor * tree-sra.c (sra_modify_expr): Generate new memory accesses with same alias type as the original statement. (subreplacement_assignment_data):

[PATCH] Make ipa-prop analyze BBs in DOM order

2014-04-25 Thread Martin Jambor
. OK for trunk? Thanks, Martin 2014-02-12 Martin Jambor PR tree-optimization/53787 * params.def (PARAM_IPA_CP_LOOP_HINT_BONUS): New param. * ipa-prop.h (ipa_node_params): Rename uses_analysis_done to analysis_done, update all uses. * ipa-prop.c: Include

[PATCH] Optionally trap on impossible devirtualization

2014-04-25 Thread Martin Jambor
branch, with the patch it will abort. Bootstrapped and tested (with the option on) on x86_64-linux, I have also successfully LTO built Firefox with it. If I add some documentation, would like to see this in trunk? Thanks, Martin 2014-04-03 Martin Jambor * cgraph.c

Re: [PATCH] Optionally trap on impossible devirtualization

2014-04-28 Thread Martin Jambor
On Mon, Apr 28, 2014 at 11:10:41AM +0200, Jakub Jelinek wrote: > On Mon, Apr 28, 2014 at 11:05:06AM +0200, Richard Biener wrote: > > On Fri, Apr 25, 2014 at 5:35 PM, Martin Jambor wrote: > > > Hi, > > > > > > the patch below might be useful for testcase prep

Re: [PATCH 0/3] Compile-time gimple checking, without typedefs

2014-05-06 Thread Martin Jambor
On Mon, May 05, 2014 at 09:53:49PM +0200, Jakub Jelinek wrote: > On Mon, May 05, 2014 at 01:44:06PM -0600, Jeff Law wrote: > > On 05/05/14 11:37, Richard Biener wrote: > > > > > >Well, I hope that Andrew doesn't do without a namespace (and I still > > >don't believe in what he tries to achieve with

[PATCH, PR 60897] Clear DECL_LANG_SPECIFIC when creating ISRA clones

2014-05-07 Thread Martin Jambor
. Bootstrapped and tested on x86_64-linux. OK for trunk? Also, although I have not tested it there yet, I suppose this should also be committed to the 4.9 branch. Thanks, Martin 2014-04-22 Martin Jambor PR ipa/60897 * ipa-prop.c (ipa_modify_formal_parameters): Reset

[PATCH, PR 61090] Pass gsi to build_ref_for_model in sra_modify_expr

2014-05-15 Thread Martin Jambor
the source. This means we may encounter an ARRAY_REF and need an iterator for producing potential extra statements. Fixed simply by the following patch which provides the iterator we have at hand. Bootstrapped and tested on x86_64-linux. OK for trunk? Thanks, Martin 2014-05-14 Martin Jam

[PATCH, PR 61085] Add missing type_preserved check

2014-05-15 Thread Martin Jambor
both trunk and the 4.9 branch. OK for both? Thanks, Martin 2014-05-15 Martin Jambor PR ipa/61085 * ipa-prop.c (update_indirect_edges_after_inlining): Check type_preserved flag when the indirect edge is polymorphic. testsuite/ * g++.dg/ipa/pr61085.C: New test

Re: Eliminate write-only variables

2014-05-18 Thread Martin Jambor
Hi, On Fri, May 16, 2014 at 07:25:59PM +0200, Jan Hubicka wrote: > ... > > * varpool.c (dump_varpool_node): Dump write-only flag. > * lto-cgraph.c (lto_output_varpool_node, input_varpool_node): Stream > write-only flag. > * tree-cfg.c (execute_fixup_cfg): Remove statem

Re: Eliminate write-only variables

2014-05-20 Thread Martin Jambor
Hi, On Fri, May 16, 2014 at 07:25:59PM +0200, Jan Hubicka wrote: > Hi, > this patch adds code to remove write only static variables. While analyzing > effectivity of LTO on firefox, I noticed that surprisingly large part of > binary's data segment is occupied by these. Fixed thus. > (this is qui

[PATCH 0/7] ipa-prop escape analysis

2014-05-21 Thread Martin Jambor
Hi, this patch series implements ipa-prop escape and clobber analysis and then more advanced jump function building on top of them. Better descriptions of individual patches are in their corresponding email messages, they however need to be applied in this order and so I'm sending them in this th

[PATCH 1/7] Add missing documentation of four IPA-CP params

2014-05-21 Thread Martin Jambor
rrect this by this separate patch which I'd like to propose also for 4.9 because it is missing there as well. Checked by running make info. OK for both branches? Thanks, Martin 2014-05-16 Martin Jambor * doc/invoke.texi (Optimize Options): Document parameters ipa-cp-eval

[PATCH 7/7] Plug ipa-prop escape analysis into gimple_call_arg_flags

2014-05-21 Thread Martin Jambor
still but for example in gamess that number raises from 5.21% to 7.66%. Thanks, Martin 2014-04-30 Martin Jambor * gimple.c: Include cgraph.h. (gimple_call_arg_flags): Also query bitmaps in cgraph_node. Index: src/gcc/gimple.c

[PATCH 5/7] Advanced aggregate jump function construction

2014-05-21 Thread Martin Jambor
. I'm sure there will be comments but eventually I'd like to commit this to trunk. Thanks, Martin 2014-02-18 Martin Jambor * ipa-prop.h (ipa_agg_jf_item): New fields size and only_unescaped. * ipa-prop.c (ipa_known_agg_contents_list): Moved up, new fields c

[PATCH 6/7] Real aggregate contents merge and application of deltas

2014-05-21 Thread Martin Jambor
. Bootstrapped and tested on x86_64 where it also passes LTO bootstrap and is able to LTO build Firefox. Thanks, Martin 2014-02-25 Martin Jambor * ipa-prop.c (ipa_bb_info): New field own_begin_agg_cnt. (apply_agg_contents_deltas): New parameters fbi and own. Reimplemented

[PATCH 4/7] Break up determine_known_aggregate_parts

2014-05-21 Thread Martin Jambor
and even possibly filtering out useful information. Bootstrapped and tested and LTO-bootstrapped on x86_64-linux. OK for trunk after the preceeding patches get in? Thanks, Martin 2014-02-19 Martin Jambor * ipa-prop.c (get_place_in_agg_contents_list): New function

[PATCH 2/7] Analyze BBs in DOM order in ipa-prop.c

2014-05-21 Thread Martin Jambor
ed it and LTO built Firefox with it. Thanks, Martin 2014-05-15 Martin Jambor PR tree-optimization/53787 * params.def (PARAM_IPA_CP_LOOP_HINT_BONUS): New param. * ipa-prop.h (ipa_node_params): Rename uses_analysis_done to analysis_done, update all uses.

Re: Eliminate write-only variables

2014-05-21 Thread Martin Jambor
Hi, On Wed, May 21, 2014 at 05:10:55AM +0200, Jan Hubicka wrote: > > > > Unfortunately, this commit has caused the following ICE for me when > > LTO building 471.omnetpp from SPEC 2006 or Firefox (but not libxul, > > something that gets built earlier): > > > > lto1: internal compiler error: in g

Re: [PATCH 7/7] Plug ipa-prop escape analysis into gimple_call_arg_flags

2014-05-22 Thread Martin Jambor
Hi, On Wed, May 21, 2014 at 04:27:32PM +0200, Richard Biener wrote: > On Wed, May 21, 2014 at 3:16 PM, Martin Jambor wrote: > > Hi, > > > > this demonstrates how results of ipa-prop escape analysis from > > previous patches can be used at a later stage of compilatio

Re: [PATCH 3/7] IPA-CP escape and clobber analysis

2014-05-23 Thread Martin Jambor
paper some seven years ago) Modified flags are propagated only from callees to callers, of course. On Wed, May 21, 2014 at 04:50:33PM +0200, Richard Biener wrote: > On Wed, May 21, 2014 at 3:16 PM, Martin Jambor wrote: > > Hi, > > > > this patch is rather big but not overly c

[PATCH] Remove now unnecessary bailout from split_live_ranges_for_shrink_wrap

2014-05-23 Thread Martin Jambor
above. So this patch does that. Bootstrapped and tested on x86_64-linux. OK for trunk? Thanks, Martin 2014-05-23 Martin Jambor * ira.c (split_live_ranges_for_shrink_wrap): Remove bailout on subreg uses. diff --git a/gcc/ira.c b/gcc/ira.c index b9caad7..00d95fb 100644

[PATCH, PR 61211] Fix a bug in clone_of_p verification

2014-05-30 Thread Martin Jambor
trunk and the 4.9 branch. OK for both? Thanks, Martin 2014-05-30 Martin Jambor PR ipa/61211 * cgraph.c (clone_of_p): Allow skipped_branch to deal with expanded clones. diff --git a/gcc/cgraph.c b/gcc/cgraph.c index ff65b86..f18f977 100644 --- a/gcc/cgraph.c +++ b

<    1   2   3   4   5   6   7   8   9   10   >