This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [trans-mem] expand transactions inside cloned functions


On 05/06/2010 12:14 PM, Aldy Hernandez wrote:
> 	* trans-mem.c (execute_tm_edges): Look for transactions inside
> 	cloned functions.

This is insufficient, unfortunately.  I wondered why you were having to
special-case this for cloned functions until I realized we weren't really
handling nested transactions at all.  E.g.

extern int foo(int) __attribute__((transaction_safe));
void bar(void)
{
  __transaction {
    if (foo(1))
      __transaction {
        if (foo(2))
          __transaction {
            if (foo(3))
              __transaction {
                if (foo(4))
                  foo(5);
                else
                  __transaction_cancel;
              }
            else
              __transaction_cancel;
          }
        else
          __transaction_cancel;
      }
    else
      __transaction_cancel;
  }
}

crashes in exactly the same way.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]