Patchwork [buildrobot] r202527: ssa / ssanames restructure broke alpha-linux

login
register
mail settings
Submitter Uros Bizjak
Date Sept. 16, 2013, 11:01 a.m.
Message ID <CAFULd4ZEWA=b2jKdPsksYL0JzcCFtEXam5_g53m=Ws+zdDv6oQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/275184/
State New
Headers show

Comments

Uros Bizjak - Sept. 16, 2013, 11:01 a.m.
On Mon, Sep 16, 2013 at 11:06 AM, Uros Bizjak <ubizjak@gmail.com> wrote:

>> My Build Robot[1] found this recent commit to break Alpha:
>>
>> * tree-flow.h (FREE_SSANAMES): Move to tree-ssanames.c
>> (SSANAMES, MODIFIED_NORETURN_CALLS, DEFAULT_DEFS, ptr_info_def,
>> num_ssa_names, ssa_name): Move to tree-ssanames.h + prototypes.
>> * tree-flow-inline.h (make_ssa_name, copy_ssa_name, duplicate_ssa_name,
>> make_temp_ssa_name): move to tree-ssanames.h
>> * tree-ssa-alias.h: Move prototype.
>> * tree-ssa.h: Include tree-ssanames.h.
>> * tree-ssanames.c (FREE_SSANAMES): Move to here.
>> * tree-ssanames.h: New.  Move items from tree-flow*.h
>> * Makefile.in (tree-ssanames.h): Add to tree-ssanames.o and GTFILES.
>>
>> See for example this build log:
>> http://toolchain.lug-owl.de/buildbot/showlog.php?id=11663&mode=view
>>
>> I suggest this patch, which fixes an alpha-linux build for me:
>>
>> 2013-09-13  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
>>
>> * config/alpha.c: Include tree-ssa.h.
>
> Thanks, I have tested the patch and commit it to the mainline to
> restore bootstrap.

Richi noted that:

I think you can remove the tree-flow.h include and you need to update the
dependencies in gcc/Makefile.in.

However, we still need tree-flow.h, but instead of tree-ssa.h, we can
include tree-ssanames.h:

I will commit attached  incremental patch, once bootstrap finish.

Uros.
Jan-Benedict Glaw - Sept. 16, 2013, 11:36 a.m.
On Mon, 2013-09-16 13:01:40 +0200, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Mon, Sep 16, 2013 at 11:06 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> > > My Build Robot[1] found this recent commit to break Alpha:
> 
> I think you can remove the tree-flow.h include and you need to update the
> dependencies in gcc/Makefile.in.
> 
> However, we still need tree-flow.h, but instead of tree-ssa.h, we can
> include tree-ssanames.h:
> 
> I will commit attached  incremental patch, once bootstrap finish.

Please don't forget the dep's in gcc/Makefile.in as mentioned above.

MfG, JBG
Richard Guenther - Sept. 16, 2013, 11:40 a.m.
On Mon, 16 Sep 2013, Uros Bizjak wrote:

> On Mon, Sep 16, 2013 at 11:06 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> 
> >> My Build Robot[1] found this recent commit to break Alpha:
> >>
> >> * tree-flow.h (FREE_SSANAMES): Move to tree-ssanames.c
> >> (SSANAMES, MODIFIED_NORETURN_CALLS, DEFAULT_DEFS, ptr_info_def,
> >> num_ssa_names, ssa_name): Move to tree-ssanames.h + prototypes.
> >> * tree-flow-inline.h (make_ssa_name, copy_ssa_name, duplicate_ssa_name,
> >> make_temp_ssa_name): move to tree-ssanames.h
> >> * tree-ssa-alias.h: Move prototype.
> >> * tree-ssa.h: Include tree-ssanames.h.
> >> * tree-ssanames.c (FREE_SSANAMES): Move to here.
> >> * tree-ssanames.h: New.  Move items from tree-flow*.h
> >> * Makefile.in (tree-ssanames.h): Add to tree-ssanames.o and GTFILES.
> >>
> >> See for example this build log:
> >> http://toolchain.lug-owl.de/buildbot/showlog.php?id=11663&mode=view
> >>
> >> I suggest this patch, which fixes an alpha-linux build for me:
> >>
> >> 2013-09-13  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
> >>
> >> * config/alpha.c: Include tree-ssa.h.
> >
> > Thanks, I have tested the patch and commit it to the mainline to
> > restore bootstrap.
> 
> Richi noted that:
> 
> I think you can remove the tree-flow.h include and you need to update the
> dependencies in gcc/Makefile.in.
> 
> However, we still need tree-flow.h, but instead of tree-ssa.h, we can
> include tree-ssanames.h:

My point was that tree-ssa.h now includes tree-flow.h.  But yes,
making it even more specific works for me as well.

Richard.

> I will commit attached  incremental patch, once bootstrap finish.
> 
> Uros.
> 
> Index: alpha.c
> ===================================================================
> --- alpha.c     (revision 202621)
> +++ alpha.c     (working copy)
> @@ -50,7 +50,7 @@
>  #include "splay-tree.h"
>  #include "gimple.h"
>  #include "tree-flow.h"
> -#include "tree-ssa.h"
> +#include "tree-ssanames.h"
>  #include "tree-stdarg.h"
>  #include "tm-constrs.h"
>  #include "df.h"
> 
>
Uros Bizjak - Sept. 16, 2013, 11:43 a.m.
On Mon, Sep 16, 2013 at 1:36 PM, Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
> On Mon, 2013-09-16 13:01:40 +0200, Uros Bizjak <ubizjak@gmail.com> wrote:
>> On Mon, Sep 16, 2013 at 11:06 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
>> > > My Build Robot[1] found this recent commit to break Alpha:
>>
>> I think you can remove the tree-flow.h include and you need to update the
>> dependencies in gcc/Makefile.in.
>>
>> However, we still need tree-flow.h, but instead of tree-ssa.h, we can
>> include tree-ssanames.h:
>>
>> I will commit attached  incremental patch, once bootstrap finish.
>
> Please don't forget the dep's in gcc/Makefile.in as mentioned above.

Where? I don't see config/alpha.c listed anywhere.

Uros.
Richard Guenther - Sept. 16, 2013, 11:57 a.m.
On Mon, 16 Sep 2013, Uros Bizjak wrote:

> On Mon, Sep 16, 2013 at 1:36 PM, Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
> > On Mon, 2013-09-16 13:01:40 +0200, Uros Bizjak <ubizjak@gmail.com> wrote:
> >> On Mon, Sep 16, 2013 at 11:06 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> >> > > My Build Robot[1] found this recent commit to break Alpha:
> >>
> >> I think you can remove the tree-flow.h include and you need to update the
> >> dependencies in gcc/Makefile.in.
> >>
> >> However, we still need tree-flow.h, but instead of tree-ssa.h, we can
> >> include tree-ssanames.h:
> >>
> >> I will commit attached  incremental patch, once bootstrap finish.
> >
> > Please don't forget the dep's in gcc/Makefile.in as mentioned above.
> 
> Where? I don't see config/alpha.c listed anywhere.

Must be in one of the fragments in config/ or config/alpha.  For
i386 it's config/i386/t-i386

Richard.
Uros Bizjak - Sept. 16, 2013, 1:11 p.m.
On Mon, Sep 16, 2013 at 1:57 PM, Richard Biener <rguenther@suse.de> wrote:

>> >> > > My Build Robot[1] found this recent commit to break Alpha:
>> >>
>> >> I think you can remove the tree-flow.h include and you need to update the
>> >> dependencies in gcc/Makefile.in.
>> >>
>> >> However, we still need tree-flow.h, but instead of tree-ssa.h, we can
>> >> include tree-ssanames.h:
>> >>
>> >> I will commit attached  incremental patch, once bootstrap finish.
>> >
>> > Please don't forget the dep's in gcc/Makefile.in as mentioned above.
>>
>> Where? I don't see config/alpha.c listed anywhere.
>
> Must be in one of the fragments in config/ or config/alpha.  For
> i386 it's config/i386/t-i386

Well, we have a problem here. The dependencies from t-* files are
ignored and the default from generic Makefile.in is used:

From gcc/Makefile.in:

...
out_file=$(srcdir)/config/@out_file@
out_object_file=@out_object_file@
...
$(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) \
   $(RTL_H) $(REGS_H) hard-reg-set.h insn-config.h conditions.h \
   output.h $(INSN_ATTR_H) $(SYSTEM_H) toplev.h $(DIAGNOSTIC_CORE_H) \
   $(TARGET_H) $(LIBFUNCS_H) $(TARGET_DEF_H) $(FUNCTION_H) $(SCHED_INT_H) \
   $(TM_P_H) $(EXPR_H) langhooks.h $(GGC_H) $(OPTABS_H) $(REAL_H) \
   tm-constrs.h $(GIMPLE_H) $(DF_H) cselib.h $(COMMON_TARGET_H) hw-doloop.h \
   regrename.h
    $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
        $(out_file) $(OUTPUT_OPTION)

These are "universal" dependecies used to compile config/${cpu-type}.o
for any target, no matter what their t- fragment says.

Uros.
Michael Matz - Sept. 16, 2013, 2:20 p.m.
Hi,

On Mon, 16 Sep 2013, Uros Bizjak wrote:

> >> Where? I don't see config/alpha.c listed anywhere.
> >
> > Must be in one of the fragments in config/ or config/alpha.  For
> > i386 it's config/i386/t-i386
> 
> Well, we have a problem here. The dependencies from t-* files are
> ignored

Why do you think so?  The t-* frags are includes via
...
tmake_file=...$(srcdir)/config/i386/t-i386
...
ifneq ($(tmake_file),)
include $(tmake_file)
endif
...

It's just that there's no t-alpha frag yet.

> These are "universal" dependecies used to compile config/${cpu-type}.o 
> for any target, no matter what their t- fragment says.

The universal deps are amended by the t- frags, as above.


Ciao,
Michael.
Uros Bizjak - Sept. 16, 2013, 2:32 p.m.
On Mon, Sep 16, 2013 at 4:20 PM, Michael Matz <matz@suse.de> wrote:

>> >> Where? I don't see config/alpha.c listed anywhere.
>> >
>> > Must be in one of the fragments in config/ or config/alpha.  For
>> > i386 it's config/i386/t-i386
>>
>> Well, we have a problem here. The dependencies from t-* files are
>> ignored
>
> Why do you think so?  The t-* frags are includes via
> ...
> tmake_file=...$(srcdir)/config/i386/t-i386
> ...
> ifneq ($(tmake_file),)
> include $(tmake_file)
> endif
> ...
>
> It's just that there's no t-alpha frag yet.

No, there is no problem with includes. The *dependencies* from t-*
files are missing.

Please compare i386.o dependencies from config/i386/t-i386 with
$(out_object_file) from the resulting Makefile in the build directory.
They are NOT the same, the dependencies in the Makefile from the build
directory for $(out_object_file) AKA i386.o are copied verbatim from
Makefile.in.

>> These are "universal" dependecies used to compile config/${cpu-type}.o
>> for any target, no matter what their t- fragment says.
>
> The universal deps are amended by the t- frags, as above.

No, they are copied directly from Makefile.in.

Uros.
Michael Matz - Sept. 16, 2013, 2:50 p.m.
Hi,

On Mon, 16 Sep 2013, Uros Bizjak wrote:

> > Why do you think so?  The t-* frags are includes via
> > ...
> > tmake_file=...$(srcdir)/config/i386/t-i386
> > ...
> > ifneq ($(tmake_file),)
> > include $(tmake_file)
> > endif
> > ...
> >
> > It's just that there's no t-alpha frag yet.
> 
> No, there is no problem with includes. The *dependencies* from t-*
> files are missing.

No, because the t- frags contain the dependencies and the t- frags are 
included by make verbatim, hence they're there when building target.o.

> Please compare i386.o dependencies from config/i386/t-i386 with
> $(out_object_file) from the resulting Makefile in the build directory.
> They are NOT the same,

Of course not.  But as $(out_object_file) is 'i386.o' they will be 
dependencies for the same target.

> the dependencies in the Makefile from the build
> directory for $(out_object_file) AKA i386.o are copied verbatim from
> Makefile.in.

Sure.  And the Makefile _includes_ the t- frags, which means for i386, 
that there are two dependency sets, once from Makefile.in copied into 
Makefile, for $(out_object_file), and once explicitely for i386.o from the 
t-i386 frag included by Makefile.

> >> These are "universal" dependecies used to compile config/${cpu-type}.o
> >> for any target, no matter what their t- fragment says.
> >
> > The universal deps are amended by the t- frags, as above.
> 
> No, they are copied directly from Makefile.in.

Sure they are amended.  I'm unsure what thing you're missing, but you do 
miss something.  Maybe that the 'include' directives in the Makefile are 
not autoconf directives by real make directives?  IOW, the generated 
Makefile is not all that's interpreted by make; it's amended with all the 
included frags when reading the Makefile.  If you don't believe me: make 
an experiment, on a i386 devel tree:

% cd gcc; make i386.o
% vi ..../config/i386/t-i386
... add something like "nonexisting" to the deps of i386.o ...
# make i386.o
make: *** No rule to make target `nonexisting', needed by `i386.o'.  Stop.

So, clearly, the deps from t-i386 _are_ used.


Ciao,
Michael.
Uros Bizjak - Sept. 16, 2013, 3:45 p.m.
On Mon, Sep 16, 2013 at 4:50 PM, Michael Matz <matz@suse.de> wrote:

>> > Why do you think so?  The t-* frags are includes via
>> > ...
>> > tmake_file=...$(srcdir)/config/i386/t-i386
>> > ...
>> > ifneq ($(tmake_file),)
>> > include $(tmake_file)
>> > endif
>> > ...
>> >
>> > It's just that there's no t-alpha frag yet.
>>
>> No, there is no problem with includes. The *dependencies* from t-*
>> files are missing.
>
> No, because the t- frags contain the dependencies and the t- frags are
> included by make verbatim, hence they're there when building target.o.
>
>> Please compare i386.o dependencies from config/i386/t-i386 with
>> $(out_object_file) from the resulting Makefile in the build directory.
>> They are NOT the same,
>
> Of course not.  But as $(out_object_file) is 'i386.o' they will be
> dependencies for the same target.
>
>> the dependencies in the Makefile from the build
>> directory for $(out_object_file) AKA i386.o are copied verbatim from
>> Makefile.in.
>
> Sure.  And the Makefile _includes_ the t- frags, which means for i386,
> that there are two dependency sets, once from Makefile.in copied into
> Makefile, for $(out_object_file), and once explicitely for i386.o from the
> t-i386 frag included by Makefile.

Thanks for your explanation, I was not aware that we actually have two
dependency sets for the same file. It was not obvious when looking
into generated Makefile, and I was not even sure that this is allowed.

I will prepare the corresponding t-alpha file that will set correct dependecies.

Thanks,
Uros.

Patch

Index: alpha.c
===================================================================
--- alpha.c     (revision 202621)
+++ alpha.c     (working copy)
@@ -50,7 +50,7 @@ 
 #include "splay-tree.h"
 #include "gimple.h"
 #include "tree-flow.h"
-#include "tree-ssa.h"
+#include "tree-ssanames.h"
 #include "tree-stdarg.h"
 #include "tm-constrs.h"
 #include "df.h"