Re: [committed] taking transactional credits

2015-09-01 Thread Patrick Marlier
On Tue, Sep 1, 2015 at 4:10 PM, Aldy Hernandez wrote: > On 09/01/2015 07:03 AM, Richard Henderson wrote: >> >> On 09/01/2015 06:55 AM, Aldy Hernandez wrote: >>> >>> If you don't like it, sue me. =) >> >> >> Share the blame... ;-) > > > That's right! I ain't going down in posterity alone on this.

[PATCH COMMITTED] MAINTAINERS (Write After Approval): Add myself.

2015-08-27 Thread Patrick Marlier
@@ +2015-08-27 Patrick Marlier + + * MAINTAINERS (Write After Approval): Add myself. + 2015-08-23 Francois-Xavier Coudert PR libfortran/54572 Index: MAINTAINERS === --- MAINTAINERS (revision 227278) +++ MAINTAINERS

Re: [PR64164] drop copyrename, integrate into expand

2015-08-10 Thread Patrick Marlier
On Mon, Aug 10, 2015 at 5:14 PM, Jeff Law wrote: > On 08/10/2015 02:23 AM, James Greenhalgh wrote: >> >> On Tue, Aug 04, 2015 at 12:45:28AM +0100, Alexandre Oliva wrote: >>> >>> On Jul 30, 2015, "H.J. Lu" wrote: >>> aoliva/pr64164 is fine on x32. >>> >>> >>> Thanks. I have made a large num

Re: [doc, rfa] (v2) improve x86 transactional memory intrinsics section

2015-02-24 Thread Patrick Marlier
On 02/24/2015 01:51 AM, Sandra Loosemore wrote: On 02/23/2015 03:36 AM, Patrick Marlier wrote: On 02/22/2015 04:06 AM, Sandra Loosemore wrote: +Here is an example showing handling for @code{_XABORT_RETRY} +and a fallback path for other failures: + +@smallexample +#include + +int n_tries

Re: [doc, rfa] improve x86 transactional memory intrinsics section

2015-02-23 Thread Patrick Marlier
On 02/22/2015 04:06 AM, Sandra Loosemore wrote: On 02/19/2015 12:36 PM, Sandra Loosemore wrote: On 02/19/2015 09:38 AM, Patrick Marlier wrote: Thanks Sandra. Just a minor comment. -Valid abort status bits (when the value is not @code{_XBEGIN_STARTED}) are: +If the transaction aborts, the

Re: [doc, committed] copy-edit x86 transactional memory intrinsics section

2015-02-19 Thread Patrick Marlier
Thanks Sandra. Just a minor comment. -Valid abort status bits (when the value is not @code{_XBEGIN_STARTED}) are: +If the transaction aborts, the return value is one of: Here it is really bits. So maybe something like that: If the transaction aborts, the return value is a combination of the follo

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

2014-08-06 Thread Patrick Marlier
clone of particular function. So the question is: Can the compiler replace a function pointer by its corresponding constprop function pointer in some cases? -- Patrick Marlier

Re: [PATCH] Add -mtune=ia support

2013-12-05 Thread Patrick Marlier
ssors. At first, 'ia' means to me Itanium, ie IA-64. I would personally prefer another name but maybe I am the only one to think that. -- Patrick Marlier

Re: [wwwdocs] Broken links

2013-11-20 Thread Patrick Marlier
+ Secify [docs] in the subject header. Also [wwwdocs] instead of [docs]. -- Patrick Marlier

Re: [testsuite] Adding target nonpic to certain tests part. 2

2013-06-05 Thread Patrick Marlier
Hi Alexander, At least for TM testcase, I would prefer to add 'transaction_safe' attribute on foobar as in the attached patch. Aldy and Richard H: What do you think? Thanks, -- Patrick On Wed, Jun 5, 2013 at 1:13 PM, Alexander Ivchenko wrote: > Hi, > > Another bunch of tests that fails with -fp

Re: [testsuite] Adding target nonpic to g++.dg/tm/pr47746.C

2013-05-27 Thread Patrick Marlier
Hi, This is just a memo about why the testcase failed: When it tries to compile, we get this: gcc/testsuite/g++.dg/tm/pr47746.C:20:14: error: unsafe function call ‘void Building::load(InputStream*)’ within ‘transaction_safe’ function load(stream); Indeed, with PIC, the 'load' method can be ove

Re: [testsuite] Adding target nonpic to g++.dg/tm/pr47746.C

2013-04-18 Thread Patrick Marlier
Hi Alexander, On Thu, Apr 18, 2013 at 12:49 PM, Alexander Ivchenko wrote: > I'm trying it on linux/x86_64 on trunk. Testing just by adding -fpic > to the dg-options: > > --- a/gcc/testsuite/g++.dg/tm/pr47746.C > +++ b/gcc/testsuite/g++.dg/tm/pr47746.C > @@ -1,5 +1,5 @@ > // { dg-do compile } > -

Re: [testsuite] Adding target nonpic to g++.dg/tm/pr47746.C

2013-04-18 Thread Patrick Marlier
e a testfail for Android. Where/how does it fails? (backtrace?) I cannot reproduce with -fpic on linux/x86. Actually the test is not supposed to fail even with pic. So maybe you should open a PR. Thanks, -- Patrick Marlier

Re: [PATCH] Fix PR libitm/55693

2013-02-06 Thread Patrick Marlier
Jack, On Wed, Feb 6, 2013 at 10:27 PM, Jack Howarth wrote: >I think you are making this much more complex than it really is. > The ENDFILE_SPEC on ppc is obtained from gcc/config/darwin.h and is > only... > > #define TM_DESTRUCTOR "%{fgnu-tm: -lcrttme.o}" > > whereas for intel darwin, it is d

Re: [PATCH] Fix PR libitm/55693

2013-02-06 Thread Patrick Marlier
On Wed, Feb 6, 2013 at 6:28 PM, Iain Sandoe wrote: > > On 6 Feb 2013, at 17:20, Jack Howarth wrote: > >> On Wed, Feb 06, 2013 at 05:37:12PM +0100, Patrick Marlier wrote: >>> Hi Jack, >>> >>> Thanks for having a look at this. >>> >>> Howe

Re: [PATCH] Fix PR libitm/55693

2013-02-06 Thread Patrick Marlier
Hi Jack, Thanks for having a look at this. However I don't understand why you need this: Index: gcc/config/i386/darwin.h === --- gcc/config/i386/darwin.h (revision 195764) +++ gcc/config/i386/darwin.h (working copy) @@ -131,8 +131,7

[PATCH] PR53992 - openmp lower transaction code

2012-08-20 Thread Patrick Marlier
I ask for that?). Tested on trunk / i686. Ok for trunk? Ok to backport to 4.7 branch if no regression? Thanks. gcc/ 2012-08-17 Patrick Marlier PR libgomp/53992 * omp-low.c (lower_omp_1): Handle GIMPLE_TRANSACTION. Index: omp-

[patch, libitm] fix __cxa_end_catch declaration

2012-05-21 Thread Patrick Marlier
Hi, __cxa_end_catch declaration was wrong. No functional change just correctness. Ok for trunk? Thanks. 2012-05-21 Patrick Marlier * eh_cpp.cc: Fix __cxa_end_catch declaration. -- Patrick Marlier Index: eh_cpp.cc

Re: trans-mem: functions making indirect calls are not transformed (issue6194061)

2012-05-15 Thread Patrick Marlier
Follow-up of Dave's patch with a testcase. Functions with indirect calls must be transactified (transformed). Tested on i686. Ok for trunk? -- Patrick 2012-05-15 Dave Boutcher Patrick Marlier * trans-mem.c (ipa_tm_transform_clone): Transform functions

Re: gnu-tm: Dont allow assigning transaction_unsafe functions to transaction_safe function pointers (issue6198054)

2012-05-15 Thread Patrick Marlier
ssert because the clone is not found. Tested on i686. Is the patch ok? Thanks. BTW, Should we generate a warning or an error? -- 2012-05-15 Patrick Marlier * trans-mem.c (diagnose_tm_1_op): Warn about assignment of transaction unsafe function to safe function pointer. testsuite/

Re: [trans-mem,darwin] PR/52042 find tm_clone_table with PIE

2012-02-28 Thread Patrick Marlier
Jack, Can I ask you to close this PR? http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52042 Indeed, my bugzilla account is a simple one and I cannot to change the bug status... -- Patrick On 02/07/2012 10:36 PM, Patrick Marlier wrote: Hi, The problem in this PR is that with PIE, getsectdata

Re: [PATCH, i386] RTM support

2012-02-21 Thread Patrick Marlier
On 02/21/2012 02:52 AM, Uros Bizjak wrote: On Tue, Feb 21, 2012 at 12:26 AM, Andi Kleen wrote: IIUC the documentation, the fallback label is a parameter to xbegin insn, but the insn itself doesn't jump anywhere - it just records the From the point of view of the program XBEGIN behaves like a

Re: [PATCH, i386] RTM support

2012-02-20 Thread Patrick Marlier
On 02/20/2012 01:51 PM, Uros Bizjak wrote: On Mon, Feb 20, 2012 at 7:43 PM, Richard Henderson wrote: IIUC the documentation, the fallback label is a parameter to xbegin insn, but the insn itself doesn't jump anywhere - it just records the parameter as a fallback address. However, there is no g

Re: [PATCH, i386] RTM support

2012-02-16 Thread Patrick Marlier
On 02/16/2012 11:47 AM, Jakub Jelinek wrote: if you want to use different fallback code from the transaction code. So the above is right and needed, though perhaps we might want a combine pattern or peephole to turn the movl $-1, %eax xbegin .+6 cmpl %eax, $-1 jne 1f sequence into movl $-1, %eax

Re: [PATCH, i386] RTM support

2012-02-16 Thread Patrick Marlier
Hi, On 02/16/2012 11:06 AM, Kirill Yukhin wrote: > +(define_insn "xbegin_1" > + [(set (match_operand:SI 0 "register_operand" "=a") > +(unspec_volatile:SI [(match_dup 0)] UNSPECV_XBEGIN)) > + (set (match_operand:BLK 1 "" "") > +(unspec_volatile:BLK [(match_dup 1)] UNSPECV_XBEGIN))] > +

Re: [libitm, darwin] PR52220 move dummy functions definition

2012-02-15 Thread Patrick Marlier
On 02/15/2012 08:24 PM, Jack Howarth wrote: On Wed, Feb 15, 2012 at 11:48:29PM +, Iain Sandoe wrote: On 15 Feb 2012, at 23:39, Patrick Marlier wrote: PR libitm/52220 * alloc_cpp.cc: No dummy definitions for darwin. * eh_cpp.cc: Likewise. libgcc/ 2012-02-15 Iain

[libitm, darwin] PR52220 move dummy functions definition

2012-02-15 Thread Patrick Marlier
by Iain Sandoe. This was approved off-list by Mike Stump. Committed and tested on darwin 10/11. -- Patrick. libitm/ 2012-02-15 Iain Sandoe Patrick Marlier PR libitm/52220 * alloc_cpp.cc: No dummy definitions for darwin. * eh_cpp.cc: Likewise. libgcc

Re: [trans-mem,darwin] PR/52042 find tm_clone_table with PIE

2012-02-15 Thread Patrick Marlier
Here the committed patch approved off-list by Mike Stump which fixed PR/52042. Tested on darwin10/11 with x86_64. PS: this is my first commit so I hope I get it right. Otherwise do not hesitate to yell at me. Thanks. -- Patrick. 2012-02-15 Iain Sandoe Patrick Marlier

Re: [trans-mem,darwin] PR/52042 find tm_clone_table with PIE

2012-02-09 Thread Patrick Marlier
Hi Iain, On 02/09/2012 07:26 AM, Iain Sandoe wrote: apologies for (a) the extra loop - I missed a deprecation warning when I built your last version ... Thanks! Actually, I saw the depreciation but I didn't found that dladdr. (b) rolling two things into one mail ... ... (point 1 is related th

Re: [trans-mem,darwin] PR/52042 find tm_clone_table with PIE

2012-02-08 Thread Patrick Marlier
On 02/08/2012 12:12 AM, Jack Howarth wrote: I believe the remaining libitm.c++/eh-1.C execution test failures are due to the weakref linker bug currently in Xcode 4.x (radr://10466868) which I hae been told will be fixed in the next Xcode release after Xcode 4.3. Jack Humm... I

Re: [trans-mem,darwin] PR/52042 find tm_clone_table with PIE

2012-02-08 Thread Patrick Marlier
On 02/08/2012 04:14 PM, Mike Stump wrote: On Feb 7, 2012, at 7:36 PM, Patrick Marlier wrote: The problem in this PR is that with PIE, getsectdata does not return the position of tm_clone_table after the relocation. If tests passed, ok for 4.7? Ok. Thanks for all your hard work. If you

[trans-mem,darwin] PR/52042 find tm_clone_table with PIE

2012-02-07 Thread Patrick Marlier
(my knowledge of darwin is really limited)? Can someone do a bootstrap and test libitm on darwin (I have a limited access to a darwin machine, at least libitm tests pass)? Thanks! If tests passed, ok for 4.7? -- Patrick Marlier. libgcc: PR libitm/52042 * config/darwin-crt-tm.c

Re: MAINTAINERS (Write After Approval): Add myself.

2012-02-03 Thread Patrick Marlier
On 02/03/2012 11:44 AM, Kumar, Venkataramanan wrote: Index: MAINTAINERS === --- MAINTAINERS (revision 183872) +++ MAINTAINERS (working copy) @@ -538,6 +538,7 @@ Jon zieglerj...@apple.com Roman zippelzip...@linux-m68k.org Josef

Re: [trans-mem, PATCH] do not dereference node if null in expand_call_tm (PR middle-end/52047)

2012-02-02 Thread Patrick Marlier
On 02/02/2012 04:22 AM, Richard Guenther wrote: On Wed, Feb 1, 2012 at 10:19 PM, Patrick Marlier wrote: On 02/01/2012 03:59 AM, Richard Guenther wrote: The patch looks ok, but I'm not sure why you do not get a cgraph node here - cgraph doesn't really care for builtins as far as

Re: [trans-mem, PATCH] do not dereference node if null in expand_call_tm (PR middle-end/52047)

2012-02-01 Thread Patrick Marlier
On 02/01/2012 03:59 AM, Richard Guenther wrote: The patch looks ok, but I'm not sure why you do not get a cgraph node here - cgraph doesn't really care for builtins as far as I can see. Honza? I cannot help on this... Don't you maybe want to handle builtins in a special way here? Indeed, I th

[trans-mem, PATCH] do not dereference node if null in expand_call_tm (PR middle-end/52047)

2012-01-31 Thread Patrick Marlier
OK? (I am almost sure I already proposed this modification few time ago but it have been lost somewhere.) -- Patrick. 2012-01-31 Patrick Marlier PR middle-end/52047 * trans-mem.c (expand_call_tm): Dereference node only if non-NULL. Index:

Re: [libitm] Link eh-1.exe with -shared-libgcc on Solaris (PR libitm/51822)

2012-01-30 Thread Patrick Marlier
On 01/30/2012 12:15 PM, Jack Howarth wrote: On Mon, Jan 30, 2012 at 05:40:21PM +0100, Rainer Orth wrote: Richard Henderson writes: On 01/25/2012 12:03 AM, Rainer Orth wrote: Er.. how did we get two copies? The link line boils down to ld -o eh-1.exe crt1.o crti.o crtbegin.o eh-1.o -litm -l

Re: PR testsuite/52011: add regparm to LTO/TM tests

2012-01-27 Thread Patrick Marlier
On 01/27/2012 11:02 AM, Aldy Hernandez wrote: If you all agree to remove ITM_REGPARM from libitm.h, then the tests on x86-32 will work. What is the status of this-- was there agreement on removing regparm? Note that I meant only for _ITM_beginTransaction. Indeed, regparm is ignored with varia

Re: PR testsuite/52011: add regparm to LTO/TM tests

2012-01-27 Thread Patrick Marlier
On 01/27/2012 10:14 AM, Aldy Hernandez wrote: +ITM_REGPARM noinline uint32_t _ITM_beginTransaction(uint32_t a, ...) { asm(""); } No ITM_REGPARM here. It should be also removed from libitm.h. -- Patrick.

Re: [trans-mem] Do not instrument thread locals

2012-01-24 Thread Patrick Marlier
On 01/24/2012 08:32 PM, Andi Kleen wrote: Hi, > > I found that all thread local variables are instrumented with > _ITM_W/R* calls whereas they should not be shared with other > threads. This patch takes care of thread locals into requires_barrier > and also adds the local save/restore for the

Re: [libitm] Minor changes to libitm.h

2012-01-24 Thread Patrick Marlier
On 01/24/2012 07:32 PM, Torvald Riegel wrote: * Remove ITM_REGPARM from _ITM_beginTransaction since on x86-32, a > variadic function ignores regparm. > * Add ITM_PURE to _ITM_addUserCommitAction and _ITM_addUserUndoAction to > be usable inside transactions. Those should be called from transac

[libitm] Minor changes to libitm.h

2012-01-24 Thread Patrick Marlier
transactions. * Cosmetic changes to match GCC coding rules. By the way, is it on purpose that libitm.h is not installed? Tested on x86_64-unknown-linux-gnu. Ok for trunk? (Aldy, I am really sorry to bother you one more time. I owe you one) Thanks. -- Patrick. libitm/ 2012-01-24 Patrick Marlier

Re: [trans-mem,c++] PR51928

2012-01-24 Thread Patrick Marlier
On 01/24/2012 08:32 AM, Aldy Hernandez wrote: On 01/23/12 18:34, Patrick Marlier wrote: Hi, In this PR51928, it tries to look_for_tm_attr_overrides on a thunk but there is no DECL_NAME for thunk. So it fails in lookup_fnfields_idx_nolazy because name is NULL. #0 0x00764b5a in

[trans-mem,c++] PR51928

2012-01-23 Thread Patrick Marlier
(type=0x76a091f8, fndecl=0x769f8800) at ../../trunk/gcc/cp/class.c:4337 I hope the good way to solve this is to use the THUNK_TARGET instead of the thunk itself. (or just ignore when it is a thunk?) Tested on x86_64-unknown-linux-gnu. Thanks. -- Patrick Marlier. Changelog 2012-01-23

[trans-mem] Do not instrument thread locals

2012-01-23 Thread Patrick Marlier
fill any PR since I have already a patch for it but tell me if I have to. Tested on x86_64-unknown-linux-gnu, ok for trunk? Thanks. -- Patrick Marlier. ChangeLog 2012-01-23 Patrick Marlier * trans-mem.c (requires_barrier): Do not instrument thread local variables and emit

Re: [PATCH] PR51280 LTO/trans-mem ICE with TM builtins

2012-01-21 Thread Patrick Marlier
On 01/20/2012 08:04 AM, Dominique Dhumieres wrote: The following patch fixes the problem. The test fails on *-apple-darwin*: pr51916. TIA Dominique Dominique or Iain, may I ask you to test this patch on darwin? I have a sporadic access to a darwin machine. Bootstrapped and tested on x86_

Re: [PATCH] PR51280 LTO/trans-mem ICE with TM builtins

2012-01-21 Thread Patrick Marlier
On 01/20/2012 08:04 AM, Dominique Dhumieres wrote: The following patch fixes the problem. The test fails on *-apple-darwin*: pr51916. TIA Dominique Dominique or Iain, may I ask you to test this patch on darwin? I have a sporadic access to a darwin machine. Bootstrapped and tested on x86_

Re: [PATCH, trans-mem]: Fix PR51830, FAIL: libitm.c/mem(cpy|set)-1.c execution test on x86_32

2012-01-18 Thread Patrick Marlier
On 01/18/2012 03:35 PM, Uros Bizjak wrote: Please note that all recent x86 processors implement store forwarding, so passing arguments through memory is mostly a non-issue nowadays. Ok. Thanks :) IMO, whatever the future decision would be, we shouldn't leave one part of the compiler out-of-sy

Re: [PATCH, trans-mem]: Fix PR51830, FAIL: libitm.c/mem(cpy|set)-1.c execution test on x86_32

2012-01-18 Thread Patrick Marlier
) ITM_REGPARM; At least, it provides a new parameter for future use and do not use the stack for parameters. Other thoughts? Thanks. -- Patrick Marlier.

Re: PR other/51165: add new adress_escapes predicate

2012-01-17 Thread Patrick Marlier
lower_sequence_tm altogether. */ needs_to_live_in_memory (x) - /* X escapes. */ - || is_global_var (x)) return true; else { Thanks. Patrick Marlier.

Re: [Patch libitm] [V2] config-based assessment of weakref capability

2012-01-06 Thread Patrick Marlier
On 01/06/2012 12:30 PM, Iain Sandoe wrote: On 6 Jan 2012, at 16:42, Jack Howarth wrote: On Fri, Jan 06, 2012 at 10:58:51AM -0500, Patrick Marlier wrote: On 01/06/2012 10:38 AM, Mike Stump wrote: On Jan 6, 2012, at 12:29 AM, Iain Sandoe wrote: I think something is wrong in the configure

Re: [Patch libitm] [V2] config-based assessment of weakref capability

2012-01-06 Thread Patrick Marlier
On 01/06/2012 10:38 AM, Mike Stump wrote: On Jan 6, 2012, at 12:29 AM, Iain Sandoe wrote: I think something is wrong in the configure. Indeed, on apple-darwin10.8.0, weak ref works but it is configure as "no". I guess it should not try to run it but only compile it (or the symbol should exists

Re: [Patch libitm] [V2] config-based assessment of weakref capability

2012-01-05 Thread Patrick Marlier
Hello Iain, On 11/21/2011 10:17 AM, Iain Sandoe wrote: This checked to DTRT on i686-darwin9 (weak ref doesn't behave like ELF's) and x86-64-darwin10/XCode 3.2.5 (weak ref behaves as per ELF). It is my understanding from some off-list discussion reported with the ld64 engineer - - that Darwin >=

[testsuite,trans-mem] memcpy-1.c testcase

2012-01-05 Thread Patrick Marlier
On Darwin, the memcpy is a macro to provide secure string operations (FORTIFY_LEVEL > 0). I propose to remove the string.h include and add manually the declaration. Tested on x86_64-apple-darwin and on x86_64-unknown-linux-gnu. This solves PR51655. Patrick Marlier. testsuite/ChangeLog 2

[trans-mem] fix problem with TM clone aliases

2012-01-04 Thread Patrick Marlier
. Bootstrapped and regtested on x86_64-unknown-linux-gnu. Richard, ok? (Don't have an account yet, thanks in advance for the committer) Thanks. -- Patrick Marlier. ChangeLog 2012-01-05 Patrick Marlier PR middle-end/51516 * trans-mem.c (ipa_tm_scan_calls_block): Use parent

[libitm] fix reentrant.c testcase

2012-01-04 Thread Patrick Marlier
In the reentrant.c testcase, the first transaction has no transactional access and thus removed. In order to keep this transaction, I added a shared access inside. Tested on i686. OK to commit? (I don't have an account, so thanks in advance to committer) -- Patrick Marlier. 2012-01-04 Pa

Re: PR middle-end/51472: handle TM memmove with non-addressable destinations

2012-01-04 Thread Patrick Marlier
On 01/04/2012 01:20 PM, Aldy Hernandez wrote: I fixed this PR, and then it got reopened because the testcase triggered a different problem on Alpha, Mips, and other architectures. The problem is actually totally different than the previous fix for 51472, and has nothing to do with --param tm-max-

Re: PR middle-end/51472: handle TM memmove with non-addressable destinations

2012-01-04 Thread Patrick Marlier
On 01/04/2012 01:20 PM, Aldy Hernandez wrote: The attached patch fixes the ICE on alpha-linux-gnu as tested with a cross-cc1 build. Note that it was also failing with i686/linux and the patch fixes the ICE. Patrick.

Re: [RFC][patch] trans-mem: mark transaction begins as returns-twice

2012-01-04 Thread Patrick Marlier
On 01/04/2012 11:40 AM, Aldy Hernandez wrote: On 01/04/12 09:53, Patrick Marlier wrote: On 01/02/2012 01:10 PM, Torvald Riegel wrote: This was motivated by the miscompilation of one of the STAMP applications (Genome), where a stack slot was used as temp storage for a CPU register but not

Re: [trans-mem] remove xfail for tm alias testcases

2012-01-04 Thread Patrick Marlier
I have just realized that there are bugreports for them. So here the ChangeLog adjusted. Patrick. On 01/04/2012 11:51 AM, Patrick Marlier wrote: (From a old email in sent after the merge) The output for "ealias" was changed in revision 158374. * tree-ssa-structalias.c (dump_soluti

[trans-mem] remove xfail for tm alias testcases

2012-01-04 Thread Patrick Marlier
the patch adjusts the output to be checked in the testcases and remove the xfail. Tested on i686. Ok to commit? (don't have an account yet, thanks in advance for committer) Patrick Marlier. 2012-01-04 Patrick Marlier * gcc.dg/tm/alias-1.c: Adjust regexp. * gcc.dg/tm/ali

Re: [RFC][patch] trans-mem: mark transaction begins as returns-twice

2012-01-04 Thread Patrick Marlier
On 01/02/2012 01:10 PM, Torvald Riegel wrote: This was motivated by the miscompilation of one of the STAMP applications (Genome), where a stack slot was used as temp storage for a CPU register but not restored when the transaction got aborted and restarted (then, after restart, the program crashe

Re: [PATCH] Use ggc allocated strings instead of malloced for debug macro sections (PR pch/51722)

2012-01-03 Thread Patrick Marlier
opy) @@ -20904,7 +20904,6 @@ output_macinfo (void) case DW_MACINFO_end_file: if (!VEC_empty (macinfo_entry, files)) { - macinfo_entry *file = VEC_last (macinfo_entry, files); VEC_pop (macinfo_entry, files); } break; Patr

Re: [libitm] Remove variadic argument of _ITM_beginTransaction from libitm.h

2011-12-29 Thread Patrick Marlier
On 12/29/2011 06:59 AM, Torvald Riegel wrote: On Wed, 2011-12-28 at 21:03 -0500, Patrick Marlier wrote: With i386, the regparm(2) is not taken into account when there is a variadic function. All parameters are in the stack. Since this variable argument is never used removing it is not a problem

[libitm] Remove variadic argument of _ITM_beginTransaction from libitm.h

2011-12-28 Thread Patrick Marlier
=== # of expected passes23 # of expected failures 5 # of unresolved testcases 1 Tested on i686. If ok, please commit. Thanks. Patrick Marlier. 2011-12-28 Patrick Marlier PR testsuite/51655 * libitm.h (_ITM_beginTransaction): Remove unused argument

Re: [PATCH] PR51280 LTO/trans-mem ICE with TM builtins

2011-12-19 Thread Patrick Marlier
On 12/16/2011 03:54 AM, Richard Guenther wrote: On Thu, 15 Dec 2011, Patrick Marlier wrote: In PR51280, LTO does ICE because the object file uses TM builtin but the TM is not enabled. In the patch, it displays a error message if the builtin is not defined and due to TM. I moved is_tm_builtin

[PATCH] PR51280 LTO/trans-mem ICE with TM builtins

2011-12-15 Thread Patrick Marlier
Marlier. 2011-12-15 Patrick Marlier PR lto/51280 * tree.h (is_tm_builtin): Declare. (is_tm_builtin_code): Declare. * calls.c (is_tm_builtin): Move to... * trans-mem.c (is_tm_builtin): ...here. (is_tm_builtin_code): New, add missing builtins

Re: PR middle-end/51411: handle transaction_safe virtual inlined methods

2011-12-14 Thread Patrick Marlier
On 12/14/2011 07:56 AM, Aldy Hernandez wrote: Without the patch, it is ok. If I remove completely this part: if (DECL_DECLARED_INLINE_P (new_decl) && DECL_EXTERNAL (new_decl)) { DECL_EXTERNAL (new_decl) = 0; TREE_PUBLIC (new_decl) = 0; } It ends with *only* one undefined symbol: src/UnitsSkins.

Re: PR middle-end/51411: handle transaction_safe virtual inlined methods

2011-12-13 Thread Patrick Marlier
On 12/13/2011 04:04 PM, Aldy Hernandez wrote: On 12/13/11 15:02, Richard Henderson wrote: On 12/13/2011 12:48 PM, Aldy Hernandez wrote: PR middle-end/51411 * trans-mem.c (ipa_tm_create_version): Do not zap DECL_EXTERNAL. ... /* ??? Is it worth trying to use make_decl_one_only? */ if (DECL_DEC

Re: [patch] PR51347 alias problem

2011-12-12 Thread Patrick Marlier
On 12/12/2011 11:19 AM, Aldy Hernandez wrote: Yes the testcase attached in the PR works for me but I can't change the status because I am not the reporter (nor admin). I will close it. Ok thanks. However, the testcase I have added g++.dg/tm/ctor-used.C fails. I can fill another PR but I f

Re: [patch] PR51347 alias problem

2011-12-11 Thread Patrick Marlier
On 12/11/2011 09:11 AM, Aldy Hernandez wrote: On 12/10/11 17:13, Patrick Marlier wrote: On 12/10/2011 02:16 PM, Aldy Hernandez wrote: Using the parent node for aliases (as in your patch) makes sense, but I don't see tree_function_versioning() segfaulting as you claim. What I s

Re: [patch] PR51347 alias problem

2011-12-10 Thread Patrick Marlier
On 12/10/2011 02:16 PM, Aldy Hernandez wrote: Using the parent node for aliases (as in your patch) makes sense, but I don't see tree_function_versioning() segfaulting as you claim. What I see is estimate_function_body_sizes() Humm you are seeing this I guess: http://gcc.gnu.org/ml/gcc-patches/

Re: [patch] PR51347 alias problem

2011-12-10 Thread Patrick Marlier
On 12/10/2011 02:16 PM, Aldy Hernandez wrote: Using the parent node for aliases (as in your patch) makes sense, but I don't see tree_function_versioning() segfaulting as you claim. What I see is estimate_function_body_sizes() failing because it is trying to analyze an edge that doesn't exist her

[patch,trans-mem] do not remove cgraph_edge after substitution

2011-12-06 Thread Patrick Marlier
was not sure about edge removal. Patrick. gcc/ 2011-12-06 Patrick Marlier * trans-mem.c (ipa_tm_transform_calls_redirect): Do not remove edge. testsuite/ 2011-12-06 Patrick Marlier * g++.dg/tm/cgraph_edge.C: New test. Index: trans-mem.c

[patch] PR51347 alias problem

2011-12-02 Thread Patrick Marlier
Marlier PR c++/51347 * trans-mem.c (ipa_tm_scan_calls_block): Use parent node of aliases. (ipa_tm_decrement_clone_counts): Likewise. testsuite/ChangeLog 2011-12-02 Patrick Marlier PR c++/51347 * g++.dg/tm/pr51347.C: New test. * g++.dg/tm

[patch] original function and TM clone has to be marked needed

2011-11-30 Thread Patrick Marlier
problem with the testcase because _ITM_getTMCloneOrIrrevocable is called instead of _ITM_getTMCloneSafe (it is an atomic not relaxed transaction). I can have a look if you want. 2011-11-30 Patrick Marlier * trans-mem.c (ipa_tm_insert_gettmclone_call): mark original and clone as

PR middle-end/51273: call cgraph_call_node_duplication_hooks

2011-11-27 Thread Patrick Marlier
if ok) Patrick Marlier. 2011-11-27 Patrick Marlier PR middle-end/51273 * cgraph.h (cgraph_call_node_duplication_hooks): Declare. * cgraph.c (cgraph_call_node_duplication_hooks): Make global. * cgraphunit.c (cgraph_copy_node_for_versioning): Call duplication

Re: Re-merge crtstuff.c from the trans-mem branch

2011-11-21 Thread Patrick Marlier
On 11/21/2011 06:46 PM, Patrick Marlier wrote: On 11/21/2011 06:14 PM, Richard Henderson wrote: On 11/21/2011 02:13 PM, Richard Henderson wrote: It has been pointed out to me that I'm an idiot and sent an empty attachment. So lets try this again... Arg... I have never said that!

Re: [libitm] Work around missing AVX support

2011-11-10 Thread Patrick Marlier
On 11/10/2011 03:25 PM, Iain Sandoe wrote: libtool: link: /GCC/gcc-4-7-trunk-build/./gcc/xgcc -B/GCC/gcc-4-7-trunk-build/./gcc/ -B/GCC/gcc-4-7-install/i686-apple-darwin9/bin/ -B/GCC/gcc-4-7-install/i686-apple-darwin9/lib/ -isystem /GCC/gcc-4-7-install/i686-apple-darwin9/include -isystem /GCC/gcc-

Re: [trans-mem] fix memopt-1.c for 32bits

2011-11-09 Thread Patrick Marlier
On 11/09/2011 03:23 PM, Jakub Jelinek wrote: On Wed, Nov 09, 2011 at 09:32:28AM -0500, Patrick Marlier wrote: * gcc.dg/tm/memopt-1.c: Adjust regexp. This results in ERROR: (DejaGnu) proc "248" does not exist. - [] is tcl procedure invocation. Testing following, will c

Re: [trans-mem] fix memopt-1.c for 32bits

2011-11-09 Thread Patrick Marlier
On 11/08/2011 05:25 PM, Richard Henderson wrote: On 11/08/2011 02:08 PM, Patrick Marlier wrote: - change the match for g to _ITM_RU[48] Change the match to [248]. I have never seen a "long" type to have a size of 2 bytes but I am probably wrong. (I did not find the C specifica

Re: [trans-mem] fix memopt-1.c for 32bits

2011-11-08 Thread Patrick Marlier
On 11/08/2011 04:29 PM, Richard Henderson wrote: On 11/08/2011 12:21 PM, Patrick Marlier wrote: The other way could be to change the regex but we don't want that. Why not? My guess was that the purpose to have "long" in the testcase was to test the generation of another

[trans-mem] fix memopt-1.c for 32bits

2011-11-08 Thread Patrick Marlier
In x86/32bits, long is 4bytes, and the test checks for _ITM_RU8 (8bytes). I propose to change to long long (it is C99 but it should not be a problem, right?). The other way could be to change the regex but we don't want that. Tested on x86. Richard/Aldy, can you apply it to trunk and trans-mem

Re: [trans-mem] Fix tm_pure not inlinable in tm_safe

2011-10-31 Thread Patrick Marlier
On 10/31/2011 03:21 PM, Aldy Hernandez wrote: On 10/31/11 13:54, Patrick Marlier wrote: This fixes the g++ pr45940-4 failure. I think it is due to the latest merge. Tested on i686. (I cannot test it yet on x86-64, I hope to get access to a 64 bit soon...) Patrick. 2011-10-31 Patrick Marlier

[trans-mem] Fix tm_pure not inlinable in tm_safe

2011-10-31 Thread Patrick Marlier
This fixes the g++ pr45940-4 failure. I think it is due to the latest merge. Tested on i686. (I cannot test it yet on x86-64, I hope to get access to a 64 bit soon...) Patrick. 2011-10-31 Patrick Marlier * ipa-inline.c: Adjust how cannot_inline is set. Index: ipa-inline.c

Re: [trans-mem] Explicitly go irrevocable even if transaction will always go irrevocable.

2011-10-28 Thread Patrick Marlier
On 10/28/2011 08:53 AM, Aldy Hernandez wrote: If the original test was not wrong, you need to add a new test (and bonus points for finding out why this test is currently failing :)). long g, xxx, yyy; /* { dg-final { scan-tree-dump-times "transforming: .*_ITM_RaWU8 \\(&g\\);" 1 "tmmemopt" } }

[trans-mem] wrong calling convention _ITM_free with i*86

2011-10-21 Thread Patrick Marlier
f expected passes196 # of unexpected failures12 # of unsupported tests 1 === g++ Summary === # of expected passes 102 # of unexpected failures26 # of unresolved testcases 3 Patrick Marlier. * builtin-attrs.def (ATTR

[trans-mem] Fix compilation of libitm with recent gcc

2011-09-07 Thread Patrick Marlier
Here the error when gcc compiles libitm: ../../../transactional-memory/libitm/aatree.h: In constructor ‘GTM::aa_node_base::aa_node_base(GTM::aa_node_base::level_type)’: ../../../transactional-memory/libitm/aatree.h:53:16: error: list-initializer for non-class type must not be parenthesized [-We

Re: [trans-mem] verify_types_in_gimple_seq_2 glitch

2011-07-29 Thread Patrick Marlier
Thanks to remind me (once again) the rules... Bootstrapped and tested successfully with: make check-gcc RUNTESTFLAGS=tm.exp Changelog: * tree-cfg.c: Fix typo. -- Patrick Marlier On 07/29/2011 01:14 PM, Aldy Hernandez wrote: On 07/29/11 05:25, Patrick Marlier wrote: In tree-cfg.c

[trans-mem] verify_types_in_gimple_seq_2 glitch

2011-07-29 Thread Patrick Marlier
|= verify_types_in_gimple_seq_2 (gimple_omp_body (stmt)); + err |= verify_types_in_gimple_seq_2 (gimple_transaction_body (stmt)); break; default: Patrick Marlier.

Re: [trans-mem] Add documentation

2011-05-27 Thread Patrick Marlier
This is great to see that there is some activity around the trans-mem branch. +@subsection [New] Transactional dynamic memory management Remark: I think this part of documentation may also mention new and delete operators. Patrick Marlier. On Thu, 26 May 2011, Torvald Riegel wrote

Re: [trans-mem] PR 47952 Re: weak aliases, .tm_clone_table, and binutils confusion

2011-04-13 Thread Patrick Marlier
obl _ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC1EPSt15_List_node_base The clone version should be also weak. Ping to this? I know that is not causing a big problem but I think the clone should be coherent with the original. Should I fill another PR just for this? (even if obvious). Patrick Marlier.

Re: [trans-mem] PR 47952 Re: weak aliases, .tm_clone_table, and binutils confusion

2011-03-08 Thread Patrick Marlier
Hi Richard, On 03/08/2011 01:50 AM, Richard Henderson wrote: On 03/06/2011 10:54 PM, Patrick Marlier wrote: Well, I have patched trans-mem.c to update the name of the COMDAT_GROUP in ipa_tm_create_version(). I know this is not the way to do this but I hope it can at least help you. This