This is the mail archive of the
mailing list for the GCC project.
Re: lto bootstrap fails.
- From: Richard Biener <rguenther at suse dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Toon Moene <toon at moene dot org>, Roman Gareev <gareevroman at gmail dot com>, Tobias Grosser <tobias at grosser dot es>, Jan Hubicka <hubicka at ucw dot cz>, Trevor Saunders <tbsaunde at tbsaunde dot org>, gcc at gcc dot gnu dot org
- Date: Tue, 14 Apr 2015 09:17:25 +0200 (CEST)
- 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> <20150413160715 dot GB1725 at tucnak dot redhat dot com>
On Mon, 13 Apr 2015, Jakub Jelinek wrote:
> 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:
> > https://gcc.gnu.org/ml/gcc-testresults/2015-04/msg01450.html
> > 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...
I am testing the following.
2015-04-14 Richard Biener <email@example.com>
* graphite-scop-detection.c: Do not include cp/cp-tree.h.
(graphite_can_represent_scev): Use POINTER_TYPE_P.
--- gcc/graphite-scop-detection.c (revision 222076)
+++ gcc/graphite-scop-detection.c (working copy)
@@ -70,7 +70,6 @@ along with GCC; see the file COPYING3.
@@ -239,7 +238,7 @@ graphite_can_represent_scev (tree scev)
the only nodes, which are disabled in case they are pointers to object
types, but this can be changed. */
- if (TYPE_PTROB_P (TREE_TYPE (scev)) && TREE_CODE (scev) == SSA_NAME)
+ if (POINTER_TYPE_P (TREE_TYPE (scev)) && TREE_CODE (scev) == SSA_NAME)
switch (TREE_CODE (scev))