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: do not pass PR_INSTRUMENTEDCODE if there is no instrumentation


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)
>                 continue;

should in fact set EDGE_TM_UNINSTRUMENTED, or we should set that bit
even earlier

>       /* If we're sure to go irrevocable, don't transform anything.  */
>       if (d->irrevocable_blocks_normal
>           && bitmap_bit_p (d->irrevocable_blocks_normal,
>                            region->entry_block->index))
>         {
>           transaction_subcode_ior (region, GTMA_DOES_GO_IRREVOCABLE);
>           transaction_subcode_ior (region, GTMA_MAY_ENTER_IRREVOCABLE);
>           continue;
>         }

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.


r~




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