Hello. I accidentally learned that -fipa-ra option is disabled if:
/* Do not use IPA optimizations for register allocation if profiler is active or port does not emit prologue and epilogue as RTL. */ if (profile_flag || !targetm.have_prologue () || !targetm.have_epilogue ()) flag_ipa_ra = 0; So I basically copied the comment to invoke.texi. Apart from that, I've noticed that '-fprofile' (which is alias of '-p') is not documented. Shouldn't it be documented as an alias? Thanks, Martin
>From e43eb357b986234e0454e6f6898ef5ae46a7a596 Mon Sep 17 00:00:00 2001 From: marxin <mli...@suse.cz> Date: Wed, 13 Jul 2016 18:25:09 +0200 Subject: [PATCH] Enhance documentation of -fipa-ra option. gcc/ChangeLog: 2016-07-13 Martin Liska <mli...@suse.cz> * doc/invoke.texi (-fipa-ra): Document when the option is disabled. Fix a typo. --- gcc/doc/invoke.texi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 9a4db38..647caae 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -7260,7 +7260,9 @@ any called function. In that case it is not necessary to save and restore them around calls. This is only possible if called functions are part of same compilation unit as current function and they are compiled before it. -Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. +Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}, however the option +is disabled if profiler is active (@option{-p}, @option{-pg} or +@option{-fprofile}) or a port does not emit prologue and epilogue as RTL. @item -fconserve-stack @opindex fconserve-stack @@ -7280,7 +7282,7 @@ Perform code hoisting. Code hoisting tries to move the evaluation of expressions executed on all paths to the function exit as early as possible. This is especially useful as a code size optimization, but it often helps for code speed as well. -This flag is enabled by defailt at @option{-O2} and higher. +This flag is enabled by default at @option{-O2} and higher. @item -ftree-pre @opindex ftree-pre -- 2.8.4