https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68122

--- Comment #11 from torvald at gcc dot gnu.org ---
(In reply to Jakub Jelinek from comment #10)
> There are lots of internal functions in GCC 6 (older versions had fewer).
> Many of them are ECF_CONST, which is also treated like txn_pure, right?

I think it should be (ie, won't access global memory, so is a black box an only
output/input is values) -- but I don't know whether we do this everywhere.

> Other than that, e.g. the remaining UBSAN* handlers are pretty much just
> report some diagnostics and either terminate the program or return, but in a
> valid program they should never be called.  If we treat them as ECF_TM_PURE,
> that would worst case mean the diagnostics could be printed multiple times
> for the same spot in a transaction, if the transaction is restarted, right?

Yes.

> Most of them are not reporting the same diagnostics for the same source code
> location, so I suppose it would be no harm to treat them as tm pure.

Agreed.  Are we running the TM pass before the pass that replaces UBSAN* with
real code?

Reply via email to