[PATCH] D31100: [LTO] Allow client to skip code gen

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 17 23:13:59 PDT 2017


mehdi_amini added a comment.

In https://reviews.llvm.org/D31100#704580, @mehdi_amini wrote:

> In https://reviews.llvm.org/D31100#704477, @tejohnson wrote:
>
> > > So I rather get clang to initialize the TargetOptions in the LTO config. I think it should be easy to extract `EmitAssemblyHelper::CreateTargetOptions` out of `EmitAssemblyHelper::CreateTargetMachine` and reuse it for this purpose.
> >
> > That is doable, but I don't see the advantage of duplicating the logic in EmitAssemblyHelper (e.g. CreateTargetMachine), just so we can invoke the codegen through LTO, since we have to be able to do this outside LTO in EmitAssemblyHelper in the non-LTO case in clang. We have to set up TargetOptions in either case, see below.
>
>
> Not clear which duplicating logic you're referring to right now? I'm talking about *reusing* the logic (OK I may miss something because I haven't looked deep enough).


I figured it'll be easier to figure what I had in mind by implementing it: https://reviews.llvm.org/D31114


https://reviews.llvm.org/D31100





More information about the llvm-commits mailing list