public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/46567] New: ipa_tm_decrement_clone_counts ICE at -O2
@ 2010-11-19 18:11 aldyh at gcc dot gnu.org
  2010-11-19 18:12 ` [Bug other/46567] " aldyh at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: aldyh at gcc dot gnu.org @ 2010-11-19 18:11 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46567

           Summary: ipa_tm_decrement_clone_counts ICE at -O2
           Product: gcc
           Version: trans-mem
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: aldyh@gcc.gnu.org


$  ./cc1plus c.cc -O -fgnu-tm -fdump-tree-all -fdump-ipa-all -quiet -O2
c.cc: In function 'void* buildProjectSyncStepConcurrently(int, int)':
c.cc:2674:1: internal compiler error: in ipa_tm_decrement_clone_counts, at
trans-mem.c:3687
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug other/46567] ipa_tm_decrement_clone_counts ICE at -O2
  2010-11-19 18:11 [Bug other/46567] New: ipa_tm_decrement_clone_counts ICE at -O2 aldyh at gcc dot gnu.org
@ 2010-11-19 18:12 ` aldyh at gcc dot gnu.org
  2010-11-19 18:14 ` aldyh at gcc dot gnu.org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: aldyh at gcc dot gnu.org @ 2010-11-19 18:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46567

--- Comment #1 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2010-11-19 18:11:23 UTC ---
Created attachment 22460
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22460
boom


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug other/46567] ipa_tm_decrement_clone_counts ICE at -O2
  2010-11-19 18:11 [Bug other/46567] New: ipa_tm_decrement_clone_counts ICE at -O2 aldyh at gcc dot gnu.org
  2010-11-19 18:12 ` [Bug other/46567] " aldyh at gcc dot gnu.org
@ 2010-11-19 18:14 ` aldyh at gcc dot gnu.org
  2010-11-19 18:17 ` aldyh at gcc dot gnu.org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: aldyh at gcc dot gnu.org @ 2010-11-19 18:14 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46567

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |trans-mem
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2010.11.19 18:11:58
     Ever Confirmed|0                           |1


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug other/46567] ipa_tm_decrement_clone_counts ICE at -O2
  2010-11-19 18:11 [Bug other/46567] New: ipa_tm_decrement_clone_counts ICE at -O2 aldyh at gcc dot gnu.org
  2010-11-19 18:12 ` [Bug other/46567] " aldyh at gcc dot gnu.org
  2010-11-19 18:14 ` aldyh at gcc dot gnu.org
@ 2010-11-19 18:17 ` aldyh at gcc dot gnu.org
  2010-11-24 15:09 ` [Bug other/46567] [trans-mem] " aldyh at gcc dot gnu.org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: aldyh at gcc dot gnu.org @ 2010-11-19 18:17 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46567

--- Comment #2 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2010-11-19 18:14:07 UTC ---
*** Bug 46566 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug other/46567] [trans-mem] ipa_tm_decrement_clone_counts ICE at -O2
  2010-11-19 18:11 [Bug other/46567] New: ipa_tm_decrement_clone_counts ICE at -O2 aldyh at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2010-11-19 18:17 ` aldyh at gcc dot gnu.org
@ 2010-11-24 15:09 ` aldyh at gcc dot gnu.org
  2010-12-13 11:12 ` aldyh at gcc dot gnu.org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: aldyh at gcc dot gnu.org @ 2010-11-24 15:09 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46567

--- Comment #3 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2010-11-24 14:43:53 UTC ---
ipa_tm_decrement_clone_counts() is dying because we are decrementing the clone
count for a caller that was not marked as being in a transaction in the first
place.

The problem here is that in the <tmipa> pass we have a transaction containing a
call that was not marked as inside of a transaction:

<bb 2>:
  __transaction [[relaxed]]
...
<bb 4>:
  ...
  std::_List_node_base::unhook (SR.31_22); <-- HERE

The pass that marks calls as inside of a transaction is in examine_call_tm()
which is part of the <tmlower> pass.  The function unhook() above was placed
inside of the transaction in the early inline pass, and inlining is one of the
small IPA passes, which happen after the lowering passes.

It would seem we need to run <tmlower> after early inlining, but before
<tmipa>, so some sort of lowering pass between the inlining passes.

Richard?


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug other/46567] [trans-mem] ipa_tm_decrement_clone_counts ICE at -O2
  2010-11-19 18:11 [Bug other/46567] New: ipa_tm_decrement_clone_counts ICE at -O2 aldyh at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2010-11-24 15:09 ` [Bug other/46567] [trans-mem] " aldyh at gcc dot gnu.org
@ 2010-12-13 11:12 ` aldyh at gcc dot gnu.org
  2010-12-13 11:12 ` aldyh at gcc dot gnu.org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: aldyh at gcc dot gnu.org @ 2010-12-13 11:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46567

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug other/46567] [trans-mem] ipa_tm_decrement_clone_counts ICE at -O2
  2010-11-19 18:11 [Bug other/46567] New: ipa_tm_decrement_clone_counts ICE at -O2 aldyh at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2010-12-13 11:12 ` aldyh at gcc dot gnu.org
@ 2010-12-13 11:12 ` aldyh at gcc dot gnu.org
  2011-01-28 14:53 ` patrick.marlier at gmail dot com
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: aldyh at gcc dot gnu.org @ 2010-12-13 11:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46567

--- Comment #4 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2010-12-13 11:12:08 UTC ---
[Comments from Richard.]

There are two possible solutions:

  (1) Teach inlining to propagate the in_transaction_p bit
      to every call within the function that gets inlined,

  (2) Don't use an in_transaction_p bit.  I.e. rewrite
      <tmipa> to only use the region blocks bitmap, rather
      than cheating with on-the-side data that has to be
      kept up to date by other parties.

Nr 2 is probably the better solution.  You might be able to use
cgraph_edge->aux as a replacement marker for in_transaction_p
during the <tmipa> pass.  That would certainly make things like
the use in ipa_tm_note_irrevocable easier.

[Comments from Aldy]

I'll be fixing this with option 2, but I'm trying to come up with a work around
for now.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug other/46567] [trans-mem] ipa_tm_decrement_clone_counts ICE at -O2
  2010-11-19 18:11 [Bug other/46567] New: ipa_tm_decrement_clone_counts ICE at -O2 aldyh at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2010-12-13 11:12 ` aldyh at gcc dot gnu.org
@ 2011-01-28 14:53 ` patrick.marlier at gmail dot com
  2011-01-28 20:34 ` amacleod at redhat dot com
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: patrick.marlier at gmail dot com @ 2011-01-28 14:53 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46567

--- Comment #5 from Patrick Marlier <patrick.marlier at gmail dot com> 2011-01-28 14:18:45 UTC ---
Created attachment 23153
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23153
testcase with O0

With this testcase and -O0:

$ gcc -fgnu-tm -O0 -S pr46567-2.i -o testcase.s
pr46567-2.i: In function ‘readLoop’:
pr46567-2.i:18:1: internal compiler error: in ipa_tm_decrement_clone_counts, at
trans-mem.c:3748
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Maybe not related to this bug?


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug other/46567] [trans-mem] ipa_tm_decrement_clone_counts ICE at -O2
  2010-11-19 18:11 [Bug other/46567] New: ipa_tm_decrement_clone_counts ICE at -O2 aldyh at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2011-01-28 14:53 ` patrick.marlier at gmail dot com
@ 2011-01-28 20:34 ` amacleod at redhat dot com
  2011-02-03 10:29 ` patrick.marlier at gmail dot com
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: amacleod at redhat dot com @ 2011-01-28 20:34 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46567

Andrew Macleod <amacleod at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amacleod at redhat dot com

--- Comment #6 from Andrew Macleod <amacleod at redhat dot com> 2011-01-28 19:41:28 UTC ---
discussion starting at http://gcc.gnu.org/ml/gcc-patches/2011-01/msg01479.html
for the third approach which I implemented. checked in as revision 169369 on
Jan 28.

This implements the need to track whether a call in in a transaction or not.

The follow on bugs are not related to that problem specifically, but then I
wonder if the original problem was *really* tracking the bit :-).  Regardless,
not requiring the bit is a good thing, and will help prevent future problems.

looking at the other testcase now.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug other/46567] [trans-mem] ipa_tm_decrement_clone_counts ICE at -O2
  2010-11-19 18:11 [Bug other/46567] New: ipa_tm_decrement_clone_counts ICE at -O2 aldyh at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2011-01-28 20:34 ` amacleod at redhat dot com
@ 2011-02-03 10:29 ` patrick.marlier at gmail dot com
  2011-02-11 14:44 ` aldyh at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: patrick.marlier at gmail dot com @ 2011-02-03 10:29 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46567

--- Comment #7 from Patrick Marlier <patrick.marlier at gmail dot com> 2011-02-03 10:28:37 UTC ---
Created attachment 23234
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23234
new testcase with O0

Here a reduced test case that raises this ICE with current svn version:
$ gcc -O0 -S -fgnu-tm ICE_ipa_tm_propagate_irr.i 
ICE_ipa_tm_propagate_irr.i: In function ‘readLoop’:
ICE_ipa_tm_propagate_irr.i:23:1: internal compiler error: in
ipa_tm_decrement_clone_counts, at trans-mem.c:3763
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

and raises this ICE with Andrew's patch (tm2.patch)
gcc -O0 -S -fgnu-tm ICE_ipa_tm_propagate_irr.i
ICE_ipa_tm_propagate_irr.i: In function ‘readLoop’:
ICE_ipa_tm_propagate_irr.i:23:1: internal compiler error: in
ipa_tm_propagate_irr, at trans-mem.c:3738
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Thanks.

Patrick Marlier.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug other/46567] [trans-mem] ipa_tm_decrement_clone_counts ICE at -O2
  2010-11-19 18:11 [Bug other/46567] New: ipa_tm_decrement_clone_counts ICE at -O2 aldyh at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2011-02-03 10:29 ` patrick.marlier at gmail dot com
@ 2011-02-11 14:44 ` aldyh at gcc dot gnu.org
  2011-02-11 18:21 ` aldyh at gcc dot gnu.org
  2011-02-11 18:47 ` aldyh at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: aldyh at gcc dot gnu.org @ 2011-02-11 14:44 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46567

--- Comment #8 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2011-02-11 14:42:35 UTC ---
Awaiting approval:
http://gcc.gnu.org/ml/gcc-patches/2011-02/msg00742.html


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug other/46567] [trans-mem] ipa_tm_decrement_clone_counts ICE at -O2
  2010-11-19 18:11 [Bug other/46567] New: ipa_tm_decrement_clone_counts ICE at -O2 aldyh at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2011-02-11 14:44 ` aldyh at gcc dot gnu.org
@ 2011-02-11 18:21 ` aldyh at gcc dot gnu.org
  2011-02-11 18:47 ` aldyh at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: aldyh at gcc dot gnu.org @ 2011-02-11 18:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46567

--- Comment #9 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2011-02-11 18:18:11 UTC ---
Author: aldyh
Date: Fri Feb 11 18:18:09 2011
New Revision: 170057

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170057
Log:
        PR 46567
        * trans-mem.c (ipa_tm_propagate_irr): Change assert to if.


Added:
    branches/transactional-memory/gcc/testsuite/gcc.dg/tm/pr46567-2.c
Modified:
    branches/transactional-memory/gcc/ChangeLog.tm
    branches/transactional-memory/gcc/trans-mem.c


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug other/46567] [trans-mem] ipa_tm_decrement_clone_counts ICE at -O2
  2010-11-19 18:11 [Bug other/46567] New: ipa_tm_decrement_clone_counts ICE at -O2 aldyh at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2011-02-11 18:21 ` aldyh at gcc dot gnu.org
@ 2011-02-11 18:47 ` aldyh at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: aldyh at gcc dot gnu.org @ 2011-02-11 18:47 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46567

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #10 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2011-02-11 18:19:17 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-02-11 18:21 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-19 18:11 [Bug other/46567] New: ipa_tm_decrement_clone_counts ICE at -O2 aldyh at gcc dot gnu.org
2010-11-19 18:12 ` [Bug other/46567] " aldyh at gcc dot gnu.org
2010-11-19 18:14 ` aldyh at gcc dot gnu.org
2010-11-19 18:17 ` aldyh at gcc dot gnu.org
2010-11-24 15:09 ` [Bug other/46567] [trans-mem] " aldyh at gcc dot gnu.org
2010-12-13 11:12 ` aldyh at gcc dot gnu.org
2010-12-13 11:12 ` aldyh at gcc dot gnu.org
2011-01-28 14:53 ` patrick.marlier at gmail dot com
2011-01-28 20:34 ` amacleod at redhat dot com
2011-02-03 10:29 ` patrick.marlier at gmail dot com
2011-02-11 14:44 ` aldyh at gcc dot gnu.org
2011-02-11 18:21 ` aldyh at gcc dot gnu.org
2011-02-11 18:47 ` aldyh at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).