Bug 92749 - [10 Regression] warning: inlining failed in call to ‘salsa20’: --param max-inline-insns-single limit reached after r276516
Summary: [10 Regression] warning: inlining failed in call to ‘salsa20’: --param max-in...
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: ipa (show other bugs)
Version: 10.0
: P3 normal
Target Milestone: 10.0
Assignee: Not yet assigned to anyone
URL:
Keywords: missed-optimization
Depends on:
Blocks:
 
Reported: 2019-12-02 14:23 UTC by Martin Liška
Modified: 2020-01-30 18:06 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work: 9.2.0
Known to fail: 10.0
Last reconfirmed: 2019-12-02 00:00:00


Attachments
test-case (20.55 KB, text/plain)
2019-12-02 14:23 UTC, Martin Liška
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Liška 2019-12-02 14:23:46 UTC
Created attachment 47403 [details]
test-case

The test-case is reduced from libxcrypt package, starting from the revision I see:

$ gcc -m32 -O2 -Winline -c xcrypt.i -Werror
alg-yescrypt-opt.c: In function ‘blockmix_salsa8’:
alg-yescrypt-opt.c:280:20: error: inlining failed in call to ‘salsa20’: --param max-inline-insns-single limit reached [-Werror=inline]
alg-yescrypt-opt.c:383:364: note: called from here
alg-yescrypt-opt.c:280:20: error: inlining failed in call to ‘salsa20’: --param max-inline-insns-single limit reached [-Werror=inline]
alg-yescrypt-opt.c:382:332: note: called from here
alg-yescrypt-opt.c: In function ‘blockmix_salsa8_xor’:
alg-yescrypt-opt.c:280:20: error: inlining failed in call to ‘salsa20’: --param max-inline-insns-single limit reached [-Werror=inline]
alg-yescrypt-opt.c:408:372: note: called from here
alg-yescrypt-opt.c:280:20: error: inlining failed in call to ‘salsa20’: --param max-inline-insns-single limit reached [-Werror=inline]
alg-yescrypt-opt.c:406:340: note: called from here
alg-yescrypt-opt.c: In function ‘blockmix’:
alg-yescrypt-opt.c:280:20: error: inlining failed in call to ‘salsa20’: --param max-inline-insns-single limit reached [-Werror=inline]
alg-yescrypt-opt.c:674:2: note: called from here
alg-yescrypt-opt.c: In function ‘blockmix_xor_save’:
alg-yescrypt-opt.c:280:20: error: inlining failed in call to ‘salsa20’: --param max-inline-insns-single limit reached [-Werror=inline]
alg-yescrypt-opt.c:784:2: note: called from here
alg-yescrypt-opt.c: In function ‘blockmix_xor.constprop’:
alg-yescrypt-opt.c:280:20: error: inlining failed in call to ‘salsa20’: --param max-inline-insns-single limit reached [-Werror=inline]
alg-yescrypt-opt.c:733:2: note: called from here

@Honza: Can you please check that it's not a regression after the revision?
I need to tweak --param max-inline-insns-single to 110 to make it happy.
Comment 1 Richard Biener 2019-12-03 10:00:14 UTC
-Winline + -Werror is somewhat "stupid" of course.
Comment 2 Jan Hubicka 2020-01-14 14:39:02 UTC
This is intentional, we got less aggressive at inlining inline functions for -O2 (since we do not need to do all inlining we want for -O3 when we have independent set of attributes).

Indeed -Winline -Werror is not the best idea - if you want that there is always_inline attribute.
Comment 3 Jeffrey A. Law 2020-01-30 18:06:40 UTC
Per c#2