This is the mail archive of the
mailing list for the GCC project.
Re: do not pass PR_INSTRUMENTEDCODE if there is no instrumentation
- From: Richard Henderson <rth at redhat dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 22 Feb 2013 09:27:30 -0800
- Subject: Re: do not pass PR_INSTRUMENTEDCODE if there is no instrumentation
- References: <51269C36.email@example.com>
On 02/21/2013 02:14 PM, Aldy Hernandez wrote:
> 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.
I assume you meant "never enter" there.
Yes, you don't need to "accumulate" GTMA_INSTRUMENTED_CODE.
Probably what should happen is that either
> /* If we're sure to go irrevocable, there won't be
> anything to expand, since the run-time will go
> irrevocable right away. */
> if (sub & GTMA_DOES_GO_IRREVOCABLE
> && sub & GTMA_MAY_ENTER_IRREVOCABLE)
should in fact set EDGE_TM_UNINSTRUMENTED, or we should set that bit
> /* If we're sure to go irrevocable, don't transform anything. */
> if (d->irrevocable_blocks_normal
> && bitmap_bit_p (d->irrevocable_blocks_normal,
> transaction_subcode_ior (region, GTMA_DOES_GO_IRREVOCABLE);
> transaction_subcode_ior (region, GTMA_MAY_ENTER_IRREVOCABLE);
And while we're at it, ipa_tm_scan_calls_transaction should probably add
a check to skip doing ipa_uninstrument_transaction on transactions that
have already been so marked.