[PATCH] D20576: [Driver] Add support for -finline-functions and /Ob2 flags

Rudy Pons via cfe-commits cfe-commits at lists.llvm.org
Tue May 24 10:19:08 PDT 2016


Ilod created this revision.
Ilod added a reviewer: hans.
Ilod added a subscriber: cfe-commits.

-finline-functions and /Ob2 are currently ignored by Clang. The only way to enable inlining is to use the global O flags, which also enable other options, or to emit LLVM bitcode using Clang, then running opt by hand with the inline pass.
This patch allows to simply use the -finline-functions flag (same as GCC) or /Ob2 in clang-cl mode to enable inlining without other optimizations.
This is the first patch of a serie to improve support for the /Ob flags.

http://reviews.llvm.org/D20576

Files:
  include/clang/Driver/CLCompatOptions.td
  include/clang/Driver/Options.td
  lib/Driver/Tools.cpp
  lib/Frontend/CompilerInvocation.cpp
  test/CodeGen/inline-optim.c
  test/Driver/cl-options.c
  test/Driver/clang_f_opts.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20576.58261.patch
Type: text/x-patch
Size: 6609 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160524/2a1e2f88/attachment-0001.bin>


More information about the cfe-commits mailing list