[PATCH][MIPS] Add -minline-intermix to ignore compression flags when inlining

Sandra Loosemore sandra@codesourcery.com
Wed May 25 07:47:00 GMT 2016


On 05/24/2016 08:23 AM, Robert Suchanek wrote:
>
>
> [snip]
>
> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
> index 73f1cb6..2f6195e 100644
> --- a/gcc/doc/invoke.texi
> +++ b/gcc/doc/invoke.texi
> @@ -837,6 +837,7 @@ Objective-C and Objective-C++ Dialects}.
>   -mips16  -mno-mips16  -mflip-mips16 @gol
>   -minterlink-compressed -mno-interlink-compressed @gol
>   -minterlink-mips16  -mno-interlink-mips16 @gol
> +-minline-intermix -mno-inline-intermix @gol

Funky indentation here....

>   -mabi=@var{abi}  -mabicalls  -mno-abicalls @gol
>   -mshared  -mno-shared  -mplt  -mno-plt  -mxgot  -mno-xgot @gol
>   -mgp32  -mgp64  -mfp32  -mfpxx  -mfp64  -mhard-float  -msoft-float @gol
> @@ -17916,6 +17917,18 @@ Aliases of @option{-minterlink-compressed} and
>   @option{-mno-interlink-compressed}.  These options predate the microMIPS ASE
>   and are retained for backwards compatibility.
>
> +@item -minline-intermix
> +@itemx -mno-inline-intermix
> +@opindex minline-intermix
> +@opindex mno-inline-intermix
> +Enable inlining of functions which have opposing compression flags e.g.
> +@code{mips16}/@code{nomips16} attributes.
> +This is useful when using the @code{mips16} attribute to balance code size
> +and performance so that a function will be compressed when not inlined or
> +vice-versa.  When using this option it is necessary to protect functions
> +that cannot be compiled as MIPS16 with a @code{noinline} attribute to ensure
> +they are not inlined into a MIPS16 function.

This flag applies to microMIPS inlining, too, right?  It's confusing to 
only mention MIPS16.

Maybe you could say something like this instead:

Allow inlining even if the compression flags differ between caller and 
callee.  This is useful in conjunction with the @code{mips16}, 
@code{micromips}, or @code{nocompression} function attributes.  The code 
for the inlined function is compiled using the compression flags for the 
callee, so you may need to use the @code{noinline} attribute on 
functions that must be compiled with particular compression settings.

-Sandra



More information about the Gcc-patches mailing list