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: TYPE_VECTOR_OPAQUE broken


On Tue, Jul 28, 2009 at 04:06:06PM -0400, DJ Delorie wrote:
> 
> This patch:
> 
> r146153 | bonzini | 2009-04-16 05:11:39 -0400 (Thu, 16 Apr 2009) | 25 lines
> 
> 2009-04-16  Paolo Bonzini  <bonzini@gnu.org>
> 
> 	* c-common.c (vector_targets_convertible_p, vector_types_convertible_p):
> 	Use TYPE_VECTOR_OPAQUE instead of targetm.vector_opaque_p.
> 	* c-typeck.c (really_start_incremental_init): Likewise.
> 	* target-def.h (TARGET_VECTOR_OPAQUE_P): Remove.
> 	(TARGET_INITIALIZER): Remove it.
> 	* target.h (struct target): Remove vector_opaque_p.
> 	* tree.c (build_opaque_vector_type): New.
> 	* tree.h (TYPE_VECTOR_OPAQUE): New.
> 	(build_opaque_vector_type): Declare.
> 	* doc/tm.texi (TARGET_VECTOR_OPAQUE_P): Remove.
> 	* config/rs6000/rs6000.c (build_opaque_vector_type,
> 	rs6000_is_vector_type, TARGET_VECTOR_OPAQUE_P): Remove.
> 	(rs6000_init_builtins): Use build_opaque_vector_type for
> 	opaque_V4SI_type_node.
> 
> 
> Forces all opaque vectors to be deprecated:
> 
> +/* Nonzero in an IDENTIFIER_NODE if the name is a local alias, whose
> +   uses are to be substituted for uses of the TREE_CHAINed identifier.  */
> +#define TYPE_VECTOR_OPAQUE(NODE) \
> +  (VECTOR_TYPE_CHECK (NODE)->base.deprecated_flag)
> +
> 
> Why?  This is causing problems with the mep-elf port, which uses
> opaque vectors extensively.

Umm, the deprecated bitfield only means deprecated for decls.  In types, the
bitfield is used for opaque types.  Quoting from tree.h:

   deprecated_flag:

       TREE_DEPRECATED in
           all decls

       IDENTIFIER_TRANSPARENT_ALIAS in
           IDENTIFIER_NODE

       STMT_IN_SSA_EDGE_WORKLIST in
           all expressions (tree-ssa-propagate.c)

	TYPE_VECTOR_OPAQUE in
	   VECTOR_TYPE

The powerpc and cell targets also use opaque vectors.

-- 
Michael Meissner, IBM
4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA
meissner@linux.vnet.ibm.com


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