[Bug c++/85747] suboptimal code without constexpr
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri May 11 13:26:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85747
--- Comment #5 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Antony Polukhin from comment #4)
> Does providing some kind of -Oon-the-fly switch solves the issue with JIT
> compile times while still allows more optimizations for the traditional non
> JIT -O2 builds?
Not sure what you mean by -Oon-the-fly. If you want to JIT compile the code,
you more or less need to embed a compiler in the executable...
The closest I can think of is -fprofile-values. It is possible to collect the
values of constants during a training run and use them during a second
compilation. But then knowing more constants in one compilation than the other
may change the code in ways that the PGO framework will not like.
More information about the Gcc-bugs
mailing list