public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Pedro Falcato" <pedro.falcato@gmail.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>,
	yi1.li@intel.com,  Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Jiewen Yao <jiewen.yao@intel.com>,
	 Jordan Justen <jordan.l.justen@intel.com>
Subject: Re: [edk2-devel] [PATCH] OvmfPkg/PlatformCI: Skip GCC5_OVMF_IA32X64_FULL_NOOPT build
Date: Wed, 21 Jun 2023 15:13:36 +0100	[thread overview]
Message-ID: <CAKbZUD1vObfOib8-WEE7a0HeB9OGFzam=SMk4-PutM9RGLW9rA@mail.gmail.com> (raw)
In-Reply-To: <ov3id6xnn7q5wdze2dmlzvpubhh5m4g7ukv53bxqcndp6ovuyz@e2me5imxbo3d>

On Wed, Jun 21, 2023 at 8:55 AM Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> On Wed, Jun 21, 2023 at 01:40:06AM +0100, Pedro Falcato wrote:
> > On Tue, 20 Jun 2023, 12:11 Li, Yi, <yi1.li@intel.com> wrote:
> >
> > > The effect of LTO is limited with optimization turned off, and blocked
> > > the upgrade of Openssl3.0. We already skipped this build with VS2019,
> > > skip the GCC NOOPT build also.
> > >
> > Hi,
> >
> > If LTO is the problem here, have you given ffunction-sections +
> > fdata-sections + gc-sections a spin?
>
> lto alone works and reduces size a bit, also turning on optimizations
> has a much bigger effect though.  Which I suspect happens because gcc
> detects constant expressions then, calculates them at compile time
> instead of runtime, which in turn removes function calls in code paths
> never taken.

Right, LTO is of course a lot less limited when it comes to this and
may give out further size reductions. But if we can't enable LTO (as
in NOOPT), gc-sections /may/ help here; gc-sections will *not* affect
debugging whatsoever.
Of course, whether this works is pure speculation; I personally
haven't tested this.

-- 
Pedro

  reply	other threads:[~2023-06-21 14:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20 11:11 [PATCH] OvmfPkg/PlatformCI: Skip GCC5_OVMF_IA32X64_FULL_NOOPT build Li, Yi
2023-06-20 14:35 ` [edk2-devel] " Gerd Hoffmann
2023-06-21  4:16   ` Yao, Jiewen
2023-06-21  0:40 ` Pedro Falcato
2023-06-21  4:03   ` Li, Yi
2023-06-21  7:55   ` Gerd Hoffmann
2023-06-21 14:13     ` Pedro Falcato [this message]
2023-06-27 10:14       ` Ard Biesheuvel

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-list 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='CAKbZUD1vObfOib8-WEE7a0HeB9OGFzam=SMk4-PutM9RGLW9rA@mail.gmail.com' \
    --to=devel@edk2.groups.io \
    /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