On Fri, 2011-10-28 at 07:53 -0500, Aldy Hernandez wrote: > > diff --git a/gcc/testsuite/gcc.dg/tm/memopt-1.c > > b/gcc/testsuite/gcc.dg/tm/memopt-1.c > > index 06d4f64..9a48dcb 100644 > > --- a/gcc/testsuite/gcc.dg/tm/memopt-1.c > > +++ b/gcc/testsuite/gcc.dg/tm/memopt-1.c > > @@ -2,8 +2,8 @@ > > /* { dg-options "-fgnu-tm -O -fdump-tree-tmmemopt" } */ > > > > long g, xxx, yyy; > > -extern george() __attribute__((transaction_callable)); > > -extern ringo(long int); > > +extern george() __attribute__((transaction_safe)); > > +extern ringo(long int) __attribute__((transaction_safe)); > > int i; > > The patch looks fine, but...
Looking closer at this, we were faking to have an uninstrumented code path so not explicitly requesting irrevocable mode was okay. However, we still had calls to the TM library in those code, which is not really what we want (mostly for performance reasons, it is supposed to still work because the runtime has to change to a suitable dispatch internally after going irrevocable). I'll prepare a different patch, after looking at Richard's recent changes. > Was the original test wrong, or are you testing something new? Yes, sort of. It was testing for optimizations that were correct performed but which should not have been applicable in this particular test case _and_ with the current state of the code. However, after the fix for when to request irrevocable mode that I have in mind, this test should work as is. Torvald