public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/110334] [13/14 Regresssion] unused functions not eliminated before LTO streaming
Date: Mon, 10 Jul 2023 08:24:00 +0000	[thread overview]
Message-ID: <bug-110334-4-POFRfDSg8I@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-110334-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110334

--- Comment #20 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #19)
> It seems that the C++ FE change in comment#13 causes libreoffice to fail to
> build with
> 
> [  553s]
> /home/abuild/rpmbuild/BUILD/libreoffice-7.5.4.2/workdir/UnpackedTarball/skia/
> include/private/SkVx.h: In function 'interpret_skvm':
> [  553s]
> /home/abuild/rpmbuild/BUILD/libreoffice-7.5.4.2/workdir/UnpackedTarball/skia/
> include/private/SkVx.h:150: error: inlining failed in call to
> 'always_inline' '__ct_comp ': target specific option mismatch
> [  553s]   150 |     using VecStorage<N,T>::VecStorage;
> [  553s]       | 
> 
> I have yet to reproduce and extract a testcase though.

libreoffice has a skia import and links its Library/libskialo.so library
with LTO, combining the AVX, HSW, SSE41, SSE42, SSSE3, CRC32, SKX, ...
SkOpts_*.o objects which likely follow a very similar scheme as the firefox
copy.  SkOpts_hsw.cpp looks like

#include "src/core/SkOpts.h"

#define SK_OPTS_NS hsw
#include "src/core/SkCubicSolver.h"
#include "src/opts/SkBitmapProcState_opts.h"
#include "src/opts/SkBlitRow_opts.h"
#include "src/opts/SkRasterPipeline_opts.h"
#include "src/opts/SkSwizzler_opts.h"
#include "src/opts/SkUtils_opts.h"
#include "src/opts/SkVM_opts.h"

namespace SkOpts {
    void Init_hsw() {
        blit_row_color32     = hsw::blit_row_color32;
        blit_row_s32a_opaque = hsw::blit_row_s32a_opaque;

        S32_alpha_D32_filter_DX  = hsw::S32_alpha_D32_filter_DX;

        cubic_solver = SK_OPTS_NS::cubic_solver;

        RGBA_to_BGRA          = SK_OPTS_NS::RGBA_to_BGRA;
        RGBA_to_rgbA          = SK_OPTS_NS::RGBA_to_rgbA;
        RGBA_to_bgrA          = SK_OPTS_NS::RGBA_to_bgrA;
        gray_to_RGB1          = SK_OPTS_NS::gray_to_RGB1;
        grayA_to_RGBA         = SK_OPTS_NS::grayA_to_RGBA;
        grayA_to_rgbA         = SK_OPTS_NS::grayA_to_rgbA;
        inverted_CMYK_to_RGB1 = SK_OPTS_NS::inverted_CMYK_to_RGB1;
        inverted_CMYK_to_BGR1 = SK_OPTS_NS::inverted_CMYK_to_BGR1;

    #define M(st) stages_highp[SkRasterPipeline::st] = (StageFn)SK_OPTS_NS::st;
        SK_RASTER_PIPELINE_STAGES(M)
        just_return_highp = (StageFn)SK_OPTS_NS::just_return;
        start_pipeline_highp = SK_OPTS_NS::start_pipeline;
    #undef M

    #define M(st) stages_lowp[SkRasterPipeline::st] =
(StageFn)SK_OPTS_NS::lowp::st;
        SK_RASTER_PIPELINE_STAGES(M)
        just_return_lowp = (StageFn)SK_OPTS_NS::lowp::just_return;
        start_pipeline_lowp = SK_OPTS_NS::lowp::start_pipeline;
    #undef M

        interpret_skvm = SK_OPTS_NS::interpret_skvm;
    }
}  // namespace SkOpts

the question in the end is why we fail to process the always_inlines
early here and only discover them late.  Unfortunately the inline
diagnostic doesn't print the original TU name (that would be useful
for all late LTO diagnostics).

I'm not sure whether this is an issue with the C++ frontend change or with
the ODR issues present in Skia.  Eventually since we're dealing with
aliases(?), always_inline isn't appropriately detected or still missing
on some callees.

Unfortunately there isn't a knob to diagnose late inlined always-inline
functions.

  parent reply	other threads:[~2023-07-10  8:24 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-21  7:05 [Bug ipa/110334] New: " rguenth at gcc dot gnu.org
2023-06-21  7:06 ` [Bug ipa/110334] " rguenth at gcc dot gnu.org
2023-06-21  7:08 ` rguenth at gcc dot gnu.org
2023-06-21  7:12 ` rguenth at gcc dot gnu.org
2023-06-22 11:15 ` rguenth at gcc dot gnu.org
2023-06-22 11:45 ` rguenth at gcc dot gnu.org
2023-06-22 12:02 ` rguenth at gcc dot gnu.org
2023-06-23 10:47 ` hubicka at gcc dot gnu.org
2023-06-23 11:21 ` rguenth at gcc dot gnu.org
2023-06-23 12:59 ` hubicka at ucw dot cz
2023-06-23 13:07   ` Jan Hubicka
2023-06-23 13:07 ` hubicka at ucw dot cz
2023-06-26  6:39 ` rguenther at suse dot de
2023-06-26 17:50 ` hubicka at ucw dot cz
2023-06-27  6:41 ` rguenther at suse dot de
2023-06-28 10:00   ` Jan Hubicka
2023-06-28  4:42 ` cvs-commit at gcc dot gnu.org
2023-06-28 10:00 ` hubicka at ucw dot cz
2023-06-28 10:20 ` rguenther at suse dot de
2023-06-28 10:45 ` hubicka at ucw dot cz
2023-06-28 21:06 ` cvs-commit at gcc dot gnu.org
2023-07-03  7:05 ` jakub at gcc dot gnu.org
2023-07-10  7:40 ` rguenth at gcc dot gnu.org
2023-07-10  8:24 ` rguenth at gcc dot gnu.org [this message]
2023-07-10  8:24 ` rguenth at gcc dot gnu.org
2023-07-11 14:45 ` hubicka at ucw dot cz
2023-07-11 14:46 ` hubicka at ucw dot cz
2023-07-12  7:05 ` rguenther at suse dot de
2023-07-27  9:26 ` rguenth at gcc dot gnu.org
2023-11-25 10:00 ` egallager at gcc dot gnu.org
2023-11-27  7:28 ` rguenth at gcc dot gnu.org
2024-05-21  9:16 ` 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-110334-4-POFRfDSg8I@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: link
Be 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).