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]

[trans-mem] PR 46567


After looking at this, I decided to try a 3rd option.

the routine 'get_tm_region_blocks' find all the exit and irrevocable blocks. In the process of calculating those, it has to visit every block in a transaction. It then throws out this visited bitmap.

I added a parameter which will set all the visited blocks in a bitmap as well.

ipa_tm_execute simply visits each TM region and sets this bitmap. We end up with a bitmap which has a bit set for every BB in a transaction.

Now rather than checking the in_transaction bit or using a callgraph edge field, we simply need to check the bitmap for the BB the call is in.

At least on the surface this seems to work as the testcases all pass and the bug doesn't trigger the exception any more.

Have a look at the patch and tell me what I'm missing, there are lots of other things going on I don't understand :-) In particular, there is what appears to be a hack in 'ipa_tm_insert_gettmclone_call' which I simply removed... since it didn't appear needed any more...

If it seems reasonable I'll add the testcase into the testsuite and the patch as well.
I guess I could also remove gimple_call_in_transaction_p and references as well eh?


Andrew

Attachment: pr46567
Description: Text document


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