[llvm-dev] what is official way to determine if we are running lto 2nd stage?

Mehdi Amini via llvm-dev llvm-dev at lists.llvm.org
Mon Sep 12 08:17:49 PDT 2016


> On Sep 12, 2016, at 1:26 AM, Konstantin Vladimirov via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> Hi,
> I want to enable some target-specific functionality only if current
> build is 2nd LTO stage (i.e. optimizer called from plugin). What is
> best and recommended way to do it?

There is none. We can setup a different optimizer pass pipeline for LTO, but the target specific part (i.e. the backend) isn’t supposed to behave differently.

This is an issue in general with LTO where options from the command line (like -fno-builtins, or -fveclib=xxxx) are not correctly propagated to LTO.

What kind of behavior do you want to enable exactly?


More information about the llvm-dev mailing list