This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
do not pass PR_INSTRUMENTEDCODE if there is no instrumentation
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 21 Feb 2013 16:14:14 -0600
- Subject: 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