[patch] More precise message with -Winline

Eric Botcazou ebotcazou@adacore.com
Wed Jul 24 09:57:00 GMT 2019


Hi,

for EH cleanups, the branch probability heuristics can consider that edges are 
never taken, i.e. their profile count is set to zero.  In this case, no matter 
how you tweak the inlining parameters, you cannot get function calls inlined, 
but -Winline nevertheless prints the standard message about unlikely calls as 
in the cases when tweaking the inlining parameters can work.

Therefore the attached patch adds a new CIF code with the warning message:

"call is never executed and code size would grow [-Winline]"

for this case, thus signaling the user that he'd better not waste time trying 
to get the call inlined.

Tested on x86_64-suse-linux, OK for the mainline?


2019-07-24  Eric Botcazou  <ebotcazou@adacore.com>

	* cif-code.def (NEVER_CALL): New code.
	* ipa-inline.c (want_inline_small_function_p): Fix formatting issues.
	Set the failure to CIF_NEVER_CALL if the IPA count is zero.

-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 2815 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190724/6d048d13/attachment.bin>


More information about the Gcc-patches mailing list