From bab9b7cb64b1f54019f7eeedd160b0fb3eee1724 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Fri, 1 Aug 2014 09:58:47 +0200 Subject: invoke.texi (Options That Control Optimization): Documentation for -foptimize-strlen introduced. * doc/invoke.texi (Options That Control Optimization): Documentation for -foptimize-strlen introduced. Optimization levels default options fixed. From-SVN: r213407 --- gcc/ChangeLog | 6 ++++++ gcc/doc/invoke.texi | 29 +++++++++++++++++++++++++---- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 414b53b..be9c572 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-08-01 Martin Liska + + * doc/invoke.texi (Options That Control Optimization): Documentation + for -foptimize-strlen introduced. Optimization levels default options + fixed. + 2014-08-01 Jakub Jelinek * opts.c (common_handle_option): Handle -fsanitize=alignment. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 7378a2e..1eefb69 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -6959,25 +6959,31 @@ compilation time. @option{-O} turns on the following optimization flags: @gccoptlist{ -fauto-inc-dec @gol +-fbranch-count-reg @gol +-fcombine-stack-adjustments @gol -fcompare-elim @gol -fcprop-registers @gol -fdce @gol -fdefer-pop @gol -fdelayed-branch @gol -fdse @gol +-fforward-propagate @gol -fguess-branch-probability @gol -fif-conversion2 @gol -fif-conversion @gol +-finline-functions-called-once @gol -fipa-pure-const @gol -fipa-profile @gol -fipa-reference @gol --fmerge-constants +-fmerge-constants @gol +-fmove-loop-invariants @gol +-fshrink-wrap @gol -fsplit-wide-types @gol -ftree-bit-ccp @gol --ftree-builtin-call-dce @gol -ftree-ccp @gol -fssa-phiopt @gol -ftree-ch @gol +-ftree-copy-prop @gol -ftree-copyrename @gol -ftree-dce @gol -ftree-dominator-opts @gol @@ -6985,6 +6991,7 @@ compilation time. -ftree-forwprop @gol -ftree-fre @gol -ftree-phiprop @gol +-ftree-sink @gol -ftree-slsr @gol -ftree-sra @gol -ftree-pta @gol @@ -7016,19 +7023,23 @@ also turns on the following optimization flags: -fhoist-adjacent-loads @gol -finline-small-functions @gol -findirect-inlining @gol +-fipa-cp @gol -fipa-sra @gol -fisolate-erroneous-paths-dereference @gol -foptimize-sibling-calls @gol +-foptimize-strlen @gol -fpartial-inlining @gol -fpeephole2 @gol --freorder-blocks -freorder-functions @gol +-freorder-blocks -freorder-blocks-and-partition -freorder-functions @gol -frerun-cse-after-loop @gol -fsched-interblock -fsched-spec @gol -fschedule-insns -fschedule-insns2 @gol -fstrict-aliasing -fstrict-overflow @gol +-ftree-builtin-call-dce @gol -ftree-switch-conversion -ftree-tail-merge @gol -ftree-pre @gol --ftree-vrp} +-ftree-vrp @gol +-fuse-caller-save} Please note the warning under @option{-fgcse} about invoking @option{-O2} on programs that use computed gotos. @@ -7152,6 +7163,14 @@ Optimize sibling and tail recursive calls. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. +@item -foptimize-strlen +@opindex foptimize-strlen +Optimize various standard C string functions (e.g. @code{strlen}, +@code{strchr} or @code{strcpy}) and +their _FORTIFY_SOURCE counterparts into faster alternatives. + +Enabled at levels @option{-O2}, @option{-O3}. + @item -fno-inline @opindex fno-inline Do not expand any functions inline apart from those marked with @@ -7317,6 +7336,8 @@ register, compare it against zero, then branch based upon the result. This option is only meaningful on architectures that support such instructions, which include x86, PowerPC, IA-64 and S/390. +Enabled by default at -O1 and higher. + The default is @option{-fbranch-count-reg}. @item -fno-function-cse -- cgit v1.1