[PATCH] D74298: Honor -finline-functions and -finline-hint-functions at -O0

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 9 11:29:10 PST 2020


MaskRay added a comment.

Why you say regression, do you have a case where fcd33149b48885ab8e4ca4ffb6977bce5be2e623 actually regressed things?

-O0 implies optnone. For `-Xclang -disable-O0-optnone -O0 -finline-functions`, the patch can indeed make a difference. `-disable-O0-optnone` is currently a debug aid AFAICT.

`GCC -O0 -finline-functions` does not seem to have a difference.



================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:702
+    const Option &InlineOpt = InlineArg->getOption();
+    if (InlineOpt.matches(options::OPT_fno_inline)) {
+      Opts.setInlining(CodeGenOptions::OnlyAlwaysInlining);
----------------
The old order looks good. The new ordering does not seen to be needed? The assert is also unnecessary.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74298/new/

https://reviews.llvm.org/D74298





More information about the cfe-commits mailing list