tejohnson added inline comments.
================ Comment at: lib/CodeGen/BackendUtil.cpp:1007 else AsmHelper.EmitAssembly(Action, std::move(OS)); ---------------- tejohnson wrote: > I just noticed that EmitAssembly does a lot more than just emission - it is > also setting up an optimization pipeline in CreatePasses, which we don't want > to do in the ThinLTO backend case as we already do the opt in LTO. Which > makes me think that the simplest and most consistent solution, especially if > as in discussed in D31114 we'll be using the LTO API for emitting object and > assembly code, is to use LTO for all file emission in the ThinLTO backend > case. It would mean extending lto::Config to be able to flag when we want to > emit-llvm or emit-llvm-bc, and invoke the appropriate module writer/printer > instead of normal codegen. That way -emit-llvm* will always get output > corresponding to the native object/assembly in the ThinLTO backend case. WDYT? I have a new patch set that will do just this that I am uploading momentarily https://reviews.llvm.org/D31101 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits