public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] rtl-ssa: Include memmodel.h before tm_p.h
@ 2020-12-17 10:36 Rainer Orth
  2020-12-17 13:41 ` Kyrylo Tkachov
  0 siblings, 1 reply; 4+ messages in thread
From: Rainer Orth @ 2020-12-17 10:36 UTC (permalink / raw)
  To: gcc-patches; +Cc: Richard Sandiford

[-- Attachment #1: Type: text/plain, Size: 1010 bytes --]

The RTL SSA merge broke SPARC bootstrap:

In file included from ./tm_p.h:4,
                 from /vol/gcc/src/hg/master/local/gcc/rtl-ssa.h:54,
                 from /vol/gcc/src/hg/master/local/gcc/fwprop.c:29:
/vol/gcc/src/hg/master/local/gcc/config/sparc/sparc-protos.h:45:47: error: use of enum 'memmodel' without previous declaration
 extern void sparc_emit_membar_for_model (enum memmodel, int, int);
                                               ^~~~~~~~

and similarly in rtl-ssa/functions.cc, rtl-ssa/changes.cc, and
rtl-ssa/insns.cc.

Fixed by moving the memmove.h include in rtl-ssa.h before tm_p.h.

Tested on sparc-sun-solaris2.11 and i386-pc-solaris2.11 (both into stage
3 now, so the compilation error is gone).

Ok for master?

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2020-12-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc:
	* rtl-ssa.h: Include memmodel.h before tm_p.h.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: rtl-ssa-memmodel.patch --]
[-- Type: text/x-patch, Size: 284 bytes --]

diff --git a/gcc/rtl-ssa.h b/gcc/rtl-ssa.h
--- a/gcc/rtl-ssa.h
+++ b/gcc/rtl-ssa.h
@@ -51,8 +51,8 @@
 #include "rtlanal.h"
 
 // Provides the global crtl->ssa.
+#include "memmodel.h"
 #include "tm_p.h"
-#include "memmodel.h"
 #include "emit-rtl.h"
 
 // The rtl-ssa files themselves.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] rtl-ssa: Include memmodel.h before tm_p.h
  2020-12-17 10:36 [PATCH] rtl-ssa: Include memmodel.h before tm_p.h Rainer Orth
@ 2020-12-17 13:41 ` Kyrylo Tkachov
  2020-12-17 13:49   ` Rainer Orth
  0 siblings, 1 reply; 4+ messages in thread
From: Kyrylo Tkachov @ 2020-12-17 13:41 UTC (permalink / raw)
  To: Rainer Orth, gcc-patches; +Cc: Richard Sandiford

Hi Rainer,

> -----Original Message-----
> From: Gcc-patches <gcc-patches-bounces@gcc.gnu.org> On Behalf Of
> Rainer Orth
> Sent: 17 December 2020 10:36
> To: gcc-patches@gcc.gnu.org
> Cc: Richard Sandiford <Richard.Sandiford@arm.com>
> Subject: [PATCH] rtl-ssa: Include memmodel.h before tm_p.h
> 
> The RTL SSA merge broke SPARC bootstrap:
> 
> In file included from ./tm_p.h:4,
>                  from /vol/gcc/src/hg/master/local/gcc/rtl-ssa.h:54,
>                  from /vol/gcc/src/hg/master/local/gcc/fwprop.c:29:
> /vol/gcc/src/hg/master/local/gcc/config/sparc/sparc-protos.h:45:47: error:
> use of enum 'memmodel' without previous declaration
>  extern void sparc_emit_membar_for_model (enum memmodel, int, int);
>                                                ^~~~~~~~
> 
> and similarly in rtl-ssa/functions.cc, rtl-ssa/changes.cc, and
> rtl-ssa/insns.cc.
> 
> Fixed by moving the memmove.h include in rtl-ssa.h before tm_p.h.
> 
> Tested on sparc-sun-solaris2.11 and i386-pc-solaris2.11 (both into stage
> 3 now, so the compilation error is gone).
> 
> Ok for master?

AFAIK simple patches like this that fix build/bootstrap are viewed as obvious and can be committed.
I hope I'm not wrong 😊
Thanks,
Kyrill

> 
> 	Rainer
> 
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
> 
> 
> 2020-12-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
> 
> 	gcc:
> 	* rtl-ssa.h: Include memmodel.h before tm_p.h.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] rtl-ssa: Include memmodel.h before tm_p.h
  2020-12-17 13:41 ` Kyrylo Tkachov
@ 2020-12-17 13:49   ` Rainer Orth
  2020-12-17 14:04     ` Richard Sandiford
  0 siblings, 1 reply; 4+ messages in thread
From: Rainer Orth @ 2020-12-17 13:49 UTC (permalink / raw)
  To: Kyrylo Tkachov; +Cc: gcc-patches, Richard Sandiford

Hi Kyryll,

>> Fixed by moving the memmove.h include in rtl-ssa.h before tm_p.h.
>> 
>> Tested on sparc-sun-solaris2.11 and i386-pc-solaris2.11 (both into stage
>> 3 now, so the compilation error is gone).
>> 
>> Ok for master?
>
> AFAIK simple patches like this that fix build/bootstrap are viewed as
> obvious and can be committed.
> I hope I'm not wrong 😊

I know, however I'm always unsure about the proper include order, thus
asking for review.

Thanks.
	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] rtl-ssa: Include memmodel.h before tm_p.h
  2020-12-17 13:49   ` Rainer Orth
@ 2020-12-17 14:04     ` Richard Sandiford
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Sandiford @ 2020-12-17 14:04 UTC (permalink / raw)
  To: Rainer Orth; +Cc: Kyrylo Tkachov, gcc-patches

Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:
> Hi Kyryll,
>
>>> Fixed by moving the memmove.h include in rtl-ssa.h before tm_p.h.
>>> 
>>> Tested on sparc-sun-solaris2.11 and i386-pc-solaris2.11 (both into stage
>>> 3 now, so the compilation error is gone).
>>> 
>>> Ok for master?
>>
>> AFAIK simple patches like this that fix build/bootstrap are viewed as
>> obvious and can be committed.
>> I hope I'm not wrong 😊
>
> I know, however I'm always unsure about the proper include order,

Me too TBH, as seen here.  But I agree it looks like memmodel.h
has to be included before tm_p.h.  It looks like some files
include emit-rtl.h without directly including tm_p.h (such as
auto-inc-dec.c) so maybe that tm_p.h include was needed for
something else.  Or maybe auto-inc-dec.c gets it indirectly
via something else.

> thus asking for review.

OK, thanks, and sorry for the breakage.

Richard

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-17 14:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-17 10:36 [PATCH] rtl-ssa: Include memmodel.h before tm_p.h Rainer Orth
2020-12-17 13:41 ` Kyrylo Tkachov
2020-12-17 13:49   ` Rainer Orth
2020-12-17 14:04     ` Richard Sandiford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).