[PATCH] D87477: [ThinLTO] Make -lto-embed-bitcode an enum
Mircea Trofin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 11 10:56:48 PDT 2020
mtrofin added a comment.
In D87477#2268461 <https://reviews.llvm.org/D87477#2268461>, @tejohnson wrote:
> The change itself looks good to me, but I don't understand this comment from the summary:
>
>> (*) That's the compiler semantics. The driver splits compilation in 2 phases, so if -fembed-bitcode is given to the driver, the .llvmbc is optimized bitcode; if the option is passed to the compiler (after -cc1), the section is pre-optimized.
>
> Are you saying that "clang -fembed-bitcode foo.c -O2 -c" does something different than "clang -cc1 -fembed-bitcode foo.c -O2 -c". That seems strange and broken to me. I thought the intent of the option is to emit pre-optimized code.
That's indeed how it works. I was also under the same impression (by looking at the code). The semantic nuance can be derived from the RFC (specifically, http://lists.llvm.org/pipermail/llvm-dev/2016-February/094907.html), albeit, TBH, it took me a bit to put the 2 together (i.e. what the RFC said with what I saw in code).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87477/new/
https://reviews.llvm.org/D87477
More information about the llvm-commits
mailing list