public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/marxin/heads/enable-live-patching-with-lto-v2)] IPA: support -flto + -flive-patching
Date: Wed,  5 Oct 2022 18:56:53 +0000 (GMT)	[thread overview]
Message-ID: <20221005185653.5DAF53858004@sourceware.org> (raw)

https://gcc.gnu.org/g:ac3d75711843bda7eb60b44bb174498eac2f35f6

commit ac3d75711843bda7eb60b44bb174498eac2f35f6
Author: Martin Liska <mliska@suse.cz>
Date:   Wed Oct 5 11:15:36 2022 +0200

    IPA: support -flto + -flive-patching
    
    There's no fundamental reason why -flive-patching can't
    coexist with -flto. Yes, one can theoretically have many more clone
    functions that includes a live patch. However, tt is pretty much the same
    as in-module inlining.
    
    gcc/ChangeLog:
    
            * opts.cc (finish_options): Allow -flto + -flive-patching.
    
    gcc/testsuite/ChangeLog:
    
            * gcc.dg/live-patching-2.c: Remote expected sorry message.

Diff:
---
 gcc/opts.cc                            | 4 ----
 gcc/testsuite/gcc.dg/live-patching-2.c | 2 --
 2 files changed, 6 deletions(-)

diff --git a/gcc/opts.cc b/gcc/opts.cc
index eb5db01de17..bedc93e3ab2 100644
--- a/gcc/opts.cc
+++ b/gcc/opts.cc
@@ -1287,10 +1287,6 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
     sorry ("transactional memory is not supported with "
 	   "%<-fsanitize=kernel-address%>");
 
-  /* Currently live patching is not support for LTO.  */
-  if (opts->x_flag_live_patching && opts->x_flag_lto)
-    sorry ("live patching is not supported with LTO");
-
   /* Currently vtable verification is not supported for LTO */
   if (opts->x_flag_vtable_verify && opts->x_flag_lto)
     sorry ("vtable verification is not supported with LTO");
diff --git a/gcc/testsuite/gcc.dg/live-patching-2.c b/gcc/testsuite/gcc.dg/live-patching-2.c
index 0dde4e9e0c0..098047a36cd 100644
--- a/gcc/testsuite/gcc.dg/live-patching-2.c
+++ b/gcc/testsuite/gcc.dg/live-patching-2.c
@@ -6,5 +6,3 @@ int main()
 {
   return 0;
 }
-
-/* { dg-message "sorry, unimplemented: live patching is not supported with LTO" "-flive-patching and -flto together" { target *-*-* } 0 } */

                 reply	other threads:[~2022-10-05 18:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20221005185653.5DAF53858004@sourceware.org \
    --to=marxin@gcc.gnu.org \
    --cc=gcc-cvs@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).