Patchwork [Ada/C/C++] Do not include tree-flow.h in FEs

login
register
mail settings
Submitter Manuel López-Ibáñez
Date June 28, 2010, 8:01 p.m.
Message ID <AANLkTimPCtIlduHyO340aavHpi_qyOzr10Zjq5XXISw5@mail.gmail.com>
Download mbox | patch
Permalink /patch/57185/
State New
Headers show

Comments

Manuel López-Ibáñez - June 28, 2010, 8:01 p.m.
On 28 June 2010 21:56, Arnaud Charlet <charlet@adacore.com> wrote:
>> The subject says all. Bootstrapped and regression tested on
>> x86_64-linux-gnu with --enable-languages=all,ada
>
> Can you please include the patch for review?

Well, if it is necessary, here it is, but I think the GCC project
should work on improving its mind-reading skills, it will give it a
key advantage over its competitors

;-)

Manuel.
Arnaud Charlet - June 28, 2010, 8:04 p.m.
Thanks. The Ada part is OK assuming it builds cleanly.

Arno
Manuel López-Ibáñez - June 28, 2010, 8:11 p.m.
On 28 June 2010 22:04, Arnaud Charlet <charlet@adacore.com> wrote:
> Thanks. The Ada part is OK assuming it builds cleanly.

I does in x86_64. I don't have any reason to believe it doesn't in
other targets but further testing would be welcome.

Manuel.
Eric Botcazou - June 28, 2010, 9:48 p.m.
> I does in x86_64. I don't have any reason to believe it doesn't in
> other targets but further testing would be welcome.

Go ahead, one target is sufficient here, thanks.
Manuel López-Ibáñez - June 28, 2010, 10:14 p.m.
On 28 June 2010 23:48, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> I does in x86_64. I don't have any reason to believe it doesn't in
>> other targets but further testing would be welcome.
>
> Go ahead, one target is sufficient here, thanks.

Thanks, I still need C/C++ approval.

Cheers,

Manuel.
Joseph S. Myers - June 28, 2010, 10:35 p.m.
The C front-end parts of this patch are OK.
Manuel López-Ibáñez - June 29, 2010, 10:28 p.m.
On 29 June 2010 00:35, Joseph S. Myers <joseph@codesourcery.com> wrote:
> The C front-end parts of this patch are OK.

I think only the C++ parts remain to be approved.

Manuel.
Jason Merrill - June 30, 2010, 4:13 a.m.
On 06/29/2010 06:28 PM, Manuel López-Ibáñez wrote:
> On 29 June 2010 00:35, Joseph S. Myers<joseph@codesourcery.com>  wrote:
>> The C front-end parts of this patch are OK.
>
> I think only the C++ parts remain to be approved.

OK.

Jason

Patch

Index: gcc/c-family/c-gimplify.c
===================================================================
--- gcc/c-family/c-gimplify.c	(revision 161481)
+++ gcc/c-family/c-gimplify.c	(working copy)
@@ -30,11 +30,10 @@  along with GCC; see the file COPYING3.  
 #include "tm.h"
 #include "tree.h"
 #include "c-common.h"
 #include "gimple.h"
 #include "basic-block.h"
-#include "tree-flow.h"
 #include "tree-inline.h"
 #include "diagnostic-core.h"
 #include "langhooks.h"
 #include "langhooks-def.h"
 #include "flags.h"
Index: gcc/tree.h
===================================================================
--- gcc/tree.h	(revision 161481)
+++ gcc/tree.h	(working copy)
@@ -1885,15 +1885,12 @@  struct GTY(()) tree_exp {
 
 /* Attributes for SSA_NAMEs for pointer-type variables.  */
 #define SSA_NAME_PTR_INFO(N) \
     SSA_NAME_CHECK (N)->ssa_name.ptr_info
 
-#ifndef _TREE_FLOW_H
+/* Defined in tree-flow.h.  */
 struct ptr_info_def;
-#endif
-
-
 
 /* Immediate use linking structure.  This structure is used for maintaining
    a doubly linked list of uses of an SSA_NAME.  */
 typedef struct GTY(()) ssa_use_operand_d {
   struct ssa_use_operand_d* GTY((skip(""))) prev;
@@ -5568,6 +5565,9 @@  static inline bool
 is_lang_specific (tree t)
 {
   return TREE_CODE (t) == LANG_TYPE || TREE_CODE (t) >= NUM_TREE_CODES;
 }
 
+/* In gimple-low.c.  */
+extern bool block_may_fallthru (const_tree);
+
 #endif  /* GCC_TREE_H  */
Index: gcc/cp/decl.c
===================================================================
--- gcc/cp/decl.c	(revision 161481)
+++ gcc/cp/decl.c	(working copy)
@@ -49,11 +49,10 @@  along with GCC; see the file COPYING3.  
 #include "c-family/c-pragma.h"
 #include "diagnostic.h"
 #include "intl.h"
 #include "debug.h"
 #include "timevar.h"
-#include "tree-flow.h"
 #include "pointer-set.h"
 #include "splay-tree.h"
 #include "plugin.h"
 
 /* Possible cases of bad specifiers type used by bad_specifiers. */
Index: gcc/cp/tree.c
===================================================================
--- gcc/cp/tree.c	(revision 161481)
+++ gcc/cp/tree.c	(working copy)
@@ -29,13 +29,13 @@  along with GCC; see the file COPYING3.  
 #include "flags.h"
 #include "toplev.h"
 #include "tree-inline.h"
 #include "debug.h"
 #include "convert.h"
-#include "tree-flow.h"
 #include "cgraph.h"
 #include "splay-tree.h"
+#include "gimple.h" /* gimple_has_body_p */
 
 static tree bot_manip (tree *, int *, void *);
 static tree bot_replace (tree *, int *, void *);
 static int list_hash_eq (const void *, const void *);
 static hashval_t list_hash_pieces (tree, tree, tree);
Index: gcc/ada/gcc-interface/trans.c
===================================================================
--- gcc/ada/gcc-interface/trans.c	(revision 161481)
+++ gcc/ada/gcc-interface/trans.c	(working copy)
@@ -31,11 +31,10 @@ 
 #include "flags.h"
 #include "ggc.h"
 #include "output.h"
 #include "libfuncs.h"	/* For set_stack_check_libfunc.  */
 #include "tree-iterator.h"
-#include "tree-flow.h"
 #include "gimple.h"
 
 #include "ada.h"
 #include "adadecode.h"
 #include "types.h"
Index: gcc/c-typeck.c
===================================================================
--- gcc/c-typeck.c	(revision 161481)
+++ gcc/c-typeck.c	(working copy)
@@ -37,11 +37,12 @@  along with GCC; see the file COPYING3.  
 #include "output.h"
 #include "toplev.h"
 #include "intl.h"
 #include "target.h"
 #include "tree-iterator.h"
-#include "tree-flow.h"
+#include "bitmap.h"
+#include "gimple.h"
 
 /* Possible cases of implicit bad conversions.  Used to select
    diagnostic messages in convert_for_assignment.  */
 enum impl_conv {
   ic_argpass,
Index: gcc/tree-flow.h
===================================================================
--- gcc/tree-flow.h	(revision 161481)
+++ gcc/tree-flow.h	(working copy)
@@ -538,11 +538,10 @@  extern void phinodes_print_statistics (v
 #endif
 
 /* In gimple-low.c  */
 extern void record_vars_into (tree, tree);
 extern void record_vars (tree);
-extern bool block_may_fallthru (const_tree);
 extern bool gimple_seq_may_fallthru (gimple_seq);
 extern bool gimple_stmt_may_fallthru (gimple);
 extern bool gimple_check_call_args (gimple);