From fca9dc00583665bb89e63df672ba2f2184bb9ee6 Mon Sep 17 00:00:00 2001 From: Zdenek Dvorak Date: Sun, 19 Oct 2003 23:37:32 +0200 Subject: Makefile.in (toplev.o): Add value-prof.h dependency. * Makefile.in (toplev.o): Add value-prof.h dependency. (value-prof.o): Add REGS_H dependency. * common.opt (fprofile-values, fvpt): New. * flags.h (flag_value_profile_transformations): Declare. * opts.c (common_handle_option): Handle -fprofile_values and -fvpt. * profile.c (branch_prob): Don't remove death notes here. * timevar.def (TV_VPT): New. * value-prof.c: Include regs.h. (insn_divmod_values_to_profile, gen_divmod_fixed_value, gen_mod_pow2, gen_mod_subtract, divmod_fixed_value_transform,mod_pow2_value_transform, mod_subtract_transform, value_profile_transformations): New. (insn_values_to_profile): Call insn_divmod_values_to_profile. (find_values_to_profile): Add dumps. * value-prof.h (value_profile_transformations): Declare. * toplev.c: Include value-prof.h. (rest_of_handle_value_profile_transformations): New. (enum dump_file_index): Add DFI_vpt. (dump_file): Add vpt dump. (flag_value_profile_transformations): New. (lang_independent_options): Add flag_profile_values and flag_value_profile_transformations. (rest_of_compilation): Call rest_of_handle_value_profile_transformations. (process_options): Let -fvpt imply -fprofile-values. * doc/invoke.texi (-fvpt): Document. From-SVN: r72685 --- gcc/doc/invoke.texi | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'gcc/doc/invoke.texi') diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index a154b7c..c99af2c 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -264,7 +264,7 @@ in the following sections. @xref{Optimize Options,,Options that Control Optimization}. @gccoptlist{-falign-functions=@var{n} -falign-jumps=@var{n} @gol -falign-labels=@var{n} -falign-loops=@var{n} @gol --fbranch-probabilities -fprofile-values -fbranch-target-load-optimize @gol +-fbranch-probabilities -fprofile-values -fvpt -fbranch-target-load-optimize @gol -fbranch-target-load-optimize2 -fcaller-saves -fcprop-registers @gol -fcse-follow-jumps -fcse-skip-blocks -fdata-sections @gol -fdelayed-branch -fdelete-null-pointer-checks @gol @@ -4564,6 +4564,16 @@ With @option{-fbranch-probabilities}, it reads back the data gathered from profiling values of expressions and adds @samp{REG_VALUE_PROFILE} notes to instructions for their later usage in optimizations. +@item -fvpt +@opindex fvpt +If combined with @option{-fprofile-arcs}, it instructs the compiler to add +a code to gather information about values of expressions. + +With @option{-fbranch-probabilities}, it reads back the data gathered +and actually performs the optimizations based on them. +Currently the optimizations include specialization of division operation +using the knowledge about the value of the denominator. + @item -fnew-ra @opindex fnew-ra Use a graph coloring register allocator. Currently this option is meant -- cgit v1.1