[LTO API] add lto_codegen_set_module to help ld64 debug LTO issues

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Feb 19 18:06:08 PST 2015


How would this be used? Would ld64 get an option for it? How would

ld64 -no_optimize_single_ir combined.bc ...
be different from
llc combined.bc -o foo.o -filetype=obj
ld64 foo.o ....

Cheers,
Rafael


On 19 February 2015 at 20:22, Manman Ren <mren at apple.com> wrote:
> Hi Rafael and others,
>
> When debugging LTO issues with ld64, I sometimes use -save-temps to save the merged optimized bitcode file, then invoke ld64 again on the single bitcode file.
>
> I found out that llvm linking a single bitcode file via lto_codegen_add_module will generate a different bitcode file from the single input.
> This makes debugging hard. With the newly-added lto_codegen_set_module, we can make sure the destination module is the same as the input.
>
> The patch is attached. Let me know your thoughts,
>
> Thanks,
> Manman
>
>
>
>
>



More information about the llvm-commits mailing list