<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Document optimization flags"
   href="http://llvm.org/bugs/show_bug.cgi?id=20543">20543</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Document optimization flags
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Documentation
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>gonzalobg88@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I have tried to find documentation about the optimization flags available
in the current version of clang (ToT) without much success (both in the
webpage, the manual, and google).  Google always points me to:
<a href="http://clang.llvm.org/docs/UsersManual.html">http://clang.llvm.org/docs/UsersManual.html</a> but I see no information there
regarding optimization levels/flags.

I'm particularly interested in:

- which optimization flags are there and a description of what they do
(e.g. -ffast-math),

- which optimization levels are there (e.g. O2) and which flags does each
level enable,

- which potentially-useful but unstable/not supported llvm optimization options
are there (e.g. -mllvm -inline-threshold=value has a large impact on
performance [0]) and a link to the llvm docs that describe them.

I asked this in the mailing list [1] but no answers so far. Anyhow, even if
this is already documented somewhere it should be easier to find than it is
now.

[0] <a href="http://www.reddit.com/r/cpp/comments/24663s/range_comprehensions/ch46dye">http://www.reddit.com/r/cpp/comments/24663s/range_comprehensions/ch46dye</a>
[1] <a href="http://lists.cs.uiuc.edu/pipermail/cfe-users/2014-July/000541.html">http://lists.cs.uiuc.edu/pipermail/cfe-users/2014-July/000541.html</a></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>