[PATCH] D42183: [LLD] [ELF] Pass CPU string to LTO pipeline.

Pratik Bhatu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 22:09:50 PST 2018


pbhatu added a comment.

In https://reviews.llvm.org/D42183#978862, @davide wrote:

> You should add a testcase as Rafael pointed out. Overall it looks fine.
>  We used `mllvm` in lld to pass this kind of options to the backend but this seems justifiable.
>  BTW, if you're using lld or the gold plugin you might consider implementing the linker counterpart as well (if you have your proprietary linker, just ignore this last bit).


Thanks for the prompt review Davide and Rafael!

I don't think the mllvm option works as intended. The specified CPU(through mllvm) is definitely being used in the middle end for optimizations during LTO. However, it is not picked up when we initialize the target machine for the backend. This patch tries to fix that.

Also, I'm a bit confused by your last statement. What do you mean by implementing the linker counterpart as well? I think I'm missing the larger picture.


https://reviews.llvm.org/D42183





More information about the llvm-commits mailing list