This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: Transform assertion into optimization hints


On Mon, 17 Sep 2018, François Dumont wrote:

We talk about it a while back.

I've run testsuite several times since I have this patch on my local copy. Note that when I implemented it the wrong way tests started to fail so it is clearly having an effect on the generated code.

* include/bits/c++config [__OPTIMIZE__](__glibcxx_assert): Define as optimization hint

using __builtin_unreachable.

Ok to commit ?

I see for instance in bits/regex_automaton.tcc:

              __glibcxx_assert(__m.count(__ref._M_next) > 0);

where __m is a map, which does not look so well suited for a __builtin_unreachable. Is it using the wrong macro?

--
Marc Glisse


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