From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by sourceware.org (Postfix) with ESMTPS id C2C71385840B; Thu, 13 Jan 2022 11:56:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C2C71385840B Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id EFFF8280CEB; Thu, 13 Jan 2022 12:56:16 +0100 (CET) Date: Thu, 13 Jan 2022 12:56:16 +0100 From: Jan Hubicka To: "rguenth at gcc dot gnu.org" Cc: gcc-bugs@gcc.gnu.org Subject: Re: [Bug tree-optimization/103989] [12 regression] std::optional and bogus -Wmaybe-unitialized at -Og since r12-1992-g6feb628a706e86eb Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2022 11:56:20 -0000 > --- Comment #6 from Richard Biener --- > Honza, -Og was supposed to not do so much work, I intended to disable IPA > inlining but there's no knob for that. I wonder where to best put such > guard? I set flag_inline_small_functions to zero for -Og but we still > run inline_small_functions (). Basically -Og was supposed to only do > early opts and then what is necessary for correct RTL expansion. Doing > IPA inlining defeats this :/ > > Can you help? Is it safe to simply gate the inline_small_functions () > call? Do we want an extra -f[no-]ipa-inline like we have -fearly-inlining? > > Using -fdisable-ipa-inline gets rid of the diagnostic You can not disable an IPA pass becasuse then we will mishandle optimize attributes. I think you simply want to set flag_inline_small_functions = 0 flag_inline_functions_called_once = 0 and we should only inline always_inlines. inline_small_functions will still loop and check inlinability of functions but if everything is compiled with -Og it will not find anything inlinable and exit. Perhaps we may also extend initialize_inline_failed to add CIF_DEBUG_OPTIMIZE so -Winline does say something more useufl then "function not considered" Honza