From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1075) id 1DCA8388A403; Fri, 25 Sep 2020 22:06:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1DCA8388A403 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Jan Hubicka To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-3469] Disable ipa-modref with live patching X-Act-Checkin: gcc X-Git-Author: Jan Hubicka X-Git-Refname: refs/heads/master X-Git-Oldrev: 67a5c215940f4b21bac1aa489ce1f2fb3d52a53a X-Git-Newrev: f46f899b4fa41ec889540c4a663feaa814b73d24 Message-Id: <20200925220625.1DCA8388A403@sourceware.org> Date: Fri, 25 Sep 2020 22:06:25 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2020 22:06:25 -0000 https://gcc.gnu.org/g:f46f899b4fa41ec889540c4a663feaa814b73d24 commit r11-3469-gf46f899b4fa41ec889540c4a663feaa814b73d24 Author: Jan Hubicka Date: Sat Sep 26 00:05:53 2020 +0200 Disable ipa-modref with live patching 2020-09-26 Jan Hubicka * doc/invoke.texi: Add -fno-ipa-modref to flags disabled by -flive-patching. * opts.c (control_options_for_live_patching): Disable ipa-modref. Diff: --- gcc/doc/invoke.texi | 2 +- gcc/opts.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 2091e0cd23b..226b0e1dc91 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -10879,7 +10879,7 @@ callers are impacted, therefore need to be patched as well. @gccoptlist{-fwhole-program -fipa-pta -fipa-reference -fipa-ra @gol -fipa-icf -fipa-icf-functions -fipa-icf-variables @gol -fipa-bit-cp -fipa-vrp -fipa-pure-const -fipa-reference-addressable @gol --fipa-stack-alignment} +-fipa-stack-alignment -fipa-modref} @item inline-only-static diff --git a/gcc/opts.c b/gcc/opts.c index 3c4a0b540b4..3bda59afced 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -792,6 +792,13 @@ control_options_for_live_patching (struct gcc_options *opts, else opts->x_flag_ipa_pure_const = 0; + if (opts_set->x_flag_ipa_modref && opts->x_flag_ipa_modref) + error_at (loc, + "%<-fipa-modref%> is incompatible with " + "%<-flive-patching=inline-only-static|inline-clone%>"); + else + opts->x_flag_ipa_modref = 0; + /* FIXME: disable unreachable code removal. */ /* discovery of functions/variables with no address taken. */