This is the mail archive of the
mailing list for the GCC project.
Re: lto bootstrap fails.
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Toon Moene <toon at moene dot org>, Roman Gareev <gareevroman at gmail dot com>, Tobias Grosser <tobias at grosser dot es>, Richard Biener <rguenther at suse dot de>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, Trevor Saunders <tbsaunde at tbsaunde dot org>, gcc at gcc dot gnu dot org
- Date: Mon, 13 Apr 2015 18:07:15 +0200
- Subject: Re: lto bootstrap fails.
- Authentication-results: sourceware.org; auth=none
- References: <5527D737 dot 5060409 at moene dot org> <20150410151219 dot GA4555 at tsaunders-iceball dot corp dot tor1 dot mozilla dot com> <20150410152727 dot GW19273 at tucnak dot redhat dot com> <20150410233320 dot GA19873 at atrey dot karlin dot mff dot cuni dot cz> <552BE4DB dot 9000508 at moene dot org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Apr 13, 2015 at 05:46:35PM +0200, Toon Moene wrote:
> [ Patch elided ]
> The patch applied cleanly - this is what I got as a result:
> I hope this is useful.
Looks like the http://gcc.gnu.org/ml/gcc-patches/2014-08/msg01014.html
patch is bad, including a header of one particular FE in the middle-end
is just wrong.
#define TYPE_PTR_P(NODE) \
(TREE_CODE (NODE) == POINTER_TYPE)
#define TYPE_OBJ_P(NODE) \
(TREE_CODE (NODE) != REFERENCE_TYPE \
&& !VOID_TYPE_P (NODE) \
&& TREE_CODE (NODE) != FUNCTION_TYPE \
&& TREE_CODE (NODE) != METHOD_TYPE)
#define TYPE_PTROB_P(NODE) \
(TYPE_PTR_P (NODE) && TYPE_OBJ_P (TREE_TYPE (NODE)))
is nothing that one couldn't just open-code in the middle-end,
if (TREE_CODE (scev) == SSA_NAME
&& TREE_CODE (TREE_TYPE (scev)) == POINTER_TYPE
&& TREE_CODE (TREE_TYPE (TREE_TYPE ((scev)))) != REFERENCE_TYPE
&& !VOID_TYPE_P (TREE_TYPE (TREE_TYPE ((scev))))
&& TREE_CODE (TREE_TYPE (TREE_TYPE ((scev)))) != FUNCTION_TYPE
&& TREE_CODE (TREE_TYPE (TREE_TYPE ((scev)))) != METHOD_TYPE)
but it is unclear why you want this check. For the middle-end, most pointer
conversions are useless, so the distinction between pointers to objects and
pointers to something different, might be long time lost.
Don't you want just
if (TREE_CODE (scev) == SSA_NAME && POINTER_TYPE_P (TREE_TYPE (scev)))
instead (i.e. just give up on all pointers/references)? That is what the
middle-end usually tests...