This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [trans-mem] inlining fixes
On 08/06/2009 08:48 AM, Jan Hubicka wrote:
This fixes up some niggly points when inlining TM_ATOMIC statements,
both with the ERT_TRANSACTION eh region and with marking which
statements can and cannot throw.
The eh-1.C testcase still does not work at -O3 because a dominator walk
to find the end of an atomic region does not work with the existing
implementation of RESX statements.
What is the problem here?
(I am still slowly working on the EH changes, so I wonder what kind of
problems we run into)
My code is relying on a dominator walk to maintain transaction
regions, and the current situation with EH is that it gives
incorrect dominator results. In particular:
struct S { ~S(); }
void bar ();
void foo()
{
try {
S s;
bar ();
} catch (...) {
}
}
The CFG that we create does not have S::~S post-dominate bar,
even though it really does. We create an extra edge directly
from bar to the catch handler.
I'm close to having a small patch to fix this (10 regressions left),
which simply changes reachable_next_level
case ERT_CLEANUP:
- /* Before landing-pad generation, we model control flow
- directly to the individual handlers. In this way we can
- see that catch handler types may shadow one another. */
add_reachable_handler (info, region, region);
- return RNL_MAYBE_CAUGHT;
+ return RNL_CAUGHT;
and then properly creates edges for GIMPLE_RESX statements.
I've also been thinking a good deal about a grand EH reorg; I'll try
to post something for you to comment on later today.
r~