[PATCH] D88114: [clang]Test ensuring -fembed-bitcode passed to cc1 captures pre-opt bitcode.
Steven Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 22 14:15:24 PDT 2020
steven_wu added a comment.
In D88114#2288737 <https://reviews.llvm.org/D88114#2288737>, @mtrofin wrote:
> In D88114#2288732 <https://reviews.llvm.org/D88114#2288732>, @steven_wu wrote:
>
>> I am not sure what exactly is expected here. What is your definition for pre-optimized bitcode and how your test case ensures that? Can you explain a bit more for context?
>
> Pre-optimized meaning before the llvm optimization pipeline is called. That's the current implementation, and the test explicitly checks that the inlining of bar into foo doesn't happen.
>
> I could add an "alwaysinline" to bar, to further stress that.
I think the current implementation does run optimization passes if the input is c family language and we need to keep it that way (just so that we don't do most of the optimization again). The reason you don't see it running because you are using IR as input. For Apple's implementation, we actually pass `-disable-llvm-passes` when the input is IR to ensure no optimization passes are running.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88114/new/
https://reviews.llvm.org/D88114
More information about the cfe-commits
mailing list