Bug 57055 - Incorrect CFG after transactional memory passes
Summary: Incorrect CFG after transactional memory passes
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.9.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: 56982
  Show dependency treegraph
 
Reported: 2013-04-24 12:22 UTC by Ilya Enkovich
Modified: 2015-05-05 12:30 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2013-04-25 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Enkovich 2013-04-24 12:22:45 UTC
Transactional passes do not set cfun->calls_setjmp to true and do not fix CFG accordingly after adding __builtin__ITM_beginTransaction call having ECF_RETURNS_TWICE flag set.

It leads to inconsistency which may be revealed with special calls flags recomputation.

If I add DCE pass after transactional memory then flags are recomputed and CFG check fails because of call statements in the middle of basic block. Thus DCE pass after transactional memory causes ~250 new fails in 'make check'.


Tried on 'gcc version 4.9.0 20130422 (experimental) (GCC)'
Comment 1 Jakub Jelinek 2013-04-24 13:15:46 UTC
I think the TM code was taking care of edges so far, so either this TM shouldn't be handled as ECF_RETURNS_TWICE for the purposes of the ab edge creation code added recently by Richard, or we should handle it like any other returns_twice.
Comment 2 Richard Biener 2013-04-25 08:17:07 UTC
I think we should handle it like any other returns-twice, that is, TM should
split the block properly (and either call notice_special_calls or set ->calls_setjmp).  TM can still handle edge creation itself because it knows
where abnormal transfer can originate from.