> On 11/5/18 10:51 AM, Jan Hubicka wrote: > >> @honza: PING > >> > >> On 10/3/18 12:53 PM, Martin Liška wrote: > >>> On 10/3/18 11:04 AM, Jan Hubicka wrote: > >>>>> > >>>>> That was promised to be done by Honza Hubička. He's very skilled in IPA optimizations and he's aware > >>>>> of optimizations that cause troubles for live-patching. > >>>> > >>>> :) I am not sure how skilful I am, but here is what I arrived to. > >>> > >>> Heh! Thanks for the analysis. > >>> > >>>> > >>>> We have transformations that are modeled as clonning, which are > >>>> - inlining (can't be disabled completely because of always inline, but -fno-inline > >>>> does most of stuff) > >>>> - cloning (disabled via -fno-ipa-cp) > >>>> - ipa-sra (-fno-ipa-sra) > >>>> - splitting (-fno-partial-inlining) > >>>> These should play well with Martin's tracking code > >>> > >>> I hope so! > >>> > >>>> > >>>> We propagate info about side effects of function: > >>>> - function attribute discovery (pure, const, nothrow, malloc) > >>>> Some of this can be disabled by -fno-ipa-pure-const, but not all > >>>> of it. > >>> > >>> Would it be possible to add option for the remaining ones? > > > > Sure, I can prepare patch unless you beat me :) > > Are you sure there's a call to 'analyze_function' where the analysis is done > when one sets -fno-ipa-pure-const? In set_nothrow_function_flags. Probably would be good to grep for places where node->set_XXXX_flag is used. > 2018-11-07 Martin Liska <mliska@xxxxxxx> > > * common.opt: Add -fipa-stack-alignment flag. > * doc/invoke.texi: Document it. > * final.c (rest_of_clean_state): Guard stack > shrinking with flag. > > gcc/testsuite/ChangeLog: > > 2018-11-07 Martin Liska <mliska@xxxxxxx> > > * gcc.target/i386/ipa-stack-alignment.c: New test. > From 8691490a142228021ed65313a72d176d06966829 Mon Sep 17 00:00:00 2001 > From: marxin <mliska@xxxxxxx> > Date: Wed, 7 Nov 2018 13:31:41 +0100 > Subject: [PATCH 1/2] Come up with -fipa-reference-addressable flag. > > gcc/ChangeLog: > > 2018-11-07 Martin Liska <mliska@xxxxxxx> > > * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename > to ... > (ipa_discover_nonaddressable_vars): ... this. > * common.opt: Come up with new flag -fipa-reference-addressable. > * doc/invoke.texi: Document it. > * ipa-reference.c (propagate): Call the renamed fn. > * ipa-visibility.c (whole_program_function_and_variable_visibility): > Likewise. > * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to > ... > (ipa_discover_nonaddressable_vars): ... this. Discove > non-addressable variables only with the newly added flag. > * opts.c: Enable the newly added flag with -O1 and higher > optimization level. Hmm, the write-only and readonly flags are not handled in here? Honza