tycho added a comment.

OK, that makes sense. So this change would not enforce `-O2`/`-O3` for the 
bitcode emission, but would enforce one of the two for the LTO phase.

This may be a stupid question, but aren't there some optimization passes that 
can emit functions during the LTO phase that weren't in the initial bitcode 
compile? If so, wouldn't those miss out on getting the `-Os`/`-Oz` function 
attributes applied?

What would happen after D63976 <https://reviews.llvm.org/D63976> is applied 
with a funny command line like `clang -Oz -flto -o foo a.o b.c`, where one (or 
all) of the input arguments is a source file? Would it invoke the bitcode 
compile of the source files with the requested `-Oz` and then invoke the LTO 
linker plugin with `-O2`/`-O3`?


Repository:
  rC Clang

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

https://reviews.llvm.org/D63976



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to