public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "siarhei.siamashka at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/54965] [4.6 Regression] sorry, unimplemented: inlining failed in call to 'foo': function not considered for inlining Date: Thu, 18 Oct 2012 10:48:00 -0000 [thread overview] Message-ID: <bug-54965-4-P9cvgSSLK8@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-54965-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54965 --- Comment #3 from Siarhei Siamashka <siarhei.siamashka at gmail dot com> 2012-10-18 10:47:51 UTC --- (In reply to comment #2) > void combine_conjoint_xor_ca_float () > { > combine_channel_t j = pd_combine_conjoint_xor, k = pd_combine_conjoint_xor; > a[0] = k (0, b, 0, a[0]); > a[0] = k (0, b, 0, a[0]); > a[0] = k (0, b, 0, a[0]); > a[0] = j (0, c[0], 0, a[0]); > a[0] = k (0, c[0], 0, a[0]); > a[0] = k (0, c[0], 0, a[0]); > a[0] = k (0, c[0], 0, a[0]); > > you are using indirect function calls here, GCC in 4.6 is not smart enough > to transform them to direct calls before inlining. Inlining of > always-inline indirect function calls is not going to work reliably. Does this only apply to GCC 4.6? > Don't use always-inline or don't use indirect function calls to always-inline > functions. This looks like it might be really inconvenient. Pixman relies on this functionality in a number of places by doing something like this: void always_inline per_pixel_operation_a(...) { ... } void always_inline per_pixel_operation_b(...) { ... } void always_inline big_function_template(..., per_pixel_operation_ptr foo) { ... /* do some calls to foo() in an inner loop */ ... } void big_function_a(...) { big_function_template(..., per_pixel_operation_a); } void big_function_b(...) { big_function_template(..., per_pixel_operation_b); } Needless to say that we want to be absolutely sure that per-pixel operations are always inlined. Otherwise the performance gets really bad if the compiler ever makes a bad inlining decision. The same functionality can be probably achieved by replacing always_inline functions with macros. But the code becomes less readable, more error prone and somewhat more difficult to maintain.
next prev parent reply other threads:[~2012-10-18 10:48 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-10-18 1:50 [Bug tree-optimization/54965] New: [4.6] " siarhei.siamashka at gmail dot com 2012-10-18 1:56 ` [Bug tree-optimization/54965] " siarhei.siamashka at gmail dot com 2012-10-18 9:52 ` [Bug tree-optimization/54965] [4.6 Regression] " rguenth at gcc dot gnu.org 2012-10-18 10:48 ` siarhei.siamashka at gmail dot com [this message] 2012-10-18 10:59 ` rguenther at suse dot de 2012-10-19 0:17 ` siarhei.siamashka at gmail dot com 2012-10-19 8:36 ` rguenth at gcc dot gnu.org 2012-10-23 14:03 ` hubicka at ucw dot cz 2013-04-12 16:18 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-54965-4-P9cvgSSLK8@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).