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]

do not pass PR_INSTRUMENTEDCODE if there is no instrumentation


It has come to my attention, by..ahem...you, that in handling the testcase from my previous patch:

__transaction_relaxed { __asm__(""); }

...if we avoid instrumentation altogether, we shouldn't lie to the run-time and pass PR_INSTRUMENTEDCODE.

I suppose we could cheat and avoid passing PR_INSTRUMENTEDCODE if we ever enter expand_block_tm(), but perhaps we could do a little better as with the attached patch.

With this patch, we generate:

tm_state.2_6 = __builtin__ITM_beginTransaction (16458); [ uninstrumentedCode hasNoAbort doesGoIrrevocable readOnly ]

Notice there is no "instrumentedCode".

By the way, can you double check my logic in expand_assign_tm() and expand_call_tm(), particularly if we should bother setting GTMA_INSTRUMENTED_CODE for thread private variables?

Thanks.

Attachment: curr
Description: Text document


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