Patchwork 17/n: trans-mem: compiler trans-mem main engine

login
register
mail settings
Submitter Torvald Riegel
Date Nov. 4, 2011, 9:48 p.m.
Message ID <1320443299.5756.1066.camel@triegel.csb>
Download mbox | patch
Permalink /patch/123706/
State New
Headers show

Comments

Torvald Riegel - Nov. 4, 2011, 9:48 p.m.
On Thu, 2011-11-03 at 20:38 +0000, Joseph S. Myers wrote:
> Make sure that you do need each #include present in this and any other new 
> file.  Since 2008 a lot of includes of tm.h and toplev.h have been removed 
> and diagnostic-core.h introduced as an alternative to diagnostic.h for 
> many users.  If tm.h is needed, it's good to have a comment on the 
> #include explaining why (which target macros are used, for example), since 
> we'd like to avoid unnecessary tm.h includes.

See attached patch. OK for branch?
commit dddfec5e83627ef4dc208eddad644d478250a1c4
Author: Torvald Riegel <triegel@redhat.com>
Date:   Fri Nov 4 16:59:44 2011 +0100

    Removed unnecessary includes.
    
    	* trans-mem.c: Removed unnecessary includes.
Joseph S. Myers - Nov. 4, 2011, 10:18 p.m.
On Fri, 4 Nov 2011, Torvald Riegel wrote:

> On Thu, 2011-11-03 at 20:38 +0000, Joseph S. Myers wrote:
> > Make sure that you do need each #include present in this and any other new 
> > file.  Since 2008 a lot of includes of tm.h and toplev.h have been removed 
> > and diagnostic-core.h introduced as an alternative to diagnostic.h for 
> > many users.  If tm.h is needed, it's good to have a comment on the 
> > #include explaining why (which target macros are used, for example), since 
> > we'd like to avoid unnecessary tm.h includes.
> 
> See attached patch. OK for branch?

OK with me.
Richard Henderson - Nov. 4, 2011, 10:24 p.m.
On 11/04/2011 02:48 PM, Torvald Riegel wrote:
>     Removed unnecessary includes.
>     
>     	* trans-mem.c: Removed unnecessary includes.

Ok.

r~
Aldy Hernandez - Nov. 6, 2011, 3:29 p.m.
On 11/06/11 07:28, Torvald Riegel wrote:
> On Fri, 2011-11-04 at 22:48 +0100, Torvald Riegel wrote:
>> On Thu, 2011-11-03 at 20:38 +0000, Joseph S. Myers wrote:
>>> Make sure that you do need each #include present in this and any other new
>>> file.  Since 2008 a lot of includes of tm.h and toplev.h have been removed
>>> and diagnostic-core.h introduced as an alternative to diagnostic.h for
>>> many users.  If tm.h is needed, it's good to have a comment on the
>>> #include explaining why (which target macros are used, for example), since
>>> we'd like to avoid unnecessary tm.h includes.
>>
>> See attached patch. OK for branch?
>
> I should have updated the build dependencies too, which this patch does.
> OK for branch?

Yes.

Patch

--- a/gcc/ChangeLog.tm
+++ b/gcc/ChangeLog.tm
@@ -1,3 +1,7 @@ 
+2011-11-04  Torvald Riegel  <triegel@redhat.com>
+
+	* trans-mem.c: Removed unnecessary includes.
+
 2011-11-04  Richard Henderson  <rth@redhat.com>
 
 	* cp/parser.c (cp_parser_init_declarator): Fix production comments.
diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c
index f0f5c8a..db65e12 100644
--- a/gcc/trans-mem.c
+++ b/gcc/trans-mem.c
@@ -20,21 +20,15 @@ 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
-#include "tm.h"
 #include "tree.h"
 #include "gimple.h"
-#include "tree-dump.h"
 #include "tree-flow.h"
 #include "tree-pass.h"
 #include "tree-inline.h"
-#include "except.h"
-#include "diagnostic.h"
-#include "toplev.h"
-#include "flags.h"
+#include "diagnostic-core.h"
 #include "demangle.h"
 #include "output.h"
 #include "trans-mem.h"
-#include "ggc.h"
 #include "params.h"
 #include "target.h"
 #include "langhooks.h"