This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][LTO] Fix PR41638, wrong streaming of MD builtins


On Fri, Oct 9, 2009 at 09:49, Richard Guenther <rguenther@suse.de> wrote:

> ! Â else if (fclass == BUILT_IN_MD)
> ! Â Â {
> ! Â Â Â result = targetm.builtin_decl (fcode, true);
> ! Â Â Â if (!result || result == (tree) (void *)-1)

s/-1/error_mark_node/

> --- 1165,1174 ----
> Â Â Â}
>
> Â Âif (CODE_CONTAINS_STRUCT (code, TS_OPTIMIZATION))
> ! Â Â sorry ("LTO does not handle the optimization attribute");
>
> Â Âif (CODE_CONTAINS_STRUCT (code, TS_TARGET_OPTION))
> ! Â Â sorry ("LTO does not handle the target attribute");
> Â}

Better say 'gimple bytecode streams' instead of LTO.  The two
things are orthogonal.  In the future we may use gimple bytecode
streams for other things, not necesssarily related to LTO.

> + Â if (DECL_BUILT_IN_CLASS (expr) == BUILT_IN_MD
> + Â Â Â && !targetm.builtin_decl)
> + Â Â sorry ("LTO of builtin functions not supported on this target");

Likewise here.  We don't support builtin functions in the gimple
bytecode.

> + /* Return the ix86 builtin for CODE. Â*/
> +
> + static tree
> + ix86_builtin_decl (unsigned code, bool initialize_p ATTRIBUTE_UNUSED)
> + {
> + Â if (code >= IX86_BUILTIN_MAX)
> + Â Â return (tree) (void *)-1;

s/-1/error_mark_node/

> + @deftypefn {Target Hook} tree TARGET_BUILTIN_FUNCTION (unsigned @var{code}, bool @var{initialize_p})
> + Define this hook if you have any machine-specific built-in functions
> + that need to be defined. ÂIt should be a function that returns the
> + builtin function declaration for the builtin function code @var{code}.
> + If there is no such builtin and it cannot be initialized at this time
> + if @var{initialize_p} is true the function should return @code{NULL_TREE}.
> + If @var{code} is out of range the function should return @code{-1}.

Likewise.

The middle end parts look OK otherwise.


Diego.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]