This is the mail archive of the
mailing list for the libstdc++ project.
Re: [PATCH] Use __builtin_is_constant_evaluated some more (PR libstdc++/86590)
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Mon, 21 Jan 2019 11:15:34 +0000
- Subject: Re: [PATCH] Use __builtin_is_constant_evaluated some more (PR libstdc++/86590)
- References: <20190119225646.GC30353@tucnak>
On 19/01/19 23:56 +0100, Jakub Jelinek wrote:
The following patch uses __builtin_is_constant_evaluated for
__constant_string_p and __constant_char_array_p - in constexpr contexts,
all the strings or arrays should be constant, and by doing it this way the
compiler should be able to optimize better the callers of these inline
functions already shortly after early inlining rather than having to wait
until fold builtins pass much later.
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?