This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PR 45934 4/5] Introduce a flag to control devirtualization
- From: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>
- To: Martin Jambor <mjambor at suse dot cz>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>, Richard Guenther <rguenther at suse dot de>
- Date: Wed, 15 Dec 2010 19:13:39 +0100
- Subject: Re: [PATCH, PR 45934 4/5] Introduce a flag to control devirtualization
- References: <20101215164902.438513649@virgil.suse.cz> <20101215164917.406217162@virgil.suse.cz>
* Martin Jambor wrote on Wed, Dec 15, 2010 at 05:49:06PM CET:
> * common.opt (fdevirtualize): New flag.
> * doc/invoke.texi (Option Summary): Document it.
> * opts.c (default_options_table): Add devirtualize flag.
> * ipa-prop.c (detect_type_change): Return immediately if
> devirtualize flag is not set.
> (detect_type_change_ssa): Likewise.
> (compute_known_type_jump_func): Likewise.
> (ipa_analyze_virtual_call_uses): Likewise.
> --- icln.orig/gcc/doc/invoke.texi
> +++ icln/gcc/doc/invoke.texi
> @@ -6420,6 +6421,14 @@ Otherwise it is enabled at all levels: @
> @option{-O2}, @option{-O3}, @option{-Os}. Passes that use the information
> are enabled independently at different optimization levels.
>
> +@item -fdevirtualize
> +@opindex fdevirtualize
> +Attempt to convert calls to virtual functions to direct calls. This
> +is done both within a procedure and inteprocedurally as part of
interprocedurally
> +indirect inlining (@code{-findirect-inlining}) and inteprocedural copy
interprocedural
> +propagation (@option{-fipa-cp}).
> +Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
Cheers,
Ralf