Konstantin Vladimirov via llvm-dev
2016-Sep-12 08:26 UTC
[llvm-dev] what is official way to determine if we are running lto 2nd stage?
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? --- With best regards, Konstantin
Mehdi Amini via llvm-dev
2016-Sep-12 15:17 UTC
[llvm-dev] what is official way to determine if we are running lto 2nd stage?
Hi,> 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? — Mehdi
Konstantin Vladimirov via llvm-dev
2016-Sep-12 16:26 UTC
[llvm-dev] what is official way to determine if we are running lto 2nd stage?
Hi, In LTO we have AsmParser that process inline assembler instructions to MCInst and I want to fix some inline assembler in order to conform its rules (do not start with non-identifier and so on) because asm syntax of our backend allows some incompatible patterns. In order to do this I am adding IR-level target-specific pass. But those fixes shall not be applied when there is no AsmParser later to process them. So I want to switch this pass off if we are not in 2nd lto stage. I think, I can make target-specific option and make user to supply it whenever he wants to run 2nd lto stage, but this is ugly. Can I somehow ask, say, about whole string of options and then parse it to match "lto" from here? --- With best regards, Konstantin On Mon, Sep 12, 2016 at 6:17 PM, Mehdi Amini <mehdi.amini at apple.com> wrote:> Hi, > > >> 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? > > — > Mehdi >
Possibly Parallel Threads
- what is official way to determine if we are running lto 2nd stage?
- what is official way to determine if we are running lto 2nd stage?
- what is official way to determine if we are running lto 2nd stage?
- [llvm dev] do we have allocator hook to use maximum different registers?
- RFC: module flag for hosted mode