[cfe-dev] RFC: Codifying (but not formalizing) the optimization levels in LLVM and Clang

Christopher Jefferson chris at bubblescope.net
Mon Jan 14 14:07:08 PST 2013


On 14 Jan 2013 09:10, "Chandler Carruth" <chandlerc at gmail.com> wrote:
>
> This has been an idea floating around in my head for a while and after
several discussions with others it continues to hold up so I thought I
would mail it out. Sorry for cross posting to both lists, but this is an
issue that would significantly impact both LLVM and Clang.
>

>
> 3) Optimize quickly or '-O1'
> - Attribute: quickopt (this would be a new attribute)
> - Goal: Perform basic optimizations to improve both performance and
simplicity of the code, but perform them *quickly*.
> This level is all about compile time, but in a holistic sense. It tries
to perform basic optimizations to get reasonably efficient code, and get it
very quickly.
>

GCC tries to make -O1 be compatible with debugging. I find having debugging
functional with some level of optimisation very useful, particularly in
template heavy C++ code. I don't know if there is an optimisation level
with similar behaviour in clang.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130114/094b3b05/attachment.html>


More information about the cfe-dev mailing list