public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch 1/4] Separate gimple.[ch] and gimplify.[ch]
@ 2013-11-11 23:04 Andrew MacLeod
  2013-11-11 23:18 ` [patch 2/4] " Andrew MacLeod
                   ` (3 more replies)
  0 siblings, 4 replies; 24+ messages in thread
From: Andrew MacLeod @ 2013-11-11 23:04 UTC (permalink / raw)
  To: gcc-patches, Jeff Law, Richard Biener, Diego Novillo

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

This was/is relatively painful, and there will be another set after this 
to really finish it.

The front ends and the middle end both make extensive use of 
gimplification  There is no way at this early point to really separate 
them unless we created a gimplify-fe.[ch] and gimplfy-be.[ch]   so all I 
can do is structure the headers a bit better.

These patches split out the gimplification part of gimple.c and 
gimplify.c to be in gimplify.c, and adds gimplify.h for the prototypes.
Some routines from gimplify.c have been moved to gimple-expr.[ch], and 
occasionally gimple.c as appropriate.

At the moment, gimplify.h cannot compile without gimple.h, so gimplify.h 
includes gimple.h, and all the consumers of gimplification now include 
gimplify.h (or just gimpl-expr.h, if thats all they really needed)   The 
next set of patches will attempt address this and reduce it to only what 
is really needed, but first there is an anomaly that needs a solution.

So on to the anomaly that causes the issue.  force_gimple_operand* is 
extensively used by the middle end, but not by the front end at all.  
The front ends do not use the statement iterators, but 2 of the 
force_gimple_operand() routines work with gsi's, and as such, have  
"enum gsi_iterator_update" in the prototype.   This means that 
gimplify.h will not compile without understanding what enum 
gsi_iterator_update is, but no front end routine ever needs it.  the 
choices are:

  a) put "enum gsi_iterator_update" in gimple-iterator.h where it 
belongs and force anyone including gimpllfy.h to include it, even though 
no front end ever uses the routines that require it.
  b) leave "enum gsi_iterator_update" in gimple.h, and require anyone 
using gimplify.h to include gimple.h. Similar circumstance, but at least 
a few places also require gimple.h...
  c) put enum gsi_iterator_update" in coretypes.h until such time that 
the front end interface is better defined and no longer requires it
  d) split gimplifcation now into 2 parts, gimplify.[ch] for the front 
ends which doesn't include those routines that only the middle end 
requires, and gimplfy-be.[ch] for the routines which are used 
exclusively by the BE.  this will allow all the types to go where they 
belong, only only include the bits things actually need.

My order of preference is d) then c)... a) is a distant third, and I 
really dislike  b).... for what thats worth... opinions on how to 
structure it?

Anyway, these 4 set sof patches bootstrap on x86_64-unknown-linux-gnu 
with no new regressions. I've built all languages, and configured/built 
stage 1 of all the targets that utilized gimple.h, replacing gimple.h 
with gimplify,h to ensure they compile.  Ive also tried seeing if any of 
the language parts required gimplify.h, or gimple.h, or just some other 
conponent  that was being included indirectly... so there aree some 
minor cutbacks on includes there.

patch 1 is the main changes,
patch 2 contains the include changes for the body of the middle/back end
patch 3 are the front end changes
patch4  has the config/* changes for any file which used gimple.h and I 
built stage 1 for.

OK for mainline?

Andrew

PS. Once these are in I'll work on the followups to extract 
gimple-iterator.[ch], clean up gimple.h to only have the appropriate 
prototypes in the correct order, and then truly flatten the include web. 
Its just getting a bit too messy to do all at once.

[-- Attachment #2: G1.patch --]
[-- Type: text/x-patch, Size: 51395 bytes --]


	* gimple-expr.h (create_tmp_var_name, create_tmp_var_raw,
	create_tmp_var, create_tmp_reg, mark_addressable, is_gimple_reg_rhs):
	Relocate prototypes from gimple.h.
	* gimplify.h: New File.  Relocate some prototypes from gimple.h here.
	(gimple_predicate, enum fallback, enum gimplify_status): Relocate
	from gimple.h.
	* gimple.h: Move some prototypes to gimplify.h.
	(gimple_predicate, enum fallback, enum gimplify_status): Move to
	gimplify.h.
	(gimple_do_not_emit_location_p, gimple_set_do_not_emit_location):
	Relocate from gimpify.c.
	* gimple-expr.c (remove_suffix, tmp_var_id_num, create_tmp_var_name,
	create_tmp_var_raw, create_tmp_var, create_tmp_reg, mark_addressable,
	is_gimple_reg_rhs) Relocate from gimplify.c.
	* gimplify.c (mark_addressable): Move to gimple-expr.c.
	(gimple_seq_add_stmt_without_update): Move to gimple.c.
	(remove_suffix, tmp_var_id_num, create_tmp_var_name, create_tmp_var_raw,
	create_tmp_var, create_tmp_reg, is_gimple_reg_rhs): Move to 
	gimple-expr.c.
	(should_carry_location_p): Move to gimple.c.
	(gimple_do_not_emit_location_p, gimple_set_do_not_emit_location): Move
	to gimple.h.
	(annotate_one_with_location, annotate_all_with_location_after,
	annotate_all_with_location): Move to gimple.c.
	(compare_case_labels, sort_case_labels,
	preprocess_case_label_vec_for_gimple): Move to gimple.c.
	(rhs_predicate_for): Make static.
	(gimplify_assign): Relocate from gimple.c.
	* gimple.c (gimplify_assign): Move to gimplify.c.
	(gimple_seq_add_stmt_without_update, should_carry_location_p,
	annotate_one_with_location, annotate_all_with_location_after,
	annotate_all_with_location, compare_case_labels, sort_case_labels,
	preprocess_case_label_vec_for_gimple): Relocate from gimplify.c.
	* tree.h (unshare_expr, unshare_expr_without_location,
	mark_addressable): Move prototypes to gimplify.h.
	* Makefile.in (GTFILES): gimple-expr.c now has the GTY tag for
	tmp_var_id_num

Index: gimple-expr.h
===================================================================
*** gimple-expr.h	(revision 204496)
--- gimple-expr.h	(working copy)
*************** along with GCC; see the file COPYING3.
*** 22,33 ****
--- 22,39 ----
  
  extern bool useless_type_conversion_p (tree, tree);
  
+ 
  extern void gimple_set_body (tree, gimple_seq);
  extern gimple_seq gimple_body (tree);
  extern bool gimple_has_body_p (tree);
  extern const char *gimple_decl_printable_name (tree, int);
  extern tree copy_var_decl (tree, tree, tree);
  extern bool gimple_can_coalesce_p (tree, tree);
+ extern tree create_tmp_var_name (const char *);
+ extern tree create_tmp_var_raw (tree, const char *);
+ extern tree create_tmp_var (tree, const char *);
+ extern tree create_tmp_reg (tree, const char *);
+ 
  
  extern void extract_ops_from_tree_1 (tree, enum tree_code *, tree *, tree *,
  				     tree *);
*************** extern bool is_gimple_asm_val (tree);
*** 46,51 ****
--- 52,59 ----
  extern bool is_gimple_min_lval (tree);
  extern bool is_gimple_call_addr (tree);
  extern bool is_gimple_mem_ref_addr (tree);
+ extern void mark_addressable (tree);
+ extern bool is_gimple_reg_rhs (tree);
  
  /* Return true if a conversion from either type of TYPE1 and TYPE2
     to the other is not required.  Otherwise return false.  */
Index: gimplify.h
===================================================================
*** gimplify.h	(revision 0)
--- gimplify.h	(working copy)
***************
*** 0 ****
--- 1,92 ----
+ /* Header file for gimplification.
+    Copyright (C) 2013 Free Software Foundation, Inc.
+ 
+ This file is part of GCC.
+ 
+ GCC is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 3, or (at your option) any later
+ version.
+ 
+ GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+  for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3.  If not see
+ <http://www.gnu.org/licenses/>.  */
+ 
+ #ifndef GCC_GIMPLIFY_H
+ #define GCC_GIMPLIFY_H
+ 
+ #include "gimple.h"
+ 
+ /* Validation of GIMPLE expressions.  Note that these predicates only check
+    the basic form of the expression, they don't recurse to make sure that
+    underlying nodes are also of the right form.  */
+ typedef bool (*gimple_predicate)(tree);
+ 
+ /* FIXME we should deduce this from the predicate.  */
+ enum fallback {
+   fb_none = 0,		/* Do not generate a temporary.  */
+ 
+   fb_rvalue = 1,	/* Generate an rvalue to hold the result of a
+ 			   gimplified expression.  */
+ 
+   fb_lvalue = 2,	/* Generate an lvalue to hold the result of a
+ 			   gimplified expression.  */
+ 
+   fb_mayfail = 4,	/* Gimplification may fail.  Error issued
+ 			   afterwards.  */
+   fb_either= fb_rvalue | fb_lvalue
+ };
+ 
+ typedef int fallback_t;
+ 
+ enum gimplify_status {
+   GS_ERROR	= -2,	/* Something Bad Seen.  */
+   GS_UNHANDLED	= -1,	/* A langhook result for "I dunno".  */
+   GS_OK		= 0,	/* We did something, maybe more to do.  */
+   GS_ALL_DONE	= 1	/* The expression is fully gimplified.  */
+ };
+ 
+ extern void push_gimplify_context (struct gimplify_ctx *);
+ extern void pop_gimplify_context (gimple);
+ extern gimple gimple_current_bind_expr (void);
+ extern vec<gimple> gimple_bind_expr_stack (void);
+ extern void gimplify_and_add (tree, gimple_seq *);
+ extern tree get_formal_tmp_var (tree, gimple_seq *);
+ extern tree get_initialized_tmp_var (tree, gimple_seq *, gimple_seq *);
+ extern void declare_vars (tree, gimple, bool);
+ extern void gimple_add_tmp_var (tree);
+ extern tree unshare_expr (tree);
+ extern tree unshare_expr_without_location (tree);
+ extern tree voidify_wrapper_expr (tree, tree);
+ extern tree build_and_jump (tree *);
+ extern enum gimplify_status gimplify_self_mod_expr (tree *, gimple_seq *,
+ 						    gimple_seq *, bool, tree);
+ extern tree gimple_boolify (tree);
+ extern bool gimplify_stmt (tree *, gimple_seq *);
+ extern void omp_firstprivatize_variable (struct gimplify_omp_ctx *, tree);
+ extern enum gimplify_status gimplify_expr (tree *, gimple_seq *, gimple_seq *,
+ 					   bool (*) (tree), fallback_t);
+ 
+ extern void gimplify_type_sizes (tree, gimple_seq *);
+ extern void gimplify_one_sizepos (tree *, gimple_seq *);
+ extern gimple gimplify_body (tree, bool);
+ extern void gimplify_function_tree (tree);
+ extern void gimple_regimplify_operands (gimple, gimple_stmt_iterator *);
+ extern tree force_gimple_operand_1 (tree, gimple_seq *, gimple_predicate, tree);
+ extern tree force_gimple_operand (tree, gimple_seq *, bool, tree);
+ extern tree force_gimple_operand_gsi_1 (gimple_stmt_iterator *, tree,
+ 					gimple_predicate, tree,
+ 					bool, enum gsi_iterator_update);
+ extern tree force_gimple_operand_gsi (gimple_stmt_iterator *, tree, bool, tree,
+ 				      bool, enum gsi_iterator_update);
+ 
+ extern enum gimplify_status gimplify_va_arg_expr (tree *, gimple_seq *,
+ 						  gimple_seq *);
+ gimple gimplify_assign (tree, tree, gimple_seq *);
+ 
+ #endif /* GCC_GIMPLIFY_H */
Index: gimple.h
===================================================================
*** gimple.h	(revision 204496)
--- gimple.h	(working copy)
*************** gimple gimple_build_call_valist (tree, u
*** 766,772 ****
  gimple gimple_build_call_internal (enum internal_fn, unsigned, ...);
  gimple gimple_build_call_internal_vec (enum internal_fn, vec<tree> );
  gimple gimple_build_call_from_tree (tree);
- gimple gimplify_assign (tree, tree, gimple_seq *);
  gimple gimple_build_cond (enum tree_code, tree, tree, tree, tree);
  gimple gimple_build_label (tree label);
  gimple gimple_build_goto (tree dest);
--- 766,771 ----
*************** gimple gimple_build_omp_atomic_store (tr
*** 806,813 ****
  gimple gimple_build_transaction (gimple_seq, tree);
  gimple gimple_build_predict (enum br_predictor, enum prediction);
  enum gimple_statement_structure_enum gss_for_assign (enum tree_code);
- void sort_case_labels (vec<tree> );
- void preprocess_case_label_vec_for_gimple (vec<tree> , tree, tree *);
  gimple_seq gimple_seq_alloc (void);
  void gimple_seq_free (gimple_seq);
  void gimple_seq_add_seq (gimple_seq *, gimple_seq);
--- 805,810 ----
*************** bool gimple_has_side_effects (const_gimp
*** 834,841 ****
  bool gimple_could_trap_p (gimple);
  bool gimple_could_trap_p_1 (gimple, bool, bool);
  bool gimple_assign_rhs_could_trap_p (gimple);
- void gimple_regimplify_operands (gimple, gimple_stmt_iterator *);
  bool empty_body_p (gimple_seq);
  unsigned get_gimple_rhs_num_ops (enum tree_code);
  #define gimple_alloc(c, n) gimple_alloc_stat (c, n MEM_STAT_INFO)
  gimple gimple_alloc_stat (enum gimple_code, unsigned MEM_STAT_DECL);
--- 831,840 ----
  bool gimple_could_trap_p (gimple);
  bool gimple_could_trap_p_1 (gimple, bool, bool);
  bool gimple_assign_rhs_could_trap_p (gimple);
  bool empty_body_p (gimple_seq);
+ extern void annotate_all_with_location_after (gimple_seq, gimple_stmt_iterator,
+ 					      location_t);
+ extern void annotate_all_with_location (gimple_seq, location_t);
  unsigned get_gimple_rhs_num_ops (enum tree_code);
  #define gimple_alloc(c, n) gimple_alloc_stat (c, n MEM_STAT_INFO)
  gimple gimple_alloc_stat (enum gimple_code, unsigned MEM_STAT_DECL);
*************** extern bool gimple_ior_addresses_taken (
*** 859,906 ****
  extern bool gimple_call_builtin_p (gimple, enum built_in_class);
  extern bool gimple_call_builtin_p (gimple, enum built_in_function);
  extern bool gimple_asm_clobbers_memory_p (const_gimple);
- 
- /* In gimplify.c  */
- extern tree create_tmp_var_raw (tree, const char *);
- extern tree create_tmp_var_name (const char *);
- extern tree create_tmp_var (tree, const char *);
- extern tree create_tmp_reg (tree, const char *);
- extern tree get_initialized_tmp_var (tree, gimple_seq *, gimple_seq *);
- extern tree get_formal_tmp_var (tree, gimple_seq *);
- extern void declare_vars (tree, gimple, bool);
- extern void annotate_all_with_location (gimple_seq, location_t);
  extern unsigned gimple_call_get_nobnd_arg_index (const_gimple, unsigned);
  
- /* Validation of GIMPLE expressions.  Note that these predicates only check
-    the basic form of the expression, they don't recurse to make sure that
-    underlying nodes are also of the right form.  */
- typedef bool (*gimple_predicate)(tree);
- 
- 
- /* FIXME we should deduce this from the predicate.  */
- enum fallback {
-   fb_none = 0,		/* Do not generate a temporary.  */
- 
-   fb_rvalue = 1,	/* Generate an rvalue to hold the result of a
- 			   gimplified expression.  */
- 
-   fb_lvalue = 2,	/* Generate an lvalue to hold the result of a
- 			   gimplified expression.  */
- 
-   fb_mayfail = 4,	/* Gimplification may fail.  Error issued
- 			   afterwards.  */
-   fb_either= fb_rvalue | fb_lvalue
- };
- 
- typedef int fallback_t;
- 
- enum gimplify_status {
-   GS_ERROR	= -2,	/* Something Bad Seen.  */
-   GS_UNHANDLED	= -1,	/* A langhook result for "I dunno".  */
-   GS_OK		= 0,	/* We did something, maybe more to do.  */
-   GS_ALL_DONE	= 1	/* The expression is fully gimplified.  */
- };
- 
  /* Formal (expression) temporary table handling: multiple occurrences of
     the same scalar expression are evaluated into the same temporary.  */
  
--- 858,865 ----
*************** inc_gimple_stmt_max_uid (struct function
*** 1010,1040 ****
    return fn->last_stmt_uid++;
  }
  
- extern enum gimplify_status gimplify_expr (tree *, gimple_seq *, gimple_seq *,
- 					   bool (*) (tree), fallback_t);
- extern void gimplify_type_sizes (tree, gimple_seq *);
- extern void gimplify_one_sizepos (tree *, gimple_seq *);
- enum gimplify_status gimplify_self_mod_expr (tree *, gimple_seq *, gimple_seq *,
- 					     bool, tree);
- extern bool gimplify_stmt (tree *, gimple_seq *);
- extern gimple gimplify_body (tree, bool);
- extern void push_gimplify_context (struct gimplify_ctx *);
- extern void pop_gimplify_context (gimple);
- extern void gimplify_and_add (tree, gimple_seq *);
- 
  /* Miscellaneous helpers.  */
- extern void gimple_add_tmp_var (tree);
- extern gimple gimple_current_bind_expr (void);
- extern vec<gimple> gimple_bind_expr_stack (void);
- extern tree voidify_wrapper_expr (tree, tree);
- extern tree build_and_jump (tree *);
- extern tree force_labels_r (tree *, int *, void *);
- extern enum gimplify_status gimplify_va_arg_expr (tree *, gimple_seq *,
- 						  gimple_seq *);
  struct gimplify_omp_ctx;
- extern void omp_firstprivatize_variable (struct gimplify_omp_ctx *, tree);
- extern tree gimple_boolify (tree);
- extern gimple_predicate rhs_predicate_for (tree);
  extern tree canonicalize_cond_expr_cond (tree);
  extern void dump_decl_set (FILE *, bitmap);
  extern bool nonfreeing_call_p (gimple);
--- 969,976 ----
*************** extern void compute_transaction_bits (vo
*** 1048,1056 ****
  extern void lower_nested_functions (tree);
  extern void insert_field_into_struct (tree, tree);
  
- /* In gimplify.c.  */
- extern void gimplify_function_tree (tree);
- 
  /* In cfgexpand.c.  */
  extern tree gimple_assign_rhs_to_tree (gimple);
  
--- 984,989 ----
*************** gimple_seq_empty_p (gimple_seq s)
*** 1121,1134 ****
    return s == NULL;
  }
  
! void gimple_seq_add_stmt (gimple_seq *, gimple);
! 
! /* Link gimple statement GS to the end of the sequence *SEQ_P.  If
!    *SEQ_P is NULL, a new sequence is allocated.  This function is
!    similar to gimple_seq_add_stmt, but does not scan the operands.
!    During gimplification, we need to manipulate statement sequences
!    before the def/use vectors have been constructed.  */
! void gimple_seq_add_stmt_without_update (gimple_seq *, gimple);
  
  /* Allocate a new sequence and initialize its first element with STMT.  */
  
--- 1054,1061 ----
    return s == NULL;
  }
  
! extern void gimple_seq_add_stmt (gimple_seq *, gimple);
! extern void gimple_seq_add_stmt_without_update (gimple_seq *, gimple);
  
  /* Allocate a new sequence and initialize its first element with STMT.  */
  
*************** void gsi_commit_one_edge_insert (edge, b
*** 5563,5577 ****
  void gsi_commit_edge_inserts (void);
  gimple gimple_call_copy_skip_args (gimple, bitmap);
  
- /* In gimplify.c.  */
- tree force_gimple_operand_1 (tree, gimple_seq *, gimple_predicate, tree);
- tree force_gimple_operand (tree, gimple_seq *, bool, tree);
- tree force_gimple_operand_gsi_1 (gimple_stmt_iterator *, tree,
- 				 gimple_predicate, tree,
- 				 bool, enum gsi_iterator_update);
- tree force_gimple_operand_gsi (gimple_stmt_iterator *, tree, bool, tree,
- 			       bool, enum gsi_iterator_update);
- 
  /* Convenience routines to walk all statements of a gimple function.
     Note that this is useful exclusively before the code is converted
     into SSA form.  Once the program is in SSA form, the standard
--- 5490,5495 ----
*************** gimple_seq_set_location (gimple_seq seq,
*** 5684,5689 ****
--- 5602,5628 ----
      gimple_set_location (gsi_stmt (i), loc);
  }
  
+ /* Return true if a location should not be emitted for this statement
+    by annotate_all_with_location.  */
+ 
+ static inline bool
+ gimple_do_not_emit_location_p (gimple g)
+ {
+   return gimple_plf (g, GF_PLF_1);
+ }
+ 
+ /* Mark statement G so a location will not be emitted by
+    annotate_one_with_location.  */
+ 
+ static inline void
+ gimple_set_do_not_emit_location (gimple g)
+ {
+   /* The PLF flags are initialized to 0 when a new tuple is created,
+      so no need to initialize it anywhere.  */
+   gimple_set_plf (g, GF_PLF_1, true);
+ }
+ 
+ 
  /* Macros for showing usage statistics.  */
  #define SCALE(x) ((unsigned long) ((x) < 1024*10	\
  		  ? (x)					\
*************** gimple_seq_set_location (gimple_seq seq,
*** 5695,5698 ****
--- 5634,5640 ----
  
  #define PERCENT(x,y) ((float)(x) * 100.0 / (float)(y))
  
+ extern void sort_case_labels (vec<tree> );
+ extern void preprocess_case_label_vec_for_gimple (vec<tree> , tree, tree *);
+ 
  #endif  /* GCC_GIMPLE_H */
Index: gimple-expr.c
===================================================================
*** gimple-expr.c	(revision 204496)
--- gimple-expr.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 24,31 ****
  #include "coretypes.h"
  #include "tm.h"
  #include "tree.h"
! #include "gimple.h"
  #include "demangle.h"
  
  /* ----- Type related -----  */
  
--- 24,32 ----
  #include "coretypes.h"
  #include "tm.h"
  #include "tree.h"
! #include "gimplify.h"
  #include "demangle.h"
+ #include "gimple-ssa.h"
  
  /* ----- Type related -----  */
  
*************** gimple_can_coalesce_p (tree name1, tree
*** 406,411 ****
--- 407,522 ----
    return false;
  }
  
+ /* Strip off a legitimate source ending from the input string NAME of
+    length LEN.  Rather than having to know the names used by all of
+    our front ends, we strip off an ending of a period followed by
+    up to five characters.  (Java uses ".class".)  */
+ 
+ static inline void
+ remove_suffix (char *name, int len)
+ {
+   int i;
+ 
+   for (i = 2;  i < 8 && len > i;  i++)
+     {
+       if (name[len - i] == '.')
+ 	{
+ 	  name[len - i] = '\0';
+ 	  break;
+ 	}
+     }
+ }
+ 
+ /* Create a new temporary name with PREFIX.  Return an identifier.  */
+ 
+ static GTY(()) unsigned int tmp_var_id_num;
+ 
+ tree
+ create_tmp_var_name (const char *prefix)
+ {
+   char *tmp_name;
+ 
+   if (prefix)
+     {
+       char *preftmp = ASTRDUP (prefix);
+ 
+       remove_suffix (preftmp, strlen (preftmp));
+       clean_symbol_name (preftmp);
+ 
+       prefix = preftmp;
+     }
+ 
+   ASM_FORMAT_PRIVATE_NAME (tmp_name, prefix ? prefix : "T", tmp_var_id_num++);
+   return get_identifier (tmp_name);
+ }
+ 
+ /* Create a new temporary variable declaration of type TYPE.
+    Do NOT push it into the current binding.  */
+ 
+ tree
+ create_tmp_var_raw (tree type, const char *prefix)
+ {
+   tree tmp_var;
+ 
+   tmp_var = build_decl (input_location,
+ 			VAR_DECL, prefix ? create_tmp_var_name (prefix) : NULL,
+ 			type);
+ 
+   /* The variable was declared by the compiler.  */
+   DECL_ARTIFICIAL (tmp_var) = 1;
+   /* And we don't want debug info for it.  */
+   DECL_IGNORED_P (tmp_var) = 1;
+ 
+   /* Make the variable writable.  */
+   TREE_READONLY (tmp_var) = 0;
+ 
+   DECL_EXTERNAL (tmp_var) = 0;
+   TREE_STATIC (tmp_var) = 0;
+   TREE_USED (tmp_var) = 1;
+ 
+   return tmp_var;
+ }
+ 
+ /* Create a new temporary variable declaration of type TYPE.  DO push the
+    variable into the current binding.  Further, assume that this is called
+    only from gimplification or optimization, at which point the creation of
+    certain types are bugs.  */
+ 
+ tree
+ create_tmp_var (tree type, const char *prefix)
+ {
+   tree tmp_var;
+ 
+   /* We don't allow types that are addressable (meaning we can't make copies),
+      or incomplete.  We also used to reject every variable size objects here,
+      but now support those for which a constant upper bound can be obtained.
+      The processing for variable sizes is performed in gimple_add_tmp_var,
+      point at which it really matters and possibly reached via paths not going
+      through this function, e.g. after direct calls to create_tmp_var_raw.  */
+   gcc_assert (!TREE_ADDRESSABLE (type) && COMPLETE_TYPE_P (type));
+ 
+   tmp_var = create_tmp_var_raw (type, prefix);
+   gimple_add_tmp_var (tmp_var);
+   return tmp_var;
+ }
+ 
+ /* Create a new temporary variable declaration of type TYPE by calling
+    create_tmp_var and if TYPE is a vector or a complex number, mark the new
+    temporary as gimple register.  */
+ 
+ tree
+ create_tmp_reg (tree type, const char *prefix)
+ {
+   tree tmp;
+ 
+   tmp = create_tmp_var (type, prefix);
+   if (TREE_CODE (type) == COMPLEX_TYPE
+       || TREE_CODE (type) == VECTOR_TYPE)
+     DECL_GIMPLE_REG_P (tmp) = 1;
+ 
+   return tmp;
+ }
+ 
  
  /* ----- Expression related -----  */
  
*************** is_gimple_mem_ref_addr (tree t)
*** 719,721 ****
--- 830,874 ----
  	      && (CONSTANT_CLASS_P (TREE_OPERAND (t, 0))
  		  || decl_address_invariant_p (TREE_OPERAND (t, 0)))));
  }
+ 
+ /* Mark X addressable.  Unlike the langhook we expect X to be in gimple
+    form and we don't do any syntax checking.  */
+ 
+ void
+ mark_addressable (tree x)
+ {
+   while (handled_component_p (x))
+     x = TREE_OPERAND (x, 0);
+   if (TREE_CODE (x) == MEM_REF
+       && TREE_CODE (TREE_OPERAND (x, 0)) == ADDR_EXPR)
+     x = TREE_OPERAND (TREE_OPERAND (x, 0), 0);
+   if (TREE_CODE (x) != VAR_DECL
+       && TREE_CODE (x) != PARM_DECL
+       && TREE_CODE (x) != RESULT_DECL)
+     return;
+   TREE_ADDRESSABLE (x) = 1;
+ 
+   /* Also mark the artificial SSA_NAME that points to the partition of X.  */
+   if (TREE_CODE (x) == VAR_DECL
+       && !DECL_EXTERNAL (x)
+       && !TREE_STATIC (x)
+       && cfun->gimple_df != NULL
+       && cfun->gimple_df->decls_to_pointers != NULL)
+     {
+       void *namep
+ 	= pointer_map_contains (cfun->gimple_df->decls_to_pointers, x); 
+       if (namep)
+ 	TREE_ADDRESSABLE (*(tree *)namep) = 1;
+     }
+ }
+ 
+ /* Returns true iff T is a valid RHS for an assignment to a renamed
+    user -- or front-end generated artificial -- variable.  */
+ 
+ bool
+ is_gimple_reg_rhs (tree t)
+ {
+   return get_gimple_rhs_class (TREE_CODE (t)) != GIMPLE_INVALID_RHS;
+ }
+ 
+ #include "gt-gimple-expr.h"
Index: gimplify.c
===================================================================
*** gimplify.c	(revision 204496)
--- gimplify.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 25,31 ****
  #include "coretypes.h"
  #include "tm.h"
  #include "tree.h"
! #include "gimple.h"
  #include "tree-iterator.h"
  #include "tree-inline.h"
  #include "tree-pretty-print.h"
--- 25,31 ----
  #include "coretypes.h"
  #include "tm.h"
  #include "tree.h"
! #include "gimplify.h"
  #include "tree-iterator.h"
  #include "tree-inline.h"
  #include "tree-pretty-print.h"
*************** static struct gimplify_omp_ctx *gimplify
*** 108,162 ****
  /* Forward declaration.  */
  static enum gimplify_status gimplify_compound_expr (tree *, gimple_seq *, bool);
  
- /* Mark X addressable.  Unlike the langhook we expect X to be in gimple
-    form and we don't do any syntax checking.  */
- 
- void
- mark_addressable (tree x)
- {
-   while (handled_component_p (x))
-     x = TREE_OPERAND (x, 0);
-   if (TREE_CODE (x) == MEM_REF
-       && TREE_CODE (TREE_OPERAND (x, 0)) == ADDR_EXPR)
-     x = TREE_OPERAND (TREE_OPERAND (x, 0), 0);
-   if (TREE_CODE (x) != VAR_DECL
-       && TREE_CODE (x) != PARM_DECL
-       && TREE_CODE (x) != RESULT_DECL)
-     return;
-   TREE_ADDRESSABLE (x) = 1;
- 
-   /* Also mark the artificial SSA_NAME that points to the partition of X.  */
-   if (TREE_CODE (x) == VAR_DECL
-       && !DECL_EXTERNAL (x)
-       && !TREE_STATIC (x)
-       && cfun->gimple_df != NULL
-       && cfun->gimple_df->decls_to_pointers != NULL)
-     {
-       void *namep
- 	= pointer_map_contains (cfun->gimple_df->decls_to_pointers, x); 
-       if (namep)
- 	TREE_ADDRESSABLE (*(tree *)namep) = 1;
-     }
- }
- 
- /* Link gimple statement GS to the end of the sequence *SEQ_P.  If
-    *SEQ_P is NULL, a new sequence is allocated.  This function is
-    similar to gimple_seq_add_stmt, but does not scan the operands.
-    During gimplification, we need to manipulate statement sequences
-    before the def/use vectors have been constructed.  */
- 
- void
- gimple_seq_add_stmt_without_update (gimple_seq *seq_p, gimple gs)
- {
-   gimple_stmt_iterator si;
- 
-   if (gs == NULL)
-     return;
- 
-   si = gsi_last (*seq_p);
-   gsi_insert_after_without_update (&si, gs, GSI_NEW_STMT);
- }
- 
  /* Shorter alias name for the above function for use in gimplify.c
     only.  */
  
--- 108,113 ----
*************** gimplify_and_return_first (tree t, gimpl
*** 365,489 ****
      return gimple_seq_first_stmt (*seq_p);
  }
  
- /* Strip off a legitimate source ending from the input string NAME of
-    length LEN.  Rather than having to know the names used by all of
-    our front ends, we strip off an ending of a period followed by
-    up to five characters.  (Java uses ".class".)  */
- 
- static inline void
- remove_suffix (char *name, int len)
- {
-   int i;
- 
-   for (i = 2;  i < 8 && len > i;  i++)
-     {
-       if (name[len - i] == '.')
- 	{
- 	  name[len - i] = '\0';
- 	  break;
- 	}
-     }
- }
- 
- /* Create a new temporary name with PREFIX.  Return an identifier.  */
- 
- static GTY(()) unsigned int tmp_var_id_num;
- 
- tree
- create_tmp_var_name (const char *prefix)
- {
-   char *tmp_name;
- 
-   if (prefix)
-     {
-       char *preftmp = ASTRDUP (prefix);
- 
-       remove_suffix (preftmp, strlen (preftmp));
-       clean_symbol_name (preftmp);
- 
-       prefix = preftmp;
-     }
- 
-   ASM_FORMAT_PRIVATE_NAME (tmp_name, prefix ? prefix : "T", tmp_var_id_num++);
-   return get_identifier (tmp_name);
- }
- 
- /* Create a new temporary variable declaration of type TYPE.
-    Do NOT push it into the current binding.  */
- 
- tree
- create_tmp_var_raw (tree type, const char *prefix)
- {
-   tree tmp_var;
- 
-   tmp_var = build_decl (input_location,
- 			VAR_DECL, prefix ? create_tmp_var_name (prefix) : NULL,
- 			type);
- 
-   /* The variable was declared by the compiler.  */
-   DECL_ARTIFICIAL (tmp_var) = 1;
-   /* And we don't want debug info for it.  */
-   DECL_IGNORED_P (tmp_var) = 1;
- 
-   /* Make the variable writable.  */
-   TREE_READONLY (tmp_var) = 0;
- 
-   DECL_EXTERNAL (tmp_var) = 0;
-   TREE_STATIC (tmp_var) = 0;
-   TREE_USED (tmp_var) = 1;
- 
-   return tmp_var;
- }
- 
- /* Create a new temporary variable declaration of type TYPE.  DO push the
-    variable into the current binding.  Further, assume that this is called
-    only from gimplification or optimization, at which point the creation of
-    certain types are bugs.  */
- 
- tree
- create_tmp_var (tree type, const char *prefix)
- {
-   tree tmp_var;
- 
-   /* We don't allow types that are addressable (meaning we can't make copies),
-      or incomplete.  We also used to reject every variable size objects here,
-      but now support those for which a constant upper bound can be obtained.
-      The processing for variable sizes is performed in gimple_add_tmp_var,
-      point at which it really matters and possibly reached via paths not going
-      through this function, e.g. after direct calls to create_tmp_var_raw.  */
-   gcc_assert (!TREE_ADDRESSABLE (type) && COMPLETE_TYPE_P (type));
- 
-   tmp_var = create_tmp_var_raw (type, prefix);
-   gimple_add_tmp_var (tmp_var);
-   return tmp_var;
- }
- 
- /* Create a new temporary variable declaration of type TYPE by calling
-    create_tmp_var and if TYPE is a vector or a complex number, mark the new
-    temporary as gimple register.  */
- 
- tree
- create_tmp_reg (tree type, const char *prefix)
- {
-   tree tmp;
- 
-   tmp = create_tmp_var (type, prefix);
-   if (TREE_CODE (type) == COMPLEX_TYPE
-       || TREE_CODE (type) == VECTOR_TYPE)
-     DECL_GIMPLE_REG_P (tmp) = 1;
- 
-   return tmp;
- }
- 
- /* Returns true iff T is a valid RHS for an assignment to a renamed
-    user -- or front-end generated artificial -- variable.  */
- 
- static bool
- is_gimple_reg_rhs (tree t)
- {
-   return get_gimple_rhs_class (TREE_CODE (t)) != GIMPLE_INVALID_RHS;
- }
- 
  /* Returns true iff T is a valid RHS for an assignment to an un-renamed
     LHS, or for a call argument.  */
  
--- 316,321 ----
*************** gimple_add_tmp_var (tree tmp)
*** 750,833 ****
      }
  }
  
- /* Determine whether to assign a location to the statement GS.  */
- 
- static bool
- should_carry_location_p (gimple gs)
- {
-   /* Don't emit a line note for a label.  We particularly don't want to
-      emit one for the break label, since it doesn't actually correspond
-      to the beginning of the loop/switch.  */
-   if (gimple_code (gs) == GIMPLE_LABEL)
-     return false;
- 
-   return true;
- }
- 
- /* Return true if a location should not be emitted for this statement
-    by annotate_one_with_location.  */
- 
- static inline bool
- gimple_do_not_emit_location_p (gimple g)
- {
-   return gimple_plf (g, GF_PLF_1);
- }
- 
- /* Mark statement G so a location will not be emitted by
-    annotate_one_with_location.  */
- 
- static inline void
- gimple_set_do_not_emit_location (gimple g)
- {
-   /* The PLF flags are initialized to 0 when a new tuple is created,
-      so no need to initialize it anywhere.  */
-   gimple_set_plf (g, GF_PLF_1, true);
- }
- 
- /* Set the location for gimple statement GS to LOCATION.  */
- 
- static void
- annotate_one_with_location (gimple gs, location_t location)
- {
-   if (!gimple_has_location (gs)
-       && !gimple_do_not_emit_location_p (gs)
-       && should_carry_location_p (gs))
-     gimple_set_location (gs, location);
- }
- 
- /* Set LOCATION for all the statements after iterator GSI in sequence
-    SEQ.  If GSI is pointing to the end of the sequence, start with the
-    first statement in SEQ.  */
- 
- static void
- annotate_all_with_location_after (gimple_seq seq, gimple_stmt_iterator gsi,
- 				  location_t location)
- {
-   if (gsi_end_p (gsi))
-     gsi = gsi_start (seq);
-   else
-     gsi_next (&gsi);
- 
-   for (; !gsi_end_p (gsi); gsi_next (&gsi))
-     annotate_one_with_location (gsi_stmt (gsi), location);
- }
- 
- /* Set the location for all the statements in a sequence STMT_P to LOCATION.  */
  
- void
- annotate_all_with_location (gimple_seq stmt_p, location_t location)
- {
-   gimple_stmt_iterator i;
- 
-   if (gimple_seq_empty_p (stmt_p))
-     return;
- 
-   for (i = gsi_start (stmt_p); !gsi_end_p (i); gsi_next (&i))
-     {
-       gimple gs = gsi_stmt (i);
-       annotate_one_with_location (gs, location);
-     }
- }
  \f
  /* This page contains routines to unshare tree nodes, i.e. to duplicate tree
     nodes that are referenced more than once in GENERIC functions.  This is
--- 582,588 ----
*************** gimplify_vla_decl (tree decl, gimple_seq
*** 1441,1446 ****
--- 1196,1215 ----
    gimplify_ctxp->save_stack = true;
  }
  
+ /* A helper function to be called via walk_tree.  Mark all labels under *TP
+    as being forced.  To be called for DECL_INITIAL of static variables.  */
+ 
+ static tree
+ force_labels_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
+ {
+   if (TYPE_P (*tp))
+     *walk_subtrees = 0;
+   if (TREE_CODE (*tp) == LABEL_DECL)
+     FORCED_LABEL (*tp) = 1;
+ 
+   return NULL_TREE;
+ }
+ 
  /* Gimplify a DECL_EXPR node *STMT_P by making any necessary allocation
     and initialization explicit.  */
  
*************** gimplify_statement_list (tree *expr_p, g
*** 1557,1764 ****
  
    return GS_ALL_DONE;
  }
- \f
- /* Compare two case labels.  Because the front end should already have
-    made sure that case ranges do not overlap, it is enough to only compare
-    the CASE_LOW values of each case label.  */
- 
- static int
- compare_case_labels (const void *p1, const void *p2)
- {
-   const_tree const case1 = *(const_tree const*)p1;
-   const_tree const case2 = *(const_tree const*)p2;
- 
-   /* The 'default' case label always goes first.  */
-   if (!CASE_LOW (case1))
-     return -1;
-   else if (!CASE_LOW (case2))
-     return 1;
-   else
-     return tree_int_cst_compare (CASE_LOW (case1), CASE_LOW (case2));
- }
- 
- /* Sort the case labels in LABEL_VEC in place in ascending order.  */
  
- void
- sort_case_labels (vec<tree> label_vec)
- {
-   label_vec.qsort (compare_case_labels);
- }
- \f
- /* Prepare a vector of case labels to be used in a GIMPLE_SWITCH statement.
- 
-    LABELS is a vector that contains all case labels to look at.
- 
-    INDEX_TYPE is the type of the switch index expression.  Case labels
-    in LABELS are discarded if their values are not in the value range
-    covered by INDEX_TYPE.  The remaining case label values are folded
-    to INDEX_TYPE.
- 
-    If a default case exists in LABELS, it is removed from LABELS and
-    returned in DEFAULT_CASEP.  If no default case exists, but the
-    case labels already cover the whole range of INDEX_TYPE, a default
-    case is returned pointing to one of the existing case labels.
-    Otherwise DEFAULT_CASEP is set to NULL_TREE.
- 
-    DEFAULT_CASEP may be NULL, in which case the above comment doesn't
-    apply and no action is taken regardless of whether a default case is
-    found or not.  */
- 
- void
- preprocess_case_label_vec_for_gimple (vec<tree> labels,
- 				      tree index_type,
- 				      tree *default_casep)
- {
-   tree min_value, max_value;
-   tree default_case = NULL_TREE;
-   size_t i, len;
- 
-   i = 0;
-   min_value = TYPE_MIN_VALUE (index_type);
-   max_value = TYPE_MAX_VALUE (index_type);
-   while (i < labels.length ())
-     {
-       tree elt = labels[i];
-       tree low = CASE_LOW (elt);
-       tree high = CASE_HIGH (elt);
-       bool remove_element = FALSE;
- 
-       if (low)
- 	{
- 	  gcc_checking_assert (TREE_CODE (low) == INTEGER_CST);
- 	  gcc_checking_assert (!high || TREE_CODE (high) == INTEGER_CST);
- 
- 	  /* This is a non-default case label, i.e. it has a value.
- 
- 	     See if the case label is reachable within the range of
- 	     the index type.  Remove out-of-range case values.  Turn
- 	     case ranges into a canonical form (high > low strictly)
- 	     and convert the case label values to the index type.
- 
- 	     NB: The type of gimple_switch_index() may be the promoted
- 	     type, but the case labels retain the original type.  */
- 
- 	  if (high)
- 	    {
- 	      /* This is a case range.  Discard empty ranges.
- 		 If the bounds or the range are equal, turn this
- 		 into a simple (one-value) case.  */
- 	      int cmp = tree_int_cst_compare (high, low);
- 	      if (cmp < 0)
- 		remove_element = TRUE;
- 	      else if (cmp == 0)
- 		high = NULL_TREE;
- 	    }
- 
- 	  if (! high)
- 	    {
- 	      /* If the simple case value is unreachable, ignore it.  */
- 	      if ((TREE_CODE (min_value) == INTEGER_CST
- 		   && tree_int_cst_compare (low, min_value) < 0)
- 		  || (TREE_CODE (max_value) == INTEGER_CST
- 		      && tree_int_cst_compare (low, max_value) > 0))
- 		remove_element = TRUE;
- 	      else
- 		low = fold_convert (index_type, low);
- 	    }
- 	  else
- 	    {
- 	      /* If the entire case range is unreachable, ignore it.  */
- 	      if ((TREE_CODE (min_value) == INTEGER_CST
- 		   && tree_int_cst_compare (high, min_value) < 0)
- 		  || (TREE_CODE (max_value) == INTEGER_CST
- 		      && tree_int_cst_compare (low, max_value) > 0))
- 		remove_element = TRUE;
- 	      else
- 		{
- 		  /* If the lower bound is less than the index type's
- 		     minimum value, truncate the range bounds.  */
- 		  if (TREE_CODE (min_value) == INTEGER_CST
- 		      && tree_int_cst_compare (low, min_value) < 0)
- 		    low = min_value;
- 		  low = fold_convert (index_type, low);
- 
- 		  /* If the upper bound is greater than the index type's
- 		     maximum value, truncate the range bounds.  */
- 		  if (TREE_CODE (max_value) == INTEGER_CST
- 		      && tree_int_cst_compare (high, max_value) > 0)
- 		    high = max_value;
- 		  high = fold_convert (index_type, high);
- 
- 		  /* We may have folded a case range to a one-value case.  */
- 		  if (tree_int_cst_equal (low, high))
- 		    high = NULL_TREE;
- 		}
- 	    }
- 
- 	  CASE_LOW (elt) = low;
- 	  CASE_HIGH (elt) = high;
- 	}
-       else
- 	{
- 	  gcc_assert (!default_case);
- 	  default_case = elt;
- 	  /* The default case must be passed separately to the
- 	     gimple_build_switch routine.  But if DEFAULT_CASEP
- 	     is NULL, we do not remove the default case (it would
- 	     be completely lost).  */
- 	  if (default_casep)
- 	    remove_element = TRUE;
- 	}
- 
-       if (remove_element)
- 	labels.ordered_remove (i);
-       else
- 	i++;
-     }
-   len = i;
- 
-   if (!labels.is_empty ())
-     sort_case_labels (labels);
- 
-   if (default_casep && !default_case)
-     {
-       /* If the switch has no default label, add one, so that we jump
- 	 around the switch body.  If the labels already cover the whole
- 	 range of the switch index_type, add the default label pointing
- 	 to one of the existing labels.  */
-       if (len
- 	  && TYPE_MIN_VALUE (index_type)
- 	  && TYPE_MAX_VALUE (index_type)
- 	  && tree_int_cst_equal (CASE_LOW (labels[0]),
- 				 TYPE_MIN_VALUE (index_type)))
- 	{
- 	  tree low, high = CASE_HIGH (labels[len - 1]);
- 	  if (!high)
- 	    high = CASE_LOW (labels[len - 1]);
- 	  if (tree_int_cst_equal (high, TYPE_MAX_VALUE (index_type)))
- 	    {
- 	      for (i = 1; i < len; i++)
- 		{
- 		  high = CASE_LOW (labels[i]);
- 		  low = CASE_HIGH (labels[i - 1]);
- 		  if (!low)
- 		    low = CASE_LOW (labels[i - 1]);
- 		  if ((TREE_INT_CST_LOW (low) + 1
- 		       != TREE_INT_CST_LOW (high))
- 		      || (TREE_INT_CST_HIGH (low)
- 			  + (TREE_INT_CST_LOW (high) == 0)
- 			  != TREE_INT_CST_HIGH (high)))
- 		    break;
- 		}
- 	      if (i == len)
- 		{
- 		  tree label = CASE_LABEL (labels[0]);
- 		  default_case = build_case_label (NULL_TREE, NULL_TREE,
- 						   label);
- 		}
- 	    }
- 	}
-     }
- 
-   if (default_casep)
-     *default_casep = default_case;
- }
  \f
  /* Gimplify a SWITCH_EXPR, and collect the vector of labels it can
     branch to.  */
--- 1326,1332 ----
*************** gimplify_exit_expr (tree *expr_p)
*** 1882,1901 ****
    return GS_OK;
  }
  
- /* A helper function to be called via walk_tree.  Mark all labels under *TP
-    as being forced.  To be called for DECL_INITIAL of static variables.  */
- 
- tree
- force_labels_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
- {
-   if (TYPE_P (*tp))
-     *walk_subtrees = 0;
-   if (TREE_CODE (*tp) == LABEL_DECL)
-     FORCED_LABEL (*tp) = 1;
- 
-   return NULL_TREE;
- }
- 
  /* *EXPR_P is a COMPONENT_REF being used as an rvalue.  If its type is
     different from its canonical type, wrap the whole thing inside a
     NOP_EXPR and force the type of the COMPONENT_REF to be the canonical
--- 1450,1455 ----
*************** gimplify_init_ctor_eval (tree object, ve
*** 3838,3844 ****
  
  /* Return the appropriate RHS predicate for this LHS.  */
  
! gimple_predicate
  rhs_predicate_for (tree lhs)
  {
    if (is_gimple_reg (lhs))
--- 3392,3398 ----
  
  /* Return the appropriate RHS predicate for this LHS.  */
  
! static gimple_predicate
  rhs_predicate_for (tree lhs)
  {
    if (is_gimple_reg (lhs))
*************** gimplify_va_arg_expr (tree *expr_p, gimp
*** 9421,9424 ****
      }
  }
  
! #include "gt-gimplify.h"
--- 8975,8994 ----
      }
  }
  
! /* Build a new GIMPLE_ASSIGN tuple and append it to the end of *SEQ_P.
! 
!    DST/SRC are the destination and source respectively.  You can pass
!    ungimplified trees in DST or SRC, in which case they will be
!    converted to a gimple operand if necessary.
! 
!    This function returns the newly created GIMPLE_ASSIGN tuple.  */
! 
! gimple
! gimplify_assign (tree dst, tree src, gimple_seq *seq_p)
! {
!   tree t = build2 (MODIFY_EXPR, TREE_TYPE (dst), dst, src);
!   gimplify_and_add (t, seq_p);
!   ggc_free (t);
!   return gimple_seq_last_stmt (*seq_p);
! }
! 
Index: gimple.c
===================================================================
*** gimple.c	(revision 204496)
--- gimple.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 29,34 ****
--- 29,35 ----
  #include "hard-reg-set.h"
  #include "basic-block.h"
  #include "gimple.h"
+ #include "gimplify.h"
  #include "diagnostic.h"
  #include "value-prof.h"
  #include "flags.h"
*************** gimple_build_assign_with_ops (enum tree_
*** 446,469 ****
  }
  
  
- /* Build a new GIMPLE_ASSIGN tuple and append it to the end of *SEQ_P.
- 
-    DST/SRC are the destination and source respectively.  You can pass
-    ungimplified trees in DST or SRC, in which case they will be
-    converted to a gimple operand if necessary.
- 
-    This function returns the newly created GIMPLE_ASSIGN tuple.  */
- 
- gimple
- gimplify_assign (tree dst, tree src, gimple_seq *seq_p)
- {
-   tree t = build2 (MODIFY_EXPR, TREE_TYPE (dst), dst, src);
-   gimplify_and_add (t, seq_p);
-   ggc_free (t);
-   return gimple_seq_last_stmt (*seq_p);
- }
- 
- 
  /* Build a GIMPLE_COND statement.
  
     PRED is the condition used to compare LHS and the RHS.
--- 447,452 ----
*************** gimple_seq_add_stmt (gimple_seq *seq_p,
*** 1172,1177 ****
--- 1155,1177 ----
    gsi_insert_after (&si, gs, GSI_NEW_STMT);
  }
  
+ /* Link gimple statement GS to the end of the sequence *SEQ_P.  If
+    *SEQ_P is NULL, a new sequence is allocated.  This function is
+    similar to gimple_seq_add_stmt, but does not scan the operands.
+    During gimplification, we need to manipulate statement sequences
+    before the def/use vectors have been constructed.  */
+ 
+ void
+ gimple_seq_add_stmt_without_update (gimple_seq *seq_p, gimple gs)
+ {
+   gimple_stmt_iterator si;
+ 
+   if (gs == NULL)
+     return;
+ 
+   si = gsi_last (*seq_p);
+   gsi_insert_after_without_update (&si, gs, GSI_NEW_STMT);
+ }
  
  /* Append sequence SRC to the end of sequence *DST_P.  If *DST_P is
     NULL, a new sequence is allocated.  */
*************** gimple_seq_add_seq (gimple_seq *dst_p, g
*** 1187,1192 ****
--- 1187,1250 ----
    gsi_insert_seq_after (&si, src, GSI_NEW_STMT);
  }
  
+ /* Determine whether to assign a location to the statement GS.  */
+ 
+ static bool
+ should_carry_location_p (gimple gs)
+ {
+   /* Don't emit a line note for a label.  We particularly don't want to
+      emit one for the break label, since it doesn't actually correspond
+      to the beginning of the loop/switch.  */
+   if (gimple_code (gs) == GIMPLE_LABEL)
+     return false;
+ 
+   return true;
+ }
+ 
+ /* Set the location for gimple statement GS to LOCATION.  */
+ 
+ static void
+ annotate_one_with_location (gimple gs, location_t location)
+ {
+   if (!gimple_has_location (gs)
+       && !gimple_do_not_emit_location_p (gs)
+       && should_carry_location_p (gs))
+     gimple_set_location (gs, location);
+ }
+ 
+ /* Set LOCATION for all the statements after iterator GSI in sequence
+    SEQ.  If GSI is pointing to the end of the sequence, start with the
+    first statement in SEQ.  */
+ 
+ void
+ annotate_all_with_location_after (gimple_seq seq, gimple_stmt_iterator gsi,
+ 				  location_t location)
+ {
+   if (gsi_end_p (gsi))
+     gsi = gsi_start (seq);
+   else
+     gsi_next (&gsi);
+ 
+   for (; !gsi_end_p (gsi); gsi_next (&gsi))
+     annotate_one_with_location (gsi_stmt (gsi), location);
+ }
+ 
+ /* Set the location for all the statements in a sequence STMT_P to LOCATION.  */
+ 
+ void
+ annotate_all_with_location (gimple_seq stmt_p, location_t location)
+ {
+   gimple_stmt_iterator i;
+ 
+   if (gimple_seq_empty_p (stmt_p))
+     return;
+ 
+   for (i = gsi_start (stmt_p); !gsi_end_p (i); gsi_next (&i))
+     {
+       gimple gs = gsi_stmt (i);
+       annotate_one_with_location (gs, location);
+     }
+ }
  
  /* Helper function of empty_body_p.  Return true if STMT is an empty
     statement.  */
*************** infer_nonnull_range (gimple stmt, tree o
*** 3428,3430 ****
--- 3486,3690 ----
  
    return false;
  }
+ 
+ /* Compare two case labels.  Because the front end should already have
+    made sure that case ranges do not overlap, it is enough to only compare
+    the CASE_LOW values of each case label.  */
+ 
+ static int
+ compare_case_labels (const void *p1, const void *p2)
+ {
+   const_tree const case1 = *(const_tree const*)p1;
+   const_tree const case2 = *(const_tree const*)p2;
+ 
+   /* The 'default' case label always goes first.  */
+   if (!CASE_LOW (case1))
+     return -1;
+   else if (!CASE_LOW (case2))
+     return 1;
+   else
+     return tree_int_cst_compare (CASE_LOW (case1), CASE_LOW (case2));
+ }
+ 
+ /* Sort the case labels in LABEL_VEC in place in ascending order.  */
+ 
+ void
+ sort_case_labels (vec<tree> label_vec)
+ {
+   label_vec.qsort (compare_case_labels);
+ }
+ \f
+ /* Prepare a vector of case labels to be used in a GIMPLE_SWITCH statement.
+ 
+    LABELS is a vector that contains all case labels to look at.
+ 
+    INDEX_TYPE is the type of the switch index expression.  Case labels
+    in LABELS are discarded if their values are not in the value range
+    covered by INDEX_TYPE.  The remaining case label values are folded
+    to INDEX_TYPE.
+ 
+    If a default case exists in LABELS, it is removed from LABELS and
+    returned in DEFAULT_CASEP.  If no default case exists, but the
+    case labels already cover the whole range of INDEX_TYPE, a default
+    case is returned pointing to one of the existing case labels.
+    Otherwise DEFAULT_CASEP is set to NULL_TREE.
+ 
+    DEFAULT_CASEP may be NULL, in which case the above comment doesn't
+    apply and no action is taken regardless of whether a default case is
+    found or not.  */
+ 
+ void
+ preprocess_case_label_vec_for_gimple (vec<tree> labels,
+ 				      tree index_type,
+ 				      tree *default_casep)
+ {
+   tree min_value, max_value;
+   tree default_case = NULL_TREE;
+   size_t i, len;
+ 
+   i = 0;
+   min_value = TYPE_MIN_VALUE (index_type);
+   max_value = TYPE_MAX_VALUE (index_type);
+   while (i < labels.length ())
+     {
+       tree elt = labels[i];
+       tree low = CASE_LOW (elt);
+       tree high = CASE_HIGH (elt);
+       bool remove_element = FALSE;
+ 
+       if (low)
+ 	{
+ 	  gcc_checking_assert (TREE_CODE (low) == INTEGER_CST);
+ 	  gcc_checking_assert (!high || TREE_CODE (high) == INTEGER_CST);
+ 
+ 	  /* This is a non-default case label, i.e. it has a value.
+ 
+ 	     See if the case label is reachable within the range of
+ 	     the index type.  Remove out-of-range case values.  Turn
+ 	     case ranges into a canonical form (high > low strictly)
+ 	     and convert the case label values to the index type.
+ 
+ 	     NB: The type of gimple_switch_index() may be the promoted
+ 	     type, but the case labels retain the original type.  */
+ 
+ 	  if (high)
+ 	    {
+ 	      /* This is a case range.  Discard empty ranges.
+ 		 If the bounds or the range are equal, turn this
+ 		 into a simple (one-value) case.  */
+ 	      int cmp = tree_int_cst_compare (high, low);
+ 	      if (cmp < 0)
+ 		remove_element = TRUE;
+ 	      else if (cmp == 0)
+ 		high = NULL_TREE;
+ 	    }
+ 
+ 	  if (! high)
+ 	    {
+ 	      /* If the simple case value is unreachable, ignore it.  */
+ 	      if ((TREE_CODE (min_value) == INTEGER_CST
+ 		   && tree_int_cst_compare (low, min_value) < 0)
+ 		  || (TREE_CODE (max_value) == INTEGER_CST
+ 		      && tree_int_cst_compare (low, max_value) > 0))
+ 		remove_element = TRUE;
+ 	      else
+ 		low = fold_convert (index_type, low);
+ 	    }
+ 	  else
+ 	    {
+ 	      /* If the entire case range is unreachable, ignore it.  */
+ 	      if ((TREE_CODE (min_value) == INTEGER_CST
+ 		   && tree_int_cst_compare (high, min_value) < 0)
+ 		  || (TREE_CODE (max_value) == INTEGER_CST
+ 		      && tree_int_cst_compare (low, max_value) > 0))
+ 		remove_element = TRUE;
+ 	      else
+ 		{
+ 		  /* If the lower bound is less than the index type's
+ 		     minimum value, truncate the range bounds.  */
+ 		  if (TREE_CODE (min_value) == INTEGER_CST
+ 		      && tree_int_cst_compare (low, min_value) < 0)
+ 		    low = min_value;
+ 		  low = fold_convert (index_type, low);
+ 
+ 		  /* If the upper bound is greater than the index type's
+ 		     maximum value, truncate the range bounds.  */
+ 		  if (TREE_CODE (max_value) == INTEGER_CST
+ 		      && tree_int_cst_compare (high, max_value) > 0)
+ 		    high = max_value;
+ 		  high = fold_convert (index_type, high);
+ 
+ 		  /* We may have folded a case range to a one-value case.  */
+ 		  if (tree_int_cst_equal (low, high))
+ 		    high = NULL_TREE;
+ 		}
+ 	    }
+ 
+ 	  CASE_LOW (elt) = low;
+ 	  CASE_HIGH (elt) = high;
+ 	}
+       else
+ 	{
+ 	  gcc_assert (!default_case);
+ 	  default_case = elt;
+ 	  /* The default case must be passed separately to the
+ 	     gimple_build_switch routine.  But if DEFAULT_CASEP
+ 	     is NULL, we do not remove the default case (it would
+ 	     be completely lost).  */
+ 	  if (default_casep)
+ 	    remove_element = TRUE;
+ 	}
+ 
+       if (remove_element)
+ 	labels.ordered_remove (i);
+       else
+ 	i++;
+     }
+   len = i;
+ 
+   if (!labels.is_empty ())
+     sort_case_labels (labels);
+ 
+   if (default_casep && !default_case)
+     {
+       /* If the switch has no default label, add one, so that we jump
+ 	 around the switch body.  If the labels already cover the whole
+ 	 range of the switch index_type, add the default label pointing
+ 	 to one of the existing labels.  */
+       if (len
+ 	  && TYPE_MIN_VALUE (index_type)
+ 	  && TYPE_MAX_VALUE (index_type)
+ 	  && tree_int_cst_equal (CASE_LOW (labels[0]),
+ 				 TYPE_MIN_VALUE (index_type)))
+ 	{
+ 	  tree low, high = CASE_HIGH (labels[len - 1]);
+ 	  if (!high)
+ 	    high = CASE_LOW (labels[len - 1]);
+ 	  if (tree_int_cst_equal (high, TYPE_MAX_VALUE (index_type)))
+ 	    {
+ 	      for (i = 1; i < len; i++)
+ 		{
+ 		  high = CASE_LOW (labels[i]);
+ 		  low = CASE_HIGH (labels[i - 1]);
+ 		  if (!low)
+ 		    low = CASE_LOW (labels[i - 1]);
+ 		  if ((TREE_INT_CST_LOW (low) + 1
+ 		       != TREE_INT_CST_LOW (high))
+ 		      || (TREE_INT_CST_HIGH (low)
+ 			  + (TREE_INT_CST_LOW (high) == 0)
+ 			  != TREE_INT_CST_HIGH (high)))
+ 		    break;
+ 		}
+ 	      if (i == len)
+ 		{
+ 		  tree label = CASE_LABEL (labels[0]);
+ 		  default_case = build_case_label (NULL_TREE, NULL_TREE,
+ 						   label);
+ 		}
+ 	    }
+ 	}
+     }
+ 
+   if (default_casep)
+     *default_casep = default_case;
+ }
Index: tree.h
===================================================================
*** tree.h	(revision 204496)
--- tree.h	(working copy)
*************** extern void cache_integer_cst (tree);
*** 4290,4299 ****
  /* In cgraph.c */
  extern void change_decl_assembler_name (tree, tree);
  \f
- /* In gimplify.c */
- extern tree unshare_expr (tree);
- extern tree unshare_expr_without_location (tree);
- \f
  /* In stmt.c */
  
  extern void expand_label (tree);
--- 4290,4295 ----
*************** extern void set_decl_incoming_rtl (tree,
*** 4797,4803 ****
  
  /* In gimple.c.  */
  extern tree get_base_address (tree t);
- extern void mark_addressable (tree);
  
  /* In tree.c.  */
  extern tree drop_tree_overflow (tree);
--- 4793,4798 ----
Index: Makefile.in
===================================================================
*** Makefile.in	(revision 204496)
--- Makefile.in	(working copy)
*************** GTFILES = $(CPP_ID_DATA_H) $(srcdir)/inp
*** 2254,2260 ****
    $(srcdir)/tree-ssanames.c $(srcdir)/tree-eh.c $(srcdir)/tree-ssa-address.c \
    $(srcdir)/tree-cfg.c \
    $(srcdir)/tree-dfa.c \
!   $(srcdir)/tree-iterator.c $(srcdir)/gimplify.c \
    $(srcdir)/tree-chrec.h \
    $(srcdir)/tree-scalar-evolution.c \
    $(srcdir)/tree-ssa-operands.h \
--- 2254,2260 ----
    $(srcdir)/tree-ssanames.c $(srcdir)/tree-eh.c $(srcdir)/tree-ssa-address.c \
    $(srcdir)/tree-cfg.c \
    $(srcdir)/tree-dfa.c \
!   $(srcdir)/tree-iterator.c $(srcdir)/gimple-expr.c \
    $(srcdir)/tree-chrec.h \
    $(srcdir)/tree-scalar-evolution.c \
    $(srcdir)/tree-ssa-operands.h \

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

* [patch 2/4] Separate gimple.[ch] and gimplify.[ch]
  2013-11-11 23:04 [patch 1/4] Separate gimple.[ch] and gimplify.[ch] Andrew MacLeod
@ 2013-11-11 23:18 ` Andrew MacLeod
  2013-11-11 23:51 ` [patch 3/4] Separate gimple.[ch] and gimplify.[ch] - front end files Andrew MacLeod
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 24+ messages in thread
From: Andrew MacLeod @ 2013-11-11 23:18 UTC (permalink / raw)
  To: gcc-patches, Jeff Law, Richard Biener, Diego Novillo

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

This one covers the middle and back end files which included gimple.h

Bootstraps on x86_64-unknown-linux-gnu with no new regressions.  OK?

Andrew

[-- Attachment #2: G2.patch --]
[-- Type: text/x-patch, Size: 40570 bytes --]


	* asan.c: Include gimplify.h rather than gimple.h.
	* cfgloopmanip.c: Likewise.
	* cgraphunit.c: Likewise.
	* cilk-common.c: Likewise.
	* dwarf2out.c: Dont include gimple.h.
	* fold-const.c: Include gimplify.h rather than gimple.h.
	* function.c: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-ssa-strength-reduction.c: Likewise.
	* graphite-clast-to-gimple.c: Likewise.
	* graphite-sese-to-poly.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-split.c: Likewise.
	* ipa.c: Likewise.
	* langhooks.c: Dont include gimple.h.
	* loop-init.c: Include gimplify.h rather than gimple.h.
	* omp-low.c: Likewise.
	* sese.c: Likewise.
	* stor-layout.c: Likewise.
	* targhooks.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-affine.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-complex.c: Likewise.
	* tree-if-conv.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-iterator.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-predcom.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-address.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-dce.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-ifcombine.c: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-loop-manip.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-ssa-loop-unswitch.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* tree-ssa-phiprop.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* tree-ssa-propagate.c: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-strlen.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-switch-conversio: Likewise.n.c
	* tree-tailcall.c: Likewise.
	* tree-vect-data-refs.c: Likewise.
	* tree-vect-generic.c: Likewise.
	* tree-vect-loop-manip.c: Likewise.
	* tree-vect-loop.c: Likewise.
	* tree-vect-patterns.c: Likewise.
	* tree-vect-stmts.c: Likewise.
	* tsan.c: Likewise.
	* value-prof.c: Likewise.

Index: asan.c
===================================================================
*** asan.c	(revision 204496)
--- asan.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 23,29 ****
  #include "system.h"
  #include "coretypes.h"
  #include "tree.h"
! #include "gimple.h"
  #include "tree-iterator.h"
  #include "cgraph.h"
  #include "tree-ssanames.h"
--- 23,29 ----
  #include "system.h"
  #include "coretypes.h"
  #include "tree.h"
! #include "gimplify.h"
  #include "tree-iterator.h"
  #include "cgraph.h"
  #include "tree-ssanames.h"
Index: cfgloopmanip.c
===================================================================
*** cfgloopmanip.c	(revision 204496)
--- cfgloopmanip.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 25,31 ****
  #include "basic-block.h"
  #include "cfgloop.h"
  #include "tree.h"
! #include "gimple.h"
  #include "tree-ssa-loop-manip.h"
  #include "dumpfile.h"
  
--- 25,31 ----
  #include "basic-block.h"
  #include "cfgloop.h"
  #include "tree.h"
! #include "gimplify.h"
  #include "tree-ssa-loop-manip.h"
  #include "dumpfile.h"
  
Index: cgraphunit.c
===================================================================
*** cgraphunit.c	(revision 204496)
--- cgraphunit.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 164,170 ****
  #include "tree.h"
  #include "output.h"
  #include "rtl.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-into-ssa.h"
--- 164,170 ----
  #include "tree.h"
  #include "output.h"
  #include "rtl.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-into-ssa.h"
Index: cilk-common.c
===================================================================
*** cilk-common.c	(revision 204496)
--- cilk-common.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 29,35 ****
  #include "optabs.h"
  #include "recog.h"
  #include "tree-iterator.h"
! #include "gimple.h"
  #include "cilk.h"
  
  /* This structure holds all the important fields of the internal structures,
--- 29,35 ----
  #include "optabs.h"
  #include "recog.h"
  #include "tree-iterator.h"
! #include "gimplify.h"
  #include "cilk.h"
  
  /* This structure holds all the important fields of the internal structures,
Index: dwarf2out.c
===================================================================
*** dwarf2out.c	(revision 204496)
--- dwarf2out.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 87,93 ****
  #include "hash-table.h"
  #include "cgraph.h"
  #include "input.h"
- #include "gimple.h"
  #include "ira.h"
  #include "lra.h"
  #include "dumpfile.h"
--- 87,92 ----
Index: fold-const.c
===================================================================
*** fold-const.c	(revision 204496)
--- fold-const.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 57,63 ****
  #include "hash-table.h"
  #include "langhooks.h"
  #include "md5.h"
! #include "gimple.h"
  #include "tree-dfa.h"
  
  /* Nonzero if we are folding constants inside an initializer; zero
--- 57,63 ----
  #include "hash-table.h"
  #include "langhooks.h"
  #include "md5.h"
! #include "gimplify.h"
  #include "tree-dfa.h"
  
  /* Nonzero if we are folding constants inside an initializer; zero
Index: function.c
===================================================================
*** function.c	(revision 204496)
--- function.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 55,61 ****
  #include "langhooks.h"
  #include "target.h"
  #include "common/common-target.h"
! #include "gimple.h"
  #include "tree-pass.h"
  #include "predict.h"
  #include "df.h"
--- 55,61 ----
  #include "langhooks.h"
  #include "target.h"
  #include "common/common-target.h"
! #include "gimplify.h"
  #include "tree-pass.h"
  #include "predict.h"
  #include "df.h"
Index: gimple-fold.c
===================================================================
*** gimple-fold.c	(revision 204496)
--- gimple-fold.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 27,33 ****
  #include "function.h"
  #include "dumpfile.h"
  #include "bitmap.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-ssanames.h"
  #include "tree-into-ssa.h"
--- 27,33 ----
  #include "function.h"
  #include "dumpfile.h"
  #include "bitmap.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-ssanames.h"
  #include "tree-into-ssa.h"
Index: gimple-ssa-strength-reduction.c
===================================================================
*** gimple-ssa-strength-reduction.c	(revision 204496)
--- gimple-ssa-strength-reduction.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 37,43 ****
  #include "system.h"
  #include "coretypes.h"
  #include "tree.h"
! #include "gimple.h"
  #include "basic-block.h"
  #include "tree-pass.h"
  #include "cfgloop.h"
--- 37,43 ----
  #include "system.h"
  #include "coretypes.h"
  #include "tree.h"
! #include "gimplify.h"
  #include "basic-block.h"
  #include "tree-pass.h"
  #include "cfgloop.h"
Index: graphite-clast-to-gimple.c
===================================================================
*** graphite-clast-to-gimple.c	(revision 204496)
--- graphite-clast-to-gimple.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 36,42 ****
  #include "coretypes.h"
  #include "diagnostic-core.h"
  #include "tree.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-ssa-loop-manip.h"
  #include "tree-ssa-loop.h"
--- 36,42 ----
  #include "coretypes.h"
  #include "diagnostic-core.h"
  #include "tree.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-ssa-loop-manip.h"
  #include "tree-ssa-loop.h"
Index: graphite-sese-to-poly.c
===================================================================
*** graphite-sese-to-poly.c	(revision 204496)
--- graphite-sese-to-poly.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 34,40 ****
  #include "system.h"
  #include "coretypes.h"
  #include "tree.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 34,40 ----
  #include "system.h"
  #include "coretypes.h"
  #include "tree.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: ipa-prop.c
===================================================================
*** ipa-prop.c	(revision 204496)
--- ipa-prop.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 21,27 ****
  #include "system.h"
  #include "coretypes.h"
  #include "tree.h"
! #include "gimple.h"
  #include "langhooks.h"
  #include "ggc.h"
  #include "target.h"
--- 21,27 ----
  #include "system.h"
  #include "coretypes.h"
  #include "tree.h"
! #include "gimplify.h"
  #include "langhooks.h"
  #include "ggc.h"
  #include "target.h"
Index: ipa-split.c
===================================================================
*** ipa-split.c	(revision 204496)
--- ipa-split.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 78,84 ****
  #include "system.h"
  #include "coretypes.h"
  #include "tree.h"
! #include "gimple.h"
  #include "target.h"
  #include "ipa-prop.h"
  #include "gimple-ssa.h"
--- 78,84 ----
  #include "system.h"
  #include "coretypes.h"
  #include "tree.h"
! #include "gimplify.h"
  #include "target.h"
  #include "ipa-prop.h"
  #include "gimple-ssa.h"
Index: ipa.c
===================================================================
*** ipa.c	(revision 204496)
--- ipa.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 24,30 ****
  #include "tree.h"
  #include "cgraph.h"
  #include "tree-pass.h"
! #include "gimple.h"
  #include "ggc.h"
  #include "flags.h"
  #include "pointer-set.h"
--- 24,30 ----
  #include "tree.h"
  #include "cgraph.h"
  #include "tree-pass.h"
! #include "gimplify.h"
  #include "ggc.h"
  #include "flags.h"
  #include "pointer-set.h"
Index: langhooks.c
===================================================================
*** langhooks.c	(revision 204496)
--- langhooks.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 26,32 ****
  #include "toplev.h"
  #include "tree.h"
  #include "tree-inline.h"
! #include "gimple.h"
  #include "rtl.h"
  #include "insn-config.h"
  #include "flags.h"
--- 26,32 ----
  #include "toplev.h"
  #include "tree.h"
  #include "tree-inline.h"
! #include "gimplify.h"
  #include "rtl.h"
  #include "insn-config.h"
  #include "flags.h"
Index: loop-init.c
===================================================================
*** loop-init.c	(revision 204496)
--- loop-init.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 31,37 ****
  #include "flags.h"
  #include "df.h"
  #include "ggc.h"
- #include "gimple.h"
  #include "tree-ssa-loop-niter.h"
  
  \f
--- 31,36 ----
Index: omp-low.c
===================================================================
*** omp-low.c	(revision 204496)
--- omp-low.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 27,33 ****
  #include "tm.h"
  #include "tree.h"
  #include "rtl.h"
! #include "gimple.h"
  #include "tree-iterator.h"
  #include "tree-inline.h"
  #include "langhooks.h"
--- 27,33 ----
  #include "tm.h"
  #include "tree.h"
  #include "rtl.h"
! #include "gimplify.h"
  #include "tree-iterator.h"
  #include "tree-inline.h"
  #include "langhooks.h"
Index: sese.c
===================================================================
*** sese.c	(revision 204496)
--- sese.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 25,31 ****
  #include "hash-table.h"
  #include "tree.h"
  #include "tree-pretty-print.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 25,31 ----
  #include "hash-table.h"
  #include "tree.h"
  #include "tree-pretty-print.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: stor-layout.c
===================================================================
*** stor-layout.c	(revision 204496)
--- stor-layout.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 37,43 ****
  #include "cgraph.h"
  #include "tree-inline.h"
  #include "tree-dump.h"
! #include "gimple.h"
  
  /* Data type for the expressions representing sizes of data types.
     It is the first integer type laid out.  */
--- 37,43 ----
  #include "cgraph.h"
  #include "tree-inline.h"
  #include "tree-dump.h"
! #include "gimplify.h"
  
  /* Data type for the expressions representing sizes of data types.
     It is the first integer type laid out.  */
Index: targhooks.c
===================================================================
*** targhooks.c	(revision 204496)
--- targhooks.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 68,74 ****
  #include "recog.h"
  #include "intl.h"
  #include "opts.h"
! #include "gimple.h"
  #include "tree-ssanames.h"
  #include "tree-ssa-alias.h"
  #include "insn-codes.h"
--- 68,74 ----
  #include "recog.h"
  #include "intl.h"
  #include "opts.h"
! #include "gimplify.h"
  #include "tree-ssanames.h"
  #include "tree-ssa-alias.h"
  #include "insn-codes.h"
Index: trans-mem.c
===================================================================
*** trans-mem.c	(revision 204496)
--- trans-mem.c	(working copy)
***************
*** 22,28 ****
  #include "coretypes.h"
  #include "hash-table.h"
  #include "tree.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "cgraph.h"
  #include "tree-cfg.h"
--- 22,28 ----
  #include "coretypes.h"
  #include "hash-table.h"
  #include "tree.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "cgraph.h"
  #include "tree-cfg.h"
Index: tree-affine.c
===================================================================
*** tree-affine.c	(revision 204496)
--- tree-affine.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 24,30 ****
  #include "tree-pretty-print.h"
  #include "pointer-set.h"
  #include "tree-affine.h"
! #include "gimple.h"
  #include "flags.h"
  #include "dumpfile.h"
  
--- 24,30 ----
  #include "tree-pretty-print.h"
  #include "pointer-set.h"
  #include "tree-affine.h"
! #include "gimplify.h"
  #include "flags.h"
  #include "dumpfile.h"
  
Index: tree-cfg.c
===================================================================
*** tree-cfg.c	(revision 204496)
--- tree-cfg.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 30,36 ****
  #include "function.h"
  #include "ggc.h"
  #include "gimple-pretty-print.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "cgraph.h"
  #include "tree-cfg.h"
--- 30,36 ----
  #include "function.h"
  #include "ggc.h"
  #include "gimple-pretty-print.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "cgraph.h"
  #include "tree-cfg.h"
Index: tree-cfgcleanup.c
===================================================================
*** tree-cfgcleanup.c	(revision 204496)
--- tree-cfgcleanup.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 29,35 ****
  #include "function.h"
  #include "ggc.h"
  #include "langhooks.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 29,35 ----
  #include "function.h"
  #include "ggc.h"
  #include "langhooks.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: tree-complex.c
===================================================================
*** tree-complex.c	(revision 204496)
--- tree-complex.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 23,29 ****
  #include "tm.h"
  #include "tree.h"
  #include "flags.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 23,29 ----
  #include "tm.h"
  #include "tree.h"
  #include "flags.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: tree-if-conv.c
===================================================================
*** tree-if-conv.c	(revision 204496)
--- tree-if-conv.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 88,94 ****
  #include "flags.h"
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 88,94 ----
  #include "flags.h"
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: tree-inline.c
===================================================================
*** tree-inline.c	(revision 204496)
--- tree-inline.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 34,40 ****
  #include "basic-block.h"
  #include "tree-iterator.h"
  #include "intl.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 34,40 ----
  #include "basic-block.h"
  #include "tree-iterator.h"
  #include "intl.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: tree-iterator.c
===================================================================
*** tree-iterator.c	(revision 204496)
--- tree-iterator.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 22,28 ****
  #include "system.h"
  #include "coretypes.h"
  #include "tree.h"
- #include "gimple.h"
  #include "tree-iterator.h"
  #include "ggc.h"
  
--- 22,27 ----
Index: tree-loop-distribution.c
===================================================================
*** tree-loop-distribution.c	(revision 204496)
--- tree-loop-distribution.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 45,51 ****
  #include "system.h"
  #include "coretypes.h"
  #include "tree.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 45,51 ----
  #include "system.h"
  #include "coretypes.h"
  #include "tree.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: tree-nested.c
===================================================================
*** tree-nested.c	(revision 204496)
--- tree-nested.c	(working copy)
***************
*** 26,32 ****
  #include "function.h"
  #include "tree-dump.h"
  #include "tree-inline.h"
! #include "gimple.h"
  #include "tree-iterator.h"
  #include "bitmap.h"
  #include "cgraph.h"
--- 26,32 ----
  #include "function.h"
  #include "tree-dump.h"
  #include "tree-inline.h"
! #include "gimplify.h"
  #include "tree-iterator.h"
  #include "bitmap.h"
  #include "cgraph.h"
Index: tree-parloops.c
===================================================================
*** tree-parloops.c	(revision 204496)
--- tree-parloops.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 23,29 ****
  #include "system.h"
  #include "coretypes.h"
  #include "tree.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 23,29 ----
  #include "system.h"
  #include "coretypes.h"
  #include "tree.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: tree-predcom.c
===================================================================
*** tree-predcom.c	(revision 204496)
--- tree-predcom.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 191,197 ****
  #include "tree.h"
  #include "tm_p.h"
  #include "cfgloop.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-phinodes.h"
  #include "ssa-iterators.h"
--- 191,197 ----
  #include "tree.h"
  #include "tm_p.h"
  #include "cfgloop.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-phinodes.h"
  #include "ssa-iterators.h"
Index: tree-profile.c
===================================================================
*** tree-profile.c	(revision 204496)
--- tree-profile.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 34,40 ****
  #include "diagnostic-core.h"
  #include "coverage.h"
  #include "tree.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "cgraph.h"
  #include "tree-cfg.h"
--- 34,40 ----
  #include "diagnostic-core.h"
  #include "coverage.h"
  #include "tree.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "cgraph.h"
  #include "tree-cfg.h"
Index: tree-scalar-evolution.c
===================================================================
*** tree-scalar-evolution.c	(revision 204496)
--- tree-scalar-evolution.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 259,265 ****
  #include "tree.h"
  #include "hash-table.h"
  #include "gimple-pretty-print.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 259,265 ----
  #include "tree.h"
  #include "hash-table.h"
  #include "gimple-pretty-print.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: tree-sra.c
===================================================================
*** tree-sra.c	(revision 204496)
--- tree-sra.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 78,84 ****
  #include "alloc-pool.h"
  #include "tm.h"
  #include "tree.h"
! #include "gimple.h"
  #include "bitmap.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
--- 78,84 ----
  #include "alloc-pool.h"
  #include "tm.h"
  #include "tree.h"
! #include "gimplify.h"
  #include "bitmap.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
Index: tree-ssa-address.c
===================================================================
*** tree-ssa-address.c	(revision 204496)
--- tree-ssa-address.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 28,34 ****
  #include "tm_p.h"
  #include "basic-block.h"
  #include "tree-pretty-print.h"
! #include "gimple.h"
  #include "tree-ssanames.h"
  #include "tree-ssa-loop-ivopts.h"
  #include "tree-dfa.h"
--- 28,34 ----
  #include "tm_p.h"
  #include "basic-block.h"
  #include "tree-pretty-print.h"
! #include "gimplify.h"
  #include "tree-ssanames.h"
  #include "tree-ssa-loop-ivopts.h"
  #include "tree-dfa.h"
Index: tree-ssa-ccp.c
===================================================================
*** tree-ssa-ccp.c	(revision 204496)
--- tree-ssa-ccp.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 119,125 ****
  #include "basic-block.h"
  #include "function.h"
  #include "gimple-pretty-print.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 119,125 ----
  #include "basic-block.h"
  #include "function.h"
  #include "gimple-pretty-print.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: tree-ssa-dce.c
===================================================================
*** tree-ssa-dce.c	(revision 204496)
--- tree-ssa-dce.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 50,56 ****
  #include "tree.h"
  #include "gimple-pretty-print.h"
  #include "basic-block.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 50,56 ----
  #include "tree.h"
  #include "gimple-pretty-print.h"
  #include "basic-block.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: tree-ssa-forwprop.c
===================================================================
*** tree-ssa-forwprop.c	(revision 204496)
--- tree-ssa-forwprop.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 25,31 ****
  #include "tm_p.h"
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 25,31 ----
  #include "tm_p.h"
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: tree-ssa-ifcombine.c
===================================================================
*** tree-ssa-ifcombine.c	(revision 204496)
--- tree-ssa-ifcombine.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 29,35 ****
  #include "tree.h"
  #include "basic-block.h"
  #include "tree-pretty-print.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 29,35 ----
  #include "tree.h"
  #include "basic-block.h"
  #include "tree-pretty-print.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: tree-ssa-loop-im.c
===================================================================
*** tree-ssa-loop-im.c	(revision 204496)
--- tree-ssa-loop-im.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 25,31 ****
  #include "tm_p.h"
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 25,31 ----
  #include "tm_p.h"
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: tree-ssa-loop-ivopts.c
===================================================================
*** tree-ssa-loop-ivopts.c	(revision 204496)
--- tree-ssa-loop-ivopts.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 69,75 ****
  #include "tm_p.h"
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "cgraph.h"
  #include "tree-cfg.h"
--- 69,75 ----
  #include "tm_p.h"
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "cgraph.h"
  #include "tree-cfg.h"
Index: tree-ssa-loop-manip.c
===================================================================
*** tree-ssa-loop-manip.c	(revision 204496)
--- tree-ssa-loop-manip.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 24,30 ****
  #include "tree.h"
  #include "tm_p.h"
  #include "basic-block.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 24,30 ----
  #include "tree.h"
  #include "tm_p.h"
  #include "basic-block.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: tree-ssa-loop-niter.c
===================================================================
*** tree-ssa-loop-niter.c	(revision 204496)
--- tree-ssa-loop-niter.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 26,32 ****
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
  #include "intl.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 26,32 ----
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
  #include "intl.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: tree-ssa-loop-prefetch.c
===================================================================
*** tree-ssa-loop-prefetch.c	(revision 204496)
--- tree-ssa-loop-prefetch.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 25,31 ****
  #include "tm_p.h"
  #include "basic-block.h"
  #include "tree-pretty-print.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-ssa-loop-ivopts.h"
  #include "tree-ssa-loop-manip.h"
--- 25,31 ----
  #include "tm_p.h"
  #include "basic-block.h"
  #include "tree-pretty-print.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-ssa-loop-ivopts.h"
  #include "tree-ssa-loop-manip.h"
Index: tree-ssa-loop-unswitch.c
===================================================================
*** tree-ssa-loop-unswitch.c	(revision 204496)
--- tree-ssa-loop-unswitch.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 24,30 ****
  #include "tree.h"
  #include "tm_p.h"
  #include "basic-block.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 24,30 ----
  #include "tree.h"
  #include "tm_p.h"
  #include "basic-block.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: tree-ssa-math-opts.c
===================================================================
*** tree-ssa-math-opts.c	(revision 204496)
--- tree-ssa-math-opts.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 90,96 ****
  #include "tm.h"
  #include "flags.h"
  #include "tree.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 90,96 ----
  #include "tm.h"
  #include "flags.h"
  #include "tree.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: tree-ssa-phiopt.c
===================================================================
*** tree-ssa-phiopt.c	(revision 204496)
--- tree-ssa-phiopt.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 27,33 ****
  #include "flags.h"
  #include "tm_p.h"
  #include "basic-block.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 27,33 ----
  #include "flags.h"
  #include "tm_p.h"
  #include "basic-block.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: tree-ssa-phiprop.c
===================================================================
*** tree-ssa-phiprop.c	(revision 204496)
--- tree-ssa-phiprop.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 26,32 ****
  #include "tm_p.h"
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-phinodes.h"
  #include "ssa-iterators.h"
--- 26,32 ----
  #include "tm_p.h"
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-phinodes.h"
  #include "ssa-iterators.h"
Index: tree-ssa-pre.c
===================================================================
*** tree-ssa-pre.c	(revision 204496)
--- tree-ssa-pre.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 27,33 ****
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
  #include "tree-inline.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 27,33 ----
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
  #include "tree-inline.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: tree-ssa-propagate.c
===================================================================
*** tree-ssa-propagate.c	(revision 204496)
--- tree-ssa-propagate.c	(working copy)
***************
*** 30,36 ****
  #include "gimple-pretty-print.h"
  #include "dumpfile.h"
  #include "sbitmap.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 30,36 ----
  #include "gimple-pretty-print.h"
  #include "dumpfile.h"
  #include "sbitmap.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: tree-ssa-reassoc.c
===================================================================
*** tree-ssa-reassoc.c	(revision 204496)
--- tree-ssa-reassoc.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 29,35 ****
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
  #include "tree-inline.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 29,35 ----
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
  #include "tree-inline.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: tree-ssa-sccvn.c
===================================================================
*** tree-ssa-sccvn.c	(revision 204496)
--- tree-ssa-sccvn.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 26,32 ****
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
  #include "tree-inline.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-phinodes.h"
  #include "ssa-iterators.h"
--- 26,32 ----
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
  #include "tree-inline.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-phinodes.h"
  #include "ssa-iterators.h"
Index: tree-ssa-strlen.c
===================================================================
*** tree-ssa-strlen.c	(revision 204496)
--- tree-ssa-strlen.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 24,30 ****
  #include "tree.h"
  #include "hash-table.h"
  #include "bitmap.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-phinodes.h"
  #include "ssa-iterators.h"
--- 24,30 ----
  #include "tree.h"
  #include "hash-table.h"
  #include "bitmap.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-phinodes.h"
  #include "ssa-iterators.h"
Index: tree-ssa.c
===================================================================
*** tree-ssa.c	(revision 204496)
--- tree-ssa.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 31,37 ****
  #include "function.h"
  #include "gimple-pretty-print.h"
  #include "pointer-set.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-phinodes.h"
  #include "ssa-iterators.h"
--- 31,37 ----
  #include "function.h"
  #include "gimple-pretty-print.h"
  #include "pointer-set.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-phinodes.h"
  #include "ssa-iterators.h"
Index: tree-switch-conversion.c
===================================================================
*** tree-switch-conversion.c	(revision 204496)
--- tree-switch-conversion.c	(working copy)
*************** Software Foundation, 51 Franklin Street,
*** 31,37 ****
  #include "flags.h"
  #include "tree.h"
  #include "basic-block.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "cgraph.h"
  #include "tree-cfg.h"
--- 31,37 ----
  #include "flags.h"
  #include "tree.h"
  #include "basic-block.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "cgraph.h"
  #include "tree-cfg.h"
Index: tree-tailcall.c
===================================================================
*** tree-tailcall.c	(revision 204496)
--- tree-tailcall.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 25,31 ****
  #include "tm_p.h"
  #include "basic-block.h"
  #include "function.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 25,31 ----
  #include "tm_p.h"
  #include "basic-block.h"
  #include "function.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: tree-vect-data-refs.c
===================================================================
*** tree-vect-data-refs.c	(revision 204496)
--- tree-vect-data-refs.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 30,36 ****
  #include "target.h"
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-phinodes.h"
  #include "ssa-iterators.h"
--- 30,36 ----
  #include "target.h"
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-phinodes.h"
  #include "ssa-iterators.h"
Index: tree-vect-generic.c
===================================================================
*** tree-vect-generic.c	(revision 204496)
--- tree-vect-generic.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 23,29 ****
  #include "tree.h"
  #include "tm.h"
  #include "langhooks.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-ssanames.h"
--- 23,29 ----
  #include "tree.h"
  #include "tm.h"
  #include "langhooks.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-ssanames.h"
Index: tree-vect-loop-manip.c
===================================================================
*** tree-vect-loop-manip.c	(revision 204496)
--- tree-vect-loop-manip.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 28,34 ****
  #include "tree.h"
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 28,34 ----
  #include "tree.h"
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: tree-vect-loop.c
===================================================================
*** tree-vect-loop.c	(revision 204496)
--- tree-vect-loop.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 28,34 ****
  #include "tree.h"
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-phinodes.h"
  #include "ssa-iterators.h"
--- 28,34 ----
  #include "tree.h"
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-phinodes.h"
  #include "ssa-iterators.h"
Index: tree-vect-patterns.c
===================================================================
*** tree-vect-patterns.c	(revision 204496)
--- tree-vect-patterns.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 27,33 ****
  #include "target.h"
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-phinodes.h"
  #include "ssa-iterators.h"
--- 27,33 ----
  #include "target.h"
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-phinodes.h"
  #include "ssa-iterators.h"
Index: tree-vect-stmts.c
===================================================================
*** tree-vect-stmts.c	(revision 204496)
--- tree-vect-stmts.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 29,35 ****
  #include "target.h"
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 29,35 ----
  #include "target.h"
  #include "basic-block.h"
  #include "gimple-pretty-print.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
Index: tsan.c
===================================================================
*** tsan.c	(revision 204496)
--- tsan.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 26,32 ****
  #include "intl.h"
  #include "tm.h"
  #include "basic-block.h"
! #include "gimple.h"
  #include "function.h"
  #include "gimple-ssa.h"
  #include "cgraph.h"
--- 26,32 ----
  #include "intl.h"
  #include "tm.h"
  #include "basic-block.h"
! #include "gimplify.h"
  #include "function.h"
  #include "gimple-ssa.h"
  #include "cgraph.h"
Index: value-prof.c
===================================================================
*** value-prof.c	(revision 204496)
--- value-prof.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 33,39 ****
  #include "optabs.h"
  #include "regs.h"
  #include "ggc.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"
--- 33,39 ----
  #include "optabs.h"
  #include "regs.h"
  #include "ggc.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-cfg.h"
  #include "tree-phinodes.h"

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

* [patch 3/4] Separate gimple.[ch] and gimplify.[ch] - front end files
  2013-11-11 23:04 [patch 1/4] Separate gimple.[ch] and gimplify.[ch] Andrew MacLeod
  2013-11-11 23:18 ` [patch 2/4] " Andrew MacLeod
@ 2013-11-11 23:51 ` Andrew MacLeod
  2013-11-13 10:48   ` Richard Biener
  2013-11-11 23:53 ` [patch 4/4] Separate gimple.[ch] and gimplify.[ch] Andrew MacLeod
  2013-11-12 21:16 ` [patch 1/4] " Jeff Law
  3 siblings, 1 reply; 24+ messages in thread
From: Andrew MacLeod @ 2013-11-11 23:51 UTC (permalink / raw)
  To: gcc-patches, Jeff Law, Richard Biener, Diego Novillo

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

This one covers the front end files which included gimple.h

Bootstraps on x86_64-unknown-linux-gnu with no new regressions.  OK?

Andrew

[-- Attachment #2: G3.patch --]
[-- Type: text/x-patch, Size: 17908 bytes --]


	* ada/gcc-interface/trans.c: Include gimplify.h.

	* c/c-typeck.c: Include gimplify.h.

	* c-family/c-common.c: Include gimplify.h.
	* c-family/c-gimplify.c: Likewise.
	* c-family/cilk.c: Likewise.
	* c-family/c-omp.c: Include gimple-expr.h instead of gimple.h.
	* c-family/c-ubsan.c: Don't include gimple.h.

	* cp/class.c: Include gimplify.h.
	* cp/cp-gimplify.c: Likewise.
	* cp/error.c: Likewise.
	* cp/init.c: Likewise.
	* cp/optimize.c: Likewise.
	* cp/pt.c: Likewise.
	* cp/semantics.c: Likewise.
	* cp/tree.c: Likewise.
	* cp/vtable-class-hierarchy.c: Likewise.
	* cp/decl2.c: Don't include gimple.h.
	* cp/except.c: Likewise.
	* cp/method.c: Include pointer-set.h instead of gimple.h.

	* fortran/f95-lang.c: Don't include gimple.h.
	* fortran/trans-array.c: Include gimple-expr.h instead of gimple.h.
	* fortran/trans.c: Likewise.
	* fortran/trans-decl.c: Likewise.
	* fortran/trans-expr.c: Include gimplify.h.
	* fortran/trans-openmp.c: Likewise.

	* go/go-lang.c: Include gimplify.h.
	* go/gofrontend/expressions.cc: Likewise.
	* go/gofrontend/gogo-tree.cc: Likewise.
	* go/gofrontend/types.cc: Likewise.

	* java/java-gimplify.c: Include gimplify.h.

	* objc/objc-act.c: Include gimplify.h.

Index: ada/gcc-interface/trans.c
===================================================================
*** ada/gcc-interface/trans.c	(revision 204496)
--- ada/gcc-interface/trans.c	(working copy)
***************
*** 33,39 ****
  #include "output.h"
  #include "libfuncs.h"	/* For set_stack_check_libfunc.  */
  #include "tree-iterator.h"
! #include "gimple.h"
  #include "bitmap.h"
  #include "cgraph.h"
  #include "diagnostic.h"
--- 33,39 ----
  #include "output.h"
  #include "libfuncs.h"	/* For set_stack_check_libfunc.  */
  #include "tree-iterator.h"
! #include "gimplify.h"
  #include "bitmap.h"
  #include "cgraph.h"
  #include "diagnostic.h"
Index: c/c-typeck.c
===================================================================
*** c/c-typeck.c	(revision 204496)
--- c/c-typeck.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 36,42 ****
  #include "target.h"
  #include "tree-iterator.h"
  #include "bitmap.h"
! #include "gimple.h"
  #include "tree-inline.h"
  #include "omp-low.h"
  #include "c-family/c-objc.h"
--- 36,42 ----
  #include "target.h"
  #include "tree-iterator.h"
  #include "bitmap.h"
! #include "gimplify.h"
  #include "tree-inline.h"
  #include "omp-low.h"
  #include "c-family/c-objc.h"
Index: c-family/c-common.c
===================================================================
*** c-family/c-common.c	(revision 204496)
--- c-family/c-common.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 42,47 ****
--- 42,48 ----
  #include "opts.h"
  #include "cgraph.h"
  #include "target-def.h"
+ #include "gimplify.h"
  
  cpp_reader *parse_in;		/* Declared in c-pragma.h.  */
  
Index: c-family/c-gimplify.c
===================================================================
*** c-family/c-gimplify.c	(revision 204496)
--- c-family/c-gimplify.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 29,35 ****
  #include "tm.h"
  #include "tree.h"
  #include "c-common.h"
! #include "gimple.h"
  #include "tree-inline.h"
  #include "diagnostic-core.h"
  #include "langhooks.h"
--- 29,35 ----
  #include "tm.h"
  #include "tree.h"
  #include "c-common.h"
! #include "gimplify.h"
  #include "tree-inline.h"
  #include "diagnostic-core.h"
  #include "langhooks.h"
Index: c-family/cilk.c
===================================================================
*** c-family/cilk.c	(revision 204496)
--- c-family/cilk.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 25,31 ****
  #include "coretypes.h"
  #include "tree.h"
  #include "langhooks.h"
! #include "gimple.h"
  #include "tree-iterator.h"
  #include "tree-inline.h"
  #include "c-family/c-common.h"
--- 25,31 ----
  #include "coretypes.h"
  #include "tree.h"
  #include "langhooks.h"
! #include "gimplify.h"
  #include "tree-iterator.h"
  #include "tree-inline.h"
  #include "c-family/c-common.h"
Index: c-family/c-omp.c
===================================================================
*** c-family/c-omp.c	(revision 204496)
--- c-family/c-omp.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 27,33 ****
  #include "tree.h"
  #include "c-common.h"
  #include "c-pragma.h"
! #include "gimple.h"		/* For create_tmp_var_raw.  */
  #include "langhooks.h"
  
  
--- 27,33 ----
  #include "tree.h"
  #include "c-common.h"
  #include "c-pragma.h"
! #include "gimple-expr.h"
  #include "langhooks.h"
  
  
Index: c-family/c-ubsan.c
===================================================================
*** c-family/c-ubsan.c	(revision 204496)
--- c-family/c-ubsan.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 24,30 ****
  #include "tree.h"
  #include "alloc-pool.h"
  #include "cgraph.h"
- #include "gimple.h"
  #include "output.h"
  #include "toplev.h"
  #include "ubsan.h"
--- 24,29 ----
Index: cp/class.c
===================================================================
*** cp/class.c	(revision 204496)
--- cp/class.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 36,41 ****
--- 36,42 ----
  #include "splay-tree.h"
  #include "pointer-set.h"
  #include "hash-table.h"
+ #include "gimplify.h"
  
  /* The number of nested classes being processed.  If we are not in the
     scope of any class, this is zero.  */
Index: cp/cp-gimplify.c
===================================================================
*** cp/cp-gimplify.c	(revision 204496)
--- cp/cp-gimplify.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 27,33 ****
  #include "cp-tree.h"
  #include "c-family/c-common.h"
  #include "tree-iterator.h"
! #include "gimple.h"
  #include "hashtab.h"
  #include "pointer-set.h"
  #include "flags.h"
--- 27,33 ----
  #include "cp-tree.h"
  #include "c-family/c-common.h"
  #include "tree-iterator.h"
! #include "gimplify.h"
  #include "hashtab.h"
  #include "pointer-set.h"
  #include "flags.h"
Index: cp/error.c
===================================================================
*** cp/error.c	(revision 204496)
--- cp/error.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 33,38 ****
--- 33,39 ----
  #include "pointer-set.h"
  #include "c-family/c-objc.h"
  #include "ubsan.h"
+ #include "gimplify.h"
  
  #include <new>                    // For placement-new.
  
Index: cp/init.c
===================================================================
*** cp/init.c	(revision 204496)
--- cp/init.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 28,33 ****
--- 28,34 ----
  #include "cp-tree.h"
  #include "flags.h"
  #include "target.h"
+ #include "gimplify.h"
  
  static bool begin_init_stmts (tree *, tree *);
  static tree finish_init_stmts (bool, tree, tree);
Index: cp/optimize.c
===================================================================
*** cp/optimize.c	(revision 204496)
--- cp/optimize.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 34,40 ****
  #include "langhooks.h"
  #include "diagnostic-core.h"
  #include "dumpfile.h"
! #include "gimple.h"
  #include "tree-iterator.h"
  #include "cgraph.h"
  
--- 34,40 ----
  #include "langhooks.h"
  #include "diagnostic-core.h"
  #include "dumpfile.h"
! #include "gimplify.h"
  #include "tree-iterator.h"
  #include "cgraph.h"
  
Index: cp/pt.c
===================================================================
*** cp/pt.c	(revision 204496)
--- cp/pt.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 42,47 ****
--- 42,48 ----
  #include "timevar.h"
  #include "tree-iterator.h"
  #include "type-utils.h"
+ #include "gimplify.h"
  
  /* The type of functions taking a tree, and some additional data, and
     returning an int.  */
Index: cp/semantics.c
===================================================================
*** cp/semantics.c	(revision 204496)
--- cp/semantics.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 41,47 ****
  #include "tree-iterator.h"
  #include "vec.h"
  #include "target.h"
! #include "gimple.h"
  #include "bitmap.h"
  #include "hash-table.h"
  #include "omp-low.h"
--- 41,47 ----
  #include "tree-iterator.h"
  #include "vec.h"
  #include "target.h"
! #include "gimplify.h"
  #include "bitmap.h"
  #include "hash-table.h"
  #include "omp-low.h"
Index: cp/tree.c
===================================================================
*** cp/tree.c	(revision 204496)
--- cp/tree.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 30,36 ****
  #include "convert.h"
  #include "cgraph.h"
  #include "splay-tree.h"
! #include "gimple.h" /* gimple_has_body_p */
  #include "hash-table.h"
  
  static tree bot_manip (tree *, int *, void *);
--- 30,36 ----
  #include "convert.h"
  #include "cgraph.h"
  #include "splay-tree.h"
! #include "gimplify.h"
  #include "hash-table.h"
  
  static tree bot_manip (tree *, int *, void *);
Index: cp/vtable-class-hierarchy.c
===================================================================
*** cp/vtable-class-hierarchy.c	(revision 204496)
--- cp/vtable-class-hierarchy.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 118,124 ****
  #include "cgraph.h"
  #include "tree-iterator.h"
  #include "vtable-verify.h"
! #include "gimple.h"
  
  static int num_calls_to_regset = 0;
  static int num_calls_to_regpair = 0;
--- 118,124 ----
  #include "cgraph.h"
  #include "tree-iterator.h"
  #include "vtable-verify.h"
! #include "gimplify.h"
  
  static int num_calls_to_regset = 0;
  static int num_calls_to_regpair = 0;
Index: cp/decl2.c
===================================================================
*** cp/decl2.c	(revision 204496)
--- cp/decl2.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 45,51 ****
  #include "c-family/c-pragma.h"
  #include "dumpfile.h"
  #include "intl.h"
- #include "gimple.h"
  #include "pointer-set.h"
  #include "splay-tree.h"
  #include "langhooks.h"
--- 45,50 ----
Index: cp/except.c
===================================================================
*** cp/except.c	(revision 204496)
--- cp/except.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 31,37 ****
  #include "tree-inline.h"
  #include "tree-iterator.h"
  #include "target.h"
- #include "gimple.h"
  
  static void push_eh_cleanup (tree);
  static tree prepare_eh_type (tree);
--- 31,36 ----
Index: cp/method.c
===================================================================
*** cp/method.c	(revision 204496)
--- cp/method.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 34,40 ****
  #include "common/common-target.h"
  #include "diagnostic.h"
  #include "cgraph.h"
! #include "gimple.h"
  
  /* Various flags to control the mangling process.  */
  
--- 34,40 ----
  #include "common/common-target.h"
  #include "diagnostic.h"
  #include "cgraph.h"
! #include "pointer-set.h"
  
  /* Various flags to control the mangling process.  */
  
Index: fortran/f95-lang.c
===================================================================
*** fortran/f95-lang.c	(revision 204496)
--- fortran/f95-lang.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 28,34 ****
  #include "system.h"
  #include "coretypes.h"
  #include "tree.h"
- #include "gimple.h"
  #include "flags.h"
  #include "langhooks.h"
  #include "langhooks-def.h"
--- 28,33 ----
Index: fortran/trans-array.c
===================================================================
*** fortran/trans-array.c	(revision 204496)
--- fortran/trans-array.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 79,85 ****
  #include "system.h"
  #include "coretypes.h"
  #include "tree.h"
! #include "gimple.h"		/* For create_tmp_var_name.  */
  #include "diagnostic-core.h"	/* For internal_error/fatal_error.  */
  #include "flags.h"
  #include "gfortran.h"
--- 79,85 ----
  #include "system.h"
  #include "coretypes.h"
  #include "tree.h"
! #include "gimple-expr.h"
  #include "diagnostic-core.h"	/* For internal_error/fatal_error.  */
  #include "flags.h"
  #include "gfortran.h"
Index: fortran/trans.c
===================================================================
*** fortran/trans.c	(revision 204496)
--- fortran/trans.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 22,28 ****
  #include "system.h"
  #include "coretypes.h"
  #include "tree.h"
! #include "gimple.h"	/* For create_tmp_var_raw.  */
  #include "tree-iterator.h"
  #include "diagnostic-core.h"  /* For internal_error.  */
  #include "flags.h"
--- 22,28 ----
  #include "system.h"
  #include "coretypes.h"
  #include "tree.h"
! #include "gimple-expr.h"	/* For create_tmp_var_raw.  */
  #include "tree-iterator.h"
  #include "diagnostic-core.h"  /* For internal_error.  */
  #include "flags.h"
Index: fortran/trans-decl.c
===================================================================
*** fortran/trans-decl.c	(revision 204496)
--- fortran/trans-decl.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 26,32 ****
  #include "tm.h"
  #include "tree.h"
  #include "tree-dump.h"
! #include "gimple.h"	/* For create_tmp_var_raw.  */
  #include "ggc.h"
  #include "diagnostic-core.h"	/* For internal_error.  */
  #include "toplev.h"	/* For announce_function.  */
--- 26,32 ----
  #include "tm.h"
  #include "tree.h"
  #include "tree-dump.h"
! #include "gimple-expr.h"	/* For create_tmp_var_raw.  */
  #include "ggc.h"
  #include "diagnostic-core.h"	/* For internal_error.  */
  #include "toplev.h"	/* For announce_function.  */
Index: fortran/trans-expr.c
===================================================================
*** fortran/trans-expr.c	(revision 204496)
--- fortran/trans-expr.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 38,43 ****
--- 38,44 ----
  /* Only for gfc_trans_assign and gfc_trans_pointer_assign.  */
  #include "trans-stmt.h"
  #include "dependency.h"
+ #include "gimplify.h"
  
  
  /* Convert a scalar to an array descriptor. To be used for assumed-rank
Index: fortran/trans-openmp.c
===================================================================
*** fortran/trans-openmp.c	(revision 204496)
--- fortran/trans-openmp.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 23,29 ****
  #include "system.h"
  #include "coretypes.h"
  #include "tree.h"
! #include "gimple.h"	/* For create_tmp_var_raw.  */
  #include "diagnostic-core.h"	/* For internal_error.  */
  #include "gfortran.h"
  #include "trans.h"
--- 23,29 ----
  #include "system.h"
  #include "coretypes.h"
  #include "tree.h"
! #include "gimplify.h"	/* For create_tmp_var_raw.  */
  #include "diagnostic-core.h"	/* For internal_error.  */
  #include "gfortran.h"
  #include "trans.h"
Index: go/go-lang.c
===================================================================
*** go/go-lang.c	(revision 204496)
--- go/go-lang.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 23,29 ****
  #include "coretypes.h"
  #include "opts.h"
  #include "tree.h"
! #include "gimple.h"
  #include "ggc.h"
  #include "toplev.h"
  #include "debug.h"
--- 23,29 ----
  #include "coretypes.h"
  #include "opts.h"
  #include "tree.h"
! #include "gimplify.h"
  #include "ggc.h"
  #include "toplev.h"
  #include "debug.h"
Index: go/gofrontend/expressions.cc
===================================================================
*** go/gofrontend/expressions.cc	(revision 204496)
--- go/gofrontend/expressions.cc	(working copy)
***************
*** 12,17 ****
--- 12,18 ----
  #include "intl.h"
  #include "tree.h"
  #include "gimple.h"
+ #include "gimplify.h"
  #include "tree-iterator.h"
  #include "convert.h"
  #include "real.h"
Index: go/gofrontend/gogo-tree.cc
===================================================================
*** go/gofrontend/gogo-tree.cc	(revision 204496)
--- go/gofrontend/gogo-tree.cc	(working copy)
***************
*** 9,14 ****
--- 9,15 ----
  #include "toplev.h"
  #include "tree.h"
  #include "gimple.h"
+ #include "gimplify.h"
  #include "tree-iterator.h"
  #include "cgraph.h"
  #include "langhooks.h"
Index: go/gofrontend/types.cc
===================================================================
*** go/gofrontend/types.cc	(revision 204496)
--- go/gofrontend/types.cc	(working copy)
***************
*** 10,15 ****
--- 10,16 ----
  #include "intl.h"
  #include "tree.h"
  #include "gimple.h"
+ #include "gimplify.h"
  #include "real.h"
  #include "convert.h"
  
Index: java/java-gimplify.c
===================================================================
*** java/java-gimplify.c	(revision 204496)
--- java/java-gimplify.c	(working copy)
*************** The Free Software Foundation is independ
*** 27,33 ****
  #include "tree.h"
  #include "java-tree.h"
  #include "dumpfile.h"
! #include "gimple.h"
  
  static tree java_gimplify_block (tree);
  static enum gimplify_status java_gimplify_modify_expr (tree *);
--- 27,33 ----
  #include "tree.h"
  #include "java-tree.h"
  #include "dumpfile.h"
! #include "gimplify.h"
  
  static tree java_gimplify_block (tree);
  static enum gimplify_status java_gimplify_modify_expr (tree *);
Index: objc/objc-act.c
===================================================================
*** objc/objc-act.c	(revision 204496)
--- objc/objc-act.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 60,66 ****
  #include "tree-pretty-print.h"
  
  /* For enum gimplify_status */
! #include "gimple.h"
  
  /* For encode_method_prototype().  */
  #include "objc-encoding.h"
--- 60,66 ----
  #include "tree-pretty-print.h"
  
  /* For enum gimplify_status */
! #include "gimplify.h"
  
  /* For encode_method_prototype().  */
  #include "objc-encoding.h"

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

* Re: [patch 4/4] Separate gimple.[ch] and gimplify.[ch]
  2013-11-11 23:04 [patch 1/4] Separate gimple.[ch] and gimplify.[ch] Andrew MacLeod
  2013-11-11 23:18 ` [patch 2/4] " Andrew MacLeod
  2013-11-11 23:51 ` [patch 3/4] Separate gimple.[ch] and gimplify.[ch] - front end files Andrew MacLeod
@ 2013-11-11 23:53 ` Andrew MacLeod
  2013-11-12 21:16 ` [patch 1/4] " Jeff Law
  3 siblings, 0 replies; 24+ messages in thread
From: Andrew MacLeod @ 2013-11-11 23:53 UTC (permalink / raw)
  To: gcc-patches, Jeff Law, Richard Biener, Diego Novillo

This one covers the config target files which included gimple.h

Bootstraps on x86_64-unknown-linux-gnu with no new regressions, and 
compiled stage1 on each of the targets utilizing these config/*.c files 
to ensure they compiled.

targets I used were:

aarch64-linux-gnu
alpha-linux-gnu
ia64-linux
m32c-elf
mep-elf
mips64-elf
rs6000-ibm-aix4.3
s390-linux-gnu
sh64-linux
sparc-linux-gnu
spu-elf
tilegx-linux-gnu
tilepro-linux-gnu
x86_64-unknown-cygwin
xstormy16-elf
xtensa-linux

OK for mainline?

Andrew

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

* Re: [patch 1/4] Separate gimple.[ch] and gimplify.[ch]
  2013-11-11 23:04 [patch 1/4] Separate gimple.[ch] and gimplify.[ch] Andrew MacLeod
                   ` (2 preceding siblings ...)
  2013-11-11 23:53 ` [patch 4/4] Separate gimple.[ch] and gimplify.[ch] Andrew MacLeod
@ 2013-11-12 21:16 ` Jeff Law
  2013-11-12 21:40   ` Andrew MacLeod
  3 siblings, 1 reply; 24+ messages in thread
From: Jeff Law @ 2013-11-12 21:16 UTC (permalink / raw)
  To: Andrew MacLeod, gcc-patches, Richard Biener, Diego Novillo

On 11/11/13 14:03, Andrew MacLeod wrote:
>
> So on to the anomaly that causes the issue.  force_gimple_operand* is
> extensively used by the middle end, but not by the front end at all. The
> front ends do not use the statement iterators, but 2 of the
> force_gimple_operand() routines work with gsi's, and as such, have "enum
> gsi_iterator_update" in the prototype.   This means that gimplify.h will
> not compile without understanding what enum gsi_iterator_update is, but
> no front end routine ever needs it.  the choices are:
>
>   a) put "enum gsi_iterator_update" in gimple-iterator.h where it
> belongs and force anyone including gimpllfy.h to include it, even though
> no front end ever uses the routines that require it.
>   b) leave "enum gsi_iterator_update" in gimple.h, and require anyone
> using gimplify.h to include gimple.h. Similar circumstance, but at least
> a few places also require gimple.h...
>   c) put enum gsi_iterator_update" in coretypes.h until such time that
> the front end interface is better defined and no longer requires it
>   d) split gimplifcation now into 2 parts, gimplify.[ch] for the front
> ends which doesn't include those routines that only the middle end
> requires, and gimplfy-be.[ch] for the routines which are used
> exclusively by the BE.  this will allow all the types to go where they
> belong, only only include the bits things actually need.
>
> My order of preference is d) then c)... a) is a distant third, and I
> really dislike  b).... for what thats worth... opinions on how to
> structure it?
I'd go with "d" as well.  "c" is quick and easy but just deferrs the 
problem.


>
> Anyway, these 4 set sof patches bootstrap on x86_64-unknown-linux-gnu
> with no new regressions. I've built all languages, and configured/built
> stage 1 of all the targets that utilized gimple.h, replacing gimple.h
> with gimplify,h to ensure they compile.  Ive also tried seeing if any of
> the language parts required gimplify.h, or gimple.h, or just some other
> conponent  that was being included indirectly... so there aree some
> minor cutbacks on includes there.
>
> patch 1 is the main changes,
> patch 2 contains the include changes for the body of the middle/back end
> patch 3 are the front end changes
> patch4  has the config/* changes for any file which used gimple.h and I
> built stage 1 for.
>
> OK for mainline?
1-3 are good.  You didn't include a patch in #4 :-)  Assuming it does 
the obvious things, I'm comfortable pre-approving that hunk as wel.

jeff

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

* Re: [patch 1/4] Separate gimple.[ch] and gimplify.[ch]
  2013-11-12 21:16 ` [patch 1/4] " Jeff Law
@ 2013-11-12 21:40   ` Andrew MacLeod
  0 siblings, 0 replies; 24+ messages in thread
From: Andrew MacLeod @ 2013-11-12 21:40 UTC (permalink / raw)
  To: Jeff Law; +Cc: gcc-patches, Richard Biener, Diego Novillo

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

On 11/12/2013 02:23 PM, Jeff Law wrote:
> On 11/11/13 14:03, Andrew MacLeod wrote:
>>
>> So on to the anomaly that causes the issue. force_gimple_operand* is
>> extensively used by the middle end, but not by the front end at all. The
>> front ends do not use the statement iterators, but 2 of the
>> force_gimple_operand() routines work with gsi's, and as such, have "enum
>> gsi_iterator_update" in the prototype.   This means that gimplify.h will
>> not compile without understanding what enum gsi_iterator_update is, but
>> no front end routine ever needs it.  the choices are:
>>
>>   a) put "enum gsi_iterator_update" in gimple-iterator.h where it
>> belongs and force anyone including gimpllfy.h to include it, even though
>> no front end ever uses the routines that require it.
>>   b) leave "enum gsi_iterator_update" in gimple.h, and require anyone
>> using gimplify.h to include gimple.h. Similar circumstance, but at least
>> a few places also require gimple.h...
>>   c) put enum gsi_iterator_update" in coretypes.h until such time that
>> the front end interface is better defined and no longer requires it
>>   d) split gimplifcation now into 2 parts, gimplify.[ch] for the front
>> ends which doesn't include those routines that only the middle end
>> requires, and gimplfy-be.[ch] for the routines which are used
>> exclusively by the BE.  this will allow all the types to go where they
>> belong, only only include the bits things actually need.
>>
>> My order of preference is d) then c)... a) is a distant third, and I
>> really dislike  b).... for what thats worth... opinions on how to
>> structure it?
> I'd go with "d" as well.  "c" is quick and easy but just deferrs the 
> problem.
>
>
>>
>> Anyway, these 4 set sof patches bootstrap on x86_64-unknown-linux-gnu
>> with no new regressions. I've built all languages, and configured/built
>> stage 1 of all the targets that utilized gimple.h, replacing gimple.h
>> with gimplify,h to ensure they compile.  Ive also tried seeing if any of
>> the language parts required gimplify.h, or gimple.h, or just some other
>> conponent  that was being included indirectly... so there aree some
>> minor cutbacks on includes there.
>>
>> patch 1 is the main changes,
>> patch 2 contains the include changes for the body of the middle/back end
>> patch 3 are the front end changes
>> patch4  has the config/* changes for any file which used gimple.h and I
>> built stage 1 for.
>>
>> OK for mainline?
> 1-3 are good.  You didn't include a patch in #4 :-)  Assuming it does 
> the obvious things, I'm comfortable pre-approving that hunk as wel.
>
> jeff
>
oops.  it pretty obvious :-)  for the record

Andrew


[-- Attachment #2: G4.patch --]
[-- Type: text/x-patch, Size: 9764 bytes --]


	* config/aarch64/aarch64.c: Include gimplify.h instead of gimple.h.
	* config/alpha/alpha.c: Likewise.
	* config/darwin.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/mep/mep.c: Likewise.
	* config/mips/mips.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/spu/spu.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/tilegx/tilegx.c: Likewise.
	* config/tilepro/tilepro.c: Likewise.
	* config/xtensa/xtensa.c: Likewise.

Index: config/aarch64/aarch64.c
===================================================================
*** config/aarch64/aarch64.c	(revision 204496)
--- config/aarch64/aarch64.c	(working copy)
***************
*** 42,48 ****
  #include "recog.h"
  #include "langhooks.h"
  #include "diagnostic-core.h"
! #include "gimple.h"
  #include "optabs.h"
  #include "dwarf2.h"
  #include "cfgloop.h"
--- 42,48 ----
  #include "recog.h"
  #include "langhooks.h"
  #include "diagnostic-core.h"
! #include "gimplify.h"
  #include "optabs.h"
  #include "dwarf2.h"
  #include "cfgloop.h"
Index: config/alpha/alpha.c
===================================================================
*** config/alpha/alpha.c	(revision 204496)
--- config/alpha/alpha.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 48,54 ****
  #include "debug.h"
  #include "langhooks.h"
  #include "splay-tree.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-ssanames.h"
  #include "tree-stdarg.h"
--- 48,54 ----
  #include "debug.h"
  #include "langhooks.h"
  #include "splay-tree.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-ssanames.h"
  #include "tree-stdarg.h"
Index: config/darwin.c
===================================================================
*** config/darwin.c	(revision 204496)
--- config/darwin.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 45,51 ****
  #include "df.h"
  #include "debug.h"
  #include "obstack.h"
! #include "gimple.h"
  #include "lto-streamer.h"
  
  /* Darwin supports a feature called fix-and-continue, which is used
--- 45,51 ----
  #include "df.h"
  #include "debug.h"
  #include "obstack.h"
! #include "gimplify.h"
  #include "lto-streamer.h"
  
  /* Darwin supports a feature called fix-and-continue, which is used
Index: config/i386/i386.c
===================================================================
*** config/i386/i386.c	(revision 204496)
--- config/i386/i386.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 47,53 ****
  #include "langhooks.h"
  #include "reload.h"
  #include "cgraph.h"
! #include "gimple.h"
  #include "dwarf2.h"
  #include "df.h"
  #include "tm-constrs.h"
--- 47,53 ----
  #include "langhooks.h"
  #include "reload.h"
  #include "cgraph.h"
! #include "gimplify.h"
  #include "dwarf2.h"
  #include "df.h"
  #include "tm-constrs.h"
Index: config/ia64/ia64.c
===================================================================
*** config/ia64/ia64.c	(revision 204496)
--- config/ia64/ia64.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 49,55 ****
  #include "tm_p.h"
  #include "hash-table.h"
  #include "langhooks.h"
! #include "gimple.h"
  #include "intl.h"
  #include "df.h"
  #include "debug.h"
--- 49,55 ----
  #include "tm_p.h"
  #include "hash-table.h"
  #include "langhooks.h"
! #include "gimplify.h"
  #include "intl.h"
  #include "df.h"
  #include "debug.h"
Index: config/mep/mep.c
===================================================================
*** config/mep/mep.c	(revision 204496)
--- config/mep/mep.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 47,53 ****
  #include "target-def.h"
  #include "langhooks.h"
  #include "df.h"
! #include "gimple.h"
  #include "opts.h"
  #include "dumpfile.h"
  
--- 47,53 ----
  #include "target-def.h"
  #include "langhooks.h"
  #include "df.h"
! #include "gimplify.h"
  #include "opts.h"
  #include "dumpfile.h"
  
Index: config/mips/mips.c
===================================================================
*** config/mips/mips.c	(revision 204496)
--- config/mips/mips.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 50,56 ****
  #include "common/common-target.h"
  #include "langhooks.h"
  #include "sched-int.h"
! #include "gimple.h"
  #include "bitmap.h"
  #include "diagnostic.h"
  #include "target-globals.h"
--- 50,56 ----
  #include "common/common-target.h"
  #include "langhooks.h"
  #include "sched-int.h"
! #include "gimplify.h"
  #include "bitmap.h"
  #include "diagnostic.h"
  #include "target-globals.h"
Index: config/rs6000/rs6000.c
===================================================================
*** config/rs6000/rs6000.c	(revision 204496)
--- config/rs6000/rs6000.c	(working copy)
***************
*** 51,57 ****
  #include "reload.h"
  #include "cfgloop.h"
  #include "sched-int.h"
! #include "gimple.h"
  #include "intl.h"
  #include "params.h"
  #include "tm-constrs.h"
--- 51,57 ----
  #include "reload.h"
  #include "cfgloop.h"
  #include "sched-int.h"
! #include "gimplify.h"
  #include "intl.h"
  #include "params.h"
  #include "tm-constrs.h"
Index: config/s390/s390.c
===================================================================
*** config/s390/s390.c	(revision 204496)
--- config/s390/s390.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 47,53 ****
  #include "debug.h"
  #include "langhooks.h"
  #include "optabs.h"
! #include "gimple.h"
  #include "df.h"
  #include "params.h"
  #include "cfgloop.h"
--- 47,53 ----
  #include "debug.h"
  #include "langhooks.h"
  #include "optabs.h"
! #include "gimplify.h"
  #include "df.h"
  #include "params.h"
  #include "cfgloop.h"
Index: config/sh/sh.c
===================================================================
*** config/sh/sh.c	(revision 204496)
--- config/sh/sh.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 48,54 ****
  #include "sched-int.h"
  #include "params.h"
  #include "ggc.h"
! #include "gimple.h"
  #include "cfgloop.h"
  #include "alloc-pool.h"
  #include "tm-constrs.h"
--- 48,54 ----
  #include "sched-int.h"
  #include "params.h"
  #include "ggc.h"
! #include "gimplify.h"
  #include "cfgloop.h"
  #include "alloc-pool.h"
  #include "tm-constrs.h"
Index: config/sparc/sparc.c
===================================================================
*** config/sparc/sparc.c	(revision 204496)
--- config/sparc/sparc.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 46,52 ****
  #include "target.h"
  #include "target-def.h"
  #include "common/common-target.h"
! #include "gimple.h"
  #include "langhooks.h"
  #include "reload.h"
  #include "params.h"
--- 46,52 ----
  #include "target.h"
  #include "target-def.h"
  #include "common/common-target.h"
! #include "gimplify.h"
  #include "langhooks.h"
  #include "reload.h"
  #include "params.h"
Index: config/spu/spu.c
===================================================================
*** config/spu/spu.c	(revision 204496)
--- config/spu/spu.c	(working copy)
***************
*** 45,51 ****
  #include "sched-int.h"
  #include "params.h"
  #include "machmode.h"
! #include "gimple.h"
  #include "tm-constrs.h"
  #include "ddg.h"
  #include "sbitmap.h"
--- 45,51 ----
  #include "sched-int.h"
  #include "params.h"
  #include "machmode.h"
! #include "gimplify.h"
  #include "tm-constrs.h"
  #include "ddg.h"
  #include "sbitmap.h"
Index: config/stormy16/stormy16.c
===================================================================
*** config/stormy16/stormy16.c	(revision 204496)
--- config/stormy16/stormy16.c	(working copy)
***************
*** 43,49 ****
  #include "target-def.h"
  #include "tm_p.h"
  #include "langhooks.h"
! #include "gimple.h"
  #include "df.h"
  #include "reload.h"
  #include "ggc.h"
--- 43,49 ----
  #include "target-def.h"
  #include "tm_p.h"
  #include "langhooks.h"
! #include "gimplify.h"
  #include "df.h"
  #include "reload.h"
  #include "ggc.h"
Index: config/tilegx/tilegx.c
===================================================================
*** config/tilegx/tilegx.c	(revision 204496)
--- config/tilegx/tilegx.c	(working copy)
***************
*** 40,46 ****
  #include "dwarf2.h"
  #include "timevar.h"
  #include "tree.h"
! #include "gimple.h"
  #include "cfgloop.h"
  #include "tilegx-builtins.h"
  #include "tilegx-multiply.h"
--- 40,46 ----
  #include "dwarf2.h"
  #include "timevar.h"
  #include "tree.h"
! #include "gimplify.h"
  #include "cfgloop.h"
  #include "tilegx-builtins.h"
  #include "tilegx-multiply.h"
Index: config/tilepro/tilepro.c
===================================================================
*** config/tilepro/tilepro.c	(revision 204496)
--- config/tilepro/tilepro.c	(working copy)
***************
*** 41,47 ****
  #include "dwarf2.h"
  #include "timevar.h"
  #include "tree.h"
! #include "gimple.h"
  #include "cfgloop.h"
  #include "tilepro-builtins.h"
  #include "tilepro-multiply.h"
--- 41,47 ----
  #include "dwarf2.h"
  #include "timevar.h"
  #include "tree.h"
! #include "gimplify.h"
  #include "cfgloop.h"
  #include "tilepro-builtins.h"
  #include "tilepro-multiply.h"
Index: config/xtensa/xtensa.c
===================================================================
*** config/xtensa/xtensa.c	(revision 204496)
--- config/xtensa/xtensa.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 46,52 ****
  #include "target.h"
  #include "target-def.h"
  #include "langhooks.h"
! #include "gimple.h"
  #include "df.h"
  
  
--- 46,52 ----
  #include "target.h"
  #include "target-def.h"
  #include "langhooks.h"
! #include "gimplify.h"
  #include "df.h"
  
  

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

* Re: [patch 3/4] Separate gimple.[ch] and gimplify.[ch] - front end files
  2013-11-11 23:51 ` [patch 3/4] Separate gimple.[ch] and gimplify.[ch] - front end files Andrew MacLeod
@ 2013-11-13 10:48   ` Richard Biener
  2013-11-13 15:27     ` Andrew MacLeod
  0 siblings, 1 reply; 24+ messages in thread
From: Richard Biener @ 2013-11-13 10:48 UTC (permalink / raw)
  To: Andrew MacLeod; +Cc: gcc-patches, Jeff Law, Diego Novillo

On Mon, Nov 11, 2013 at 10:07 PM, Andrew MacLeod <amacleod@redhat.com> wrote:
> This one covers the front end files which included gimple.h
>
> Bootstraps on x86_64-unknown-linux-gnu with no new regressions.  OK?

       * c-family/c-omp.c: Include gimple-expr.h instead of gimple.h.

can you explain why gimple-expr.h is not as bad as gimple.h?
(gimple-expr.h sounds oxymoronish ... but I didn't follow the thread
that ended up creating this beast, it seems a better matching name
would be gimple-tree.h ... haha).

Otherwise gimple.h -> gimplify.h indeed looks like an improvement.

Thanks,
Richard.

> Andrew

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

* Re: [patch 3/4] Separate gimple.[ch] and gimplify.[ch] - front end files
  2013-11-13 10:48   ` Richard Biener
@ 2013-11-13 15:27     ` Andrew MacLeod
  2013-11-14 16:34       ` Michael Matz
  0 siblings, 1 reply; 24+ messages in thread
From: Andrew MacLeod @ 2013-11-13 15:27 UTC (permalink / raw)
  To: Richard Biener; +Cc: gcc-patches, Jeff Law, Diego Novillo

On 11/13/2013 04:40 AM, Richard Biener wrote:
> On Mon, Nov 11, 2013 at 10:07 PM, Andrew MacLeod <amacleod@redhat.com> wrote:
>> This one covers the front end files which included gimple.h
>>
>> Bootstraps on x86_64-unknown-linux-gnu with no new regressions.  OK?
>         * c-family/c-omp.c: Include gimple-expr.h instead of gimple.h.
>
> can you explain why gimple-expr.h is not as bad as gimple.h?
> (gimple-expr.h sounds oxymoronish ... but I didn't follow the thread
> that ended up creating this beast, it seems a better matching name
> would be gimple-tree.h ... haha).
>
> Otherwise gimple.h -> gimplify.h indeed looks like an improvement.
>
>
There needs to be a place which has gimple componentry  that is not 
related to or require a statement.  gimple.h is becoming  the home for 
just 0gimple statements.     There are 3 (for the moment) major classes 
of things that are in statements and are also used by other parts of the 
compiler  .. Types, Decls, and Expressions.  I could have split it into 
those 3 files right now, but it didn't seem like that granularity was 
needed yet.

I was going to call it gimple-decl.h since most of the things are decl 
related... but I figured that eventually there will be all 3 files, and 
its likely that gimple-expr.h will eventually include gimple-type.h and 
gimple-decl.,h so just include gimple-expr.h now and have less include 
turmoil eventually.   Perhaps that wont be the case and  gimple-decl.h 
may have been a more appropriate name for now.

Its true that gimple-tree would in fact be a more appropriate name at 
the moment, but these gimple-* files are the core ones I'll be changing 
first, so the tree part would no longer be meaningful.  the 'expr' part 
is suppose to represent the abstract purpose...  The stuff required to 
represent an expression in gimple IL.  And yes, that is currently a tree :-)

Andrew

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

* Re: [patch 3/4] Separate gimple.[ch] and gimplify.[ch] - front end files
  2013-11-13 15:27     ` Andrew MacLeod
@ 2013-11-14 16:34       ` Michael Matz
  2013-11-14 16:49         ` Diego Novillo
  2013-11-14 16:56         ` Andrew MacLeod
  0 siblings, 2 replies; 24+ messages in thread
From: Michael Matz @ 2013-11-14 16:34 UTC (permalink / raw)
  To: Andrew MacLeod; +Cc: Richard Biener, gcc-patches, Jeff Law, Diego Novillo

Hi,

On Wed, 13 Nov 2013, Andrew MacLeod wrote:

> There needs to be a place which has gimple componentry that is not 
> related to or require a statement.  gimple.h is becoming the home for 
> just 0gimple statements.  There are 3 (for the moment) major classes of 
> things that are in statements and are also used by other parts of the 
> compiler .. Types, Decls, and Expressions.

Actually I wouldn't say gimple statements contain expressions.  They 
refer to objects (and unfortunately also sometimes to types directly, 
namely in the call stmt and in the exception statements, though the latter 
don't exist anymore after lowering).  It's those objects which have types.

Currently those objects are trees and hence can be more complex than just 
singletons (which are the decls, constants and ssa names), that is most of 
the SINGLE_RHS objects.  If you want to get rid of trees you somehow need 
to represent those objects in a different way, but they still aren't 
expressions in the common meaning.

E.g. there won't ever be something like a gimple arithmetic addition 
expression (or I hope there never will be).  It's always a gimple 
statement that assigns the addition result somewhere.  Even the 
non-singleton objects don't exist in isolation, they're always part of 
some action (i.e. statement) to operate on those objects.

That's why I think talking about a gimple expression as if they were 
somehow some stand-alone concept is fairly confusing, and introducing it 
now as if it would somewhen exist would lead to going down some inferior 
design paths.

> Its true that gimple-tree would in fact be a more appropriate name at 
> the moment, but these gimple-* files are the core ones I'll be changing 
> first, so the tree part would no longer be meaningful.  the 'expr' part 
> is suppose to represent the abstract purpose...  The stuff required to 
> represent an expression in gimple IL.  And yes, that is currently a tree 
> :-)

Put another way: what do you envision that gimple expressions would be.  
For example what would you propose we could do with them?


Ciao,
Michael.

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

* Re: [patch 3/4] Separate gimple.[ch] and gimplify.[ch] - front end files
  2013-11-14 16:34       ` Michael Matz
@ 2013-11-14 16:49         ` Diego Novillo
  2013-11-14 16:56         ` Andrew MacLeod
  1 sibling, 0 replies; 24+ messages in thread
From: Diego Novillo @ 2013-11-14 16:49 UTC (permalink / raw)
  To: Michael Matz; +Cc: Andrew MacLeod, Richard Biener, gcc-patches, Jeff Law

On Thu, Nov 14, 2013 at 10:26 AM, Michael Matz <matz@suse.de> wrote:

> Put another way: what do you envision that gimple expressions would be.
> For example what would you propose we could do with them?

The only expressions I have in mind are memory references and
aggregates, which can get pretty convoluted.

Perhaps we could label them something different than expressions. They
would be in the same taxonomy of "gimple values".  They are operands
to gimple statements, they can have multiple symbol references inside
and they may have a tree like structure.


Diego.

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

* Re: [patch 3/4] Separate gimple.[ch] and gimplify.[ch] - front end files
  2013-11-14 16:34       ` Michael Matz
  2013-11-14 16:49         ` Diego Novillo
@ 2013-11-14 16:56         ` Andrew MacLeod
  2013-11-14 17:06           ` Diego Novillo
  2013-11-14 17:39           ` Michael Matz
  1 sibling, 2 replies; 24+ messages in thread
From: Andrew MacLeod @ 2013-11-14 16:56 UTC (permalink / raw)
  To: Michael Matz; +Cc: Richard Biener, gcc-patches, Jeff Law, Diego Novillo

On 11/14/2013 10:26 AM, Michael Matz wrote:
> Hi,
>
> On Wed, 13 Nov 2013, Andrew MacLeod wrote:
>
>> There needs to be a place which has gimple componentry that is not
>> related to or require a statement.  gimple.h is becoming the home for
>> just 0gimple statements.  There are 3 (for the moment) major classes of
>> things that are in statements and are also used by other parts of the
>> compiler .. Types, Decls, and Expressions.
>
> E.g. there won't ever be something like a gimple arithmetic addition
> expression (or I hope there never will be).  It's always a gimple
> statement that assigns the addition result somewhere.  Even the
> non-singleton objects don't exist in isolation, they're always part of
> some action (i.e. statement) to operate on those objects.
>
> That's why I think talking about a gimple expression as if they were
> somehow some stand-alone concept is fairly confusing, and introducing it
> now as if it would somewhen exist would lead to going down some inferior
> design paths.
Well, for gimple expressions I was thinking more about the addressing 
expressions we currently leave as trees... MEM stuff... that where most 
of the remaining 'expressions' are I guess, so perhaps gimple-addressing 
is a better term...

in any case, it refers mostly to the parts of trees which are 
tcc_expression and are not subsumed by gimple_statement contructs. So I 
use expression for lack of a better term since I don't know what exact 
uses there are yet.

Andrew


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

* Re: [patch 3/4] Separate gimple.[ch] and gimplify.[ch] - front end files
  2013-11-14 16:56         ` Andrew MacLeod
@ 2013-11-14 17:06           ` Diego Novillo
  2013-11-14 17:21             ` Andrew MacLeod
  2013-11-14 17:39           ` Michael Matz
  1 sibling, 1 reply; 24+ messages in thread
From: Diego Novillo @ 2013-11-14 17:06 UTC (permalink / raw)
  To: Andrew MacLeod; +Cc: Michael Matz, Richard Biener, gcc-patches, Jeff Law

On Thu, Nov 14, 2013 at 10:34 AM, Andrew MacLeod <amacleod@redhat.com> wrote:
> On 11/14/2013 10:26 AM, Michael Matz wrote:
>>
>> Hi,
>>
>> On Wed, 13 Nov 2013, Andrew MacLeod wrote:
>>
>>> There needs to be a place which has gimple componentry that is not
>>> related to or require a statement.  gimple.h is becoming the home for
>>> just 0gimple statements.  There are 3 (for the moment) major classes of
>>> things that are in statements and are also used by other parts of the
>>> compiler .. Types, Decls, and Expressions.
>>
>>
>> E.g. there won't ever be something like a gimple arithmetic addition
>> expression (or I hope there never will be).  It's always a gimple
>> statement that assigns the addition result somewhere.  Even the
>> non-singleton objects don't exist in isolation, they're always part of
>> some action (i.e. statement) to operate on those objects.
>>
>> That's why I think talking about a gimple expression as if they were
>> somehow some stand-alone concept is fairly confusing, and introducing it
>> now as if it would somewhen exist would lead to going down some inferior
>> design paths.
>
> Well, for gimple expressions I was thinking more about the addressing
> expressions we currently leave as trees... MEM stuff... that where most of
> the remaining 'expressions' are I guess, so perhaps gimple-addressing is a
> better term...
>
> in any case, it refers mostly to the parts of trees which are tcc_expression
> and are not subsumed by gimple_statement contructs. So I use expression for
> lack of a better term since I don't know what exact uses there are yet.

I think we'll end up with a hierarchy that will have some generic
"value" at its base, with constants, symbols, aggregates, arrays,
memrefs, etc as children. But perhaps we can wait until we have a
better idea of how we want it to look like.


Diego.

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

* Re: [patch 3/4] Separate gimple.[ch] and gimplify.[ch] - front end files
  2013-11-14 17:06           ` Diego Novillo
@ 2013-11-14 17:21             ` Andrew MacLeod
  0 siblings, 0 replies; 24+ messages in thread
From: Andrew MacLeod @ 2013-11-14 17:21 UTC (permalink / raw)
  To: Diego Novillo; +Cc: Michael Matz, Richard Biener, gcc-patches, Jeff Law

On 11/14/2013 10:37 AM, Diego Novillo wrote:
> On Thu, Nov 14, 2013 at 10:34 AM, Andrew MacLeod <amacleod@redhat.com> wrote:
>> On 11/14/2013 10:26 AM, Michael Matz wrote:
>>> Hi,
>>>
>>> On Wed, 13 Nov 2013, Andrew MacLeod wrote:
>>>
>>>> There needs to be a place which has gimple componentry that is not
>>>> related to or require a statement.  gimple.h is becoming the home for
>>>> just 0gimple statements.  There are 3 (for the moment) major classes of
>>>> things that are in statements and are also used by other parts of the
>>>> compiler .. Types, Decls, and Expressions.
>>>
>>> E.g. there won't ever be something like a gimple arithmetic addition
>>> expression (or I hope there never will be).  It's always a gimple
>>> statement that assigns the addition result somewhere.  Even the
>>> non-singleton objects don't exist in isolation, they're always part of
>>> some action (i.e. statement) to operate on those objects.
>>>
>>> That's why I think talking about a gimple expression as if they were
>>> somehow some stand-alone concept is fairly confusing, and introducing it
>>> now as if it would somewhen exist would lead to going down some inferior
>>> design paths.
>> Well, for gimple expressions I was thinking more about the addressing
>> expressions we currently leave as trees... MEM stuff... that where most of
>> the remaining 'expressions' are I guess, so perhaps gimple-addressing is a
>> better term...
>>
>> in any case, it refers mostly to the parts of trees which are tcc_expression
>> and are not subsumed by gimple_statement contructs. So I use expression for
>> lack of a better term since I don't know what exact uses there are yet.
> I think we'll end up with a hierarchy that will have some generic
> "value" at its base, with constants, symbols, aggregates, arrays,
> memrefs, etc as children. But perhaps we can wait until we have a
> better idea of how we want it to look like.
>
>
That is pretty much what my prototypes at th cauldron had...   I just 
hadn't fit expressions into it yet... so just left the term. but that 
why it is lumped in with decls and types... things that will have their 
tree replaced.  In any case... thats all to come...

Andrew

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

* Re: [patch 3/4] Separate gimple.[ch] and gimplify.[ch] - front end files
  2013-11-14 16:56         ` Andrew MacLeod
  2013-11-14 17:06           ` Diego Novillo
@ 2013-11-14 17:39           ` Michael Matz
  2013-11-14 17:50             ` Andrew MacLeod
  1 sibling, 1 reply; 24+ messages in thread
From: Michael Matz @ 2013-11-14 17:39 UTC (permalink / raw)
  To: Andrew MacLeod; +Cc: Richard Biener, gcc-patches, Jeff Law, Diego Novillo

Hi,

On Thu, 14 Nov 2013, Andrew MacLeod wrote:

> > That's why I think talking about a gimple expression as if they were
> > somehow some stand-alone concept is fairly confusing, and introducing it
> > now as if it would somewhen exist would lead to going down some inferior
> > design paths.
> 
> Well, for gimple expressions I was thinking more about the addressing 
> expressions we currently leave as trees... MEM stuff... that where most 
> of the remaining 'expressions' are I guess, so perhaps gimple-addressing 
> is a better term...
> 
> in any case, it refers mostly to the parts of trees which are 
> tcc_expression and are not subsumed by gimple_statement contructs. So I 
> use expression for lack of a better term since I don't know what exact 
> uses there are yet.

Well, I can precisely name you the set of things you mean then, and I 
wouldn't call any of them expressions (all of them either represent a 
(sub)object or a statement of fact, not a computation (except as part of 
how to get at the specified object)):

  CODE_CLASS == tcc_reference
     : COMPONENT_REF, BIT_FIELD_REF, ARRAY_REF, ARRAY_RANGE_REF,
       REALPART_EXPR, IMAGPART_EXPR, VIEW_CONVERT_EXPR, INDIRECT_REF,
       TARGET_MEM_REF, MEM_REF
  CODE ==
     : CONSTRUCTOR, OBJ_TYPE_REF, ASSERT_EXPR, ADDR_EXPR, WITH_SIZE_EXPR

The rest is the trivial SSA_NAME, tcc_constant and tcc_declaration, what I 
called singletons.

Most of the codes above have a shallow one- or two-level structure in what 
they operate on, or can be made so by some more lowering.  A few of them 
can contain arbitrarily deep recursive structures (but not of all possible 
trees), and I think that's the only thing that would remain if the above 
would be better melded into serveral new statement types.  That's of 
course also the difficult part to get sensibly rid of, because the 
recursive structure lends itself to something that terribly looks like 
'tree'.

I think if following through with the whole plan there would (and should) 
be nothing remaining that could be called a gimple expression.


Ciao,
Michael.

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

* Re: [patch 3/4] Separate gimple.[ch] and gimplify.[ch] - front end files
  2013-11-14 17:39           ` Michael Matz
@ 2013-11-14 17:50             ` Andrew MacLeod
  2013-11-14 17:55               ` Michael Matz
  2013-11-14 17:57               ` Diego Novillo
  0 siblings, 2 replies; 24+ messages in thread
From: Andrew MacLeod @ 2013-11-14 17:50 UTC (permalink / raw)
  To: Michael Matz; +Cc: Richard Biener, gcc-patches, Jeff Law, Diego Novillo

On 11/14/2013 10:57 AM, Michael Matz wrote:
> Hi,
>
> On Thu, 14 Nov 2013, Andrew MacLeod wrote:
>
>>> That's why I think talking about a gimple expression as if they were
>>> somehow some stand-alone concept is fairly confusing, and introducing it
>>> now as if it would somewhen exist would lead to going down some inferior
>>> design paths.
>> Well, for gimple expressions I was thinking more about the addressing
>> expressions we currently leave as trees... MEM stuff... that where most
>> of the remaining 'expressions' are I guess, so perhaps gimple-addressing
>> is a better term...
>>
>> in any case, it refers mostly to the parts of trees which are
>> tcc_expression and are not subsumed by gimple_statement contructs. So I
>> use expression for lack of a better term since I don't know what exact
>> uses there are yet.
> Well, I can precisely name you the set of things you mean then, and I
> wouldn't call any of them expressions (all of them either represent a
> (sub)object or a statement of fact, not a computation (except as part of
> how to get at the specified object)):
>
>    CODE_CLASS == tcc_reference
>       : COMPONENT_REF, BIT_FIELD_REF, ARRAY_REF, ARRAY_RANGE_REF,
>         REALPART_EXPR, IMAGPART_EXPR, VIEW_CONVERT_EXPR, INDIRECT_REF,
>         TARGET_MEM_REF, MEM_REF
>    CODE ==
>       : CONSTRUCTOR, OBJ_TYPE_REF, ASSERT_EXPR, ADDR_EXPR, WITH_SIZE_EXPR
>
> The rest is the trivial SSA_NAME, tcc_constant and tcc_declaration, what I
> called singletons.
>
> Most of the codes above have a shallow one- or two-level structure in what
> they operate on, or can be made so by some more lowering.  A few of them
> can contain arbitrarily deep recursive structures (but not of all possible
> trees), and I think that's the only thing that would remain if the above
> would be better melded into serveral new statement types.  That's of
> course also the difficult part to get sensibly rid of, because the
> recursive structure lends itself to something that terribly looks like
> 'tree'.
>
> I think if following through with the whole plan there would (and should)
> be nothing remaining that could be called a gimple expression.
>
>
very possibly, i just haven't gotten to those parts yet. I can change 
the name back to gimple-decl.[ch] or some such thing if you like that 
better.

Andrew

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

* Re: [patch 3/4] Separate gimple.[ch] and gimplify.[ch] - front end files
  2013-11-14 17:50             ` Andrew MacLeod
@ 2013-11-14 17:55               ` Michael Matz
  2013-11-14 18:06                 ` Andrew MacLeod
  2013-11-14 17:57               ` Diego Novillo
  1 sibling, 1 reply; 24+ messages in thread
From: Michael Matz @ 2013-11-14 17:55 UTC (permalink / raw)
  To: Andrew MacLeod; +Cc: Richard Biener, gcc-patches, Jeff Law, Diego Novillo

Hi,

On Thu, 14 Nov 2013, Andrew MacLeod wrote:

> > I think if following through with the whole plan there would (and 
> > should) be nothing remaining that could be called a gimple expression.
> 
> very possibly, i just haven't gotten to those parts yet. I can change 
> the name back to gimple-decl.[ch] or some such thing if you like that 
> better.

-object? -operand? -stuff? ;-)  Will all of these splits land at trunk, 
i.e. 4.9?  Why the hurry when not even such high-level things are clear?  
I mean how can you think about rearchitecting the gimple data structures 
without having looked at the current details.  It's clear that not every 
detail of the design can be fixated at this point, but basic questions 
like "what's the operands?", "will there be expressions?", "how do we 
iterate?", "recursive structures or not?" should at least get some answer 
before really starting grind work, shouldn't they?


Ciao,
Michael.

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

* Re: [patch 3/4] Separate gimple.[ch] and gimplify.[ch] - front end files
  2013-11-14 17:50             ` Andrew MacLeod
  2013-11-14 17:55               ` Michael Matz
@ 2013-11-14 17:57               ` Diego Novillo
  2013-11-14 18:43                 ` Richard Biener
  1 sibling, 1 reply; 24+ messages in thread
From: Diego Novillo @ 2013-11-14 17:57 UTC (permalink / raw)
  To: Andrew MacLeod; +Cc: Michael Matz, Richard Biener, gcc-patches, Jeff Law

On Thu, Nov 14, 2013 at 11:13 AM, Andrew MacLeod <amacleod@redhat.com> wrote:

> very possibly, i just haven't gotten to those parts yet. I can change the
> name back to gimple-decl.[ch] or some such thing if you like that better.

As much as I hate to paint name sheds: gimple-val.[ch].


Diego.

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

* Re: [patch 3/4] Separate gimple.[ch] and gimplify.[ch] - front end files
  2013-11-14 17:55               ` Michael Matz
@ 2013-11-14 18:06                 ` Andrew MacLeod
  2013-11-14 23:20                   ` H.J. Lu
  0 siblings, 1 reply; 24+ messages in thread
From: Andrew MacLeod @ 2013-11-14 18:06 UTC (permalink / raw)
  To: Michael Matz; +Cc: Richard Biener, gcc-patches, Jeff Law, Diego Novillo

On 11/14/2013 11:23 AM, Michael Matz wrote:
> Hi,
>
> On Thu, 14 Nov 2013, Andrew MacLeod wrote:
>
>>> I think if following through with the whole plan there would (and
>>> should) be nothing remaining that could be called a gimple expression.
>> very possibly, i just haven't gotten to those parts yet. I can change
>> the name back to gimple-decl.[ch] or some such thing if you like that
>> better.
> -object? -operand? -stuff? ;-)  Will all of these splits land at trunk,
> i.e. 4.9?  Why the hurry when not even such high-level things are clear?
> I mean how can you think about rearchitecting the gimple data structures
> without having looked at the current details.  It's clear that not every
> detail of the design can be fixated at this point, but basic questions
> like "what's the operands?", "will there be expressions?", "how do we
> iterate?", "recursive structures or not?" should at least get some answer
> before really starting grind work, shouldn't they?
>
The splits are for header file cleanup and re-structuring into logical 
components.  As I mentioned in the original post,  the file is needed to 
break dependency cycles between gimple.h (the statements) , the 
iterators, and gimplification.  It is for the gimple stuff which doesn't 
need any of those things but is consumed by them.

This really has nothing to do with my future plans, other than the fact 
that I also said whatever is in this file is will eventually be split 
into more things, but I'm not ready to do those splits yet, thus the 
gimple-blah name doesn't matter to me.  gimple-expr seemed convenient at 
the time but clearly you don't like it, and I'll happily call it 
whatever you want.  It's a grab bag of all the gimple values which are 
still trees...

maybe the suggested  gimple-val.[ch] is ok?

Andrew

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

* Re: [patch 3/4] Separate gimple.[ch] and gimplify.[ch] - front end files
  2013-11-14 17:57               ` Diego Novillo
@ 2013-11-14 18:43                 ` Richard Biener
  0 siblings, 0 replies; 24+ messages in thread
From: Richard Biener @ 2013-11-14 18:43 UTC (permalink / raw)
  To: Diego Novillo, Andrew MacLeod; +Cc: Michael Matz, gcc-patches, Jeff Law

Diego Novillo <dnovillo@google.com> wrote:
>On Thu, Nov 14, 2013 at 11:13 AM, Andrew MacLeod <amacleod@redhat.com>
>wrote:
>
>> very possibly, i just haven't gotten to those parts yet. I can change
>the
>> name back to gimple-decl.[ch] or some such thing if you like that
>better.
>
>As much as I hate to paint name sheds: gimple-val.[ch].

Yeah, everything that is a gimple value ...

Richard.

>
>Diego.


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

* Re: [patch 3/4] Separate gimple.[ch] and gimplify.[ch] - front end files
  2013-11-14 18:06                 ` Andrew MacLeod
@ 2013-11-14 23:20                   ` H.J. Lu
  2013-11-15  5:16                     ` Andrew MacLeod
  0 siblings, 1 reply; 24+ messages in thread
From: H.J. Lu @ 2013-11-14 23:20 UTC (permalink / raw)
  To: Andrew MacLeod
  Cc: Michael Matz, Richard Biener, gcc-patches, Jeff Law, Diego Novillo

On Thu, Nov 14, 2013 at 8:34 AM, Andrew MacLeod <amacleod@redhat.com> wrote:
> On 11/14/2013 11:23 AM, Michael Matz wrote:
>>
>> Hi,
>>
>> On Thu, 14 Nov 2013, Andrew MacLeod wrote:
>>
>>>> I think if following through with the whole plan there would (and
>>>> should) be nothing remaining that could be called a gimple expression.
>>>
>>> very possibly, i just haven't gotten to those parts yet. I can change
>>> the name back to gimple-decl.[ch] or some such thing if you like that
>>> better.
>>
>> -object? -operand? -stuff? ;-)  Will all of these splits land at trunk,
>> i.e. 4.9?  Why the hurry when not even such high-level things are clear?
>> I mean how can you think about rearchitecting the gimple data structures
>> without having looked at the current details.  It's clear that not every
>> detail of the design can be fixated at this point, but basic questions
>> like "what's the operands?", "will there be expressions?", "how do we
>> iterate?", "recursive structures or not?" should at least get some answer
>> before really starting grind work, shouldn't they?
>>
> The splits are for header file cleanup and re-structuring into logical
> components.  As I mentioned in the original post,  the file is needed to
> break dependency cycles between gimple.h (the statements) , the iterators,
> and gimplification.  It is for the gimple stuff which doesn't need any of
> those things but is consumed by them.
>
> This really has nothing to do with my future plans, other than the fact that
> I also said whatever is in this file is will eventually be split into more
> things, but I'm not ready to do those splits yet, thus the gimple-blah name
> doesn't matter to me.  gimple-expr seemed convenient at the time but clearly
> you don't like it, and I'll happily call it whatever you want.  It's a grab
> bag of all the gimple values which are still trees...
>
> maybe the suggested  gimple-val.[ch] is ok?
>
> Andrew

It breaks Ada build.  I checked in the following patch to unbreak
it.


-- 
H.J.
---
Index: ada/ChangeLog
===================================================================
--- ada/ChangeLog    (revision 204825)
+++ ada/ChangeLog    (working copy)
@@ -1,3 +1,7 @@
+2013-11-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+    * gcc-interface/trans.c: Include gimple.h and pointer-set.h.
+
 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>

     * gcc-interface/trans.c: Include gimplify.h.
Index: ada/gcc-interface/trans.c
===================================================================
--- ada/gcc-interface/trans.c    (revision 204825)
+++ ada/gcc-interface/trans.c    (working copy)
@@ -33,7 +33,9 @@
 #include "output.h"
 #include "libfuncs.h"    /* For set_stack_check_libfunc.  */
 #include "tree-iterator.h"
+#include "gimple.h"
 #include "gimplify.h"
+#include "pointer-set.h"
 #include "bitmap.h"
 #include "cgraph.h"
 #include "diagnostic.h"

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

* Re: [patch 3/4] Separate gimple.[ch] and gimplify.[ch] - front end files
  2013-11-14 23:20                   ` H.J. Lu
@ 2013-11-15  5:16                     ` Andrew MacLeod
  2013-11-15  7:45                       ` Jeff Law
  2013-11-15  9:58                       ` Eric Botcazou
  0 siblings, 2 replies; 24+ messages in thread
From: Andrew MacLeod @ 2013-11-15  5:16 UTC (permalink / raw)
  To: H.J. Lu
  Cc: Michael Matz, Richard Biener, gcc-patches, Jeff Law, Diego Novillo

On 11/14/2013 05:06 PM, H.J. Lu wrote:
> On Thu, Nov 14, 2013 at 8:34 AM, Andrew MacLeod <amacleod@redhat.com> wrote:
>> On 11/14/2013 11:23 AM, Michael Matz wrote:
>>> Hi,
>>>
>>> On Thu, 14 Nov 2013, Andrew MacLeod wrote:
>>>
>>>>> I think if following through with the whole plan there would (and
>>>>> should) be nothing remaining that could be called a gimple expression.
>>>> very possibly, i just haven't gotten to those parts yet. I can change
>>>> the name back to gimple-decl.[ch] or some such thing if you like that
>>>> better.
>>> -object? -operand? -stuff? ;-)  Will all of these splits land at trunk,
>>> i.e. 4.9?  Why the hurry when not even such high-level things are clear?
>>> I mean how can you think about rearchitecting the gimple data structures
>>> without having looked at the current details.  It's clear that not every
>>> detail of the design can be fixated at this point, but basic questions
>>> like "what's the operands?", "will there be expressions?", "how do we
>>> iterate?", "recursive structures or not?" should at least get some answer
>>> before really starting grind work, shouldn't they?
>>>
>> The splits are for header file cleanup and re-structuring into logical
>> components.  As I mentioned in the original post,  the file is needed to
>> break dependency cycles between gimple.h (the statements) , the iterators,
>> and gimplification.  It is for the gimple stuff which doesn't need any of
>> those things but is consumed by them.
>>
>> This really has nothing to do with my future plans, other than the fact that
>> I also said whatever is in this file is will eventually be split into more
>> things, but I'm not ready to do those splits yet, thus the gimple-blah name
>> doesn't matter to me.  gimple-expr seemed convenient at the time but clearly
>> you don't like it, and I'll happily call it whatever you want.  It's a grab
>> bag of all the gimple values which are still trees...
>>
>> maybe the suggested  gimple-val.[ch] is ok?
>>
>> Andrew
> It breaks Ada build.  I checked in the following patch to unbreak
> it.
>
>
Thanks.

  I was bootstrapping Ada as well until the end of last week. It seems 
to be broken right now, so I had turned Ada off until the issue is resolved.

Andrew

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

* Re: [patch 3/4] Separate gimple.[ch] and gimplify.[ch] - front end files
  2013-11-15  5:16                     ` Andrew MacLeod
@ 2013-11-15  7:45                       ` Jeff Law
  2013-11-15  8:06                         ` Andrew MacLeod
  2013-11-15  9:58                       ` Eric Botcazou
  1 sibling, 1 reply; 24+ messages in thread
From: Jeff Law @ 2013-11-15  7:45 UTC (permalink / raw)
  To: Andrew MacLeod, H.J. Lu
  Cc: Michael Matz, Richard Biener, gcc-patches, Diego Novillo

On 11/14/13 16:00, Andrew MacLeod wrote:

>
>   I was bootstrapping Ada as well until the end of last week. It seems
> to be broken right now, so I had turned Ada off until the issue is
> resolved.
Ada should be working again...  At least on x86_64.  I'm still looking 
at it on Itanic, but I suspect you aren't building Ada on that :-)

jeff

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

* Re: [patch 3/4] Separate gimple.[ch] and gimplify.[ch] - front end files
  2013-11-15  7:45                       ` Jeff Law
@ 2013-11-15  8:06                         ` Andrew MacLeod
  0 siblings, 0 replies; 24+ messages in thread
From: Andrew MacLeod @ 2013-11-15  8:06 UTC (permalink / raw)
  To: Jeff Law
  Cc: H.J. Lu, Michael Matz, Richard Biener, gcc-patches, Diego Novillo

On 11/14/2013 06:56 PM, Jeff Law wrote:
> On 11/14/13 16:00, Andrew MacLeod wrote:
>
>>
>>   I was bootstrapping Ada as well until the end of last week. It seems
>> to be broken right now, so I had turned Ada off until the issue is
>> resolved.
> Ada should be working again...  At least on x86_64.  I'm still looking 
> at it on Itanic, but I suspect you aren't building Ada on that :-)
>
> jeff
I'll check again. it was still busted earlier this afternoon

Andrew

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

* Re: [patch 3/4] Separate gimple.[ch] and gimplify.[ch] - front end files
  2013-11-15  5:16                     ` Andrew MacLeod
  2013-11-15  7:45                       ` Jeff Law
@ 2013-11-15  9:58                       ` Eric Botcazou
  1 sibling, 0 replies; 24+ messages in thread
From: Eric Botcazou @ 2013-11-15  9:58 UTC (permalink / raw)
  To: Andrew MacLeod
  Cc: gcc-patches, H.J. Lu, Michael Matz, Richard Biener, Jeff Law,
	Diego Novillo

>   I was bootstrapping Ada as well until the end of last week. It seems
> to be broken right now, so I had turned Ada off until the issue is resolved.

Well, it's equivalent to knowingly breaking it further when you're making 
systemic changes like these...  A quick search with bugzilla would have given 
the revision that broke it and you could have reverted it locally instead.

-- 
Eric Botcazou

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

end of thread, other threads:[~2013-11-15  8:09 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-11 23:04 [patch 1/4] Separate gimple.[ch] and gimplify.[ch] Andrew MacLeod
2013-11-11 23:18 ` [patch 2/4] " Andrew MacLeod
2013-11-11 23:51 ` [patch 3/4] Separate gimple.[ch] and gimplify.[ch] - front end files Andrew MacLeod
2013-11-13 10:48   ` Richard Biener
2013-11-13 15:27     ` Andrew MacLeod
2013-11-14 16:34       ` Michael Matz
2013-11-14 16:49         ` Diego Novillo
2013-11-14 16:56         ` Andrew MacLeod
2013-11-14 17:06           ` Diego Novillo
2013-11-14 17:21             ` Andrew MacLeod
2013-11-14 17:39           ` Michael Matz
2013-11-14 17:50             ` Andrew MacLeod
2013-11-14 17:55               ` Michael Matz
2013-11-14 18:06                 ` Andrew MacLeod
2013-11-14 23:20                   ` H.J. Lu
2013-11-15  5:16                     ` Andrew MacLeod
2013-11-15  7:45                       ` Jeff Law
2013-11-15  8:06                         ` Andrew MacLeod
2013-11-15  9:58                       ` Eric Botcazou
2013-11-14 17:57               ` Diego Novillo
2013-11-14 18:43                 ` Richard Biener
2013-11-11 23:53 ` [patch 4/4] Separate gimple.[ch] and gimplify.[ch] Andrew MacLeod
2013-11-12 21:16 ` [patch 1/4] " Jeff Law
2013-11-12 21:40   ` Andrew MacLeod

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).