On 02/28/2012 04:39 AM, Richard Guenther wrote:
On Mon, Feb 27, 2012 at 5:44 PM, Andrew MacLeod<amacl...@redhat.com>  wrote:
I t would seem appropriate to me that in the future, perhaps the CFG could
have a flag set for any basic block which is in a transaction...  This would
make it pretty trivial at all times to tell if a statement is part of a
transaction or not.  It seems like the process of CFG construction/updating
should be able to maintain that info for little cost. (ie, I'd guess it's
already making the traversals requires to collect that info)

It would certainly be convenient :-)
That would sound easier than maintaining the flag on the stmt.  OTOH we
already maintain on-the-side EH tables, so it can't be that big of a problem.

What do we do if we move stmts inside a transaction though?  Do they
magically become part of it and thus we cannot move them out again?
well, I think by definition if you move a statement into a basic block of a transaction it becomes a part of the transaction. I believe transactions are block based... the entire block is in f a transaction, or not. Moving a statement out of a transaction would be as easy as moving it in... just change the block it is in.

If you want to fix this issue for 4.7, add the gimple flag and an on-demand
compute helper and check the flag in PRE/LIM.


yes, a targeted approach is required for 4.7. I just wanted to plant the seed while the discussion was ongoing.

Andrew

Reply via email to