[llvm-dev] getting nowhere with thinLTO (original) (raw)

Davis, Alan via llvm-dev llvm-dev at lists.llvm.org
Wed Nov 15 13:51:05 PST 2017


Tobias, thanks, and greetings.

change this to: int t3(void);

Yes, in fact without the 'void' the bitcast is there. When I take your suggestion to add 'void', the inlining happens. There does seem to be a difference in behavior between x86 and ARM, though. On X86 there is no bitcast.

How is the linker-script-friendly LTO coming along?

-Alan

From: Tobias Edler von Koch [mailto:tobias at codeaurora.org] Sent: Tuesday, November 14, 2017 11:26 AM To: Davis, Alan; Teresa Johnson Cc: llvm-dev at lists.llvm.org; Peter Collingbourne Subject: [EXTERNAL] Re: [llvm-dev] getting nowhere with thinLTO

Hi Alan, On 11/10/2017 11:12 AM, Davis, Alan via llvm-dev wrote:

For whatever reason in this simple example t3 is not being inlined, but I can set that aside for now.   // t2.c: int t3();

Does inlining happen if you change this to:

int t3(void);

Without the void, it's a non-prototype declaration (a pre-ANSI C holdover) and will get compiled to "declare void t3(...)". I'm guessing you'll see a bitcast at the call site which the inliner can't look through.

Tobias

-- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.



More information about the llvm-dev mailing list