This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tuples] Rename gs_*
Thanks. Here is is v2. I made a better Changelog, fixed the copyright,
fixed some line wrapping issues, and chnaged the gimplifyer statuses
back to GSes.
2007-07-16 Chris Matthews <chrismatthews@google.com>
* gimplify.c (gs_build_eh_filter): Renamed to gs_build_eh_filter_tree to
avoid name conflict.
* gimple-pretty-print.c: Renamed to debug_gs_* to debug_gimple_*. Updated
all users.
* gimple.h: Renamed all functions with GS and gs prefixes to GIMPLE and
gimple, and updated users.
Renamed gs_seq_* functions to gimple_seq_*. Updated all users.
* gimple.def: Definitions changed to from GS_* to GIMPLE_*.
On 7/17/07, Aldy Hernandez <aldyh@redhat.com> wrote:
On Tue, Jul 17, 2007 at 01:03:33PM -0700, Christopher Matthews wrote:
> So, should I change the license in gimple.def to just have a
> "Copyright (C)" like the rest of them? I don't want to make the
> lawyers angry :)
Yes.
Index: gcc/tree.h
===================================================================
--- gcc/tree.h (revision 126694)
+++ gcc/tree.h (working copy)
@@ -4525,7 +4525,7 @@ extern tree build_call_expr (tree, int,
extern tree mathfn_built_in (tree, enum built_in_function fn);
extern tree strip_float_extensions (tree);
extern tree c_strlen (tree, int);
-extern tree std_gimplify_va_arg_expr (tree, tree, gs_seq, gs_seq);
+extern tree std_gimplify_va_arg_expr (tree, tree, gimple_seq, gimple_seq);
extern tree build_va_arg_indirect_ref (tree);
extern tree build_string_literal (int, const char *);
extern bool validate_arglist (tree, ...);
@@ -4624,7 +4624,7 @@ extern void push_function_context (void)
extern void pop_function_context (void);
extern void push_function_context_to (tree);
extern void pop_function_context_from (tree);
-extern struct gs_sequence gimplify_parameters (void);
+extern struct gimple_sequence gimplify_parameters (void);
/* In print-rtl.c */
#ifdef BUFSIZ
Index: gcc/target.h
===================================================================
--- gcc/target.h (revision 126694)
+++ gcc/target.h (working copy)
@@ -645,7 +645,7 @@ struct gcc_target
/* Gimplifies a VA_ARG_EXPR. */
tree (* gimplify_va_arg_expr) (tree valist, tree type,
- gs_seq pre_p, gs_seq post_p);
+ gimple_seq pre_p, gimple_seq post_p);
/* Validity-checking routines for PCH files, target-specific.
get_pch_validity returns a pointer to the data to be stored,
Index: gcc/builtins.c
===================================================================
--- gcc/builtins.c (revision 126694)
+++ gcc/builtins.c (working copy)
@@ -4693,7 +4693,7 @@ expand_builtin_va_start (tree exp)
current (padded) address and increment by the (padded) size. */
tree
-std_gimplify_va_arg_expr (tree valist, tree type, gs_seq pre_p, gs_seq post_p)
+std_gimplify_va_arg_expr (tree valist, tree type, gimple_seq pre_p, gimple_seq post_p)
{
tree addr, t, type_size, rounded_size, valist_tmp;
unsigned HOST_WIDE_INT align, boundary;
@@ -4804,7 +4804,7 @@ dummy_object (tree type)
builtin function, but a very special sort of operator. */
enum gimplify_status
-gimplify_va_arg_expr (tree *expr_p, gs_seq pre_p, gs_seq post_p)
+gimplify_va_arg_expr (tree *expr_p, gimple_seq pre_p, gimple_seq post_p)
{
tree promoted_type, want_va_type, have_va_type;
tree valist = TREE_OPERAND (*expr_p, 0);
Index: gcc/diagnostic.h
===================================================================
--- gcc/diagnostic.h (revision 126694)
+++ gcc/diagnostic.h (working copy)
@@ -221,8 +221,8 @@ extern void debug_generic_expr (tree);
extern void debug_generic_stmt (tree);
extern void debug_tree_chain (tree);
extern void debug_gimple_stmt (gimple);
-extern void debug_gimple_seq (gs_seq);
-extern void print_gimple_seq (FILE *, gs_seq, int, int);
+extern void debug_gimple_seq (gimple_seq);
+extern void print_gimple_seq (FILE *, gimple_seq, int, int);
extern void print_gimple_stmt (FILE *, gimple, int, int);
extern void dump_gimple_stmt (pretty_printer *, gimple, int, int);
Index: gcc/gimple.def
===================================================================
--- gcc/gimple.def (revision 126694)
+++ gcc/gimple.def (working copy)
@@ -1,13 +1,13 @@
/* This file contains the definitions in the gimple IR tuples used in GCC.
- Copyright (GS_C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007 Free Software Foundation, Inc.
Contributed by Aldy Hernandez <aldyh@redhat.com>
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 2, or (GS_at your option) any later
+Software Foundation; either version 2, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
@@ -21,38 +21,38 @@ Software Foundation, 51 Franklin Street,
02110-1301, USA. */
/* The format of this file is
- DEFGSCODE(GS_symbol, printable name).
+ DEFGSCODE(GIMPLE_symbol, printable name).
- Where symbol is the enumeration name without the ``GS_''.
+ Where symbol is the enumeration name without the ``GIMPLE_''.
*/
-DEFGSCODE(GS_BASE, "gs_base")
-DEFGSCODE(GS_WITH_OPS, "gs_with_ops")
-DEFGSCODE(GS_WITH_MEM_OPS, "gs_with_mem_ops")
-DEFGSCODE(GS_OMP, "gs_omp")
+DEFGSCODE(GIMPLE_BASE, "gimple_base")
+DEFGSCODE(GIMPLE_WITH_OPS, "gimple_with_ops")
+DEFGSCODE(GIMPLE_WITH_MEM_OPS, "gimple_with_mem_ops")
+DEFGSCODE(GIMPLE_OMP, "gimple_omp")
-DEFGSCODE(GS_BIND, "gs_bind")
-DEFGSCODE(GS_CATCH, "gs_catch")
-DEFGSCODE(GS_EH_FILTER, "gs_eh_filter")
-DEFGSCODE(GS_LABEL, "gs_label")
-DEFGSCODE(GS_PHI, "gs_phi")
-DEFGSCODE(GS_RESX, "gs_resx")
-DEFGSCODE(GS_TRY, "gs_try")
-DEFGSCODE(GS_ASSIGN, "gs_assign")
-DEFGSCODE(GS_COND, "gs_cond")
-DEFGSCODE(GS_GOTO, "gs_goto")
-DEFGSCODE(GS_SWITCH, "gs_switch")
-DEFGSCODE(GS_ASM, "gs_asm")
-DEFGSCODE(GS_CALL, "gs_call")
-DEFGSCODE(GS_NOP, "gs_nop")
-DEFGSCODE(GS_RETURN, "gs_return")
-DEFGSCODE(GS_OMP_CONTINUE, "gs_omp_continue")
-DEFGSCODE(GS_OMP_CRITICAL, "gs_omp_critical")
-DEFGSCODE(GS_OMP_FOR, "gs_omp_for")
-DEFGSCODE(GS_OMP_MASTER, "gs_omp_master")
-DEFGSCODE(GS_OMP_ORDERED, "gs_omp_ordered")
-DEFGSCODE(GS_OMP_PARALLEL, "gs_omp_parallel")
-DEFGSCODE(GS_OMP_RETURN, "gs_omp_return")
-DEFGSCODE(GS_OMP_SECTION, "gs_omp_section")
-DEFGSCODE(GS_OMP_SECTIONS, "gs_omp_sections")
-DEFGSCODE(GS_OMP_SINGLE, "gs_omp_single")
+DEFGSCODE(GIMPLE_BIND, "gimple_bind")
+DEFGSCODE(GIMPLE_CATCH, "gimple_catch")
+DEFGSCODE(GIMPLE_EH_FILTER, "gimple_eh_filter")
+DEFGSCODE(GIMPLE_LABEL, "gimple_label")
+DEFGSCODE(GIMPLE_PHI, "gimple_phi")
+DEFGSCODE(GIMPLE_RESX, "gimple_resx")
+DEFGSCODE(GIMPLE_TRY, "gimple_try")
+DEFGSCODE(GIMPLE_ASSIGN, "gimple_assign")
+DEFGSCODE(GIMPLE_COND, "gimple_cond")
+DEFGSCODE(GIMPLE_GOTO, "gimple_goto")
+DEFGSCODE(GIMPLE_SWITCH, "gimple_switch")
+DEFGSCODE(GIMPLE_ASM, "gimple_asm")
+DEFGSCODE(GIMPLE_CALL, "gimple_call")
+DEFGSCODE(GIMPLE_NOP, "gimple_nop")
+DEFGSCODE(GIMPLE_RETURN, "gimple_return")
+DEFGSCODE(GIMPLE_OMP_CONTINUE, "gimple_omp_continue")
+DEFGSCODE(GIMPLE_OMP_CRITICAL, "gimple_omp_critical")
+DEFGSCODE(GIMPLE_OMP_FOR, "gimple_omp_for")
+DEFGSCODE(GIMPLE_OMP_MASTER, "gimple_omp_master")
+DEFGSCODE(GIMPLE_OMP_ORDERED, "gimple_omp_ordered")
+DEFGSCODE(GIMPLE_OMP_PARALLEL, "gimple_omp_parallel")
+DEFGSCODE(GIMPLE_OMP_RETURN, "gimple_omp_return")
+DEFGSCODE(GIMPLE_OMP_SECTION, "gimple_omp_section")
+DEFGSCODE(GIMPLE_OMP_SECTIONS, "gimple_omp_sections")
+DEFGSCODE(GIMPLE_OMP_SINGLE, "gimple_omp_single")
Index: gcc/omp-low.c
===================================================================
--- gcc/omp-low.c (revision 126694)
+++ gcc/omp-low.c (working copy)
@@ -1426,7 +1426,7 @@ scan_omp (tree *stmt_p, omp_context *ctx
/* Build a call to GOMP_barrier. */
static void
-build_omp_barrier (gs_seq stmt_list)
+build_omp_barrier (gimple_seq stmt_list)
{
tree t = build_call_expr (built_in_decls[BUILT_IN_GOMP_BARRIER], 0);
gimplify_and_add (t, stmt_list);
@@ -4145,9 +4145,9 @@ static void
lower_regimplify (tree *tp, struct walk_stmt_info *wi)
{
enum gimplify_status gs;
- struct gs_sequence pre;
+ struct gimple_sequence pre;
- gs_seq_init (&pre);
+ gimple_seq_init (&pre);
if (wi->is_lhs)
gs = gimplify_expr (tp, &pre, NULL, is_gimple_lvalue, fb_lvalue);
@@ -4157,9 +4157,9 @@ lower_regimplify (tree *tp, struct walk_
gs = gimplify_expr (tp, &pre, NULL, is_gimple_formal_tmp_var, fb_rvalue);
gcc_assert (gs == GS_ALL_DONE);
- /* FIXME tuples. Need a gs_seq_insert_before. WI->TSI must be a GS_SEQ. */
+ /* FIXME tuples. Need a gimple_seq_insert_before. WI->TSI must be a GS_SEQ. */
#if 0
- if (!gs_seq_empty_p (&pre))
+ if (!gimple_seq_empty_p (&pre))
tsi_link_before (&wi->tsi, pre, TSI_SAME_STMT);
#endif
}
Index: gcc/tree-gimple.h
===================================================================
--- gcc/tree-gimple.h (revision 126694)
+++ gcc/tree-gimple.h (working copy)
@@ -29,12 +29,12 @@ Boston, MA 02110-1301, USA. */
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 get_initialized_tmp_var (tree, gs_seq, gs_seq);
-extern tree get_formal_tmp_var (tree, gs_seq);
+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, tree, bool);
-extern void annotate_all_with_locus (gs_seq, location_t);
+extern void annotate_all_with_locus (gimple_seq, location_t);
/* Validation of GIMPLE expressions. Note that these predicates only check
the basic form of the expression, they don't recurse to make sure that
@@ -117,27 +117,27 @@ enum gimplify_status {
GS_ALL_DONE = 1 /* The expression is fully gimplified. */
};
-extern enum gimplify_status gimplify_expr (tree *, gs_seq, gs_seq,
+extern enum gimplify_status gimplify_expr (tree *, gimple_seq, gimple_seq,
bool (*) (tree), fallback_t);
-extern void gimplify_type_sizes (tree, gs_seq);
-extern void gimplify_one_sizepos (tree *, gs_seq);
-extern bool gimplify_stmt (tree *, gs_seq);
+extern void gimplify_type_sizes (tree, gimple_seq);
+extern void gimplify_one_sizepos (tree *, gimple_seq);
+extern bool gimplify_stmt (tree *, gimple_seq);
extern void gimplify_to_stmt_list (tree *);
-extern void gimplify_body (tree *, gs_seq, tree, bool);
+extern void gimplify_body (tree *, gimple_seq, tree, bool);
extern void push_gimplify_context (void);
extern void pop_gimplify_context (gimple);
-extern void gimplify_and_add (tree, gs_seq);
+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 tree voidify_wrapper_expr (tree, tree);
-extern tree gimple_build_eh_filter (tree, tree, tree);
+extern tree gimple_build_eh_filter_tree (tree, tree, tree);
extern tree build_and_jump (tree *);
extern tree alloc_stmt_list (void);
extern void free_stmt_list (tree);
extern tree force_labels_r (tree *, int *, void *);
-extern enum gimplify_status gimplify_va_arg_expr (tree *, gs_seq, gs_seq);
+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);
Index: gcc/testsuite/gcc.dg/gimple/gimple_switch.c
===================================================================
--- gcc/testsuite/gcc.dg/gimple/gimple_switch.c (revision 126677)
+++ gcc/testsuite/gcc.dg/gimple/gimple_switch.c (working copy)
@@ -1,6 +1,6 @@
/* { dg-do compile } */
-/* Test GS_SWITCH. */
+/* Test GIMPLE_SWITCH. */
int
foo (int a)
Index: gcc/testsuite/gcc.dg/gimple/gs_goto.c
===================================================================
--- gcc/testsuite/gcc.dg/gimple/gs_goto.c (revision 126694)
+++ gcc/testsuite/gcc.dg/gimple/gs_goto.c (working copy)
@@ -1,13 +0,0 @@
-/* { dg-do compile } */
-
-/* Test GS_GOTO. */
-
-void yanory()
-{
-hotdog:
- goto hotdog;
-}
-
-/* { dg-final { scan-tree-dump-times "gimpleir: goto hotdog" 1 "gimple"} } */
-/* { dg-final { scan-tree-dump-times "gimpleir: hotdog:" 1 "gimple"} } */
-/* { dg-final { cleanup-tree-dump "gimple" } } */
Index: gcc/testsuite/gcc.dg/gimple/with_size_expr.c
===================================================================
--- gcc/testsuite/gcc.dg/gimple/with_size_expr.c (revision 126694)
+++ gcc/testsuite/gcc.dg/gimple/with_size_expr.c (working copy)
@@ -1,6 +1,6 @@
/* { dg-do compile } */
-/* Test GS_ASSIGN for variable sized assignments (WITH_SIZE_EXPR). */
+/* Test GIMPLE_ASSIGN for variable sized assignments (WITH_SIZE_EXPR). */
void init (void *);
@@ -12,6 +12,6 @@ void f(int a)
d = c;
}
-/* { dg-final { scan-tree-dump-times "gimpleir: GS_TRY tuple" 1 "gimple" } } */
+/* { dg-final { scan-tree-dump-times "gimpleir: GIMPLE_TRY tuple" 1 "gimple" } } */
/* { dg-final { scan-tree-dump-times "__builtin_stack_save" 1 "gimple" } } */
/* { dg-final { cleanup-tree-dump "gimple" } } */
Index: gcc/testsuite/gcc.dg/gimple/gs_call.c
===================================================================
--- gcc/testsuite/gcc.dg/gimple/gs_call.c (revision 126694)
+++ gcc/testsuite/gcc.dg/gimple/gs_call.c (working copy)
@@ -1,15 +0,0 @@
-/* { dg-do compile } */
-
-/* Test GS_CALL. */
-
-void bar();
-void tool();
-
-void foo()
-{
- bar(), tool();
-}
-
-/* { dg-final { scan-tree-dump-times "gimpleir: bar \\(\\)" 1 "gimple"} } */
-/* { dg-final { scan-tree-dump-times "gimpleir: tool \\(\\)" 1 "gimple"} } */
-/* { dg-final { cleanup-tree-dump "gimple" } } */
Index: gcc/testsuite/gcc.dg/gimple/gs_bind.c
===================================================================
--- gcc/testsuite/gcc.dg/gimple/gs_bind.c (revision 126694)
+++ gcc/testsuite/gcc.dg/gimple/gs_bind.c (working copy)
@@ -1,16 +0,0 @@
-/* { dg-do compile } */
-
-/* Test GS_BIND. */
-
-int global;
-
-void foo(int p)
-{
- int bar = p, joe;
-
- joe = bar;
- global = joe;
-}
-
-/* { dg-final { scan-tree-dump-times "gimpleir: GS_BIND tuple" 1 "gimple"} } */
-/* { dg-final { cleanup-tree-dump "gimple" } } */
Index: gcc/testsuite/gcc.dg/gimple/gimple_goto.c
===================================================================
--- gcc/testsuite/gcc.dg/gimple/gimple_goto.c (revision 126677)
+++ gcc/testsuite/gcc.dg/gimple/gimple_goto.c (working copy)
@@ -1,6 +1,6 @@
/* { dg-do compile } */
-/* Test GS_GOTO. */
+/* Test GIMPLE_GOTO. */
void yanory()
{
Index: gcc/testsuite/gcc.dg/gimple/gimple_call.c
===================================================================
--- gcc/testsuite/gcc.dg/gimple/gimple_call.c (revision 126677)
+++ gcc/testsuite/gcc.dg/gimple/gimple_call.c (working copy)
@@ -1,6 +1,6 @@
/* { dg-do compile } */
-/* Test GS_CALL. */
+/* Test GIMPLE_CALL. */
void bar();
void tool();
Index: gcc/testsuite/gcc.dg/gimple/gs_return.c
===================================================================
--- gcc/testsuite/gcc.dg/gimple/gs_return.c (revision 126694)
+++ gcc/testsuite/gcc.dg/gimple/gs_return.c (working copy)
@@ -1,13 +0,0 @@
-/* { dg-do compile } */
-
-/* Test GS_RETURN. */
-
-int a, b;
-
-int foo()
-{
- return a + b;
-}
-
-/* { dg-final { scan-tree-dump-times "gimpleir: return" 1 "gimple"} } */
-/* { dg-final { cleanup-tree-dump "gimple" } } */
Index: gcc/testsuite/gcc.dg/gimple/gimple_bind.c
===================================================================
--- gcc/testsuite/gcc.dg/gimple/gimple_bind.c (revision 126677)
+++ gcc/testsuite/gcc.dg/gimple/gimple_bind.c (working copy)
@@ -1,6 +1,6 @@
/* { dg-do compile } */
-/* Test GS_BIND. */
+/* Test GIMPLE_BIND. */
int global;
@@ -12,5 +12,5 @@ void foo(int p)
global = joe;
}
-/* { dg-final { scan-tree-dump-times "gimpleir: GS_BIND tuple" 1 "gimple"} } */
+/* { dg-final { scan-tree-dump-times "gimpleir: GIMPLE_BIND tuple" 1 "gimple"} } */
/* { dg-final { cleanup-tree-dump "gimple" } } */
Index: gcc/testsuite/gcc.dg/gimple/gimple_return.c
===================================================================
--- gcc/testsuite/gcc.dg/gimple/gimple_return.c (revision 126677)
+++ gcc/testsuite/gcc.dg/gimple/gimple_return.c (working copy)
@@ -1,6 +1,6 @@
/* { dg-do compile } */
-/* Test GS_RETURN. */
+/* Test GIMPLE_RETURN. */
int a, b;
Index: gcc/testsuite/gcc.dg/gimple/gs_cond.c
===================================================================
--- gcc/testsuite/gcc.dg/gimple/gs_cond.c (revision 126694)
+++ gcc/testsuite/gcc.dg/gimple/gs_cond.c (working copy)
@@ -1,13 +0,0 @@
-/* { dg-do compile } */
-
-/* Test GS_COND. */
-
-int res, a, b, c;
-
-void foo()
-{
- res = a > 5 ? b : c;
-}
-
-/* { dg-final { scan-tree-dump-times "gimpleir: GS_COND tuple" 1 "gimple"} } */
-/* { dg-final { cleanup-tree-dump "gimple" } } */
Index: gcc/testsuite/gcc.dg/gimple/gs_switch2.c
===================================================================
--- gcc/testsuite/gcc.dg/gimple/gs_switch2.c (revision 126694)
+++ gcc/testsuite/gcc.dg/gimple/gs_switch2.c (working copy)
@@ -1,21 +0,0 @@
-/* { dg-do compile } */
-
-/* Test the when the switch conditional has something complex in it. */
-int
-foo2 (int a, int b)
-{
- switch (a+a)
- {
- case 0:
- return a;
- case 1:
- return b;
- default:
- return 1;
- }
-}
-/* { dg-final { scan-tree-dump-times "gimpleir: switch \\(D.*\\) <default:, case 0:, case 1:>" 1 "gimple"} } */
-/* { dg-final { scan-tree-dump-times "gimpleir: case 0:" 1 "gimple"} } */
-/* { dg-final { scan-tree-dump-times "gimpleir: case 1:" 1 "gimple"} } */
-/* { dg-final { scan-tree-dump-times "gimpleir: default:" 1 "gimple"} } */
-/* { dg-final { cleanup-tree-dump "gimple" } } */
Index: gcc/testsuite/gcc.dg/gimple/gs_assign.c
===================================================================
--- gcc/testsuite/gcc.dg/gimple/gs_assign.c (revision 126694)
+++ gcc/testsuite/gcc.dg/gimple/gs_assign.c (working copy)
@@ -1,13 +0,0 @@
-/* { dg-do compile } */
-
-/* Test GS_ASSIGN. */
-
-int a, b, c;
-
-void foo()
-{
- a = b + c;
-}
-
-/* { dg-final { scan-tree-dump-times "gimpleir: a.2 = b.0 \\+ c.1" 1 "gimple"} } */
-/* { dg-final { cleanup-tree-dump "gimple" } } */
Index: gcc/testsuite/gcc.dg/gimple/gs_switch3.c
===================================================================
--- gcc/testsuite/gcc.dg/gimple/gs_switch3.c (revision 126694)
+++ gcc/testsuite/gcc.dg/gimple/gs_switch3.c (working copy)
@@ -1,19 +0,0 @@
-/* { dg-do compile } */
-/* Test generation of default label. */
-int
-foo3 (int a)
-{
- switch (a)
- {
- case 0:
- return a;
- case 1:
- return a;
- }
-}
-/* { dg-final { scan-tree-dump-times "gimpleir: switch \\(a\\) <default:, case 0:, case 1:>" 1 "gimple"} } */
-/* { dg-final { scan-tree-dump-times "gimpleir: case 0:" 1 "gimple"} } */
-/* { dg-final { scan-tree-dump-times "gimpleir: case 1:" 1 "gimple"} } */
-/* { dg-final { scan-tree-dump-times "gimpleir: default:" 1 "gimple"} } */
-/* { dg-final { cleanup-tree-dump "gimple" } } */
-
Index: gcc/testsuite/gcc.dg/gimple/gimple_cond.c
===================================================================
--- gcc/testsuite/gcc.dg/gimple/gimple_cond.c (revision 126677)
+++ gcc/testsuite/gcc.dg/gimple/gimple_cond.c (working copy)
@@ -1,6 +1,6 @@
/* { dg-do compile } */
-/* Test GS_COND. */
+/* Test GIMPLE_COND. */
int res, a, b, c;
@@ -9,5 +9,5 @@ void foo()
res = a > 5 ? b : c;
}
-/* { dg-final { scan-tree-dump-times "gimpleir: GS_COND tuple" 1 "gimple"} } */
+/* { dg-final { scan-tree-dump-times "gimpleir: GIMPLE_COND tuple" 1 "gimple"} } */
/* { dg-final { cleanup-tree-dump "gimple" } } */
Index: gcc/testsuite/gcc.dg/gimple/gimple_assign.c
===================================================================
--- gcc/testsuite/gcc.dg/gimple/gimple_assign.c (revision 126677)
+++ gcc/testsuite/gcc.dg/gimple/gimple_assign.c (working copy)
@@ -1,6 +1,6 @@
/* { dg-do compile } */
-/* Test GS_ASSIGN. */
+/* Test GIMPLE_ASSIGN. */
int a, b, c;
Index: gcc/testsuite/gcc.dg/gimple/gs_switch.c
===================================================================
--- gcc/testsuite/gcc.dg/gimple/gs_switch.c (revision 126694)
+++ gcc/testsuite/gcc.dg/gimple/gs_switch.c (working copy)
@@ -1,23 +0,0 @@
-/* { dg-do compile } */
-
-/* Test GS_SWITCH. */
-
-int
-foo (int a)
-{
- switch (a)
- {
- default:
- return 2;
- case 0:
- return a;
- case 1:
- return 1;
- }
-
-}
-/* { dg-final { scan-tree-dump-times "gimpleir: switch \\(a\\) <default:, case 0:, case 1:>" 1 "gimple"} } */
-/* { dg-final { scan-tree-dump-times "gimpleir: default:" 1 "gimple"} } */
-/* { dg-final { scan-tree-dump-times "gimpleir: case 0:" 1 "gimple"} } */
-/* { dg-final { scan-tree-dump-times "gimpleir: case 1:" 1 "gimple"} } */
-/* { dg-final { cleanup-tree-dump "gimple" } } */
Index: gcc/testsuite/ChangeLog.tuples
===================================================================
--- gcc/testsuite/ChangeLog.tuples (revision 126694)
+++ gcc/testsuite/ChangeLog.tuples (working copy)
@@ -1,6 +1,20 @@
2007-07-16 Chris Matthews <chrismatthews@google.com>
- * gs_switch.c: Improved test case to look at the gs_switch case list instead
+ * gs_assign.c: Renamed to gimple_assign.c.
+ * gs_bind.c: Renamed to gimple_bind.c.
+ * gs_call.c: Renamed to gimple_call.c.
+ * gs_cond.c: Renamed to gimple_cond.c.
+ * gs_goto.c: Renamed to gimple_goto.c.
+ * gs_return.c: Renamed to gimple_return.c.
+ * gs_switch.c: Renamed to gimple_switch.c.
+ * gs_switch2.c: Renamed to gimple_switch2.c.
+ * gs_switch3.c: Renamed to gimple_switch3.c.
+ * with_size_expr.c: GS_ renamed to GIMPLE_.
+
+2007-07-16 Chris Matthews <chrismatthews@google.com>
+
+ * gs_switch.c: Improved test case to look at the gs_switch case list
+ instead
of just the body.
* gs_switch2.c: Same.
* gs_switch3.c: Same.
Index: gcc/cp/cp-gimplify.c
===================================================================
--- gcc/cp/cp-gimplify.c (revision 126694)
+++ gcc/cp/cp-gimplify.c (working copy)
@@ -149,7 +149,7 @@ genericize_eh_spec_block (tree *stmt_p)
tree failure = build_call_n (call_unexpected_node, 1, build_exc_ptr ());
gimplify_stmt (&body);
- *stmt_p = gimple_build_eh_filter (body, allowed, failure);
+ *stmt_p = gimple_build_eh_filter_tree (body, allowed, failure);
}
/* Genericize an IF_STMT by turning it into a COND_EXPR. */
@@ -429,7 +429,7 @@ gimplify_must_not_throw_expr (tree *expr
gimplify_stmt (&body);
- stmt = gimple_build_eh_filter (body, NULL_TREE,
+ stmt = gimple_build_eh_filter_tree (body, NULL_TREE,
build_call_n (terminate_node, 0));
if (temp)
Index: gcc/gimple-iterator.h
===================================================================
--- gcc/gimple-iterator.h (revision 126694)
+++ gcc/gimple-iterator.h (working copy)
@@ -26,30 +26,30 @@ Boston, MA 02110-1301, USA. */
typedef struct {
gimple stmt;
- gs_seq seq;
+ gimple_seq seq;
} gimple_stmt_iterator;
-/* Return a new iterator initially pointing to GS_SEQ's first statement. */
+/* Return a new iterator initially pointing to GIMPLE_SEQ's first statement. */
static inline gimple_stmt_iterator
-gsi_start (gs_seq seq)
+gsi_start (gimple_seq seq)
{
gimple_stmt_iterator i;
- i.stmt = gs_seq_first(seq);
+ i.stmt = gimple_seq_first(seq);
i.seq = seq;
return i;
}
-/* Return a new iterator initially pointing to GS_SEQ's last statement. */
+/* Return a new iterator initially pointing to GIMPLE_SEQ's last statement. */
static inline gimple_stmt_iterator
-gsi_last (gs_seq seq)
+gsi_last (gimple_seq seq)
{
gimple_stmt_iterator i;
- i.stmt = gs_seq_last(seq);
+ i.stmt = gimple_seq_last(seq);
i.seq = seq;
return i;
@@ -68,7 +68,7 @@ gsi_end_p (gimple_stmt_iterator i)
static inline bool
gsi_one_before_end_p (gimple_stmt_iterator i)
{
- return i.stmt == gs_seq_last(i.seq);
+ return i.stmt == gimple_seq_last(i.seq);
}
/* Return the next gimple statement in I. */
@@ -76,7 +76,7 @@ gsi_one_before_end_p (gimple_stmt_iterat
static inline void
gsi_next (gimple_stmt_iterator *i)
{
- i->stmt = GS_NEXT (i->stmt);
+ i->stmt = GIMPLE_NEXT (i->stmt);
}
/* Return the previous gimple statement in I. */
@@ -84,7 +84,7 @@ gsi_next (gimple_stmt_iterator *i)
static inline void
gsi_prev (gimple_stmt_iterator *i)
{
- i->stmt = GS_PREV (i->stmt);
+ i->stmt = GIMPLE_PREV (i->stmt);
}
/* Return the current stmt. */
Index: gcc/gimple-pretty-print.c
===================================================================
--- gcc/gimple-pretty-print.c (revision 126694)
+++ gcc/gimple-pretty-print.c (working copy)
@@ -40,7 +40,7 @@ Software Foundation, 51 Franklin Street,
static pretty_printer buffer;
static bool initialized = false;
-#define GS_NIY do_niy(buffer,gs)
+#define GIMPLE_NIY do_niy(buffer,gs)
/* Try to print on BUFFER a default message for the unrecognized
gimple statement GS. */
@@ -49,7 +49,7 @@ static void
do_niy (pretty_printer *buffer, gimple gs)
{
pp_printf (buffer, "<<< Unknown GIMPLE statement: %s >>>\n",
- gs_code_name[(int) GS_CODE (gs)]);
+ gimple_code_name[(int) GIMPLE_CODE (gs)]);
}
@@ -105,7 +105,7 @@ print_gimple_stmt (FILE *file, gimple g,
spaces and FLAGS as in dump_gimple_stmt. */
static void
-dump_gimple_seq (pretty_printer *buffer, gs_seq seq, int spc, int flags)
+dump_gimple_seq (pretty_printer *buffer, gimple_seq seq, int spc, int flags)
{
gimple_stmt_iterator i;
@@ -123,7 +123,7 @@ dump_gimple_seq (pretty_printer *buffer,
FLAGS as in dump_gimple_stmt. */
void
-print_gimple_seq (FILE *file, gs_seq seq, int spc, int flags)
+print_gimple_seq (FILE *file, gimple_seq seq, int spc, int flags)
{
maybe_init_pretty_print (file);
dump_gimple_seq (&buffer, seq, spc, flags);
@@ -134,7 +134,7 @@ print_gimple_seq (FILE *file, gs_seq seq
/* Print the GIMPLE sequence SEQ on stderr. */
void
-debug_gimple_seq (gs_seq seq)
+debug_gimple_seq (gimple_seq seq)
{
print_gimple_seq (stderr, seq, 0, TDF_VOPS|TDF_MEMSYMS);
}
@@ -144,31 +144,31 @@ debug_gimple_seq (gs_seq seq)
dump_gimple_stmt. */
static void
-dump_gs_assign (pretty_printer *buffer, gimple gs, int spc, int flags)
+dump_gimple_assign (pretty_printer *buffer, gimple gs, int spc, int flags)
{
enum gimple_statement_structure_enum gss;
- dump_generic_node (buffer, gs_assign_lhs (gs), spc, flags, false);
+ dump_generic_node (buffer, gimple_assign_lhs (gs), spc, flags, false);
pp_space (buffer);
pp_character (buffer, '=');
pp_space (buffer);
- gss = gss_for_assign (GS_SUBCODE_FLAGS (gs));
+ gss = gss_for_assign (GIMPLE_SUBCODE_FLAGS (gs));
switch (gss)
{
case GSS_ASSIGN_BINARY:
- dump_generic_node (buffer, gs_assign_binary_rhs1 (gs), spc,
+ dump_generic_node (buffer, gimple_assign_binary_rhs1 (gs), spc,
flags, false);
pp_space (buffer);
- pp_string (buffer, op_symbol_code (GS_SUBCODE_FLAGS (gs)));
+ pp_string (buffer, op_symbol_code (GIMPLE_SUBCODE_FLAGS (gs)));
pp_space (buffer);
- dump_generic_node (buffer, gs_assign_binary_rhs2 (gs), spc,
+ dump_generic_node (buffer, gimple_assign_binary_rhs2 (gs), spc,
flags, false);
break;
case GSS_ASSIGN_UNARY_REG:
case GSS_ASSIGN_UNARY_MEM:
- dump_generic_node (buffer, gs_assign_unary_rhs (gs), spc, flags, false);
+ dump_generic_node (buffer, gimple_assign_unary_rhs (gs), spc, flags, false);
break;
default:
@@ -181,12 +181,12 @@ dump_gs_assign (pretty_printer *buffer,
dump_gimple_stmt. */
static void
-dump_gs_return (pretty_printer *buffer, gimple gs, int spc, int flags)
+dump_gimple_return (pretty_printer *buffer, gimple gs, int spc, int flags)
{
tree t;
pp_string (buffer, "return");
- t = gs_return_retval (gs);
+ t = gimple_return_retval (gs);
if (t)
{
pp_space (buffer);
@@ -203,10 +203,10 @@ dump_gs_return (pretty_printer *buffer,
dump_gimple_stmt. */
static void
-dump_gs_call (pretty_printer *buffer, gimple gs, int spc, int flags)
+dump_gimple_call (pretty_printer *buffer, gimple gs, int spc, int flags)
{
size_t i;
- tree lhs = gs_call_lhs (gs);
+ tree lhs = gimple_call_lhs (gs);
if (lhs)
{
@@ -214,13 +214,13 @@ dump_gs_call (pretty_printer *buffer, gi
pp_string (buffer, " = ");
}
- dump_generic_node (buffer, gs_call_fn (gs), spc, flags, false);
+ dump_generic_node (buffer, gimple_call_fn (gs), spc, flags, false);
pp_string (buffer, " (");
- for (i = 0; i < gs_call_nargs (gs); i++)
+ for (i = 0; i < gimple_call_nargs (gs); i++)
{
- dump_generic_node (buffer, gs_call_arg (gs, i), 0, flags, false);
- if (i < gs_call_nargs (gs) - 1)
+ dump_generic_node (buffer, gimple_call_arg (gs, i), 0, flags, false);
+ if (i < gimple_call_nargs (gs) - 1)
pp_string (buffer, ", ");
}
@@ -232,29 +232,29 @@ dump_gs_call (pretty_printer *buffer, gi
dump_gimple_stmt. */
static void
-dump_gs_switch (pretty_printer *buffer, gimple gs, int spc, int flags)
+dump_gimple_switch (pretty_printer *buffer, gimple gs, int spc, int flags)
{
unsigned int i;
- GS_CHECK (gs, GS_SWITCH);
+ GIMPLE_CHECK (gs, GIMPLE_SWITCH);
pp_string (buffer, "switch (");
- dump_generic_node (buffer, gs_switch_index (gs), spc, flags, true);
+ dump_generic_node (buffer, gimple_switch_index (gs), spc, flags, true);
pp_string (buffer, ") <");
- for (i = 0; i < gs_switch_nlabels (gs); i++)
+ for (i = 0; i < gimple_switch_nlabels (gs); i++)
{
- dump_generic_node (buffer, gs_switch_label (gs, i), spc, flags, false);
- if (i < gs_switch_nlabels (gs) - 1)
+ dump_generic_node (buffer, gimple_switch_label (gs, i), spc, flags, false);
+ if (i < gimple_switch_nlabels (gs) - 1)
pp_string (buffer, ", ");
}
pp_string (buffer, ">");
}
-/* Return the symbol associated with the GS_COND predicate PRED. */
+/* Return the symbol associated with the GIMPLE_COND predicate PRED. */
static const char *
-op_gs_cond (enum gs_cond pred)
+op_gimple_cond (enum gimple_cond pred)
{
- /* These must be in sync with enum gs_cond. */
+ /* These must be in sync with enum gimple_cond. */
static const char *table[] =
{ "<", ">", "<=", ">=", "==", "!=" };
@@ -266,24 +266,24 @@ op_gs_cond (enum gs_cond pred)
dump_gimple_stmt. */
static void
-dump_gs_cond (pretty_printer *buffer, gimple gs, int spc, int flags)
+dump_gimple_cond (pretty_printer *buffer, gimple gs, int spc, int flags)
{
if (flags & TDF_DETAILS)
- pp_string (buffer, "GS_COND tuple");
+ pp_string (buffer, "GIMPLE_COND tuple");
newline_and_indent (buffer, spc);
pp_string (buffer, "if (");
- dump_generic_node (buffer, gs_cond_lhs (gs), spc, flags, false);
+ dump_generic_node (buffer, gimple_cond_lhs (gs), spc, flags, false);
pp_space (buffer);
- pp_string (buffer, op_gs_cond (GS_SUBCODE_FLAGS (gs)));
+ pp_string (buffer, op_gimple_cond (GIMPLE_SUBCODE_FLAGS (gs)));
pp_space (buffer);
- dump_generic_node (buffer, gs_cond_rhs (gs), spc, flags, false);
+ dump_generic_node (buffer, gimple_cond_rhs (gs), spc, flags, false);
pp_character (buffer, ')');
newline_and_indent (buffer, spc + 2);
pp_character (buffer, '{');
newline_and_indent (buffer, spc + 4);
pp_string (buffer, "goto ");
- dump_generic_node (buffer, gs_cond_true_label (gs), spc, flags, false);
+ dump_generic_node (buffer, gimple_cond_true_label (gs), spc, flags, false);
pp_character (buffer, ';');
newline_and_indent (buffer, spc + 2);
pp_character (buffer, '}');
@@ -293,36 +293,36 @@ dump_gs_cond (pretty_printer *buffer, gi
pp_character (buffer, '{');
newline_and_indent (buffer, spc + 4);
pp_string (buffer, "goto ");
- dump_generic_node (buffer, gs_cond_false_label (gs), spc, flags, false);
+ dump_generic_node (buffer, gimple_cond_false_label (gs), spc, flags, false);
pp_character (buffer, ';');
newline_and_indent (buffer, spc + 2);
pp_character (buffer, '}');
}
-/* Dump a GS_LABEL tuple on the pretty_printer BUFFER, SPC
+/* Dump a GIMPLE_LABEL tuple on the pretty_printer BUFFER, SPC
spaces of indent. FLAGS specifies details to show in the dump (see
TDF_* in tree.h)*/
static void
-dump_gs_label (pretty_printer *buffer, gimple gs, int spc, int flags)
+dump_gimple_label (pretty_printer *buffer, gimple gs, int spc, int flags)
{
- tree label = gs_label_label (gs);
+ tree label = gimple_label_label (gs);
dump_generic_node (buffer, label, spc, flags, false);
if (TREE_CODE (label) != CASE_LABEL_EXPR )
pp_string (buffer, ":");
}
-/* Dump a GS_BIND tuple on the pretty_printer BUFFER, SPC
+/* Dump a GIMPLE_BIND tuple on the pretty_printer BUFFER, SPC
spaces of indent. FLAGS specifies details to show in the dump (see
TDF_* in tree.h). */
static void
-dump_gs_bind (pretty_printer *buffer, gimple gs, int spc, int flags)
+dump_gimple_bind (pretty_printer *buffer, gimple gs, int spc, int flags)
{
if (flags & TDF_DETAILS)
- pp_string (buffer, "GS_BIND tuple");
+ pp_string (buffer, "GIMPLE_BIND tuple");
newline_and_indent (buffer, spc);
@@ -332,7 +332,7 @@ dump_gs_bind (pretty_printer *buffer, gi
{
tree var;
- for (var = gs_bind_vars (gs); var; var = TREE_CHAIN (var))
+ for (var = gimple_bind_vars (gs); var; var = TREE_CHAIN (var))
{
print_declaration (buffer, var, spc, flags);
newline_and_indent (buffer, spc + 2);
@@ -340,33 +340,33 @@ dump_gs_bind (pretty_printer *buffer, gi
newline_and_indent (buffer, spc + 2);
}
- dump_gimple_seq (buffer, gs_bind_body (gs), spc + 2, flags);
+ dump_gimple_seq (buffer, gimple_bind_body (gs), spc + 2, flags);
newline_and_indent (buffer, spc);
pp_character (buffer, '}');
}
-/* Dump a GS_TRY tuple on the pretty_printer BUFFER, SPC spaces of
+/* Dump a GIMPLE_TRY tuple on the pretty_printer BUFFER, SPC spaces of
indent. FLAGS specifies details to show in the dump (see TDF_* in
tree.h). */
static void
-dump_gs_try (pretty_printer *buffer, gimple gs, int spc, int flags)
+dump_gimple_try (pretty_printer *buffer, gimple gs, int spc, int flags)
{
if (flags & TDF_DETAILS)
- pp_string (buffer, "GS_TRY tuple");
+ pp_string (buffer, "GIMPLE_TRY tuple");
newline_and_indent (buffer, spc);
pp_string (buffer, "try {");
newline_and_indent (buffer, spc + 2);
- dump_gimple_seq (buffer, gs_try_eval (gs), spc + 2, flags);
+ dump_gimple_seq (buffer, gimple_try_eval (gs), spc + 2, flags);
newline_and_indent (buffer, spc);
- if (GS_SUBCODE_FLAGS (gs) == GS_TRY_CATCH)
+ if (GIMPLE_SUBCODE_FLAGS (gs) == GIMPLE_TRY_CATCH)
pp_string (buffer, "} catch {");
else
pp_string (buffer, "} finally {");
newline_and_indent (buffer, spc + 2);
- dump_gimple_seq (buffer, gs_try_cleanup (gs), spc + 2, flags);
+ dump_gimple_seq (buffer, gimple_try_cleanup (gs), spc + 2, flags);
newline_and_indent (buffer, spc);
pp_character (buffer, '}');
}
@@ -382,51 +382,51 @@ dump_gimple_stmt (pretty_printer *buffer
if (!gs)
return;
- switch (GS_CODE (gs))
+ switch (GIMPLE_CODE (gs))
{
- case GS_ASSIGN:
- dump_gs_assign (buffer, gs, spc, flags);
+ case GIMPLE_ASSIGN:
+ dump_gimple_assign (buffer, gs, spc, flags);
break;
- case GS_BIND:
- dump_gs_bind (buffer, gs, spc, flags);
+ case GIMPLE_BIND:
+ dump_gimple_bind (buffer, gs, spc, flags);
break;
- case GS_CALL:
- dump_gs_call (buffer, gs, spc, flags);
+ case GIMPLE_CALL:
+ dump_gimple_call (buffer, gs, spc, flags);
break;
- case GS_COND:
- dump_gs_cond (buffer, gs, spc, flags);
+ case GIMPLE_COND:
+ dump_gimple_cond (buffer, gs, spc, flags);
break;
- case GS_LABEL:
- dump_gs_label (buffer, gs, spc, flags);
+ case GIMPLE_LABEL:
+ dump_gimple_label (buffer, gs, spc, flags);
break;
- case GS_GOTO:
+ case GIMPLE_GOTO:
pp_string (buffer, "goto ");
- dump_generic_node (buffer, gs_goto_dest (gs), spc, flags, false);
+ dump_generic_node (buffer, gimple_goto_dest (gs), spc, flags, false);
break;
- case GS_NOP:
- pp_string (buffer, "GS_NOP");
+ case GIMPLE_NOP:
+ pp_string (buffer, "GIMPLE_NOP");
break;
- case GS_RETURN:
- dump_gs_return (buffer, gs, spc, flags);
+ case GIMPLE_RETURN:
+ dump_gimple_return (buffer, gs, spc, flags);
break;
- case GS_SWITCH:
- dump_gs_switch (buffer, gs, spc, flags);
+ case GIMPLE_SWITCH:
+ dump_gimple_switch (buffer, gs, spc, flags);
break;
- case GS_TRY:
- dump_gs_try (buffer, gs, spc, flags);
+ case GIMPLE_TRY:
+ dump_gimple_try (buffer, gs, spc, flags);
break;
default:
- GS_NIY;
+ GIMPLE_NIY;
}
newline_and_indent (buffer, spc);
Index: gcc/ChangeLog.tuples
===================================================================
--- gcc/ChangeLog.tuples (revision 126694)
+++ gcc/ChangeLog.tuples (working copy)
@@ -1,5 +1,16 @@
2007-07-16 Chris Matthews <chrismatthews@google.com>
+ * gimplify.c (gs_build_eh_filter): Renamed to gs_build_eh_filter_tree to
+ avoid name conflict.
+ * gimple-pretty-print.c: Renamed to debug_gs_* to debug_gimple_*. Updated
+ all users.
+ * gimple.h: Renamed all functions with GS and gs prefixes to GIMPLE and
+ gimple, and updated users.
+ Renamed gs_seq_* functions to gimple_seq_*. Updated all users.
+ * gimple.def: Definitions changed to from GS_* to GIMPLE_*.
+
+2007-07-16 Chris Matthews <chrismatthews@google.com>
+
* gimple.c (gs_build_switch): Changed nlabels to represent total number of
labels including the default.
(gs_build_switch_1): Same.
Index: gcc/langhooks.c
===================================================================
--- gcc/langhooks.c (revision 126694)
+++ gcc/langhooks.c (working copy)
@@ -378,8 +378,8 @@ lhd_expr_size (tree exp)
int
lhd_gimplify_expr (tree *expr_p ATTRIBUTE_UNUSED,
- gs_seq pre_p ATTRIBUTE_UNUSED,
- gs_seq post_p ATTRIBUTE_UNUSED)
+ gimple_seq pre_p ATTRIBUTE_UNUSED,
+ gimple_seq post_p ATTRIBUTE_UNUSED)
{
return GS_UNHANDLED;
}
Index: gcc/function.c
===================================================================
--- gcc/function.c (revision 126694)
+++ gcc/function.c (working copy)
@@ -3135,7 +3135,7 @@ gimplify_parm_type (tree *tp, int *walk_
else if (TYPE_SIZE (t) && !TREE_CONSTANT (TYPE_SIZE (t))
&& !TYPE_SIZES_GIMPLIFIED (t))
{
- gimplify_type_sizes (t, (gs_seq) data);
+ gimplify_type_sizes (t, (gimple_seq) data);
*walk_subtrees = 1;
}
}
@@ -3148,14 +3148,14 @@ gimplify_parm_type (tree *tp, int *walk_
to implement callee-copies reference parameters. Returns a sequence of
statements to add to the beginning of the function. */
-struct gs_sequence
+struct gimple_sequence
gimplify_parameters (void)
{
struct assign_parm_data_all all;
tree fnargs, parm;
- struct gs_sequence stmts;
+ struct gimple_sequence stmts;
- gs_seq_init (&stmts);
+ gimple_seq_init (&stmts);
assign_parms_initialize_all (&all);
fnargs = assign_parms_augmented_arg_list (&all);
Index: gcc/langhooks.h
===================================================================
--- gcc/langhooks.h (revision 126694)
+++ gcc/langhooks.h (working copy)
@@ -417,7 +417,7 @@ struct lang_hooks
/* Perform language-specific gimplification on the argument. Returns an
enum gimplify_status, though we can't see that type here. */
- int (*gimplify_expr) (tree *, gs_seq, gs_seq);
+ int (*gimplify_expr) (tree *, gimple_seq, gimple_seq);
/* Fold an OBJ_TYPE_REF expression to the address of a function.
KNOWN_TYPE carries the true type of the OBJ_TYPE_REF_OBJECT. */
Index: gcc/gimplify.c
===================================================================
--- gcc/gimplify.c (revision 126694)
+++ gcc/gimplify.c (working copy)
@@ -87,7 +87,7 @@ struct gimplify_ctx
VEC(gimple,heap) *bind_expr_stack;
tree temps;
- struct gs_sequence conditional_cleanups;
+ struct gimple_sequence conditional_cleanups;
tree exit_label;
tree return_temp;
@@ -114,7 +114,7 @@ typedef struct gimple_temp_hash_elt
} elt_t;
/* Forward declarations. */
-static enum gimplify_status gimplify_compound_expr (tree *, gs_seq, bool);
+static enum gimplify_status gimplify_compound_expr (tree *, gimple_seq, bool);
#ifdef ENABLE_CHECKING
static bool cpt_same_type (tree a, tree b);
#endif
@@ -199,9 +199,9 @@ pop_gimplify_context (gimple body)
}
static void
-gimple_push_bind_expr (gimple gs_bind)
+gimple_push_bind_expr (gimple gimple_bind)
{
- VEC_safe_push (gimple, heap, gimplify_ctxp->bind_expr_stack, gs_bind);
+ VEC_safe_push (gimple, heap, gimplify_ctxp->bind_expr_stack, gimple_bind);
}
static void
@@ -232,7 +232,7 @@ gimple_push_condition (void)
{
#ifdef ENABLE_CHECKING
if (gimplify_ctxp->conditions == 0)
- gcc_assert (gs_seq_empty_p (&gimplify_ctxp->conditional_cleanups));
+ gcc_assert (gimple_seq_empty_p (&gimplify_ctxp->conditional_cleanups));
#endif
++(gimplify_ctxp->conditions);
}
@@ -241,15 +241,15 @@ gimple_push_condition (void)
now, add any conditional cleanups we've seen to the prequeue. */
static void
-gimple_pop_condition (gs_seq pre_p)
+gimple_pop_condition (gimple_seq pre_p)
{
int conds = --(gimplify_ctxp->conditions);
gcc_assert (conds >= 0);
if (conds == 0)
{
- gs_seq_append (pre_p, &gimplify_ctxp->conditional_cleanups);
- gs_seq_init (&gimplify_ctxp->conditional_cleanups);
+ gimple_seq_append (pre_p, &gimplify_ctxp->conditional_cleanups);
+ gimple_seq_init (&gimplify_ctxp->conditional_cleanups);
}
}
@@ -341,13 +341,13 @@ append_to_statement_list_force (tree t,
/* Both gimplify the statement T and append it to SEQ. */
void
-gimplify_and_add (tree t, gs_seq seq)
+gimplify_and_add (tree t, gimple_seq seq)
{
- struct gs_sequence tseq;
+ struct gimple_sequence tseq;
- gs_seq_init (&tseq);
+ gimple_seq_init (&tseq);
gimplify_stmt (&t, &tseq);
- gs_seq_append (seq, &tseq);
+ gimple_seq_append (seq, &tseq);
}
/* Strip off a legitimate source ending from the input string NAME of
@@ -552,7 +552,8 @@ lookup_tmp_var (tree val, bool is_formal
For other cases, use get_initialized_tmp_var instead. */
static tree
-internal_get_tmp_var (tree val, gs_seq pre_p, gs_seq post_p, bool is_formal)
+internal_get_tmp_var (tree val, gimple_seq pre_p, gimple_seq post_p,
+ bool is_formal)
{
tree t, mod;
@@ -605,7 +606,7 @@ internal_get_tmp_var (tree val, gs_seq p
stored. */
tree
-get_formal_tmp_var (tree val, gs_seq pre_p)
+get_formal_tmp_var (tree val, gimple_seq pre_p)
{
return internal_get_tmp_var (val, pre_p, NULL, true);
}
@@ -614,13 +615,13 @@ get_formal_tmp_var (tree val, gs_seq pre
are as in gimplify_expr. */
tree
-get_initialized_tmp_var (tree val, gs_seq pre_p, gs_seq post_p)
+get_initialized_tmp_var (tree val, gimple_seq pre_p, gimple_seq post_p)
{
return internal_get_tmp_var (val, pre_p, post_p, false);
}
/* Create a temporary variable to be used as the LHS of the given GIMPLE
- statement STMT. STMT must be GS_ASSIGN or GS_CALL. If IS_FORMAL is
+ statement STMT. STMT must be GIMPLE_ASSIGN or GIMPLE_CALL. If IS_FORMAL is
true, try to return a temporary from the formal temporaries table
(which will attempt to return the same temporary created for a
previous statement identical to STMT. */
@@ -629,13 +630,13 @@ static tree
get_tmp_var_for (gimple stmt)
{
tree lhs;
- enum gs_code code = GS_CODE (stmt);
+ enum gimple_code code = GIMPLE_CODE (stmt);
/* FIXME tuples, add support for formal temporaries (worth it?) */
- if (code == GS_ASSIGN)
- return create_tmp_from_val (gs_assign_operand (stmt, 1));
- else if (code == GS_CALL)
- return create_tmp_from_val (gs_call_fn (stmt));
+ if (code == GIMPLE_ASSIGN)
+ return create_tmp_from_val (gimple_assign_operand (stmt, 1));
+ else if (code == GIMPLE_CALL)
+ return create_tmp_from_val (gimple_call_fn (stmt));
else
gcc_unreachable ();
@@ -753,7 +754,7 @@ should_carry_locus_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 (GS_CODE (gs) == GS_LABEL)
+ if (GIMPLE_CODE (gs) == GIMPLE_LABEL)
return false;
return true;
@@ -764,16 +765,16 @@ annotate_one_with_locus (gimple gs, loca
{
/* All gimple statements have location. */
- if (GS_LOCUS_EMPTY_P (gs) && should_carry_locus_p (gs))
- GS_LOCUS (gs) = locus;
+ if (GIMPLE_LOCUS_EMPTY_P (gs) && should_carry_locus_p (gs))
+ GIMPLE_LOCUS (gs) = locus;
}
void
-annotate_all_with_locus (gs_seq stmt_p, location_t locus)
+annotate_all_with_locus (gimple_seq stmt_p, location_t locus)
{
gimple_stmt_iterator i;
- if (gs_seq_empty_p (stmt_p))
+ if (gimple_seq_empty_p (stmt_p))
return;
for (i = gsi_start (stmt_p); !gsi_end_p (i); gsi_next (&i))
@@ -912,7 +913,7 @@ unshare_expr (tree expr)
specification. */
tree
-gimple_build_eh_filter (tree body, tree allowed, tree failure)
+gimple_build_eh_filter_tree (tree body, tree allowed, tree failure)
{
tree t;
@@ -1017,26 +1018,26 @@ build_stack_save_restore (gimple *save,
{
tree tmp_var;
- *save = gs_build_call (implicit_built_in_decls[BUILT_IN_STACK_SAVE], 0);
+ *save = gimple_build_call (implicit_built_in_decls[BUILT_IN_STACK_SAVE], 0);
tmp_var = create_tmp_var (ptr_type_node, "saved_stack");
- gs_call_set_lhs (*save, tmp_var);
+ gimple_call_set_lhs (*save, tmp_var);
- *restore = gs_build_call (implicit_built_in_decls[BUILT_IN_STACK_RESTORE],
+ *restore = gimple_build_call (implicit_built_in_decls[BUILT_IN_STACK_RESTORE],
1, tmp_var);
}
/* Gimplify a BIND_EXPR. Just voidify and recurse. */
static enum gimplify_status
-gimplify_bind_expr (tree *expr_p, gs_seq pre_p)
+gimplify_bind_expr (tree *expr_p, gimple_seq pre_p)
{
tree bind_expr = *expr_p;
bool old_save_stack = gimplify_ctxp->save_stack;
tree t;
- gimple gs_bind;
- struct gs_sequence empty_seq;
+ gimple gimple_bind;
+ struct gimple_sequence empty_seq;
- gs_seq_init (&empty_seq);
+ gimple_seq_init (&empty_seq);
tree temp = voidify_wrapper_expr (bind_expr, NULL);
@@ -1068,18 +1069,18 @@ gimplify_bind_expr (tree *expr_p, gs_seq
DECL_GIMPLE_REG_P (t) = 1;
}
- gs_bind = gs_build_bind (BIND_EXPR_VARS (bind_expr), &empty_seq);
- gimple_push_bind_expr (gs_bind);
+ gimple_bind = gimple_build_bind (BIND_EXPR_VARS (bind_expr), &empty_seq);
+ gimple_push_bind_expr (gimple_bind);
gimplify_ctxp->save_stack = false;
- /* Gimplify the body into the GS_BIND tuple's body. */
- gimplify_stmt (&BIND_EXPR_BODY (bind_expr), gs_bind_body (gs_bind));
+ /* Gimplify the body into the GIMPLE_BIND tuple's body. */
+ gimplify_stmt (&BIND_EXPR_BODY (bind_expr), gimple_bind_body (gimple_bind));
if (gimplify_ctxp->save_stack)
{
gimple stack_save, stack_restore, gs;
- struct gs_sequence restore_seq;
+ struct gimple_sequence restore_seq;
/* Save stack on entry and restore it on exit. Add a try_finally
block to achieve this. Note that mudflap depends on the
@@ -1089,20 +1090,21 @@ gimplify_bind_expr (tree *expr_p, gs_seq
/* FIXME tuples: Creating a one item sequence is really
retarded. If this happens more often in the gimplifier we
should create a helper function for this. */
- gs_seq_init (&restore_seq);
- gs_add (&restore_seq, stack_restore);
+ gimple_seq_init (&restore_seq);
+ gimple_add (&restore_seq, stack_restore);
- gs = gs_build_try (gs_bind_body (gs_bind), &restore_seq, GS_TRY_FINALLY);
+ gs = gimple_build_try (gimple_bind_body (gimple_bind), &restore_seq,
+ GIMPLE_TRY_FINALLY);
- gs_bind_set_body (gs_bind, &empty_seq);
- gs_add (gs_bind_body (gs_bind), stack_save);
- gs_add (gs_bind_body (gs_bind), gs);
+ gimple_bind_set_body (gimple_bind, &empty_seq);
+ gimple_add (gimple_bind_body (gimple_bind), stack_save);
+ gimple_add (gimple_bind_body (gimple_bind), gs);
}
gimplify_ctxp->save_stack = old_save_stack;
gimple_pop_bind_expr ();
- gs_add (pre_p, gs_bind);
+ gimple_add (pre_p, gimple_bind);
if (temp)
{
@@ -1121,7 +1123,7 @@ gimplify_bind_expr (tree *expr_p, gs_seq
STMT should be stored. */
static enum gimplify_status
-gimplify_return_expr (tree stmt, gs_seq pre_p)
+gimplify_return_expr (tree stmt, gimple_seq pre_p)
{
tree ret_expr = TREE_OPERAND (stmt, 0);
tree result_decl, result;
@@ -1130,8 +1132,9 @@ gimplify_return_expr (tree stmt, gs_seq
|| TREE_CODE (ret_expr) == RESULT_DECL
|| ret_expr == error_mark_node)
{
- gs_add (pre_p,
- gs_build_return (TREE_CODE (ret_expr) == RESULT_DECL, ret_expr));
+ gimple_add (pre_p,
+ gimple_build_return (TREE_CODE (ret_expr) == RESULT_DECL,
+ ret_expr));
return GS_ALL_DONE;
}
@@ -1193,7 +1196,7 @@ gimplify_return_expr (tree stmt, gs_seq
else
ret_expr = build_gimple_modify_stmt (result_decl, result);
- gs_add (pre_p, gs_build_return (result == result_decl, ret_expr));
+ gimple_add (pre_p, gimple_build_return (result == result_decl, ret_expr));
return GS_ALL_DONE;
}
@@ -1202,7 +1205,7 @@ gimplify_return_expr (tree stmt, gs_seq
and initialization explicit. */
static enum gimplify_status
-gimplify_decl_expr (tree *stmt_p, gs_seq seq_p)
+gimplify_decl_expr (tree *stmt_p, gimple_seq seq_p)
{
tree stmt = *stmt_p;
tree decl = DECL_EXPR_DECL (stmt);
@@ -1286,7 +1289,7 @@ gimplify_decl_expr (tree *stmt_p, gs_seq
EXIT_EXPR, we need to append a label for it to jump to. */
static enum gimplify_status
-gimplify_loop_expr (tree *expr_p, gs_seq pre_p)
+gimplify_loop_expr (tree *expr_p, gimple_seq pre_p)
{
tree saved_label = gimplify_ctxp->exit_label;
tree start_label = build1 (LABEL_EXPR, void_type_node, NULL_TREE);
@@ -1315,7 +1318,7 @@ gimplify_loop_expr (tree *expr_p, gs_seq
by an enlightened front-end, or by shortcut_cond_expr. */
static enum gimplify_status
-gimplify_statement_list (tree *expr_p, gs_seq pre_p)
+gimplify_statement_list (tree *expr_p, gimple_seq pre_p)
{
tree temp = voidify_wrapper_expr (*expr_p, NULL);
@@ -1391,16 +1394,16 @@ sort_case_labels (VEC(tree,heap)* label_
branch to. */
static enum gimplify_status
-gimplify_switch_expr (tree *expr_p, gs_seq pre_p)
+gimplify_switch_expr (tree *expr_p, gimple_seq pre_p)
{
enum gimplify_status ret;
- gs_seq switch_body_seq;
+ gimple_seq switch_body_seq;
tree switch_expr;
switch_expr = *expr_p;
- struct gs_sequence switch_body_seq_;
+ struct gimple_sequence switch_body_seq_;
switch_body_seq = &switch_body_seq_;
- gs_seq_init (switch_body_seq);
+ gimple_seq_init (switch_body_seq);
gimplify_expr (&SWITCH_COND (switch_expr), pre_p, NULL, is_gimple_val,
fb_rvalue);
@@ -1410,7 +1413,7 @@ gimplify_switch_expr (tree *expr_p, gs_s
VEC (tree,heap) *saved_labels;
tree default_case = NULL_TREE;
size_t i, len;
- gimple gs_switch;
+ gimple gimple_switch;
/* If someone can be bothered to fill in the labels, they can
be bothered to null out the body too. */
@@ -1458,20 +1461,20 @@ gimplify_switch_expr (tree *expr_p, gs_s
{
/* If the switch has no default label, add one, so that we jump
around the switch body. */
- gimple new_default = gs_build_label (build3 (CASE_LABEL_EXPR,
+ gimple new_default = gimple_build_label (build3 (CASE_LABEL_EXPR,
void_type_node,
NULL_TREE,
NULL_TREE,
create_artificial_label ()));
- gs_add (switch_body_seq, new_default);
- default_case = gs_label_label (new_default);
+ gimple_add (switch_body_seq, new_default);
+ default_case = gimple_label_label (new_default);
}
sort_case_labels (labels);
- gs_switch = gs_build_switch_vec (SWITCH_COND (switch_expr), default_case,
- labels);
- gs_add (pre_p, gs_switch);
- gs_seq_append (pre_p, switch_body_seq);
+ gimple_switch = gimple_build_switch_vec (SWITCH_COND (switch_expr),
+ default_case, labels);
+ gimple_add (pre_p, gimple_switch);
+ gimple_seq_append (pre_p, switch_body_seq);
VEC_free(tree, heap, labels);
}
else
@@ -1481,7 +1484,7 @@ gimplify_switch_expr (tree *expr_p, gs_s
static enum gimplify_status
-gimplify_case_label_expr (tree *expr_p, gs_seq pre_p)
+gimplify_case_label_expr (tree *expr_p, gimple_seq pre_p)
{
struct gimplify_ctx *ctxp;
@@ -1492,9 +1495,10 @@ gimplify_case_label_expr (tree *expr_p,
if (ctxp->case_labels)
break;
- gimple gs_label = gs_build_label (*expr_p);
- VEC_safe_push (tree, heap, ctxp->case_labels, gs_label_label (gs_label));
- gs_add (pre_p, gs_label);
+ gimple gimple_label = gimple_build_label (*expr_p);
+ VEC_safe_push (tree, heap, ctxp->case_labels,
+ gimple_label_label (gimple_label));
+ gimple_add (pre_p, gimple_label);
return GS_ALL_DONE;
}
@@ -1749,8 +1753,8 @@ gimplify_var_or_parm_decl (tree *expr_p)
*EXPR_P should be stored. */
static enum gimplify_status
-gimplify_compound_lval (tree *expr_p, gs_seq pre_p,
- gs_seq post_p, fallback_t fallback)
+gimplify_compound_lval (tree *expr_p, gimple_seq pre_p,
+ gimple_seq post_p, fallback_t fallback)
{
tree *p;
VEC(tree,heap) *stack;
@@ -1946,13 +1950,13 @@ gimplify_compound_lval (tree *expr_p, gs
in another expression. */
static enum gimplify_status
-gimplify_self_mod_expr (tree *expr_p, gs_seq pre_p, gs_seq post_p,
+gimplify_self_mod_expr (tree *expr_p, gimple_seq pre_p, gimple_seq post_p,
bool want_value)
{
enum tree_code code;
tree lhs, lvalue, rhs, t1;
- struct gs_sequence post;
- gs_seq orig_post_p = post_p;
+ struct gimple_sequence post;
+ gimple_seq orig_post_p = post_p;
bool postfix;
enum tree_code arith_code;
enum gimplify_status ret;
@@ -1971,7 +1975,7 @@ gimplify_self_mod_expr (tree *expr_p, gs
/* For postfix, make sure the inner expression's post side effects
are executed after side effects from this expression. */
- gs_seq_init (&post);
+ gimple_seq_init (&post);
if (postfix)
post_p = &post;
@@ -2006,7 +2010,7 @@ gimplify_self_mod_expr (tree *expr_p, gs
if (postfix)
{
gimplify_and_add (t1, orig_post_p);
- gs_seq_append (orig_post_p, &post);
+ gimple_seq_append (orig_post_p, &post);
*expr_p = lhs;
return GS_ALL_DONE;
}
@@ -2049,7 +2053,7 @@ maybe_with_size_expr (tree *expr_p)
Store any side-effects in PRE_P. */
static enum gimplify_status
-gimplify_arg (tree *arg_p, gs_seq pre_p)
+gimplify_arg (tree *arg_p, gimple_seq pre_p)
{
bool (*test) (tree);
fallback_t fb;
@@ -2079,7 +2083,7 @@ gimplify_arg (tree *arg_p, gs_seq pre_p)
WANT_VALUE is true if the result of the call is desired. */
static enum gimplify_status
-gimplify_call_expr (tree *expr_p, gs_seq pre_p, bool want_value)
+gimplify_call_expr (tree *expr_p, gimple_seq pre_p, bool want_value)
{
tree fndecl;
enum gimplify_status ret;
@@ -2181,19 +2185,19 @@ gimplify_call_expr (tree *expr_p, gs_seq
/* If the function is "const" or "pure", then clear
TREE_SIDE_EFFECTS on its decl. This allows us to eliminate
redundant or useless calls to "const" functions. */
- /* FIXME tuples. Must handle TREE_SIDE_EFFECTS on GS_CALL too. */
+ /* FIXME tuples. Must handle TREE_SIDE_EFFECTS on GIMPLE_CALL too. */
if (TREE_CODE (*expr_p) == CALL_EXPR
&& (call_expr_flags (*expr_p) & (ECF_CONST | ECF_PURE)))
TREE_SIDE_EFFECTS (*expr_p) = 0;
/* Now add the GIMPLE call to PRE_P. If WANT_VALUE is set, we need
to create the appropriate temporary for the call's LHS. */
- call = gs_build_call_vec (fndecl, args);
- gs_add (pre_p, call);
+ call = gimple_build_call_vec (fndecl, args);
+ gimple_add (pre_p, call);
if (want_value)
{
tree lhs = get_tmp_var_for (call);
- gs_call_set_lhs (call, lhs);
+ gimple_call_set_lhs (call, lhs);
*expr_p = lhs;
}
else
@@ -2497,15 +2501,15 @@ gimple_boolify (tree expr)
*EXPR_P should be stored. */
static enum gimplify_status
-gimplify_cond_expr (tree *expr_p, gs_seq pre_p, fallback_t fallback)
+gimplify_cond_expr (tree *expr_p, gimple_seq pre_p, fallback_t fallback)
{
tree expr = *expr_p;
tree tmp, type, arm1, arm2;
enum gimplify_status ret;
tree label_true, label_false, label_cont;
bool have_then_clause_p, have_else_clause_p;
- gimple gs_cond;
- enum gs_cond pred;
+ gimple gimple_cond;
+ enum gimple_cond pred;
type = TREE_TYPE (expr);
@@ -2599,25 +2603,25 @@ gimplify_cond_expr (tree *expr_p, gs_seq
switch (TREE_CODE (TREE_OPERAND (expr, 0)))
{
case LT_EXPR:
- pred = GS_COND_LT;
+ pred = GIMPLE_COND_LT;
break;
case LE_EXPR:
- pred = GS_COND_LE;
+ pred = GIMPLE_COND_LE;
break;
case GT_EXPR:
- pred = GS_COND_GT;
+ pred = GIMPLE_COND_GT;
break;
case GE_EXPR:
- pred = GS_COND_GE;
+ pred = GIMPLE_COND_GE;
break;
case EQ_EXPR:
- pred = GS_COND_EQ;
+ pred = GIMPLE_COND_EQ;
break;
case NE_EXPR:
- pred = GS_COND_NE;
+ pred = GIMPLE_COND_NE;
break;
default:
- pred = GS_COND_NE;
+ pred = GIMPLE_COND_NE;
arm1 = TREE_OPERAND (expr, 0);
arm2 = boolean_false_node;
break;
@@ -2626,22 +2630,24 @@ gimplify_cond_expr (tree *expr_p, gs_seq
{
arm1 = TREE_OPERAND (TREE_OPERAND (expr, 0), 0);
arm2 = TREE_OPERAND (TREE_OPERAND (expr, 0), 1);
- gs_cond = gs_build_cond (pred, arm1, arm2, label_false, label_true);
+ gimple_cond = gimple_build_cond (pred, arm1, arm2, label_false,
+ label_true);
}
else
{
/* Use canonical comparison with false. */
- gs_cond = gs_build_cond (pred, arm1, arm2, label_true, label_false);
+ gimple_cond = gimple_build_cond (pred, arm1, arm2, label_true,
+ label_false);
}
- gs_add (pre_p, gs_cond);
- gs_add (pre_p, gs_build_label (label_true));
+ gimple_add (pre_p, gimple_cond);
+ gimple_add (pre_p, gimple_build_label (label_true));
have_then_clause_p = gimplify_stmt (&TREE_OPERAND (expr, 1), pre_p);
label_cont = create_artificial_label ();
- gs_add (pre_p, gs_build_goto (label_cont));
- gs_add (pre_p, gs_build_label (label_false));
+ gimple_add (pre_p, gimple_build_goto (label_cont));
+ gimple_add (pre_p, gimple_build_label (label_false));
have_else_clause_p = gimplify_stmt (&TREE_OPERAND (expr, 2), pre_p);
- gs_add (pre_p, gs_build_label (label_cont));
+ gimple_add (pre_p, gimple_build_label (label_cont));
gimple_pop_condition (pre_p);
@@ -2652,7 +2658,7 @@ gimplify_cond_expr (tree *expr_p, gs_seq
else if (have_else_clause_p)
{
/* Rewrite "if (a); else b" into "if (!a) b" */
- gs_cond_invert (gs_cond);
+ gimple_cond_invert (gimple_cond);
}
else
{
@@ -2670,7 +2676,7 @@ gimplify_cond_expr (tree *expr_p, gs_seq
static enum gimplify_status
gimplify_modify_expr_to_memcpy (tree *expr_p, tree size, bool want_value,
- gs_seq seq_p)
+ gimple_seq seq_p)
{
tree t, to, to_ptr, from, from_ptr;
gimple gs;
@@ -2682,20 +2688,20 @@ gimplify_modify_expr_to_memcpy (tree *ex
to_ptr = build_fold_addr_expr (to);
t = implicit_built_in_decls[BUILT_IN_MEMCPY];
- gs = gs_build_call (t, 3, to_ptr, from_ptr, size);
+ gs = gimple_build_call (t, 3, to_ptr, from_ptr, size);
if (want_value)
{
/* tmp = memcpy() */
t = create_tmp_var (TREE_TYPE (to_ptr), NULL);
- gs_call_set_lhs (gs, t);
- gs_add (seq_p, gs);
+ gimple_call_set_lhs (gs, t);
+ gimple_add (seq_p, gs);
*expr_p = build1 (INDIRECT_REF, TREE_TYPE (to), t);
return GS_ALL_DONE;
}
- gs_add (seq_p, gs);
+ gimple_add (seq_p, gs);
*expr_p = NULL;
return GS_ALL_DONE;
}
@@ -2706,7 +2712,7 @@ gimplify_modify_expr_to_memcpy (tree *ex
static enum gimplify_status
gimplify_modify_expr_to_memset (tree *expr_p, tree size, bool want_value,
- gs_seq seq_p)
+ gimple_seq seq_p)
{
tree t, to, to_ptr;
gimple gs;
@@ -2716,20 +2722,20 @@ gimplify_modify_expr_to_memset (tree *ex
to_ptr = build_fold_addr_expr (to);
t = implicit_built_in_decls[BUILT_IN_MEMSET];
- gs = gs_build_call (t, 3, to_ptr, integer_zero_node, size);
+ gs = gimple_build_call (t, 3, to_ptr, integer_zero_node, size);
if (want_value)
{
/* tmp = memset() */
t = create_tmp_var (TREE_TYPE (to_ptr), NULL);
- gs_call_set_lhs (gs, t);
- gs_add (seq_p, gs);
+ gimple_call_set_lhs (gs, t);
+ gimple_add (seq_p, gs);
*expr_p = build1 (INDIRECT_REF, TREE_TYPE (to), t);
return GS_ALL_DONE;
}
- gs_add (seq_p, gs);
+ gimple_add (seq_p, gs);
*expr_p = NULL;
return GS_ALL_DONE;
}
@@ -2792,7 +2798,7 @@ gimplify_init_ctor_preeval_1 (tree *tp,
into temporaries. */
static void
-gimplify_init_ctor_preeval (tree *expr_p, gs_seq pre_p, gs_seq post_p,
+gimplify_init_ctor_preeval (tree *expr_p, gimple_seq pre_p, gimple_seq post_p,
struct gimplify_init_ctor_preeval_data *data)
{
enum gimplify_status one;
@@ -2876,12 +2882,12 @@ gimplify_init_ctor_preeval (tree *expr_p
already been taken care of for us, in gimplify_init_ctor_preeval(). */
static void gimplify_init_ctor_eval (tree, VEC(constructor_elt,gc) *,
- gs_seq, bool);
+ gimple_seq, bool);
static void
gimplify_init_ctor_eval_range (tree object, tree lower, tree upper,
tree value, tree array_elt_type,
- gs_seq pre_p, bool cleared)
+ gimple_seq pre_p, bool cleared)
{
tree loop_entry_label, loop_exit_label;
tree var, var_type, cref, tmp;
@@ -2892,10 +2898,10 @@ gimplify_init_ctor_eval_range (tree obje
/* Create and initialize the index variable. */
var_type = TREE_TYPE (upper);
var = create_tmp_var (var_type, NULL);
- gs_add (pre_p, gs_build_assign (var, lower));
+ gimple_add (pre_p, gimple_build_assign (var, lower));
/* Add the loop entry label. */
- gs_add (pre_p, gs_build_label (loop_entry_label));
+ gimple_add (pre_p, gimple_build_label (loop_entry_label));
/* Build the reference. */
cref = build4 (ARRAY_REF, array_elt_type, unshare_expr (object),
@@ -2910,22 +2916,23 @@ gimplify_init_ctor_eval_range (tree obje
gimplify_init_ctor_eval (cref, CONSTRUCTOR_ELTS (value),
pre_p, cleared);
else
- gs_add (pre_p, gs_build_assign (cref, value));
+ gimple_add (pre_p, gimple_build_assign (cref, value));
/* We exit the loop when the index var is equal to the upper bound. */
- gs_add (pre_p,
- gs_build_cond (GS_COND_EQ, var, upper, loop_exit_label, NULL_TREE));
+ gimple_add (pre_p,
+ gimple_build_cond (GIMPLE_COND_EQ, var, upper, loop_exit_label,
+ NULL_TREE));
/* Otherwise, increment the index var... */
tmp = build2 (PLUS_EXPR, var_type, var,
fold_convert (var_type, integer_one_node));
- gs_add (pre_p, gs_build_assign (var, tmp));
+ gimple_add (pre_p, gimple_build_assign (var, tmp));
/* ...and jump back to the loop entry. */
- gs_add (pre_p, gs_build_goto (loop_entry_label));
+ gimple_add (pre_p, gimple_build_goto (loop_entry_label));
/* Add the loop exit label. */
- gs_add (pre_p, gs_build_label (loop_exit_label));
+ gimple_add (pre_p, gimple_build_label (loop_exit_label));
}
/* Return true if FDECL is accessing a field that is zero sized. */
@@ -2958,7 +2965,7 @@ zero_sized_type (tree type)
static void
gimplify_init_ctor_eval (tree object, VEC(constructor_elt,gc) *elts,
- gs_seq pre_p, bool cleared)
+ gimple_seq pre_p, bool cleared)
{
tree array_elt_type = NULL;
unsigned HOST_WIDE_INT ix;
@@ -3026,7 +3033,7 @@ gimplify_init_ctor_eval (tree object, VE
gimplify_init_ctor_eval (cref, CONSTRUCTOR_ELTS (value),
pre_p, cleared);
else
- gs_add (pre_p, gs_build_assign (cref, value));
+ gimple_add (pre_p, gimple_build_assign (cref, value));
}
}
@@ -3038,7 +3045,7 @@ gimplify_init_ctor_eval (tree object, VE
original MODIFY_EXPR, we just remove all of the constructor elements. */
static enum gimplify_status
-gimplify_init_constructor (tree *expr_p, gs_seq pre_p, gs_seq post_p,
+gimplify_init_constructor (tree *expr_p, gimple_seq pre_p, gimple_seq post_p,
bool want_value)
{
tree object;
@@ -3386,7 +3393,7 @@ fold_indirect_ref_rhs (tree t)
static enum gimplify_status
gimplify_modify_expr_rhs (tree *expr_p, tree *from_p, tree *to_p,
- gs_seq pre_p, gs_seq post_p, bool want_value)
+ gimple_seq pre_p, gimple_seq post_p, bool want_value)
{
enum gimplify_status ret = GS_OK;
@@ -3629,7 +3636,8 @@ tree_to_gimple_tuple (tree *tp)
DECL_GIMPLE_REG_P set. */
static enum gimplify_status
-gimplify_modify_expr_complex_part (tree *expr_p, gs_seq pre_p, bool want_value)
+gimplify_modify_expr_complex_part (tree *expr_p, gimple_seq pre_p,
+ bool want_value)
{
enum tree_code code, ocode;
tree lhs, rhs, new_rhs, other, realpart, imagpart;
@@ -3654,7 +3662,7 @@ gimplify_modify_expr_complex_part (tree
if (want_value)
*expr_p = rhs;
- gs_add (pre_p, gs_build_assign (lhs, new_rhs));
+ gimple_add (pre_p, gimple_build_assign (lhs, new_rhs));
return GS_ALL_DONE;
}
@@ -3674,7 +3682,7 @@ gimplify_modify_expr_complex_part (tree
in another expression. */
static enum gimplify_status
-gimplify_modify_expr (tree *expr_p, gs_seq pre_p, gs_seq post_p,
+gimplify_modify_expr (tree *expr_p, gimple_seq pre_p, gimple_seq post_p,
bool want_value)
{
tree *from_p = &GENERIC_TREE_OPERAND (*expr_p, 1);
@@ -3771,7 +3779,7 @@ gimplify_modify_expr (tree *expr_p, gs_s
SET_DECL_DEBUG_EXPR (*from_p, *to_p);
}
- gs_add (pre_p, gs_build_assign (*to_p, *from_p));
+ gimple_add (pre_p, gimple_build_assign (*to_p, *from_p));
if (want_value)
{
@@ -3863,7 +3871,7 @@ gimplify_boolean_expr (tree *expr_p)
WANT_VALUE is true when the result of the last COMPOUND_EXPR is used. */
static enum gimplify_status
-gimplify_compound_expr (tree *expr_p, gs_seq pre_p, bool want_value)
+gimplify_compound_expr (tree *expr_p, gimple_seq pre_p, bool want_value)
{
tree t = *expr_p;
@@ -3899,7 +3907,7 @@ gimplify_compound_expr (tree *expr_p, gs
*EXPR_P should be stored. */
static enum gimplify_status
-gimplify_save_expr (tree *expr_p, gs_seq pre_p, gs_seq post_p)
+gimplify_save_expr (tree *expr_p, gimple_seq pre_p, gimple_seq post_p)
{
enum gimplify_status ret = GS_ALL_DONE;
tree val;
@@ -3945,7 +3953,7 @@ gimplify_save_expr (tree *expr_p, gs_seq
*EXPR_P should be stored. */
static enum gimplify_status
-gimplify_addr_expr (tree *expr_p, gs_seq pre_p, gs_seq post_p)
+gimplify_addr_expr (tree *expr_p, gimple_seq pre_p, gimple_seq post_p)
{
tree expr = *expr_p;
tree op0 = TREE_OPERAND (expr, 0);
@@ -4039,7 +4047,7 @@ gimplify_addr_expr (tree *expr_p, gs_seq
value; output operands should be a gimple lvalue. */
static enum gimplify_status
-gimplify_asm_expr (tree *expr_p, gs_seq pre_p, gs_seq post_p)
+gimplify_asm_expr (tree *expr_p, gimple_seq pre_p, gimple_seq post_p)
{
tree expr = *expr_p;
int noutputs = list_length (ASM_OUTPUTS (expr));
@@ -4228,9 +4236,9 @@ gimplify_cleanup_point_expr (tree *expr_
CLEANUP_POINT_EXPR and the cleanup. So save and reset the count and
any cleanups collected outside the CLEANUP_POINT_EXPR. */
int old_conds = gimplify_ctxp->conditions;
- struct gs_sequence old_cleanups = gimplify_ctxp->conditional_cleanups;
+ struct gimple_sequence old_cleanups = gimplify_ctxp->conditional_cleanups;
gimplify_ctxp->conditions = 0;
- gs_seq_init (&gimplify_ctxp->conditional_cleanups);
+ gimple_seq_init (&gimplify_ctxp->conditional_cleanups);
body = TREE_OPERAND (*expr_p, 0);
gimplify_to_stmt_list (&body);
@@ -4291,7 +4299,7 @@ gimplify_cleanup_point_expr (tree *expr_
is the cleanup action required. */
static void
-gimple_push_cleanup (tree var, tree cleanup, bool eh_only, gs_seq pre_p)
+gimple_push_cleanup (tree var, tree cleanup, bool eh_only, gimple_seq pre_p)
{
tree wce;
@@ -4326,13 +4334,13 @@ gimple_push_cleanup (tree var, tree clea
#if 0 /* FIXME tuples */
/* FIXME tuples */
tree flag = create_tmp_var (boolean_type_node, "cleanup");
- gimple ffalse = gs_build_assign (flag, boolean_false_node);
- gimple ftrue = gs_build_assign (flag, boolean_true_node);
+ gimple ffalse = gimple_build_assign (flag, boolean_false_node);
+ gimple ftrue = gimple_build_assign (flag, boolean_true_node);
cleanup = build3 (COND_EXPR, void_type_node, flag, cleanup, NULL);
wce = build1 (WITH_CLEANUP_EXPR, void_type_node, cleanup);
- gs_add (&gimplify_ctxp->conditional_cleanups, ffalse);
- gs_seq_append (&gimplify_ctxp->conditional_cleanups, wce);
- gs_add (pre_p, ftrue);
+ gimple_add (&gimplify_ctxp->conditional_cleanups, ffalse);
+ gimple_seq_append (&gimplify_ctxp->conditional_cleanups, wce);
+ gimple_add (pre_p, ftrue);
#endif
/* Because of this manipulation, and the EH edges that jump
@@ -4356,7 +4364,7 @@ gimple_push_cleanup (tree var, tree clea
/* Gimplify a TARGET_EXPR which doesn't appear on the rhs of an INIT_EXPR. */
static enum gimplify_status
-gimplify_target_expr (tree *expr_p, gs_seq pre_p, gs_seq post_p)
+gimplify_target_expr (tree *expr_p, gimple_seq pre_p, gimple_seq post_p)
{
tree targ = *expr_p;
tree temp = TARGET_EXPR_SLOT (targ);
@@ -4414,13 +4422,13 @@ gimplify_target_expr (tree *expr_p, gs_s
Return true if we actually added a statement to the queue. */
bool
-gimplify_stmt (tree *stmt_p, gs_seq seq_p)
+gimplify_stmt (tree *stmt_p, gimple_seq seq_p)
{
gimple last;
- last = gs_seq_last (seq_p);
+ last = gimple_seq_last (seq_p);
gimplify_expr (stmt_p, seq_p, NULL, is_gimple_stmt, fb_none);
- return last != gs_seq_last (seq_p);
+ return last != gimple_seq_last (seq_p);
}
/* Similarly, but force the result to be a STATEMENT_LIST. */
@@ -4790,7 +4798,7 @@ omp_check_private (struct gimplify_omp_c
and previous omp contexts. */
static void
-gimplify_scan_omp_clauses (tree *list_p, gs_seq pre_p, bool in_parallel,
+gimplify_scan_omp_clauses (tree *list_p, gimple_seq pre_p, bool in_parallel,
bool in_combined_parallel)
{
struct gimplify_omp_ctx *ctx, *outer_ctx;
@@ -5039,7 +5047,7 @@ gimplify_adjust_omp_clauses (tree *list_
decls will be decomposed during gimplification. */
static enum gimplify_status
-gimplify_omp_parallel (tree *expr_p, gs_seq pre_p)
+gimplify_omp_parallel (tree *expr_p, gimple_seq pre_p)
{
tree expr = *expr_p;
@@ -5063,7 +5071,7 @@ gimplify_omp_parallel (tree *expr_p, gs_
/* Gimplify the gross structure of an OMP_FOR statement. */
static enum gimplify_status
-gimplify_omp_for (tree *expr_p, gs_seq pre_p)
+gimplify_omp_for (tree *expr_p, gimple_seq pre_p)
{
tree for_stmt, decl, t;
enum gimplify_status ret = GS_OK;
@@ -5167,7 +5175,7 @@ gimplify_omp_for (tree *expr_p, gs_seq p
In particular, OMP_SECTIONS and OMP_SINGLE. */
static enum gimplify_status
-gimplify_omp_workshare (tree *expr_p, gs_seq pre_p)
+gimplify_omp_workshare (tree *expr_p, gimple_seq pre_p)
{
tree stmt = *expr_p;
@@ -5267,7 +5275,7 @@ gimplify_omp_atomic_fetch_op (tree *expr
a subexpression, 0 if it did not, or -1 if an error was encountered. */
static int
-goa_stabilize_expr (tree *expr_p, gs_seq pre_p, tree lhs_addr, tree lhs_var)
+goa_stabilize_expr (tree *expr_p, gimple_seq pre_p, tree lhs_addr, tree lhs_var)
{
tree expr = *expr_p;
int saw_lhs;
@@ -5318,7 +5326,7 @@ goa_stabilize_expr (tree *expr_p, gs_seq
index of the builtin decl. */
static enum gimplify_status
-gimplify_omp_atomic_pipeline (tree *expr_p, gs_seq pre_p,
+gimplify_omp_atomic_pipeline (tree *expr_p, gimple_seq pre_p,
tree addr, tree rhs, int index)
{
tree oldval, oldival, oldival2, newval, newival, label;
@@ -5422,7 +5430,7 @@ gimplify_omp_atomic_pipeline (tree *expr
this situation as well. */
static enum gimplify_status
-gimplify_omp_atomic_mutex (tree *expr_p, gs_seq pre_p, tree addr, tree rhs)
+gimplify_omp_atomic_mutex (tree *expr_p, gimple_seq pre_p, tree addr, tree rhs)
{
tree t;
@@ -5445,7 +5453,7 @@ gimplify_omp_atomic_mutex (tree *expr_p,
/* Gimplify an OMP_ATOMIC statement. */
static enum gimplify_status
-gimplify_omp_atomic (tree *expr_p, gs_seq pre_p)
+gimplify_omp_atomic (tree *expr_p, gimple_seq pre_p)
{
tree addr = TREE_OPERAND (*expr_p, 0);
tree rhs = TREE_OPERAND (*expr_p, 1);
@@ -5569,12 +5577,12 @@ gimplify_omp_atomic (tree *expr_p, gs_se
occurs. */
enum gimplify_status
-gimplify_expr (tree *expr_p, gs_seq pre_p, gs_seq post_p,
+gimplify_expr (tree *expr_p, gimple_seq pre_p, gimple_seq post_p,
bool (*gimple_test_f) (tree), fallback_t fallback)
{
tree tmp;
- struct gs_sequence internal_pre;
- struct gs_sequence internal_post;
+ struct gimple_sequence internal_pre;
+ struct gimple_sequence internal_post;
tree save_expr;
bool is_statement;
location_t saved_location;
@@ -5624,8 +5632,8 @@ gimplify_expr (tree *expr_p, gs_seq pre_
whether they are fully simplified. */
/* Set up our internal queues if needed. */
- gs_seq_init (&internal_pre);
- gs_seq_init (&internal_post);
+ gimple_seq_init (&internal_pre);
+ gimple_seq_init (&internal_post);
if (pre_p == NULL)
pre_p = &internal_pre;
@@ -5850,14 +5858,14 @@ gimplify_expr (tree *expr_p, gs_seq pre_
if (TREE_CODE (GOTO_DESTINATION (*expr_p)) != LABEL_DECL)
ret = gimplify_expr (&GOTO_DESTINATION (*expr_p), pre_p,
NULL, is_gimple_val, fb_rvalue);
- gs_add (pre_p, gs_build_goto (GOTO_DESTINATION (*expr_p)));
+ gimple_add (pre_p, gimple_build_goto (GOTO_DESTINATION (*expr_p)));
break;
case LABEL_EXPR:
ret = GS_ALL_DONE;
gcc_assert (decl_function_context (LABEL_EXPR_LABEL (*expr_p))
== current_function_decl);
- gs_add (pre_p, gs_build_label (LABEL_EXPR_LABEL (*expr_p)));
+ gimple_add (pre_p, gimple_build_label (LABEL_EXPR_LABEL (*expr_p)));
break;
case CASE_LABEL_EXPR:
@@ -6227,13 +6235,14 @@ gimplify_expr (tree *expr_p, gs_seq pre_
everything together and return. */
if (fallback == fb_none || is_statement)
{
- if (!gs_seq_empty_p (&internal_pre) || !gs_seq_empty_p (&internal_post))
+ if (!gimple_seq_empty_p (&internal_pre) ||
+ !gimple_seq_empty_p (&internal_post))
{
- gs_seq_append (&internal_pre, &internal_post);
- gs_seq_append (&internal_pre, pre_p);
+ gimple_seq_append (&internal_pre, &internal_post);
+ gimple_seq_append (&internal_pre, pre_p);
}
- if (!gs_seq_empty_p (&internal_pre))
+ if (!gimple_seq_empty_p (&internal_pre))
annotate_all_with_locus (&internal_pre, input_location);
goto out;
@@ -6276,7 +6285,7 @@ gimplify_expr (tree *expr_p, gs_seq pre_
/* If it's sufficiently simple already, we're done. Unless we are
handling some post-effects internally; if that's the case, we need to
copy into a temp before adding the post-effects to the tree. */
- if (gs_seq_empty_p (&internal_post) && (*gimple_test_f) (*expr_p))
+ if (gimple_seq_empty_p (&internal_post) && (*gimple_test_f) (*expr_p))
goto out;
/* Otherwise, we need to create a new temporary for the gimplified
@@ -6287,7 +6296,7 @@ gimplify_expr (tree *expr_p, gs_seq pre_
postqueue; we need to copy the value out first, which means an
rvalue. */
if ((fallback & fb_lvalue)
- && gs_seq_empty_p (&internal_post)
+ && gimple_seq_empty_p (&internal_post)
&& is_gimple_addressable (*expr_p))
{
/* An lvalue will do. Take the address of the expression, store it
@@ -6304,7 +6313,7 @@ gimplify_expr (tree *expr_p, gs_seq pre_
/* An rvalue will do. Assign the gimplified expression into a new
temporary TMP and replace the original expression with TMP. */
- if (!gs_seq_empty_p (&internal_post) || (fallback & fb_lvalue))
+ if (!gimple_seq_empty_p (&internal_post) || (fallback & fb_lvalue))
/* The postqueue might change the value of the expression between
the initialization and use of the temporary, so we can't use a
formal temp. FIXME do we care? */
@@ -6338,10 +6347,10 @@ gimplify_expr (tree *expr_p, gs_seq pre_
/* Make sure the temporary matches our predicate. */
gcc_assert ((*gimple_test_f) (*expr_p));
- if (!gs_seq_empty_p (&internal_post))
+ if (!gimple_seq_empty_p (&internal_post))
{
annotate_all_with_locus (&internal_post, input_location);
- gs_seq_append (pre_p, &internal_post);
+ gimple_seq_append (pre_p, &internal_post);
}
out:
@@ -6353,7 +6362,7 @@ gimplify_expr (tree *expr_p, gs_seq pre_
size that we find. Add to LIST_P any statements generated. */
void
-gimplify_type_sizes (tree type, gs_seq list_p)
+gimplify_type_sizes (tree type, gimple_seq list_p)
{
tree field, t;
@@ -6438,7 +6447,7 @@ gimplify_type_sizes (tree type, gs_seq l
We add any required statements to STMT_P. */
void
-gimplify_one_sizepos (tree *expr_p, gs_seq stmt_p)
+gimplify_one_sizepos (tree *expr_p, gimple_seq stmt_p)
{
tree type, expr = *expr_p;
@@ -6566,10 +6575,10 @@ check_pointer_types_r (tree *tp, int *wa
decl containing BODY. */
void
-gimplify_body (tree *body_p, gs_seq seq_p, tree fndecl, bool do_parms)
+gimplify_body (tree *body_p, gimple_seq seq_p, tree fndecl, bool do_parms)
{
location_t saved_location = input_location;
- struct gs_sequence parm_stmts;
+ struct gimple_sequence parm_stmts;
gimple outer_bind;
timevar_push (TV_TREE_GIMPLIFY);
@@ -6592,33 +6601,33 @@ gimplify_body (tree *body_p, gs_seq seq_
if (do_parms)
parm_stmts = gimplify_parameters ();
else
- gs_seq_init (&parm_stmts);
+ gimple_seq_init (&parm_stmts);
/* Gimplify the function's body. */
gimplify_stmt (body_p, seq_p);
- outer_bind = gs_seq_first (seq_p);
+ outer_bind = gimple_seq_first (seq_p);
if (!outer_bind)
{
- outer_bind = gs_build_nop ();
- gs_add (seq_p, outer_bind);
+ outer_bind = gimple_build_nop ();
+ gimple_add (seq_p, outer_bind);
}
- /* If there isn't an outer GS_BIND, add one. */
- if (GS_CODE (outer_bind) != GS_BIND)
+ /* If there isn't an outer GIMPLE_BIND, add one. */
+ if (GIMPLE_CODE (outer_bind) != GIMPLE_BIND)
{
- outer_bind = gs_build_bind (NULL_TREE, seq_p);
- gs_add (seq_p, outer_bind);
+ outer_bind = gimple_build_bind (NULL_TREE, seq_p);
+ gimple_add (seq_p, outer_bind);
}
*body_p = NULL_TREE;
/* If we had callee-copies statements, insert them at the beginning
of the function. */
- if (gs_seq_empty_p (&parm_stmts) != false)
+ if (gimple_seq_empty_p (&parm_stmts) != false)
{
- gs_seq_append (&parm_stmts, gs_bind_body (outer_bind));
- gs_bind_set_body (outer_bind, &parm_stmts);
+ gimple_seq_append (&parm_stmts, gimple_bind_body (outer_bind));
+ gimple_bind_set_body (outer_bind, &parm_stmts);
}
pop_gimplify_context (outer_bind);
@@ -6642,7 +6651,7 @@ void
gimplify_function_tree (tree fndecl)
{
tree oldfn, parm, ret;
- gs_seq seq;
+ gimple_seq seq;
oldfn = current_function_decl;
current_function_decl = fndecl;
@@ -6668,7 +6677,7 @@ gimplify_function_tree (tree fndecl)
&& !needs_to_live_in_memory (ret))
DECL_GIMPLE_REG_P (ret) = 1;
- seq = (gs_seq) ggc_alloc_cleared (sizeof (*seq));
+ seq = (gimple_seq) ggc_alloc_cleared (sizeof (*seq));
gimplify_body (&DECL_SAVED_TREE (fndecl), seq, fndecl, true);
/* FIXME tuples */
@@ -6717,13 +6726,13 @@ gimplify_function_tree (tree fndecl)
base variable of the final destination be VAR if suitable. */
tree
-force_gimple_operand (tree expr, gs_seq stmts, bool simple, tree var)
+force_gimple_operand (tree expr, gimple_seq stmts, bool simple, tree var)
{
tree t;
enum gimplify_status ret;
gimple_predicate gimple_test_f;
- gs_seq_init (stmts);
+ gimple_seq_init (stmts);
if (is_gimple_val (expr))
return expr;
@@ -6757,7 +6766,7 @@ tree
force_gimple_operand_bsi (block_stmt_iterator *bsi ATTRIBUTE_UNUSED, tree expr,
bool simple_p, tree var)
{
- struct gs_sequence stmts;
+ struct gimple_sequence stmts;
expr = force_gimple_operand (expr, &stmts, simple_p, var);
#if 0
Index: gcc/coretypes.h
===================================================================
--- gcc/coretypes.h (revision 126694)
+++ gcc/coretypes.h (working copy)
@@ -49,8 +49,8 @@ union gimple_statement_d;
typedef union gimple_statement_d *gimple;
union section;
typedef union section section;
-struct gs_sequence;
-typedef struct gs_sequence *gs_seq;
+struct gimple_sequence;
+typedef struct gimple_sequence *gimple_seq;
/* The major intermediate representations of GCC. */
enum ir_type {
Index: gcc/c-gimplify.c
===================================================================
--- gcc/c-gimplify.c (revision 126694)
+++ gcc/c-gimplify.c (working copy)
@@ -181,7 +181,7 @@ c_build_bind_expr (tree block, tree body
decl instead. */
static enum gimplify_status
-gimplify_compound_literal_expr (tree *expr_p, gs_seq pre_p)
+gimplify_compound_literal_expr (tree *expr_p, gimple_seq pre_p)
{
tree decl_s = COMPOUND_LITERAL_EXPR_DECL_STMT (*expr_p);
tree decl = DECL_EXPR_DECL (decl_s);
@@ -215,7 +215,7 @@ gimplify_compound_literal_expr (tree *ex
gimplify_expr. */
int
-c_gimplify_expr (tree *expr_p, gs_seq pre_p, gs_seq post_p ATTRIBUTE_UNUSED)
+c_gimplify_expr (tree *expr_p, gimple_seq pre_p, gimple_seq post_p ATTRIBUTE_UNUSED)
{
enum tree_code code = TREE_CODE (*expr_p);
Index: gcc/tree-flow.h
===================================================================
--- gcc/tree-flow.h (revision 126694)
+++ gcc/tree-flow.h (working copy)
@@ -1120,7 +1120,7 @@ extern bool thread_through_all_blocks (b
extern void register_jump_thread (edge, edge);
/* In gimplify.c */
-tree force_gimple_operand (tree, gs_seq, bool, tree);
+tree force_gimple_operand (tree, gimple_seq, bool, tree);
tree force_gimple_operand_bsi (block_stmt_iterator *, tree, bool, tree);
/* In tree-ssa-structalias.c */
Index: gcc/c-common.h
===================================================================
--- gcc/c-common.h (revision 126694)
+++ gcc/c-common.h (working copy)
@@ -890,7 +890,7 @@ extern void warn_for_div_by_zero (tree d
/* In c-gimplify.c */
extern void c_genericize (tree);
-extern int c_gimplify_expr (tree *, gs_seq, gs_seq);
+extern int c_gimplify_expr (tree *, gimple_seq, gimple_seq);
extern tree c_build_bind_expr (tree, tree);
/* In c-pch.c */
Index: gcc/gimple.c
===================================================================
--- gcc/gimple.c (revision 126694)
+++ gcc/gimple.c (working copy)
@@ -31,7 +31,7 @@ Software Foundation, 51 Franklin Street,
#include "diagnostic.h"
#define DEFGSCODE(SYM, NAME) NAME,
-const char *const gs_code_name[] = {
+const char *const gimple_code_name[] = {
#include "gimple.def"
};
#undef DEFGSCODE
@@ -44,85 +44,85 @@ static struct pointer_map_t *gimple_bodi
/* Gimple tuple constructors. */
-/* Construct a GS_RETURN statement.
+/* Construct a GIMPLE_RETURN statement.
RESULT_DECL_P is non-zero if using RESULT_DECL.
RETVAL is the return value. */
gimple
-gs_build_return (bool result_decl_p, tree retval)
+gimple_build_return (bool result_decl_p, tree retval)
{
gimple p = ggc_alloc_cleared (sizeof (struct gimple_statement_return));
- GS_CODE (p) = GS_RETURN;
- GS_SUBCODE_FLAGS (p) = (int) result_decl_p;
- gs_return_set_retval (p, retval);
+ GIMPLE_CODE (p) = GIMPLE_RETURN;
+ GIMPLE_SUBCODE_FLAGS (p) = (int) result_decl_p;
+ gimple_return_set_retval (p, retval);
return p;
}
-/* Helper for gs_build_call and gs_build_call_vec. Build the basic
- components of a GS_CALL statement to function FN with NARGS
+/* Helper for gimple_build_call and gimple_build_call_vec. Build the basic
+ components of a GIMPLE_CALL statement to function FN with NARGS
arguments. */
static inline gimple
-gs_build_call_1 (tree fn, size_t nargs)
+gimple_build_call_1 (tree fn, size_t nargs)
{
gimple gs = ggc_alloc_cleared (sizeof (struct gimple_statement_call)
+ sizeof (tree) * (nargs - 1));
- GS_CODE (gs) = GS_CALL;
- GS_SUBCODE_FLAGS (gs) = 0;
- gs->gs_call.nargs = nargs;
- gs->gs_call.fn = fn;
+ GIMPLE_CODE (gs) = GIMPLE_CALL;
+ GIMPLE_SUBCODE_FLAGS (gs) = 0;
+ gs->gimple_call.nargs = nargs;
+ gs->gimple_call.fn = fn;
return gs;
}
-/* Build a GS_CALL statement to function FN with the arguments
+/* Build a GIMPLE_CALL statement to function FN with the arguments
specified in vector ARGS. */
gimple
-gs_build_call_vec (tree fn, VEC(tree, gc) *args)
+gimple_build_call_vec (tree fn, VEC(tree, gc) *args)
{
size_t i;
size_t nargs = VEC_length (tree, args);
- gimple call = gs_build_call_1 (fn, nargs);
+ gimple call = gimple_build_call_1 (fn, nargs);
for (i = 0; i < nargs; i++)
- gs_call_set_arg (call, i, VEC_index (tree, args, i));
+ gimple_call_set_arg (call, i, VEC_index (tree, args, i));
return call;
}
-/* Build a GS_CALL statement to function FN. NARGS is the number of
+/* Build a GIMPLE_CALL statement to function FN. NARGS is the number of
arguments. The ... are the arguments. */
gimple
-gs_build_call (tree fn, size_t nargs, ...)
+gimple_build_call (tree fn, size_t nargs, ...)
{
va_list ap;
gimple call;
size_t i;
- call = gs_build_call_1 (fn, nargs);
+ call = gimple_build_call_1 (fn, nargs);
va_start (ap, nargs);
for (i = 0; i < nargs; i++)
- gs_call_set_arg (call, i, va_arg (ap, tree));
+ gimple_call_set_arg (call, i, va_arg (ap, tree));
va_end (ap);
return call;
}
-/* Construct a GS_ASSIGN statement.
+/* Construct a GIMPLE_ASSIGN statement.
LHS of the assignment.
RHS of the assignment which can be unary or binary. */
gimple
-gs_build_assign (tree lhs, tree rhs)
+gimple_build_assign (tree lhs, tree rhs)
{
gimple p;
enum gimple_statement_structure_enum gss;
@@ -132,33 +132,33 @@ gs_build_assign (tree lhs, tree rhs)
{
case GSS_ASSIGN_BINARY:
p = ggc_alloc_cleared (sizeof (struct gimple_statement_assign_binary));
- GS_CODE (p) = GS_ASSIGN;
- GS_SUBCODE_FLAGS (p) = TREE_CODE (rhs);
- gs_assign_set_lhs (p, lhs);
- gs_assign_binary_set_rhs1 (p, TREE_OPERAND (rhs, 0));
- gs_assign_binary_set_rhs2 (p, TREE_OPERAND (rhs, 1));
+ GIMPLE_CODE (p) = GIMPLE_ASSIGN;
+ GIMPLE_SUBCODE_FLAGS (p) = TREE_CODE (rhs);
+ gimple_assign_set_lhs (p, lhs);
+ gimple_assign_binary_set_rhs1 (p, TREE_OPERAND (rhs, 0));
+ gimple_assign_binary_set_rhs2 (p, TREE_OPERAND (rhs, 1));
break;
case GSS_ASSIGN_UNARY_REG:
p = ggc_alloc_cleared (sizeof (struct gimple_statement_assign_unary_reg));
- GS_CODE (p) = GS_ASSIGN;
- GS_SUBCODE_FLAGS (p) = TREE_CODE (rhs);
- gs_assign_set_lhs (p, lhs);
+ GIMPLE_CODE (p) = GIMPLE_ASSIGN;
+ GIMPLE_SUBCODE_FLAGS (p) = TREE_CODE (rhs);
+ gimple_assign_set_lhs (p, lhs);
if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (rhs))))
- gs_assign_unary_set_rhs (p, TREE_OPERAND (rhs, 0));
+ gimple_assign_unary_set_rhs (p, TREE_OPERAND (rhs, 0));
else
- gs_assign_unary_set_rhs (p, rhs);
+ gimple_assign_unary_set_rhs (p, rhs);
break;
case GSS_ASSIGN_UNARY_MEM:
p = ggc_alloc_cleared (sizeof (struct gimple_statement_assign_unary_mem));
- GS_CODE (p) = GS_ASSIGN;
- GS_SUBCODE_FLAGS (p) = TREE_CODE (rhs);
- gs_assign_set_lhs (p, lhs);
+ GIMPLE_CODE (p) = GIMPLE_ASSIGN;
+ GIMPLE_SUBCODE_FLAGS (p) = TREE_CODE (rhs);
+ gimple_assign_set_lhs (p, lhs);
if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (rhs))))
- gs_assign_unary_set_rhs (p, TREE_OPERAND (rhs, 0));
+ gimple_assign_unary_set_rhs (p, TREE_OPERAND (rhs, 0));
else
- gs_assign_unary_set_rhs (p, rhs);
+ gimple_assign_unary_set_rhs (p, rhs);
break;
@@ -170,7 +170,7 @@ gs_build_assign (tree lhs, tree rhs)
}
-/* Given a CODE for the RHS of a GS_ASSIGN, return the GSS enum for it. */
+/* Given a CODE for the RHS of a GIMPLE_ASSIGN, return the GSS enum for it. */
enum gimple_statement_structure_enum
gss_for_assign (enum tree_code code)
@@ -195,100 +195,100 @@ gss_for_assign (enum tree_code code)
return GSS_ASSIGN_UNARY_MEM;
}
-/* Construct a GS_COND statement.
+/* Construct a GIMPLE_COND statement.
PRED is the condition used to compare LHS and the RHS.
T_LABEL is the label to jump to if the condition is true.
F_LABEL is teh label to jump to otherwise. */
gimple
-gs_build_cond (enum gs_cond pred, tree lhs, tree rhs,
+gimple_build_cond (enum gimple_cond pred, tree lhs, tree rhs,
tree t_label, tree f_label)
{
gimple p;
p = ggc_alloc_cleared (sizeof (struct gimple_statement_cond));
- GS_CODE (p) = GS_COND;
- GS_SUBCODE_FLAGS (p) = pred;
- gs_cond_set_lhs (p, lhs);
- gs_cond_set_rhs (p, rhs);
- gs_cond_set_true_label (p, t_label);
- gs_cond_set_false_label (p, f_label);
+ GIMPLE_CODE (p) = GIMPLE_COND;
+ GIMPLE_SUBCODE_FLAGS (p) = pred;
+ gimple_cond_set_lhs (p, lhs);
+ gimple_cond_set_rhs (p, rhs);
+ gimple_cond_set_true_label (p, t_label);
+ gimple_cond_set_false_label (p, f_label);
return p;
}
-/* Invert the condition of a GS_COND by swapping its labels. */
+/* Invert the condition of a GIMPLE_COND by swapping its labels. */
void
-gs_cond_invert (gimple g)
+gimple_cond_invert (gimple g)
{
tree tmp;
- tmp = gs_cond_true_label (g);
- gs_cond_set_true_label (g, gs_cond_false_label (g));
- gs_cond_set_false_label (g, tmp);
+ tmp = gimple_cond_true_label (g);
+ gimple_cond_set_true_label (g, gimple_cond_false_label (g));
+ gimple_cond_set_false_label (g, tmp);
}
-/* Construct a GS_LABEL statement for LABEL. */
+/* Construct a GIMPLE_LABEL statement for LABEL. */
gimple
-gs_build_label (tree label)
+gimple_build_label (tree label)
{
gimple p;
p = ggc_alloc_cleared (sizeof (struct gimple_statement_label));
- GS_CODE (p) = GS_LABEL;
- gs_label_set_label (p, label);
+ GIMPLE_CODE (p) = GIMPLE_LABEL;
+ gimple_label_set_label (p, label);
return p;
}
-/* Construct a GS_GOTO statement to DEST. */
+/* Construct a GIMPLE_GOTO statement to DEST. */
gimple
-gs_build_goto (tree dest)
+gimple_build_goto (tree dest)
{
gimple p;
p = ggc_alloc_cleared (sizeof (struct gimple_statement_goto));
- GS_CODE (p) = GS_GOTO;
- gs_goto_set_dest (p, dest);
+ GIMPLE_CODE (p) = GIMPLE_GOTO;
+ gimple_goto_set_dest (p, dest);
return p;
}
-/* Construct a GS_NOP statement. */
+/* Construct a GIMPLE_NOP statement. */
gimple
-gs_build_nop (void)
+gimple_build_nop (void)
{
gimple p;
p = ggc_alloc_cleared (sizeof (struct gimple_statement_base));
- GS_CODE (p) = GS_NOP;
+ GIMPLE_CODE (p) = GIMPLE_NOP;
return p;
}
-/* Construct a GS_BIND statement.
+/* Construct a GIMPLE_BIND statement.
VARS are the variables in BODY. */
gimple
-gs_build_bind (tree vars, gs_seq body)
+gimple_build_bind (tree vars, gimple_seq body)
{
gimple p;
p = ggc_alloc_cleared (sizeof (struct gimple_statement_bind));
- GS_CODE (p) = GS_BIND;
- gs_bind_set_vars (p, vars);
- gs_bind_set_body (p, body);
+ GIMPLE_CODE (p) = GIMPLE_BIND;
+ gimple_bind_set_vars (p, vars);
+ gimple_bind_set_body (p, body);
return p;
}
-/* Construct a GS_ASM statement.
+/* Construct a GIMPLE_ASM statement.
STRING is the assembly code.
NINPUT is the number of register inputs.
@@ -297,7 +297,7 @@ gs_build_bind (tree vars, gs_seq body)
... are trees for each input, output and clobbered register. */
gimple
-gs_build_asm (const char *string, unsigned ninputs, unsigned noutputs,
+gimple_build_asm (const char *string, unsigned ninputs, unsigned noutputs,
unsigned nclobbered, ...)
{
gimple p;
@@ -306,84 +306,84 @@ gs_build_asm (const char *string, unsign
p = ggc_alloc_cleared (sizeof (struct gimple_statement_asm)
+ sizeof (tree) * (ninputs + noutputs + nclobbered - 1));
- GS_CODE (p) = GS_ASM;
- gs_asm_set_ninputs (p, ninputs);
- gs_asm_set_noutputs (p, noutputs);
- gs_asm_set_nclobbered (p, nclobbered);
- gs_asm_set_string (p, string);
+ GIMPLE_CODE (p) = GIMPLE_ASM;
+ gimple_asm_set_ninputs (p, ninputs);
+ gimple_asm_set_noutputs (p, noutputs);
+ gimple_asm_set_nclobbered (p, nclobbered);
+ gimple_asm_set_string (p, string);
va_start (ap, nclobbered);
for (i = 0; i < ninputs; i++)
- gs_asm_set_input_op (p, i, va_arg (ap, tree));
+ gimple_asm_set_input_op (p, i, va_arg (ap, tree));
for (i = 0; i < noutputs; i++)
- gs_asm_set_output_op (p, i, va_arg (ap, tree));
+ gimple_asm_set_output_op (p, i, va_arg (ap, tree));
for (i = 0; i < nclobbered; i++)
- gs_asm_set_clobber_op (p, i, va_arg (ap, tree));
+ gimple_asm_set_clobber_op (p, i, va_arg (ap, tree));
va_end (ap);
return p;
}
-/* Construct a GS_CATCH statement.
+/* Construct a GIMPLE_CATCH statement.
TYPES are the catch types.
HANDLER is the exception handler. */
gimple
-gs_build_catch (tree types, gimple handler)
+gimple_build_catch (tree types, gimple handler)
{
gimple p;
p = ggc_alloc_cleared (sizeof (struct gimple_statement_catch));
- GS_CODE (p) = GS_CATCH;
- gs_catch_set_types (p, types);
- gs_catch_set_handler (p, handler);
+ GIMPLE_CODE (p) = GIMPLE_CATCH;
+ gimple_catch_set_types (p, types);
+ gimple_catch_set_handler (p, handler);
return p;
}
-/* Construct a GS_EH_FILTER statement.
+/* Construct a GIMPLE_EH_FILTER statement.
TYPES are the filter's types.
FAILURE is the filter's failure action. */
gimple
-gs_build_eh_filter (tree types, gimple failure)
+gimple_build_eh_filter (tree types, gimple failure)
{
gimple p;
p = ggc_alloc_cleared (sizeof (struct gimple_statement_eh_filter));
- GS_CODE (p) = GS_EH_FILTER;
- gs_eh_filter_set_types (p, types);
- gs_eh_filter_set_failure (p, failure);
+ GIMPLE_CODE (p) = GIMPLE_EH_FILTER;
+ gimple_eh_filter_set_types (p, types);
+ gimple_eh_filter_set_failure (p, failure);
return p;
}
-/* Construct a GS_TRY statement.
+/* Construct a GIMPLE_TRY statement.
EVAL is the expression to evaluate.
CLEANUP is the cleanup expression.
- CATCH_FINALLY is either GS_TRY_CATCH or GS_TRY_FINALLY depending on whether
+ CATCH_FINALLY is either GIMPLE_TRY_CATCH or GIMPLE_TRY_FINALLY depending on whether
this is a try/catch or a try/finally respectively. */
gimple
-gs_build_try (gs_seq eval, gs_seq cleanup, unsigned int catch_finally)
+gimple_build_try (gimple_seq eval, gimple_seq cleanup, unsigned int catch_finally)
{
gimple p;
- gcc_assert (catch_finally == GS_TRY_CATCH
- || catch_finally == GS_TRY_FINALLY);
+ gcc_assert (catch_finally == GIMPLE_TRY_CATCH
+ || catch_finally == GIMPLE_TRY_FINALLY);
p = ggc_alloc_cleared (sizeof (struct gimple_statement_try));
- GS_CODE (p) = GS_TRY;
- gs_try_set_eval (p, eval);
- gs_try_set_cleanup (p, cleanup);
- GS_SUBCODE_FLAGS (p) = catch_finally;
+ GIMPLE_CODE (p) = GIMPLE_TRY;
+ gimple_try_set_eval (p, eval);
+ gimple_try_set_cleanup (p, cleanup);
+ GIMPLE_SUBCODE_FLAGS (p) = catch_finally;
return p;
}
-/* Construct a GS_PHI statement.
+/* Construct a GIMPLE_PHI statement.
CAPACITY is the max number of args this node can have (for later reuse).
RESULT the
@@ -392,7 +392,7 @@ gs_build_try (gs_seq eval, gs_seq cleanu
... phi_arg_d* for the incomming edges to this node. */
gimple
-gs_build_phi (unsigned capacity, unsigned nargs, tree result, ...)
+gimple_build_phi (unsigned capacity, unsigned nargs, tree result, ...)
{
gimple p;
unsigned int i;
@@ -400,35 +400,35 @@ gs_build_phi (unsigned capacity, unsigne
p = ggc_alloc_cleared (sizeof (struct gimple_statement_phi)
+ (sizeof (struct phi_arg_d) * (nargs - 1)) );
- GS_CODE (p) = GS_PHI;
- gs_phi_set_capacity (p, capacity);
- gs_phi_set_nargs (p, nargs);
- gs_phi_set_result (p, result);
+ GIMPLE_CODE (p) = GIMPLE_PHI;
+ gimple_phi_set_capacity (p, capacity);
+ gimple_phi_set_nargs (p, nargs);
+ gimple_phi_set_result (p, result);
va_start (va, result);
for (i = 0; i < nargs; i++)
{
struct phi_arg_d* phid = va_arg (va, struct phi_arg_d*);
- gs_phi_set_arg (p, i, phid);
+ gimple_phi_set_arg (p, i, phid);
}
va_end (va);
return p;
}
-/* Construct a GS_RESX statement.
+/* Construct a GIMPLE_RESX statement.
REGION is the region number from which this resx causes control flow to
leave. */
gimple
-gs_build_resx (int region)
+gimple_build_resx (int region)
{
gimple p;
p = ggc_alloc_cleared (sizeof (struct gimple_statement_resx));
- GS_CODE (p) = GS_RESX;
- gs_resx_set_region (p, region);
+ GIMPLE_CODE (p) = GIMPLE_RESX;
+ gimple_resx_set_region (p, region);
return p;
}
@@ -439,7 +439,7 @@ gs_build_resx (int region)
DEFAULT_LABEL is the default label for the switch statement. */
static inline gimple
-gs_build_switch_1 (unsigned int nlabels, tree index, tree default_label)
+gimple_build_switch_1 (unsigned int nlabels, tree index, tree default_label)
{
gimple p;
unsigned int n_all_labels;
@@ -448,81 +448,81 @@ gs_build_switch_1 (unsigned int nlabels,
/* total labels - 1 extra from struct. */
p = ggc_alloc_cleared (sizeof (struct gimple_statement_switch)
+ sizeof (tree) * (n_all_labels - 1));
- GS_CODE (p) = GS_SWITCH;
+ GIMPLE_CODE (p) = GIMPLE_SWITCH;
- gs_switch_set_nlabels (p, n_all_labels);
- gs_switch_set_index (p, index);
- gs_switch_set_default_label (p, default_label);
+ gimple_switch_set_nlabels (p, n_all_labels);
+ gimple_switch_set_index (p, index);
+ gimple_switch_set_default_label (p, default_label);
return p;
}
-/* Construct a GS_SWITCH statement.
+/* Construct a GIMPLE_SWITCH statement.
INDEX is the switch's index.
NLABELS is the number of labels in the switch excluding the DEFAULT_LABEL.
... are the labels excluding the default. */
gimple
-gs_build_switch (unsigned int nlabels, tree index, tree default_label, ...)
+gimple_build_switch (unsigned int nlabels, tree index, tree default_label, ...)
{
va_list al;
unsigned int i;
- gimple p = gs_build_switch_1 (nlabels, index, default_label);
+ gimple p = gimple_build_switch_1 (nlabels, index, default_label);
/* Put labels in labels[1 - (nlables + 1)].
Default label is in labels[0]. */
va_start (al, default_label);
for (i = 1; i <= nlabels; i++)
- gs_switch_set_label (p, i, va_arg (al, tree));
+ gimple_switch_set_label (p, i, va_arg (al, tree));
va_end (al);
return p;
}
-/* Construct a GS_SWITCH statement.
+/* Construct a GIMPLE_SWITCH statement.
INDEX is the switch's index.
NLABELS is the number of labels in the switch excluding the default.
ARGS is a vector of labels excluding the default. */
gimple
-gs_build_switch_vec (tree index, tree default_label, VEC(tree, heap) * args)
+gimple_build_switch_vec (tree index, tree default_label, VEC(tree, heap) * args)
{
size_t i;
size_t nlabels = VEC_length (tree, args);
- gimple p = gs_build_switch_1 (nlabels, index, default_label);
+ gimple p = gimple_build_switch_1 (nlabels, index, default_label);
/* Put labels in labels[1 - (nlables + 1)].
Default label is in labels[0]. */
for (i = 1; i <= nlabels; i++)
- gs_switch_set_label (p, i, VEC_index (tree, args, i - 1));
+ gimple_switch_set_label (p, i, VEC_index (tree, args, i - 1));
return p;
}
-/* Construct a GS_OMP_CRITICAL statement.
+/* Construct a GIMPLE_OMP_CRITICAL statement.
BODY is the sequence of statements for which only one thread can execute.
NAME is optional identifier for this critical block. */
gimple
-gs_omp_build_critical (gs_seq body, tree name)
+gimple_omp_build_critical (gimple_seq body, tree name)
{
gimple p;
p = ggc_alloc_cleared (sizeof (struct gimple_statement_omp_critical));
- GS_CODE (p) = GS_OMP_CRITICAL;
- gs_omp_critical_set_name (p, name);
- gs_omp_set_body (p, body);
+ GIMPLE_CODE (p) = GIMPLE_OMP_CRITICAL;
+ gimple_omp_critical_set_name (p, name);
+ gimple_omp_set_body (p, body);
return p;
}
-/* Construct a GS_OMP_FOR statement.
+/* Construct a GIMPLE_OMP_FOR statement.
BODY is sequence of statements inside the for loop.
CLAUSES, are any of the OMP loop construct's clauses: private, firstprivate,
@@ -535,27 +535,27 @@ gs_omp_build_critical (gs_seq body, tree
INCR is the increment expression. */
gimple
-gs_omp_build_for (gs_seq body, tree clauses, tree index,
+gimple_omp_build_for (gimple_seq body, tree clauses, tree index,
tree initial, tree final, tree incr,
- gs_seq pre_body, enum gs_cond omp_for_cond)
+ gimple_seq pre_body, enum gimple_cond omp_for_cond)
{
gimple p;
p = ggc_alloc_cleared (sizeof (struct gimple_statement_omp_for));
- GS_CODE (p) = GS_OMP_FOR;
- gs_omp_set_body (p, body);
- gs_omp_for_set_clauses (p, clauses);
- gs_omp_for_set_index (p, index);
- gs_omp_for_set_initial (p, initial);
- gs_omp_for_set_final (p, final);
- gs_omp_for_set_incr (p, incr);
- gs_omp_for_set_pre_body (p, pre_body);
- gs_assign_omp_for_cond (p, omp_for_cond);
+ GIMPLE_CODE (p) = GIMPLE_OMP_FOR;
+ gimple_omp_set_body (p, body);
+ gimple_omp_for_set_clauses (p, clauses);
+ gimple_omp_for_set_index (p, index);
+ gimple_omp_for_set_initial (p, initial);
+ gimple_omp_for_set_final (p, final);
+ gimple_omp_for_set_incr (p, incr);
+ gimple_omp_for_set_pre_body (p, pre_body);
+ gimple_assign_omp_for_cond (p, omp_for_cond);
return p;
}
-/* Construct a GS_OMP_PARALLEL statement.
+/* Construct a GIMPLE_OMP_PARALLEL statement.
BODY is sequence of statements which are executed in parallel.
CLAUSES, are the OMP parallel construct's clauses.
@@ -563,133 +563,133 @@ gs_omp_build_for (gs_seq body, tree clau
DATA_ARG are the shared data argument(s). */
gimple
-gs_omp_build_parallel (gs_seq body, tree clauses, tree child_fn,
+gimple_omp_build_parallel (gimple_seq body, tree clauses, tree child_fn,
tree data_arg)
{
gimple p;
p = ggc_alloc_cleared (sizeof (struct gimple_statement_omp_parallel));
- GS_CODE (p) = GS_OMP_PARALLEL;
- gs_omp_set_body (p, body);
- gs_omp_parallel_set_clauses (p, clauses);
- gs_omp_parallel_set_child_fn (p, child_fn);
- gs_omp_parallel_set_data_arg (p, data_arg);
+ GIMPLE_CODE (p) = GIMPLE_OMP_PARALLEL;
+ gimple_omp_set_body (p, body);
+ gimple_omp_parallel_set_clauses (p, clauses);
+ gimple_omp_parallel_set_child_fn (p, child_fn);
+ gimple_omp_parallel_set_data_arg (p, data_arg);
return p;
}
-/* Construct a GS_OMP_SECTION statement for a sections statement.
+/* Construct a GIMPLE_OMP_SECTION statement for a sections statement.
BODY is the sequence of statements in the section. */
gimple
-gs_omp_build_section (gs_seq body)
+gimple_omp_build_section (gimple_seq body)
{
gimple p;
p = ggc_alloc_cleared (sizeof (struct gimple_statement_omp));
- GS_CODE (p) = GS_OMP_SECTION;
- gs_omp_set_body (p, body);
+ GIMPLE_CODE (p) = GIMPLE_OMP_SECTION;
+ gimple_omp_set_body (p, body);
return p;
}
-/* Construct a GS_OMP_MASTER statement.
+/* Construct a GIMPLE_OMP_MASTER statement.
BODY is the sequence of statements to be executed by just the master. */
gimple
-gs_omp_build_master (gs_seq body)
+gimple_omp_build_master (gimple_seq body)
{
gimple p;
p = ggc_alloc_cleared (sizeof (struct gimple_statement_omp));
- GS_CODE (p) = GS_OMP_MASTER;
- gs_omp_set_body (p, body);
+ GIMPLE_CODE (p) = GIMPLE_OMP_MASTER;
+ gimple_omp_set_body (p, body);
return p;
}
-/* Construct a GS_OMP_CONTINUE statement.
+/* Construct a GIMPLE_OMP_CONTINUE statement.
FIXME tuples: BODY. */
gimple
-gs_omp_build_continue (gs_seq body)
+gimple_omp_build_continue (gimple_seq body)
{
gimple p;
p = ggc_alloc_cleared (sizeof (struct gimple_statement_omp));
- GS_CODE (p) = GS_OMP_CONTINUE;
- gs_omp_set_body (p, body);
+ GIMPLE_CODE (p) = GIMPLE_OMP_CONTINUE;
+ gimple_omp_set_body (p, body);
return p;
}
-/* Construct a GS_OMP_ORDERED statement.
+/* Construct a GIMPLE_OMP_ORDERED statement.
BODY is the sequence of statements inside a loop that will executed in
sequence. */
gimple
-gs_omp_build_ordered (gs_seq body)
+gimple_omp_build_ordered (gimple_seq body)
{
gimple p;
p = ggc_alloc_cleared (sizeof (struct gimple_statement_omp));
- GS_CODE (p) = GS_OMP_ORDERED;
- gs_omp_set_body (p, body);
+ GIMPLE_CODE (p) = GIMPLE_OMP_ORDERED;
+ gimple_omp_set_body (p, body);
return p;
}
-/* Construct a GS_OMP_RETURN statement.
+/* Construct a GIMPLE_OMP_RETURN statement.
WAIT_P is true if this is a non-waiting return. */
gimple
-gs_omp_build_return (bool wait_p)
+gimple_omp_build_return (bool wait_p)
{
gimple p;
p = ggc_alloc_cleared (sizeof (struct gimple_statement_omp));
- GS_CODE (p) = GS_OMP_RETURN;
+ GIMPLE_CODE (p) = GIMPLE_OMP_RETURN;
if (wait_p)
- GS_SUBCODE_FLAGS(p) = OMP_RETURN_NOWAIT_FLAG;
+ GIMPLE_SUBCODE_FLAGS(p) = OMP_RETURN_NOWAIT_FLAG;
return p;
}
-/* Construct a GS_OMP_SECTIONS statement.
+/* Construct a GIMPLE_OMP_SECTIONS statement.
BODY is a sequence of section statements.
CLAUSES are any of the OMP sections contsruct's clauses: private,
firstprivate, lastprivate, reduction, and nowait. */
gimple
-gs_omp_build_sections (gs_seq body, tree clauses)
+gimple_omp_build_sections (gimple_seq body, tree clauses)
{
gimple p;
p = ggc_alloc_cleared (sizeof (struct gimple_statement_omp_sections));
- GS_CODE (p) = GS_OMP_SECTIONS;
- gs_omp_set_body (p, body);
- gs_omp_sections_set_clauses (p, clauses);
+ GIMPLE_CODE (p) = GIMPLE_OMP_SECTIONS;
+ gimple_omp_set_body (p, body);
+ gimple_omp_sections_set_clauses (p, clauses);
return p;
}
-/* Construct a GS_OMP_SINGLE statement.
+/* Construct a GIMPLE_OMP_SINGLE statement.
BODY is the sequence of statements that will be executed once.
CLAUSES are any of the OMP single construct's clauses: private, firstprivate,
copyprivate, nowait. */
gimple
-gs_omp_build_single (gs_seq body, tree clauses)
+gimple_omp_build_single (gimple_seq body, tree clauses)
{
gimple p;
p = ggc_alloc_cleared (sizeof (struct gimple_statement_omp_single));
- GS_CODE (p) = GS_OMP_SINGLE;
- gs_omp_set_body (p, body);
- gs_omp_single_set_clauses (p, clauses);
+ GIMPLE_CODE (p) = GIMPLE_OMP_SINGLE;
+ gimple_omp_set_body (p, body);
+ gimple_omp_single_set_clauses (p, clauses);
return p;
}
@@ -700,37 +700,37 @@ gs_omp_build_single (gs_seq body, tree c
enum gimple_statement_structure_enum
gimple_statement_structure (gimple gs)
{
- unsigned int code = GS_CODE (gs);
- unsigned int subcode = GS_SUBCODE_FLAGS (gs);
+ unsigned int code = GIMPLE_CODE (gs);
+ unsigned int subcode = GIMPLE_SUBCODE_FLAGS (gs);
switch (code)
{
- case GS_ASSIGN: return gss_for_assign (subcode);
- case GS_ASM: return GSS_ASM;
- case GS_BIND: return GSS_BIND;
- case GS_CALL: return GSS_CALL;
- case GS_CATCH: return GSS_CATCH;
- case GS_COND: return GSS_COND;
- case GS_EH_FILTER: return GSS_EH_FILTER;
- case GS_GOTO: return GSS_GOTO;
- case GS_LABEL: return GSS_LABEL;
- case GS_NOP: return GSS_BASE;
- case GS_PHI: return GSS_PHI;
- case GS_RESX: return GSS_RESX;
- case GS_RETURN: return GSS_RETURN;
- case GS_SWITCH: return GSS_SWITCH;
- case GS_TRY: return GSS_TRY;
- case GS_OMP_CRITICAL: return GSS_OMP_CRITICAL;
- case GS_OMP_FOR: return GSS_OMP_FOR;
- case GS_OMP_CONTINUE:
- case GS_OMP_MASTER:
- case GS_OMP_ORDERED:
- case GS_OMP_RETURN:
- case GS_OMP_SECTION:
+ case GIMPLE_ASSIGN: return gss_for_assign (subcode);
+ case GIMPLE_ASM: return GSS_ASM;
+ case GIMPLE_BIND: return GSS_BIND;
+ case GIMPLE_CALL: return GSS_CALL;
+ case GIMPLE_CATCH: return GSS_CATCH;
+ case GIMPLE_COND: return GSS_COND;
+ case GIMPLE_EH_FILTER: return GSS_EH_FILTER;
+ case GIMPLE_GOTO: return GSS_GOTO;
+ case GIMPLE_LABEL: return GSS_LABEL;
+ case GIMPLE_NOP: return GSS_BASE;
+ case GIMPLE_PHI: return GSS_PHI;
+ case GIMPLE_RESX: return GSS_RESX;
+ case GIMPLE_RETURN: return GSS_RETURN;
+ case GIMPLE_SWITCH: return GSS_SWITCH;
+ case GIMPLE_TRY: return GSS_TRY;
+ case GIMPLE_OMP_CRITICAL: return GSS_OMP_CRITICAL;
+ case GIMPLE_OMP_FOR: return GSS_OMP_FOR;
+ case GIMPLE_OMP_CONTINUE:
+ case GIMPLE_OMP_MASTER:
+ case GIMPLE_OMP_ORDERED:
+ case GIMPLE_OMP_RETURN:
+ case GIMPLE_OMP_SECTION:
return GSS_OMP;
- case GS_OMP_PARALLEL: return GSS_OMP_PARALLEL;
- case GS_OMP_SECTIONS: return GSS_OMP_SECTIONS;
- case GS_OMP_SINGLE: return GSS_OMP_SINGLE;
+ case GIMPLE_OMP_PARALLEL: return GSS_OMP_PARALLEL;
+ case GIMPLE_OMP_SECTIONS: return GSS_OMP_SECTIONS;
+ case GIMPLE_OMP_SINGLE: return GSS_OMP_SINGLE;
default:
gcc_unreachable ();
}
@@ -740,15 +740,15 @@ gimple_statement_structure (gimple gs)
/* Complain of a gimple type mismatch and die. */
void
-gs_check_failed (const gimple gs, const char *file, int line,
+gimple_check_failed (const gimple gs, const char *file, int line,
const char *function, unsigned int code,
unsigned int subcode)
{
internal_error ("gimple check: expected %s(%s), have %s(%s) in %s, at %s:%d",
- gs_code_name[code],
+ gimple_code_name[code],
tree_code_name[subcode],
- gs_code_name[GS_CODE (gs)],
- tree_code_name[GS_SUBCODE_FLAGS (gs)],
+ gimple_code_name[GIMPLE_CODE (gs)],
+ tree_code_name[GIMPLE_SUBCODE_FLAGS (gs)],
function, trim_filename (file), line);
}
#endif /* ENABLE_TREE_CHECKING */
@@ -757,40 +757,40 @@ gs_check_failed (const gimple gs, const
/* Push gimple statement GS into the front of sequence SEQ. */
void
-gs_push (gimple gs, gs_seq seq)
+gimple_push (gimple gs, gimple_seq seq)
{
- gimple oldfirst = gs_seq_first (seq);
+ gimple oldfirst = gimple_seq_first (seq);
- GS_NEXT (gs) = oldfirst;
+ GIMPLE_NEXT (gs) = oldfirst;
if (oldfirst)
- GS_PREV (oldfirst) = gs;
- gs_seq_set_first (seq, gs);
+ GIMPLE_PREV (oldfirst) = gs;
+ gimple_seq_set_first (seq, gs);
}
/* Link a gimple statement(s) to the end of the sequence SEQ. */
void
-gs_add (gs_seq seq, gimple gs)
+gimple_add (gimple_seq seq, gimple gs)
{
gimple last;
/* Make sure this stmt is not part of another chain. */
- gcc_assert (GS_PREV (gs) == NULL);
+ gcc_assert (GIMPLE_PREV (gs) == NULL);
- for (last = gs; GS_NEXT (last) != NULL; last = GS_NEXT (last))
+ for (last = gs; GIMPLE_NEXT (last) != NULL; last = GIMPLE_NEXT (last))
;
- if (gs_seq_first (seq) == NULL)
+ if (gimple_seq_first (seq) == NULL)
{
- gs_seq_set_first (seq, gs);
- gs_seq_set_last (seq, last);
+ gimple_seq_set_first (seq, gs);
+ gimple_seq_set_last (seq, last);
}
else
{
- GS_PREV (gs) = gs_seq_last (seq);
- GS_NEXT (gs_seq_last (seq)) = gs;
- gs_seq_set_last (seq, last);
+ GIMPLE_PREV (gs) = gimple_seq_last (seq);
+ GIMPLE_NEXT (gimple_seq_last (seq)) = gs;
+ gimple_seq_set_last (seq, last);
}
}
@@ -805,7 +805,7 @@ gs_add (gs_seq seq, gimple gs)
game. */
void
-walk_seq_ops (gs_seq seq, walk_tree_fn func, void *data,
+walk_seq_ops (gimple_seq seq, walk_tree_fn func, void *data,
struct pointer_set_t *pset)
{
gimple_stmt_iterator gsi;
@@ -826,128 +826,128 @@ walk_tuple_ops (gimple gs, walk_tree_fn
unsigned int i;
tree leaf;
- switch (GS_CODE (gs))
+ switch (GIMPLE_CODE (gs))
{
- case GS_ASM:
- for (i = 0; i < gs_asm_ninputs (gs); ++i)
- WALKIT (gs_asm_input_op (gs, i));
+ case GIMPLE_ASM:
+ for (i = 0; i < gimple_asm_ninputs (gs); ++i)
+ WALKIT (gimple_asm_input_op (gs, i));
- for (i = 0; i < gs_asm_noutputs (gs); ++i)
- WALKIT (gs_asm_output_op (gs, i));
+ for (i = 0; i < gimple_asm_noutputs (gs); ++i)
+ WALKIT (gimple_asm_output_op (gs, i));
- for (i = 0; i < gs_asm_nclobbered (gs); ++i)
- WALKIT (gs_asm_clobber_op (gs, i));
+ for (i = 0; i < gimple_asm_nclobbered (gs); ++i)
+ WALKIT (gimple_asm_clobber_op (gs, i));
break;
- case GS_ASSIGN:
- WALKIT (gs_assign_operand (gs, 0));
- WALKIT (gs_assign_operand (gs, 1));
+ case GIMPLE_ASSIGN:
+ WALKIT (gimple_assign_operand (gs, 0));
+ WALKIT (gimple_assign_operand (gs, 1));
- if (gss_for_assign (GS_SUBCODE_FLAGS (gs)) == GSS_ASSIGN_BINARY)
- WALKIT (gs_assign_operand (gs, 2));
+ if (gss_for_assign (GIMPLE_SUBCODE_FLAGS (gs)) == GSS_ASSIGN_BINARY)
+ WALKIT (gimple_assign_operand (gs, 2));
break;
- case GS_BIND:
- WALKIT (gs_bind_vars (gs));
- walk_seq_ops (gs_bind_body (gs), func, data, pset);
+ case GIMPLE_BIND:
+ WALKIT (gimple_bind_vars (gs));
+ walk_seq_ops (gimple_bind_body (gs), func, data, pset);
break;
- case GS_CALL:
- WALKIT (gs_call_lhs (gs));
- WALKIT (gs_call_fn (gs));
- WALKIT (gs_call_chain (gs));
- for (i = 0; i < gs_call_nargs (gs); ++i)
- WALKIT (gs_call_arg (gs, i));
+ case GIMPLE_CALL:
+ WALKIT (gimple_call_lhs (gs));
+ WALKIT (gimple_call_fn (gs));
+ WALKIT (gimple_call_chain (gs));
+ for (i = 0; i < gimple_call_nargs (gs); ++i)
+ WALKIT (gimple_call_arg (gs, i));
break;
- case GS_CATCH:
- WALKIT (gs_catch_types (gs));
- walk_tuple_ops (gs_catch_handler (gs), func, data, pset);
+ case GIMPLE_CATCH:
+ WALKIT (gimple_catch_types (gs));
+ walk_tuple_ops (gimple_catch_handler (gs), func, data, pset);
break;
- case GS_COND:
- WALKIT (gs_cond_lhs (gs));
- WALKIT (gs_cond_rhs (gs));
- WALKIT (gs_cond_true_label (gs));
- WALKIT (gs_cond_false_label (gs));
+ case GIMPLE_COND:
+ WALKIT (gimple_cond_lhs (gs));
+ WALKIT (gimple_cond_rhs (gs));
+ WALKIT (gimple_cond_true_label (gs));
+ WALKIT (gimple_cond_false_label (gs));
break;
- case GS_EH_FILTER:
- WALKIT (gs_eh_filter_types (gs));
- walk_tuple_ops (gs_eh_filter_failure (gs), func, data, pset);
+ case GIMPLE_EH_FILTER:
+ WALKIT (gimple_eh_filter_types (gs));
+ walk_tuple_ops (gimple_eh_filter_failure (gs), func, data, pset);
break;
- case GS_GOTO:
- WALKIT (gs_goto_dest (gs));
+ case GIMPLE_GOTO:
+ WALKIT (gimple_goto_dest (gs));
break;
- case GS_LABEL:
- WALKIT (gs_label_label (gs));
+ case GIMPLE_LABEL:
+ WALKIT (gimple_label_label (gs));
break;
- case GS_PHI:
- WALKIT (gs_phi_result (gs));
+ case GIMPLE_PHI:
+ WALKIT (gimple_phi_result (gs));
break;
- case GS_RETURN:
- WALKIT (gs_return_retval (gs));
+ case GIMPLE_RETURN:
+ WALKIT (gimple_return_retval (gs));
break;
- case GS_SWITCH:
- WALKIT (gs_switch_index (gs));
- for (i = 0; i < gs_switch_nlabels (gs); ++i)
- WALKIT (gs_switch_label (gs, i));
+ case GIMPLE_SWITCH:
+ WALKIT (gimple_switch_index (gs));
+ for (i = 0; i < gimple_switch_nlabels (gs); ++i)
+ WALKIT (gimple_switch_label (gs, i));
break;
- case GS_TRY:
- walk_seq_ops (gs_try_eval (gs), func, data, pset);
- walk_seq_ops (gs_try_cleanup (gs), func, data, pset);
+ case GIMPLE_TRY:
+ walk_seq_ops (gimple_try_eval (gs), func, data, pset);
+ walk_seq_ops (gimple_try_cleanup (gs), func, data, pset);
break;
- case GS_OMP_CRITICAL:
- walk_seq_ops (gs_omp_body (gs), func, data, pset);
- WALKIT (gs_omp_critical_name (gs));
+ case GIMPLE_OMP_CRITICAL:
+ walk_seq_ops (gimple_omp_body (gs), func, data, pset);
+ WALKIT (gimple_omp_critical_name (gs));
break;
/* Just a body. */
- case GS_OMP_CONTINUE:
- case GS_OMP_MASTER:
- case GS_OMP_ORDERED:
- case GS_OMP_SECTION:
- walk_seq_ops (gs_omp_body (gs), func, data, pset);
+ case GIMPLE_OMP_CONTINUE:
+ case GIMPLE_OMP_MASTER:
+ case GIMPLE_OMP_ORDERED:
+ case GIMPLE_OMP_SECTION:
+ walk_seq_ops (gimple_omp_body (gs), func, data, pset);
break;
- case GS_OMP_FOR:
- walk_seq_ops (gs_omp_body (gs), func, data, pset);
- WALKIT (gs_omp_for_clauses (gs));
- WALKIT (gs_omp_for_index (gs));
- WALKIT (gs_omp_for_initial (gs));
- WALKIT (gs_omp_for_final (gs));
- WALKIT (gs_omp_for_incr (gs));
- walk_seq_ops (gs_omp_for_pre_body (gs), func, data, pset);
+ case GIMPLE_OMP_FOR:
+ walk_seq_ops (gimple_omp_body (gs), func, data, pset);
+ WALKIT (gimple_omp_for_clauses (gs));
+ WALKIT (gimple_omp_for_index (gs));
+ WALKIT (gimple_omp_for_initial (gs));
+ WALKIT (gimple_omp_for_final (gs));
+ WALKIT (gimple_omp_for_incr (gs));
+ walk_seq_ops (gimple_omp_for_pre_body (gs), func, data, pset);
break;
- case GS_OMP_PARALLEL:
- walk_seq_ops (gs_omp_body (gs), func, data, pset);
- WALKIT (gs_omp_parallel_clauses (gs));
- WALKIT (gs_omp_parallel_child_fn (gs));
- WALKIT (gs_omp_parallel_data_arg (gs));
+ case GIMPLE_OMP_PARALLEL:
+ walk_seq_ops (gimple_omp_body (gs), func, data, pset);
+ WALKIT (gimple_omp_parallel_clauses (gs));
+ WALKIT (gimple_omp_parallel_child_fn (gs));
+ WALKIT (gimple_omp_parallel_data_arg (gs));
break;
- case GS_OMP_SECTIONS:
- walk_seq_ops (gs_omp_body (gs), func, data, pset);
- WALKIT (gs_omp_sections_clauses (gs));
+ case GIMPLE_OMP_SECTIONS:
+ walk_seq_ops (gimple_omp_body (gs), func, data, pset);
+ WALKIT (gimple_omp_sections_clauses (gs));
break;
- case GS_OMP_SINGLE:
- walk_seq_ops (gs_omp_body (gs), func, data, pset);
- WALKIT (gs_omp_single_clauses (gs));
+ case GIMPLE_OMP_SINGLE:
+ walk_seq_ops (gimple_omp_body (gs), func, data, pset);
+ WALKIT (gimple_omp_single_clauses (gs));
break;
/* Tuples that do not have trees. */
- case GS_NOP:
- case GS_RESX:
- case GS_OMP_RETURN:
+ case GIMPLE_NOP:
+ case GIMPLE_RESX:
+ case GIMPLE_OMP_RETURN:
break;
default:
@@ -961,7 +961,7 @@ walk_tuple_ops (gimple gs, walk_tree_fn
/* Set sequence SEQ to be the GIMPLE body for function FN. */
void
-set_gimple_body (tree fn, gs_seq seq)
+set_gimple_body (tree fn, gimple_seq seq)
{
void **slot;
@@ -975,13 +975,13 @@ set_gimple_body (tree fn, gs_seq seq)
/* Return the body of GIMPLE statements for function FN. */
-gs_seq
+gimple_seq
gimple_body (tree fn)
{
void **slot;
if (gimple_bodies && (slot = pointer_map_contains (gimple_bodies, fn)))
- return (gs_seq) *slot;
+ return (gimple_seq) *slot;
return NULL;
}
Index: gcc/gimple.h
===================================================================
--- gcc/gimple.h (revision 126694)
+++ gcc/gimple.h (working copy)
@@ -29,54 +29,54 @@ DEF_VEC_P(gimple);
DEF_VEC_ALLOC_P(gimple,heap);
DEF_VEC_ALLOC_P(gimple,gc);
-enum gs_code {
+enum gimple_code {
#define DEFGSCODE(SYM, STRING) SYM,
#include "gimple.def"
#undef DEFGSCODE
- LAST_AND_UNUSED_GS_CODE
+ LAST_AND_UNUSED_GIMPLE_CODE
};
-#define GS_CODE(G) ((G)->base.code)
-#define GS_SUBCODE_FLAGS(G) ((G)->base.subcode_flags)
-#define GS_NEXT(G) ((G)->base.next)
-#define GS_PREV(G) ((G)->base.prev)
-#define GS_LOCUS(G) ((G)->base.locus)
-#define GS_LOCUS_EMPTY_P(G) (GS_LOCUS ((G)).file == NULL \
- && GS_LOCUS ((G)).line == 0)
+#define GIMPLE_CODE(G) ((G)->base.code)
+#define GIMPLE_SUBCODE_FLAGS(G) ((G)->base.subcode_flags)
+#define GIMPLE_NEXT(G) ((G)->base.next)
+#define GIMPLE_PREV(G) ((G)->base.prev)
+#define GIMPLE_LOCUS(G) ((G)->base.locus)
+#define GIMPLE_LOCUS_EMPTY_P(G) (GIMPLE_LOCUS ((G)).file == NULL \
+ && GIMPLE_LOCUS ((G)).line == 0)
/* A sequence of gimple statements. */
-struct gs_sequence
+struct gimple_sequence
{
gimple first;
gimple last;
};
static inline gimple
-gs_seq_first (gs_seq s)
+gimple_seq_first (gimple_seq s)
{
return s->first;
}
static inline gimple
-gs_seq_last (gs_seq s)
+gimple_seq_last (gimple_seq s)
{
return s->last;
}
static inline void
-gs_seq_set_last (gs_seq s, gimple last)
+gimple_seq_set_last (gimple_seq s, gimple last)
{
s->last = last;
}
static inline void
-gs_seq_set_first (gs_seq s, gimple first)
+gimple_seq_set_first (gimple_seq s, gimple first)
{
s->first = first;
}
static inline void
-gs_seq_init (gs_seq s)
+gimple_seq_init (gimple_seq s)
{
s->first = NULL;
s->last = NULL;
@@ -85,14 +85,14 @@ gs_seq_init (gs_seq s)
/* Copy the sequence SRC into the sequence DEST. */
static inline void
-gs_seq_copy (gs_seq dest, gs_seq src)
+gimple_seq_copy (gimple_seq dest, gimple_seq src)
{
- gs_seq_set_first (dest, gs_seq_first (src));
- gs_seq_set_last (dest, gs_seq_last (src));
+ gimple_seq_set_first (dest, gimple_seq_first (src));
+ gimple_seq_set_last (dest, gimple_seq_last (src));
}
static inline bool
-gs_seq_empty_p (gs_seq s)
+gimple_seq_empty_p (gimple_seq s)
{
return s->first == NULL;
}
@@ -101,7 +101,7 @@ gs_seq_empty_p (gs_seq s)
struct gimple_statement_base GTY(())
{
- ENUM_BITFIELD(gs_code) code : 16;
+ ENUM_BITFIELD(gimple_code) code : 16;
unsigned int subcode_flags : 16;
gimple next;
gimple prev;
@@ -131,18 +131,18 @@ struct gimple_statement_with_memory_ops
struct gimple_statement_omp GTY(())
{
struct gimple_statement_base base;
- struct gs_sequence body;
+ struct gimple_sequence body;
};
-/* GS_BIND */
+/* GIMPLE_BIND */
struct gimple_statement_bind GTY(())
{
struct gimple_statement_base base;
tree vars;
- struct gs_sequence body;
+ struct gimple_sequence body;
};
-/* GS_CATCH */
+/* GIMPLE_CATCH */
struct gimple_statement_catch GTY(())
{
struct gimple_statement_base base;
@@ -150,7 +150,7 @@ struct gimple_statement_catch GTY(())
gimple handler;
};
-/* GS_EH_FILTER */
+/* GIMPLE_EH_FILTER */
struct gimple_statement_eh_filter GTY(())
{
struct gimple_statement_base base;
@@ -160,14 +160,14 @@ struct gimple_statement_eh_filter GTY(()
gimple failure;
};
-/* GS_LABEL */
+/* GIMPLE_LABEL */
struct gimple_statement_label GTY(())
{
struct gimple_statement_base base;
tree label;
};
-/* GS_PHI */
+/* GIMPLE_PHI */
struct gimple_statement_phi GTY(())
{
struct gimple_statement_base base;
@@ -177,7 +177,7 @@ struct gimple_statement_phi GTY(())
struct phi_arg_d GTY ((length ("%h.nargs"))) args[1];
};
-/* GS_RESX */
+/* GIMPLE_RESX */
struct gimple_statement_resx GTY(())
{
struct gimple_statement_base base;
@@ -185,21 +185,21 @@ struct gimple_statement_resx GTY(())
int region;
};
-/* GS_TRY */
+/* GIMPLE_TRY */
struct gimple_statement_try GTY(())
{
struct gimple_statement_base base;
/* Expression to evaluate. */
- struct gs_sequence eval;
+ struct gimple_sequence eval;
/* Cleanup expression. */
- struct gs_sequence cleanup;
+ struct gimple_sequence cleanup;
};
-/* Flags stored in GS_TRY's subcode flags. */
-#define GS_TRY_CATCH 1 << 0
-#define GS_TRY_FINALLY 1 << 1
+/* Flags stored in GIMPLE_TRY's subcode flags. */
+#define GIMPLE_TRY_CATCH 1 << 0
+#define GIMPLE_TRY_FINALLY 1 << 1
-/* GS_ASSIGN */
+/* GIMPLE_ASSIGN */
struct gimple_statement_assign_binary GTY(())
{
struct gimple_statement_with_ops with_ops;
@@ -218,7 +218,7 @@ struct gimple_statement_assign_unary_mem
tree op[2];
};
-/* GS_COND */
+/* GIMPLE_COND */
struct gimple_statement_cond GTY(())
{
struct gimple_statement_with_ops with_ops;
@@ -227,14 +227,14 @@ struct gimple_statement_cond GTY(())
tree label_false;
};
-/* GS_GOTO */
+/* GIMPLE_GOTO */
struct gimple_statement_goto GTY(())
{
struct gimple_statement_with_ops with_ops;
tree dest;
};
-/* GS_SWITCH */
+/* GIMPLE_SWITCH */
struct gimple_statement_switch GTY(())
{
struct gimple_statement_with_ops with_ops;
@@ -243,7 +243,7 @@ struct gimple_statement_switch GTY(())
tree GTY ((length ("%h.nlabels + 1"))) labels[1];
};
-/* GS_ASM */
+/* GIMPLE_ASM */
struct gimple_statement_asm GTY(())
{
struct gimple_statement_with_memory_ops with_mem_ops;
@@ -257,7 +257,7 @@ struct gimple_statement_asm GTY(())
tree GTY ((length ("%h.ni+%h.no+%h.nc"))) op[1];
};
-/* GS_CALL */
+/* GIMPLE_CALL */
struct gimple_statement_call GTY(())
{
struct gimple_statement_with_memory_ops with_mem_ops;
@@ -268,14 +268,14 @@ struct gimple_statement_call GTY(())
tree GTY ((length ("%h.nargs"))) args[1];
};
-/* GS_RETURN */
+/* GIMPLE_RETURN */
struct gimple_statement_return GTY(())
{
struct gimple_statement_with_memory_ops with_mem_ops;
tree retval;
};
-/* GS_OMP_CRITICAL */
+/* GIMPLE_OMP_CRITICAL */
struct gimple_statement_omp_critical GTY(())
{
struct gimple_statement_omp omp;
@@ -283,7 +283,7 @@ struct gimple_statement_omp_critical GTY
tree name;
};
-/* GS_OMP_FOR */
+/* GIMPLE_OMP_FOR */
struct gimple_statement_omp_for GTY(())
{
struct gimple_statement_omp omp;
@@ -297,16 +297,17 @@ struct gimple_statement_omp_for GTY(())
/* Increment. */
tree incr;
/* Pre-body evaluated before the loop body begins. */
- struct gs_sequence pre_body;
+ struct gimple_sequence pre_body;
};
/* Predicate for conds. */
-enum gs_cond {
- /* These must be in sync with op_gs_cond(). */
- GS_COND_LT, GS_COND_GT, GS_COND_LE, GS_COND_GE, GS_COND_EQ, GS_COND_NE
+enum gimple_cond {
+ /* These must be in sync with op_gimple_cond(). */
+ GIMPLE_COND_LT, GIMPLE_COND_GT, GIMPLE_COND_LE, GIMPLE_COND_GE,
+ GIMPLE_COND_EQ, GIMPLE_COND_NE
};
-/* GS_OMP_PARALLEL */
+/* GIMPLE_OMP_PARALLEL */
struct gimple_statement_omp_parallel GTY(())
{
struct gimple_statement_omp omp;
@@ -316,25 +317,25 @@ struct gimple_statement_omp_parallel GTY
tree data_arg;
};
-/* GS_OMP_SECTION */
+/* GIMPLE_OMP_SECTION */
/* Uses struct gimple_statement_omp. */
-/* GS_OMP_SECTIONS */
+/* GIMPLE_OMP_SECTIONS */
struct gimple_statement_omp_sections GTY(())
{
struct gimple_statement_omp omp;
tree clauses;
};
-/* GS_OMP_SINGLE */
+/* GIMPLE_OMP_SINGLE */
struct gimple_statement_omp_single GTY(())
{
struct gimple_statement_omp omp;
tree clauses;
};
-/* GS_OMP_RETURN */
-/* Flags stored in GS_OMP_RETURN's subcode flags.*/
+/* GIMPLE_OMP_RETURN */
+/* Flags stored in GIMPLE_OMP_RETURN's subcode flags.*/
#define OMP_RETURN_NOWAIT_FLAG 1 << 0
enum gimple_statement_structure_enum {
@@ -354,158 +355,170 @@ union gimple_statement_d GTY ((desc ("gi
gimple_statement_structure() since they're subsumed by the other
tuples. We only include the tags for completeness. */
struct gimple_statement_with_ops GTY ((tag ("GSS_WITH_OPS"))) with_ops;
- struct gimple_statement_with_memory_ops GTY ((tag ("GSS_WITH_MEM_OPS"))) with_mem_ops;
+ struct gimple_statement_with_memory_ops GTY ((tag ("GSS_WITH_MEM_OPS")))
+ with_mem_ops;
struct gimple_statement_omp GTY ((tag ("GSS_OMP"))) omp;
- struct gimple_statement_bind GTY ((tag ("GSS_BIND"))) gs_bind;
- struct gimple_statement_catch GTY ((tag ("GSS_CATCH"))) gs_catch;
- struct gimple_statement_eh_filter GTY ((tag ("GSS_EH_FILTER"))) gs_eh_filter;
- struct gimple_statement_label GTY ((tag ("GSS_LABEL"))) gs_label;
- struct gimple_statement_phi GTY ((tag ("GSS_PHI"))) gs_phi;
- struct gimple_statement_resx GTY ((tag ("GSS_RESX"))) gs_resx;
- struct gimple_statement_try GTY ((tag ("GSS_TRY"))) gs_try;
- struct gimple_statement_assign_binary GTY ((tag ("GSS_ASSIGN_BINARY"))) gs_assign_binary;
- struct gimple_statement_assign_unary_reg GTY ((tag ("GSS_ASSIGN_UNARY_REG"))) gs_assign_unary_reg;
- struct gimple_statement_assign_unary_mem GTY ((tag ("GSS_ASSIGN_UNARY_MEM"))) gs_assign_unary_mem;
- struct gimple_statement_cond GTY ((tag ("GSS_COND"))) gs_cond;
- struct gimple_statement_goto GTY ((tag ("GSS_GOTO"))) gs_goto;
- struct gimple_statement_switch GTY ((tag ("GSS_SWITCH"))) gs_switch;
- struct gimple_statement_asm GTY ((tag ("GSS_ASM"))) gs_asm;
- struct gimple_statement_call GTY ((tag ("GSS_CALL"))) gs_call;
- struct gimple_statement_return GTY ((tag ("GSS_RETURN"))) gs_return;
- struct gimple_statement_omp_critical GTY ((tag ("GSS_OMP_CRITICAL"))) gs_omp_critical;
- struct gimple_statement_omp_for GTY ((tag ("GSS_OMP_FOR"))) gs_omp_for;
- struct gimple_statement_omp_parallel GTY ((tag ("GSS_OMP_PARALLEL"))) gs_omp_parallel;
- struct gimple_statement_omp_sections GTY ((tag ("GSS_OMP_SECTIONS"))) gs_omp_sections;
- struct gimple_statement_omp_single GTY ((tag ("GSS_OMP_SINGLE"))) gs_omp_single;
+ struct gimple_statement_bind GTY ((tag ("GSS_BIND"))) gimple_bind;
+ struct gimple_statement_catch GTY ((tag ("GSS_CATCH"))) gimple_catch;
+ struct gimple_statement_eh_filter GTY ((tag ("GSS_EH_FILTER")))
+ gimple_eh_filter;
+ struct gimple_statement_label GTY ((tag ("GSS_LABEL"))) gimple_label;
+ struct gimple_statement_phi GTY ((tag ("GSS_PHI"))) gimple_phi;
+ struct gimple_statement_resx GTY ((tag ("GSS_RESX"))) gimple_resx;
+ struct gimple_statement_try GTY ((tag ("GSS_TRY"))) gimple_try;
+ struct gimple_statement_assign_binary GTY ((tag ("GSS_ASSIGN_BINARY")))
+ gimple_assign_binary;
+ struct gimple_statement_assign_unary_reg GTY ((tag ("GSS_ASSIGN_UNARY_REG")))
+ gimple_assign_unary_reg;
+ struct gimple_statement_assign_unary_mem GTY ((tag ("GSS_ASSIGN_UNARY_MEM")))
+ gimple_assign_unary_mem;
+ struct gimple_statement_cond GTY ((tag ("GSS_COND"))) gimple_cond;
+ struct gimple_statement_goto GTY ((tag ("GSS_GOTO"))) gimple_goto;
+ struct gimple_statement_switch GTY ((tag ("GSS_SWITCH"))) gimple_switch;
+ struct gimple_statement_asm GTY ((tag ("GSS_ASM"))) gimple_asm;
+ struct gimple_statement_call GTY ((tag ("GSS_CALL"))) gimple_call;
+ struct gimple_statement_return GTY ((tag ("GSS_RETURN"))) gimple_return;
+ struct gimple_statement_omp_critical GTY ((tag ("GSS_OMP_CRITICAL")))
+ gimple_omp_critical;
+ struct gimple_statement_omp_for GTY ((tag ("GSS_OMP_FOR"))) gimple_omp_for;
+ struct gimple_statement_omp_parallel GTY ((tag ("GSS_OMP_PARALLEL")))
+ gimple_omp_parallel;
+ struct gimple_statement_omp_sections GTY ((tag ("GSS_OMP_SECTIONS")))
+ gimple_omp_sections;
+ struct gimple_statement_omp_single GTY ((tag ("GSS_OMP_SINGLE")))
+ gimple_omp_single;
};
/* Prototypes. */
-extern gimple gs_build_return (bool, tree);
-extern gimple gs_build_assign (tree, tree);
-extern gimple gs_build_call_vec (tree, VEC(tree, gc) *);
-extern gimple gs_build_call (tree, size_t, ...);
-extern gimple gs_build_cond (enum gs_cond, tree, tree, tree, tree);
-extern void gs_cond_invert (gimple);
-extern gimple gs_build_label (tree label);
-extern gimple gs_build_goto (tree dest);
-extern gimple gs_build_nop (void);
-extern gimple gs_build_bind (tree, gs_seq);
-extern gimple gs_build_asm (const char *, unsigned, unsigned, unsigned, ...);
-extern gimple gs_build_catch (tree, gimple);
-extern gimple gs_build_eh_filter (tree, gimple);
-extern gimple gs_build_try (gs_seq, gs_seq, unsigned int);
-extern gimple gs_build_phi (unsigned, unsigned, tree, ...);
-extern gimple gs_build_resx (int);
-extern gimple gs_build_switch (unsigned int, tree, tree, ...);
-extern gimple gs_build_switch_vec (tree, tree, VEC(tree,heap) *);
-extern gimple gs_omp_build_parallel (gs_seq, tree, tree, tree);
-extern gimple gs_omp_build_for (gs_seq, tree, tree, tree, tree, tree, gs_seq,
- enum gs_cond);
-extern gimple gs_omp_build_critical (gs_seq, tree);
-extern gimple gs_omp_build_section (gs_seq);
-extern gimple gs_omp_build_continue (gs_seq);
-extern gimple gs_omp_build_master (gs_seq);
-extern gimple gs_omp_build_return (bool);
-extern gimple gs_omp_build_ordered (gs_seq);
-extern gimple gs_omp_build_sections (gs_seq, tree);
-extern gimple gs_omp_build_single (gs_seq, tree);
+extern gimple gimple_build_return (bool, tree);
+extern gimple gimple_build_assign (tree, tree);
+extern gimple gimple_build_call_vec (tree, VEC(tree, gc) *);
+extern gimple gimple_build_call (tree, size_t, ...);
+extern gimple gimple_build_cond (enum gimple_cond, tree, tree, tree, tree);
+extern void gimple_cond_invert (gimple);
+extern gimple gimple_build_label (tree label);
+extern gimple gimple_build_goto (tree dest);
+extern gimple gimple_build_nop (void);
+extern gimple gimple_build_bind (tree, gimple_seq);
+extern gimple gimple_build_asm (const char *, unsigned, unsigned, unsigned,
+ ...);
+extern gimple gimple_build_catch (tree, gimple);
+extern gimple gimple_build_eh_filter (tree, gimple);
+extern gimple gimple_build_try (gimple_seq, gimple_seq, unsigned int);
+extern gimple gimple_build_phi (unsigned, unsigned, tree, ...);
+extern gimple gimple_build_resx (int);
+extern gimple gimple_build_switch (unsigned int, tree, tree, ...);
+extern gimple gimple_build_switch_vec (tree, tree, VEC(tree,heap) *);
+extern gimple gimple_omp_build_parallel (gimple_seq, tree, tree, tree);
+extern gimple gimple_omp_build_for (gimple_seq, tree, tree, tree, tree, tree,
+ gimple_seq, enum gimple_cond);
+extern gimple gimple_omp_build_critical (gimple_seq, tree);
+extern gimple gimple_omp_build_section (gimple_seq);
+extern gimple gimple_omp_build_continue (gimple_seq);
+extern gimple gimple_omp_build_master (gimple_seq);
+extern gimple gimple_omp_build_return (bool);
+extern gimple gimple_omp_build_ordered (gimple_seq);
+extern gimple gimple_omp_build_sections (gimple_seq, tree);
+extern gimple gimple_omp_build_single (gimple_seq, tree);
extern enum gimple_statement_structure_enum gimple_statement_structure (gimple);
-extern void gs_add (gs_seq, gimple);
-extern void gs_push (gimple, gs_seq);
+extern void gimple_add (gimple_seq, gimple);
+extern void gimple_push (gimple, gimple_seq);
extern enum gimple_statement_structure_enum gss_for_assign (enum tree_code);
extern void sort_case_labels (VEC(tree,heap) *);
extern void walk_tuple_ops (gimple, walk_tree_fn, void *,
struct pointer_set_t *);
-extern void walk_seq_ops (gs_seq, walk_tree_fn, void *, struct pointer_set_t *);
-extern void set_gimple_body (tree, gs_seq);
-extern gs_seq gimple_body (tree);
+extern void walk_seq_ops (gimple_seq, walk_tree_fn, void *,
+ struct pointer_set_t *);
+extern void set_gimple_body (tree, gimple_seq);
+extern gimple_seq gimple_body (tree);
-extern const char *const gs_code_name[];
+extern const char *const gimple_code_name[];
/* Error out if a gimple tuple is addressed incorrectly. */
#if defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 2007)
-extern void gs_check_failed (const gimple, const char *, int, const char *, \
- unsigned int, unsigned int) ATTRIBUTE_NORETURN;
+extern void gimple_check_failed (const gimple, const char *, int, \
+ const char *, unsigned int, unsigned int) \
+ ATTRIBUTE_NORETURN; \
-#define GS_CHECK(GS, CODE) __extension__ \
+#define GIMPLE_CHECK(GS, CODE) __extension__ \
({ const gimple __gs = (GS); \
- if (GS_CODE (__gs) != (CODE)) \
- gs_check_failed (__gs, __FILE__, __LINE__, __FUNCTION__, \
+ if (GIMPLE_CODE (__gs) != (CODE)) \
+ gimple_check_failed (__gs, __FILE__, __LINE__, __FUNCTION__, \
(CODE), 0); \
__gs; })
-#define GS_CHECK2(GS, CODE1, CODE2) __extension__ \
+#define GIMPLE_CHECK2(GS, CODE1, CODE2) __extension__ \
({ const gimple __gs = (GS); \
- if (GS_CODE (__gs) != (CODE1) \
- || GS_SUBCODE_FLAGS (__gs) != (CODE2)) \
- gs_check_failed (__gs, __FILE__, __LINE__, __FUNCTION__, \
+ if (GIMPLE_CODE (__gs) != (CODE1) \
+ || GIMPLE_SUBCODE_FLAGS (__gs) != (CODE2)) \
+ gimple_check_failed (__gs, __FILE__, __LINE__, __FUNCTION__, \
(CODE1), (CODE2)); \
__gs; })
#else /* not ENABLE_TREE_CHECKING, or not gcc */
-#define GS_CHECK(GS, CODE) (GS)
-#define GS_CHECK2(GS, C1, C2) (GS)
+#define GIMPLE_CHECK(GS, CODE) (GS)
+#define GIMPLE_CHECK2(GS, C1, C2) (GS)
#endif
/* GIMPLE IR accessor functions. */
-/* GS_ASSIGN accessors. */
+/* GIMPLE_ASSIGN accessors. */
-/* Get an operand in a GS_ASSIGN.
+/* Get an operand in a GIMPLE_ASSIGN.
OPNO is the number of the operand to get.
- GS is a GS_ASSIGN statement. */
+ GS is a GIMPLE_ASSIGN statement. */
static inline tree
-gs_assign_operand (gimple gs, size_t opno)
+gimple_assign_operand (gimple gs, size_t opno)
{
enum gimple_statement_structure_enum gss;
- GS_CHECK (gs, GS_ASSIGN);
+ GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
gss = gimple_statement_structure (gs);
if (gss == GSS_ASSIGN_BINARY)
- return gs->gs_assign_binary.op[opno];
+ return gs->gimple_assign_binary.op[opno];
else if (gss == GSS_ASSIGN_UNARY_REG)
- return gs->gs_assign_unary_reg.op[opno];
+ return gs->gimple_assign_unary_reg.op[opno];
else if (gss == GSS_ASSIGN_UNARY_MEM)
- return gs->gs_assign_unary_mem.op[opno];
+ return gs->gimple_assign_unary_mem.op[opno];
gcc_unreachable ();
}
-/* Set an operand in a GS_ASSIGN.
+/* Set an operand in a GIMPLE_ASSIGN.
OPNO is the number of the operand to set.
- GS is a GS_ASSIGN statement.
+ GS is a GIMPLE_ASSIGN statement.
OP is the tree to set the operand to. */
static inline void
-gs_assign_set_operand (gimple gs, size_t opno, tree op)
+gimple_assign_set_operand (gimple gs, size_t opno, tree op)
{
enum gimple_statement_structure_enum gss;
- GS_CHECK (gs, GS_ASSIGN);
+ GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
gss = gimple_statement_structure (gs);
if (gss == GSS_ASSIGN_BINARY)
{
gcc_assert (opno <= 2);
- gs->gs_assign_binary.op[opno] = op;
+ gs->gimple_assign_binary.op[opno] = op;
return;
}
else if (gss == GSS_ASSIGN_UNARY_REG)
{
gcc_assert (opno <= 1);
- gs->gs_assign_unary_reg.op[opno] = op;
+ gs->gimple_assign_unary_reg.op[opno] = op;
return;
}
else if (gss == GSS_ASSIGN_UNARY_MEM)
{
gcc_assert (opno <= 1);
- gs->gs_assign_unary_mem.op[opno] = op;
+ gs->gimple_assign_unary_mem.op[opno] = op;
return;
}
@@ -513,835 +526,835 @@ gs_assign_set_operand (gimple gs, size_t
}
static inline tree
-gs_assign_lhs (gimple gs)
+gimple_assign_lhs (gimple gs)
{
- return gs_assign_operand (gs, 0);
+ return gimple_assign_operand (gs, 0);
}
static inline void
-gs_assign_set_lhs (gimple gs, tree lhs)
+gimple_assign_set_lhs (gimple gs, tree lhs)
{
- gs_assign_set_operand (gs, 0, lhs);
+ gimple_assign_set_operand (gs, 0, lhs);
}
static inline tree
-gs_assign_binary_rhs1 (gimple gs)
+gimple_assign_binary_rhs1 (gimple gs)
{
#if defined ENABLE_CHECKING
enum gimple_statement_structure_enum gss;
- gss = gss_for_assign (GS_SUBCODE_FLAGS (gs));
+ gss = gss_for_assign (GIMPLE_SUBCODE_FLAGS (gs));
gcc_assert (gss == GSS_ASSIGN_BINARY);
#endif
- return gs_assign_operand (gs, 1);
+ return gimple_assign_operand (gs, 1);
}
static inline void
-gs_assign_binary_set_rhs1 (gimple gs, tree rhs)
+gimple_assign_binary_set_rhs1 (gimple gs, tree rhs)
{
#if defined ENABLE_CHECKING
enum gimple_statement_structure_enum gss;
- gss = gss_for_assign (GS_SUBCODE_FLAGS (gs));
+ gss = gss_for_assign (GIMPLE_SUBCODE_FLAGS (gs));
gcc_assert (gss == GSS_ASSIGN_BINARY);
#endif
- gs_assign_set_operand (gs, 1, rhs);
+ gimple_assign_set_operand (gs, 1, rhs);
}
static inline tree
-gs_assign_binary_rhs2 (gimple gs)
+gimple_assign_binary_rhs2 (gimple gs)
{
#if defined ENABLE_CHECKING
enum gimple_statement_structure_enum gss;
- gss = gss_for_assign (GS_SUBCODE_FLAGS (gs));
+ gss = gss_for_assign (GIMPLE_SUBCODE_FLAGS (gs));
gcc_assert (gss == GSS_ASSIGN_BINARY);
#endif
- return gs_assign_operand (gs, 2);
+ return gimple_assign_operand (gs, 2);
}
static inline void
-gs_assign_binary_set_rhs2 (gimple gs, tree rhs)
+gimple_assign_binary_set_rhs2 (gimple gs, tree rhs)
{
#if defined ENABLE_CHECKING
enum gimple_statement_structure_enum gss;
- gss = gss_for_assign (GS_SUBCODE_FLAGS (gs));
+ gss = gss_for_assign (GIMPLE_SUBCODE_FLAGS (gs));
gcc_assert (gss == GSS_ASSIGN_BINARY);
#endif
- gs_assign_set_operand (gs, 2, rhs);
+ gimple_assign_set_operand (gs, 2, rhs);
}
static inline tree
-gs_assign_unary_rhs (gimple gs)
+gimple_assign_unary_rhs (gimple gs)
{
#if defined ENABLE_CHECKING
enum gimple_statement_structure_enum gss;
- gss = gss_for_assign (GS_SUBCODE_FLAGS (gs));
+ gss = gss_for_assign (GIMPLE_SUBCODE_FLAGS (gs));
gcc_assert (gss == GSS_ASSIGN_UNARY_REG || gss == GSS_ASSIGN_UNARY_MEM);
#endif
- return gs_assign_operand (gs, 1);
+ return gimple_assign_operand (gs, 1);
}
static inline void
-gs_assign_unary_set_rhs (gimple gs, tree rhs)
+gimple_assign_unary_set_rhs (gimple gs, tree rhs)
{
#if defined ENABLE_CHECKING
enum gimple_statement_structure_enum gss;
- gss = gss_for_assign (GS_SUBCODE_FLAGS (gs));
+ gss = gss_for_assign (GIMPLE_SUBCODE_FLAGS (gs));
gcc_assert (gss == GSS_ASSIGN_UNARY_REG || gss == GSS_ASSIGN_UNARY_MEM);
#endif
- gs_assign_set_operand (gs, 1, rhs);
+ gimple_assign_set_operand (gs, 1, rhs);
}
-/* GS_CALL accessors. */
+/* GIMPLE_CALL accessors. */
static inline tree
-gs_call_fn (gimple gs)
+gimple_call_fn (gimple gs)
{
- GS_CHECK (gs, GS_CALL);
- return gs->gs_call.fn;
+ GIMPLE_CHECK (gs, GIMPLE_CALL);
+ return gs->gimple_call.fn;
}
static inline tree
-gs_call_lhs (gimple gs)
+gimple_call_lhs (gimple gs)
{
- GS_CHECK (gs, GS_CALL);
- return gs->gs_call.lhs;
+ GIMPLE_CHECK (gs, GIMPLE_CALL);
+ return gs->gimple_call.lhs;
}
static inline void
-gs_call_set_lhs (gimple gs, tree lhs)
+gimple_call_set_lhs (gimple gs, tree lhs)
{
- GS_CHECK (gs, GS_CALL);
- gs->gs_call.lhs = lhs;
+ GIMPLE_CHECK (gs, GIMPLE_CALL);
+ gs->gimple_call.lhs = lhs;
}
static inline tree
-gs_call_chain (gimple gs)
+gimple_call_chain (gimple gs)
{
- GS_CHECK (gs, GS_CALL);
- return gs->gs_call.chain;
+ GIMPLE_CHECK (gs, GIMPLE_CALL);
+ return gs->gimple_call.chain;
}
static inline void
-gs_call_set_chain (gimple gs, tree chain)
+gimple_call_set_chain (gimple gs, tree chain)
{
- GS_CHECK (gs, GS_CALL);
- gs->gs_call.chain = chain;
+ GIMPLE_CHECK (gs, GIMPLE_CALL);
+ gs->gimple_call.chain = chain;
}
static inline unsigned long
-gs_call_nargs (gimple gs)
+gimple_call_nargs (gimple gs)
{
- GS_CHECK (gs, GS_CALL);
- return gs->gs_call.nargs;
+ GIMPLE_CHECK (gs, GIMPLE_CALL);
+ return gs->gimple_call.nargs;
}
static inline tree
-gs_call_arg (gimple gs, int index)
+gimple_call_arg (gimple gs, int index)
{
- GS_CHECK (gs, GS_CALL);
- return gs->gs_call.args[index];
+ GIMPLE_CHECK (gs, GIMPLE_CALL);
+ return gs->gimple_call.args[index];
}
static inline void
-gs_call_set_arg (gimple gs, int index, tree arg)
+gimple_call_set_arg (gimple gs, int index, tree arg)
{
- GS_CHECK (gs, GS_CALL);
- gs->gs_call.args[index] = arg;
+ GIMPLE_CHECK (gs, GIMPLE_CALL);
+ gs->gimple_call.args[index] = arg;
}
-/* GS_COND accessors. */
+/* GIMPLE_COND accessors. */
static inline tree
-gs_cond_lhs (gimple gs)
+gimple_cond_lhs (gimple gs)
{
- GS_CHECK (gs, GS_COND);
- return gs->gs_cond.op[0];
+ GIMPLE_CHECK (gs, GIMPLE_COND);
+ return gs->gimple_cond.op[0];
}
static inline void
-gs_cond_set_lhs (gimple gs, tree lhs)
+gimple_cond_set_lhs (gimple gs, tree lhs)
{
- GS_CHECK (gs, GS_COND);
- gs->gs_cond.op[0] = lhs;
+ GIMPLE_CHECK (gs, GIMPLE_COND);
+ gs->gimple_cond.op[0] = lhs;
}
static inline tree
-gs_cond_rhs (gimple gs)
+gimple_cond_rhs (gimple gs)
{
- GS_CHECK (gs, GS_COND);
- return gs->gs_cond.op[1];
+ GIMPLE_CHECK (gs, GIMPLE_COND);
+ return gs->gimple_cond.op[1];
}
static inline void
-gs_cond_set_rhs (gimple gs, tree rhs)
+gimple_cond_set_rhs (gimple gs, tree rhs)
{
- GS_CHECK (gs, GS_COND);
- gs->gs_cond.op[1] = rhs;
+ GIMPLE_CHECK (gs, GIMPLE_COND);
+ gs->gimple_cond.op[1] = rhs;
}
static inline tree
-gs_cond_true_label (gimple gs)
+gimple_cond_true_label (gimple gs)
{
- GS_CHECK (gs, GS_COND);
- return gs->gs_cond.label_true;
+ GIMPLE_CHECK (gs, GIMPLE_COND);
+ return gs->gimple_cond.label_true;
}
static inline void
-gs_cond_set_true_label (gimple gs, tree label)
+gimple_cond_set_true_label (gimple gs, tree label)
{
- GS_CHECK (gs, GS_COND);
- gs->gs_cond.label_true = label;
+ GIMPLE_CHECK (gs, GIMPLE_COND);
+ gs->gimple_cond.label_true = label;
}
static inline void
-gs_cond_set_false_label (gimple gs, tree label)
+gimple_cond_set_false_label (gimple gs, tree label)
{
- GS_CHECK (gs, GS_COND);
- gs->gs_cond.label_false = label;
+ GIMPLE_CHECK (gs, GIMPLE_COND);
+ gs->gimple_cond.label_false = label;
}
static inline tree
-gs_cond_false_label (gimple gs)
+gimple_cond_false_label (gimple gs)
{
- GS_CHECK (gs, GS_COND);
- return gs->gs_cond.label_false;
+ GIMPLE_CHECK (gs, GIMPLE_COND);
+ return gs->gimple_cond.label_false;
}
-/* GS_LABEL accessors. */
+/* GIMPLE_LABEL accessors. */
static inline tree
-gs_label_label (gimple gs)
+gimple_label_label (gimple gs)
{
- GS_CHECK (gs, GS_LABEL);
- return gs->gs_label.label;
+ GIMPLE_CHECK (gs, GIMPLE_LABEL);
+ return gs->gimple_label.label;
}
static inline void
-gs_label_set_label (gimple gs, tree label)
+gimple_label_set_label (gimple gs, tree label)
{
- GS_CHECK (gs, GS_LABEL);
- gs->gs_label.label = label;
+ GIMPLE_CHECK (gs, GIMPLE_LABEL);
+ gs->gimple_label.label = label;
}
-/* GS_GOTO accessors. */
+/* GIMPLE_GOTO accessors. */
static inline tree
-gs_goto_dest (gimple gs)
+gimple_goto_dest (gimple gs)
{
- GS_CHECK (gs, GS_GOTO);
- return gs->gs_goto.dest;
+ GIMPLE_CHECK (gs, GIMPLE_GOTO);
+ return gs->gimple_goto.dest;
}
static inline void
-gs_goto_set_dest (gimple gs, tree dest)
+gimple_goto_set_dest (gimple gs, tree dest)
{
- GS_CHECK (gs, GS_GOTO);
- gs->gs_goto.dest = dest;
+ GIMPLE_CHECK (gs, GIMPLE_GOTO);
+ gs->gimple_goto.dest = dest;
}
-/* GS_BIND accessors. */
+/* GIMPLE_BIND accessors. */
static inline tree
-gs_bind_vars (gimple gs)
+gimple_bind_vars (gimple gs)
{
- GS_CHECK (gs, GS_BIND);
- return gs->gs_bind.vars;
+ GIMPLE_CHECK (gs, GIMPLE_BIND);
+ return gs->gimple_bind.vars;
}
static inline void
-gs_bind_set_vars (gimple gs, tree vars)
+gimple_bind_set_vars (gimple gs, tree vars)
{
- GS_CHECK (gs, GS_BIND);
- gs->gs_bind.vars = vars;
+ GIMPLE_CHECK (gs, GIMPLE_BIND);
+ gs->gimple_bind.vars = vars;
}
-static inline gs_seq
-gs_bind_body (gimple gs) {
- GS_CHECK (gs, GS_BIND);
- return &(gs->gs_bind.body);
+static inline gimple_seq
+gimple_bind_body (gimple gs) {
+ GIMPLE_CHECK (gs, GIMPLE_BIND);
+ return &(gs->gimple_bind.body);
}
static inline void
-gs_bind_set_body (gimple gs, gs_seq seq)
+gimple_bind_set_body (gimple gs, gimple_seq seq)
{
- GS_CHECK (gs, GS_BIND);
- gs_seq_copy (&(gs->gs_bind.body), seq);
+ GIMPLE_CHECK (gs, GIMPLE_BIND);
+ gimple_seq_copy (&(gs->gimple_bind.body), seq);
}
-/* GS_ASM accessors. */
+/* GIMPLE_ASM accessors. */
static inline unsigned int
-gs_asm_ninputs (gimple gs)
+gimple_asm_ninputs (gimple gs)
{
- GS_CHECK (gs, GS_ASM);
- return gs->gs_asm.ni;
+ GIMPLE_CHECK (gs, GIMPLE_ASM);
+ return gs->gimple_asm.ni;
}
static inline void
-gs_asm_set_ninputs (gimple gs, unsigned ni)
+gimple_asm_set_ninputs (gimple gs, unsigned ni)
{
- GS_CHECK (gs, GS_ASM);
- gs->gs_asm.ni = ni;
+ GIMPLE_CHECK (gs, GIMPLE_ASM);
+ gs->gimple_asm.ni = ni;
}
static inline unsigned int
-gs_asm_noutputs (gimple gs)
+gimple_asm_noutputs (gimple gs)
{
- GS_CHECK (gs, GS_ASM);
- return gs->gs_asm.no;
+ GIMPLE_CHECK (gs, GIMPLE_ASM);
+ return gs->gimple_asm.no;
}
static inline void
-gs_asm_set_noutputs (gimple gs, unsigned no)
+gimple_asm_set_noutputs (gimple gs, unsigned no)
{
- GS_CHECK (gs, GS_ASM);
- gs->gs_asm.no = no;
+ GIMPLE_CHECK (gs, GIMPLE_ASM);
+ gs->gimple_asm.no = no;
}
static inline unsigned int
-gs_asm_nclobbered (gimple gs)
+gimple_asm_nclobbered (gimple gs)
{
- GS_CHECK (gs, GS_ASM);
- return gs->gs_asm.nc;
+ GIMPLE_CHECK (gs, GIMPLE_ASM);
+ return gs->gimple_asm.nc;
}
static inline void
-gs_asm_set_nclobbered (gimple gs, unsigned nc)
+gimple_asm_set_nclobbered (gimple gs, unsigned nc)
{
- GS_CHECK (gs, GS_ASM);
- gs->gs_asm.nc = nc;
+ GIMPLE_CHECK (gs, GIMPLE_ASM);
+ gs->gimple_asm.nc = nc;
}
static inline tree
-gs_asm_input_op (gimple gs, unsigned int index)
+gimple_asm_input_op (gimple gs, unsigned int index)
{
- GS_CHECK (gs, GS_ASM);
- gcc_assert (index <= gs->gs_asm.ni);
- return gs->gs_asm.op[index];
+ GIMPLE_CHECK (gs, GIMPLE_ASM);
+ gcc_assert (index <= gs->gimple_asm.ni);
+ return gs->gimple_asm.op[index];
}
static inline void
-gs_asm_set_input_op (gimple gs, unsigned int index, tree in_op)
+gimple_asm_set_input_op (gimple gs, unsigned int index, tree in_op)
{
- GS_CHECK (gs, GS_ASM);
- gcc_assert (index <= gs->gs_asm.ni);
- gs->gs_asm.op[index] = in_op;
+ GIMPLE_CHECK (gs, GIMPLE_ASM);
+ gcc_assert (index <= gs->gimple_asm.ni);
+ gs->gimple_asm.op[index] = in_op;
}
static inline tree
-gs_asm_output_op (gimple gs, unsigned int index)
+gimple_asm_output_op (gimple gs, unsigned int index)
{
- GS_CHECK (gs, GS_ASM);
- gcc_assert (index <= gs->gs_asm.no);
- return gs->gs_asm.op[index + gs->gs_asm.ni];
+ GIMPLE_CHECK (gs, GIMPLE_ASM);
+ gcc_assert (index <= gs->gimple_asm.no);
+ return gs->gimple_asm.op[index + gs->gimple_asm.ni];
}
static inline void
-gs_asm_set_output_op (gimple gs, unsigned int index, tree out_op)
+gimple_asm_set_output_op (gimple gs, unsigned int index, tree out_op)
{
- GS_CHECK (gs, GS_ASM);
- gcc_assert (index <= gs->gs_asm.no);
- gs->gs_asm.op[index + gs->gs_asm.ni] = out_op;
+ GIMPLE_CHECK (gs, GIMPLE_ASM);
+ gcc_assert (index <= gs->gimple_asm.no);
+ gs->gimple_asm.op[index + gs->gimple_asm.ni] = out_op;
}
static inline tree
-gs_asm_clobber_op (gimple gs, unsigned int index)
+gimple_asm_clobber_op (gimple gs, unsigned int index)
{
- GS_CHECK (gs, GS_ASM);
- gcc_assert (index <= gs->gs_asm.nc);
- return gs->gs_asm.op[index + gs->gs_asm.ni + gs->gs_asm.no];
+ GIMPLE_CHECK (gs, GIMPLE_ASM);
+ gcc_assert (index <= gs->gimple_asm.nc);
+ return gs->gimple_asm.op[index + gs->gimple_asm.ni + gs->gimple_asm.no];
}
static inline void
-gs_asm_set_clobber_op (gimple gs, unsigned int index, tree clobber_op)
+gimple_asm_set_clobber_op (gimple gs, unsigned int index, tree clobber_op)
{
- GS_CHECK (gs, GS_ASM);
- gcc_assert (index <= gs->gs_asm.nc);
- gs->gs_asm.op[index + gs->gs_asm.ni + gs->gs_asm.no] = clobber_op;
+ GIMPLE_CHECK (gs, GIMPLE_ASM);
+ gcc_assert (index <= gs->gimple_asm.nc);
+ gs->gimple_asm.op[index + gs->gimple_asm.ni + gs->gimple_asm.no] = clobber_op;
}
static inline const char *
-gs_asm_string (gimple gs)
+gimple_asm_string (gimple gs)
{
- GS_CHECK (gs, GS_ASM);
- return gs->gs_asm.string;
+ GIMPLE_CHECK (gs, GIMPLE_ASM);
+ return gs->gimple_asm.string;
}
static inline void
-gs_asm_set_string (gimple gs, const char* string)
+gimple_asm_set_string (gimple gs, const char* string)
{
- GS_CHECK (gs, GS_ASM);
- gs->gs_asm.string = string;
+ GIMPLE_CHECK (gs, GIMPLE_ASM);
+ gs->gimple_asm.string = string;
}
-/* GS_CATCH accessors. */
+/* GIMPLE_CATCH accessors. */
static inline tree
-gs_catch_types (gimple gs)
+gimple_catch_types (gimple gs)
{
- GS_CHECK (gs, GS_CATCH);
- return gs->gs_catch.types;
+ GIMPLE_CHECK (gs, GIMPLE_CATCH);
+ return gs->gimple_catch.types;
}
static inline gimple
-gs_catch_handler (gimple gs)
+gimple_catch_handler (gimple gs)
{
- GS_CHECK (gs, GS_CATCH);
- return gs->gs_catch.handler;
+ GIMPLE_CHECK (gs, GIMPLE_CATCH);
+ return gs->gimple_catch.handler;
}
static inline void
-gs_catch_set_types (gimple gs, tree t)
+gimple_catch_set_types (gimple gs, tree t)
{
- GS_CHECK (gs, GS_CATCH);
- gs->gs_catch.types = t;
+ GIMPLE_CHECK (gs, GIMPLE_CATCH);
+ gs->gimple_catch.types = t;
}
static inline void
-gs_catch_set_handler (gimple gs, gimple handler)
+gimple_catch_set_handler (gimple gs, gimple handler)
{
- GS_CHECK (gs, GS_CATCH);
- gs->gs_catch.handler = handler;
+ GIMPLE_CHECK (gs, GIMPLE_CATCH);
+ gs->gimple_catch.handler = handler;
}
-/* GS_EH_FILTER accessors. */
+/* GIMPLE_EH_FILTER accessors. */
static inline tree
-gs_eh_filter_types (gimple gs)
+gimple_eh_filter_types (gimple gs)
{
- GS_CHECK (gs, GS_EH_FILTER);
- return gs->gs_eh_filter.types;
+ GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
+ return gs->gimple_eh_filter.types;
}
static inline gimple
-gs_eh_filter_failure (gimple gs)
+gimple_eh_filter_failure (gimple gs)
{
- GS_CHECK (gs, GS_EH_FILTER);
- return gs->gs_eh_filter.failure;
+ GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
+ return gs->gimple_eh_filter.failure;
}
static inline void
-gs_eh_filter_set_types (gimple gs, tree types)
+gimple_eh_filter_set_types (gimple gs, tree types)
{
- GS_CHECK (gs, GS_EH_FILTER);
- gs->gs_eh_filter.types = types;
+ GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
+ gs->gimple_eh_filter.types = types;
}
static inline void
-gs_eh_filter_set_failure (gimple gs, gimple failure)
+gimple_eh_filter_set_failure (gimple gs, gimple failure)
{
- GS_CHECK (gs, GS_EH_FILTER);
- gs->gs_eh_filter.failure = failure;
+ GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
+ gs->gimple_eh_filter.failure = failure;
}
-/* GS_TRY accessors. */
+/* GIMPLE_TRY accessors. */
-static inline gs_seq
-gs_try_eval (gimple gs)
+static inline gimple_seq
+gimple_try_eval (gimple gs)
{
- GS_CHECK (gs, GS_TRY);
- return &gs->gs_try.eval;
+ GIMPLE_CHECK (gs, GIMPLE_TRY);
+ return &gs->gimple_try.eval;
}
-static inline gs_seq
-gs_try_cleanup (gimple gs)
+static inline gimple_seq
+gimple_try_cleanup (gimple gs)
{
- GS_CHECK (gs, GS_TRY);
- return &gs->gs_try.cleanup;
+ GIMPLE_CHECK (gs, GIMPLE_TRY);
+ return &gs->gimple_try.cleanup;
}
static inline void
-gs_try_set_eval (gimple gs, gs_seq eval)
+gimple_try_set_eval (gimple gs, gimple_seq eval)
{
- GS_CHECK (gs, GS_TRY);
- gs_seq_copy (gs_try_eval (gs), eval);
+ GIMPLE_CHECK (gs, GIMPLE_TRY);
+ gimple_seq_copy (gimple_try_eval (gs), eval);
}
static inline void
-gs_try_set_cleanup (gimple gs, gs_seq cleanup)
+gimple_try_set_cleanup (gimple gs, gimple_seq cleanup)
{
- GS_CHECK (gs, GS_TRY);
- gs_seq_copy (gs_try_cleanup (gs), cleanup);
+ GIMPLE_CHECK (gs, GIMPLE_TRY);
+ gimple_seq_copy (gimple_try_cleanup (gs), cleanup);
}
-/* GS_PHI accessors. */
+/* GIMPLE_PHI accessors. */
static inline unsigned int
-gs_phi_capacity (gimple gs)
+gimple_phi_capacity (gimple gs)
{
- GS_CHECK (gs, GS_PHI);
- return gs->gs_phi.capacity;
+ GIMPLE_CHECK (gs, GIMPLE_PHI);
+ return gs->gimple_phi.capacity;
}
static inline void
-gs_phi_set_capacity (gimple gs, unsigned int capacity)
+gimple_phi_set_capacity (gimple gs, unsigned int capacity)
{
- GS_CHECK (gs, GS_PHI);
- gs->gs_phi.capacity = capacity;
+ GIMPLE_CHECK (gs, GIMPLE_PHI);
+ gs->gimple_phi.capacity = capacity;
}
static inline unsigned int
-gs_phi_nargs (gimple gs)
+gimple_phi_nargs (gimple gs)
{
- GS_CHECK (gs, GS_PHI);
- return gs->gs_phi.nargs;
+ GIMPLE_CHECK (gs, GIMPLE_PHI);
+ return gs->gimple_phi.nargs;
}
static inline void
-gs_phi_set_nargs (gimple gs, unsigned int nargs)
+gimple_phi_set_nargs (gimple gs, unsigned int nargs)
{
- GS_CHECK (gs, GS_PHI);
- gs->gs_phi.nargs = nargs;
+ GIMPLE_CHECK (gs, GIMPLE_PHI);
+ gs->gimple_phi.nargs = nargs;
}
static inline tree
-gs_phi_result (gimple gs)
+gimple_phi_result (gimple gs)
{
- GS_CHECK (gs, GS_PHI);
- return gs->gs_phi.result;
+ GIMPLE_CHECK (gs, GIMPLE_PHI);
+ return gs->gimple_phi.result;
}
static inline void
-gs_phi_set_result (gimple gs, tree result)
+gimple_phi_set_result (gimple gs, tree result)
{
- GS_CHECK (gs, GS_PHI);
- gs->gs_phi.result = result;
+ GIMPLE_CHECK (gs, GIMPLE_PHI);
+ gs->gimple_phi.result = result;
}
static inline struct phi_arg_d *
-gs_phi_arg (gimple gs, unsigned int index)
+gimple_phi_arg (gimple gs, unsigned int index)
{
- GS_CHECK (gs, GS_PHI);
- gcc_assert (index <= gs->gs_phi.nargs);
- return &(gs->gs_phi.args[index]);
+ GIMPLE_CHECK (gs, GIMPLE_PHI);
+ gcc_assert (index <= gs->gimple_phi.nargs);
+ return &(gs->gimple_phi.args[index]);
}
static inline void
-gs_phi_set_arg (gimple gs, unsigned int index, struct phi_arg_d * phiarg)
+gimple_phi_set_arg (gimple gs, unsigned int index, struct phi_arg_d * phiarg)
{
- GS_CHECK (gs, GS_PHI);
- gcc_assert (index <= gs->gs_phi.nargs);
- memcpy (gs->gs_phi.args + index, phiarg, sizeof (struct phi_arg_d));
+ GIMPLE_CHECK (gs, GIMPLE_PHI);
+ gcc_assert (index <= gs->gimple_phi.nargs);
+ memcpy (gs->gimple_phi.args + index, phiarg, sizeof (struct phi_arg_d));
}
-/* GS_RESX accessors. */
+/* GIMPLE_RESX accessors. */
static inline int
-gs_resx_region (gimple gs)
+gimple_resx_region (gimple gs)
{
- GS_CHECK (gs, GS_RESX);
- return gs->gs_resx.region;
+ GIMPLE_CHECK (gs, GIMPLE_RESX);
+ return gs->gimple_resx.region;
}
static inline void
-gs_resx_set_region (gimple gs, int region)
+gimple_resx_set_region (gimple gs, int region)
{
- GS_CHECK (gs, GS_RESX);
- gs->gs_resx.region = region;
+ GIMPLE_CHECK (gs, GIMPLE_RESX);
+ gs->gimple_resx.region = region;
}
-/* GS_SWITCH accessors. */
+/* GIMPLE_SWITCH accessors. */
static inline unsigned int
-gs_switch_nlabels (gimple gs)
+gimple_switch_nlabels (gimple gs)
{
- GS_CHECK (gs, GS_SWITCH);
- return gs->gs_switch.nlabels;
+ GIMPLE_CHECK (gs, GIMPLE_SWITCH);
+ return gs->gimple_switch.nlabels;
}
static inline void
-gs_switch_set_nlabels (gimple gs, unsigned int nlabels)
+gimple_switch_set_nlabels (gimple gs, unsigned int nlabels)
{
- GS_CHECK (gs, GS_SWITCH);
- gs->gs_switch.nlabels = nlabels;
+ GIMPLE_CHECK (gs, GIMPLE_SWITCH);
+ gs->gimple_switch.nlabels = nlabels;
}
static inline tree
-gs_switch_index (gimple gs)
+gimple_switch_index (gimple gs)
{
- GS_CHECK (gs, GS_SWITCH);
- return gs->gs_switch.index;
+ GIMPLE_CHECK (gs, GIMPLE_SWITCH);
+ return gs->gimple_switch.index;
}
static inline void
-gs_switch_set_index (gimple gs, tree index)
+gimple_switch_set_index (gimple gs, tree index)
{
- GS_CHECK (gs, GS_SWITCH);
- gs->gs_switch.index = index;
+ GIMPLE_CHECK (gs, GIMPLE_SWITCH);
+ gs->gimple_switch.index = index;
}
static inline tree
-gs_switch_default_label (gimple gs)
+gimple_switch_default_label (gimple gs)
{
- GS_CHECK (gs, GS_SWITCH);
- return gs->gs_switch.labels[0];
+ GIMPLE_CHECK (gs, GIMPLE_SWITCH);
+ return gs->gimple_switch.labels[0];
}
static inline void
-gs_switch_set_default_label (gimple gs, tree label)
+gimple_switch_set_default_label (gimple gs, tree label)
{
- GS_CHECK (gs, GS_SWITCH);
- gs->gs_switch.labels[0] = label;
+ GIMPLE_CHECK (gs, GIMPLE_SWITCH);
+ gs->gimple_switch.labels[0] = label;
}
/* Return the label numbered INDEX. The default label is 0, followed by any
labels in a switch statement. */
static inline tree
-gs_switch_label (gimple gs, int index)
+gimple_switch_label (gimple gs, int index)
{
- GS_CHECK (gs, GS_SWITCH);
- gcc_assert ((unsigned)index <= gs->gs_switch.nlabels);
- return gs->gs_switch.labels[index];
+ GIMPLE_CHECK (gs, GIMPLE_SWITCH);
+ gcc_assert ((unsigned)index <= gs->gimple_switch.nlabels);
+ return gs->gimple_switch.labels[index];
}
/* Set the label number INDEX to LABEL. 0 is always the default label. */
static inline void
-gs_switch_set_label (gimple gs, int index, tree label)
+gimple_switch_set_label (gimple gs, int index, tree label)
{
- GS_CHECK (gs, GS_SWITCH);
- gcc_assert ((unsigned)index <= gs->gs_switch.nlabels);
- gs->gs_switch.labels[index] = label;
+ GIMPLE_CHECK (gs, GIMPLE_SWITCH);
+ gcc_assert ((unsigned)index <= gs->gimple_switch.nlabels);
+ gs->gimple_switch.labels[index] = label;
}
-/* GS_OMP_* accessors. */
+/* GIMPLE_OMP_* accessors. */
-static inline gs_seq
-gs_omp_body (gimple gs)
+static inline gimple_seq
+gimple_omp_body (gimple gs)
{
return &(gs->omp.body);
}
static inline void
-gs_omp_set_body (gimple gs, gs_seq body)
+gimple_omp_set_body (gimple gs, gimple_seq body)
{
- gs_seq_copy (&(gs->omp.body), body);
+ gimple_seq_copy (&(gs->omp.body), body);
}
-/* GS_OMP_CRITICAL accessors. */
+/* GIMPLE_OMP_CRITICAL accessors. */
static inline tree
-gs_omp_critical_name (gimple gs)
+gimple_omp_critical_name (gimple gs)
{
- GS_CHECK (gs, GS_OMP_CRITICAL);
- return gs->gs_omp_critical.name;
+ GIMPLE_CHECK (gs, GIMPLE_OMP_CRITICAL);
+ return gs->gimple_omp_critical.name;
}
static inline void
-gs_omp_critical_set_name (gimple gs, tree name)
+gimple_omp_critical_set_name (gimple gs, tree name)
{
- GS_CHECK (gs, GS_OMP_CRITICAL);
- gs->gs_omp_critical.name = name;
+ GIMPLE_CHECK (gs, GIMPLE_OMP_CRITICAL);
+ gs->gimple_omp_critical.name = name;
}
-/* GS_OMP_FOR accessors. */
+/* GIMPLE_OMP_FOR accessors. */
static inline tree
-gs_omp_for_clauses (gimple gs)
+gimple_omp_for_clauses (gimple gs)
{
- GS_CHECK (gs, GS_OMP_FOR);
- return gs->gs_omp_for.clauses;
+ GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
+ return gs->gimple_omp_for.clauses;
}
static inline void
-gs_omp_for_set_clauses (gimple gs, tree clauses)
+gimple_omp_for_set_clauses (gimple gs, tree clauses)
{
- GS_CHECK (gs, GS_OMP_FOR);
- gs->gs_omp_for.clauses = clauses;
+ GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
+ gs->gimple_omp_for.clauses = clauses;
}
static inline tree
-gs_omp_for_index (gimple gs)
+gimple_omp_for_index (gimple gs)
{
- GS_CHECK (gs, GS_OMP_FOR);
- return gs->gs_omp_for.index;
+ GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
+ return gs->gimple_omp_for.index;
}
static inline void
-gs_omp_for_set_index (gimple gs, tree index)
+gimple_omp_for_set_index (gimple gs, tree index)
{
- GS_CHECK (gs, GS_OMP_FOR);
- gs->gs_omp_for.index = index;
+ GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
+ gs->gimple_omp_for.index = index;
}
static inline tree
-gs_omp_for_initial (gimple gs)
+gimple_omp_for_initial (gimple gs)
{
- GS_CHECK (gs, GS_OMP_FOR);
- return gs->gs_omp_for.initial;
+ GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
+ return gs->gimple_omp_for.initial;
}
static inline void
-gs_omp_for_set_initial (gimple gs, tree initial)
+gimple_omp_for_set_initial (gimple gs, tree initial)
{
- GS_CHECK (gs, GS_OMP_FOR);
- gs->gs_omp_for.initial = initial;
+ GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
+ gs->gimple_omp_for.initial = initial;
}
static inline tree
-gs_omp_for_final (gimple gs)
+gimple_omp_for_final (gimple gs)
{
- GS_CHECK (gs, GS_OMP_FOR);
- return gs->gs_omp_for.final;
+ GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
+ return gs->gimple_omp_for.final;
}
static inline void
-gs_omp_for_set_final (gimple gs, tree final)
+gimple_omp_for_set_final (gimple gs, tree final)
{
- GS_CHECK (gs, GS_OMP_FOR);
- gs->gs_omp_for.final = final;
+ GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
+ gs->gimple_omp_for.final = final;
}
static inline tree
-gs_omp_for_incr (gimple gs)
+gimple_omp_for_incr (gimple gs)
{
- GS_CHECK (gs, GS_OMP_FOR);
- return gs->gs_omp_for.incr;
+ GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
+ return gs->gimple_omp_for.incr;
}
static inline void
-gs_omp_for_set_incr (gimple gs, tree incr)
+gimple_omp_for_set_incr (gimple gs, tree incr)
{
- GS_CHECK (gs, GS_OMP_FOR);
- gs->gs_omp_for.incr = incr;
+ GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
+ gs->gimple_omp_for.incr = incr;
}
-static inline gs_seq
-gs_omp_for_pre_body (gimple gs)
+static inline gimple_seq
+gimple_omp_for_pre_body (gimple gs)
{
- GS_CHECK (gs, GS_OMP_FOR);
- return &(gs->gs_omp_for.pre_body);
+ GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
+ return &(gs->gimple_omp_for.pre_body);
}
static inline void
-gs_omp_for_set_pre_body (gimple gs, gs_seq pre_body)
+gimple_omp_for_set_pre_body (gimple gs, gimple_seq pre_body)
{
- GS_CHECK (gs, GS_OMP_FOR);
- gs_seq_copy (&(gs->gs_omp_for.pre_body), pre_body);
+ GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
+ gimple_seq_copy (&(gs->gimple_omp_for.pre_body), pre_body);
}
-/* GS_OMP_PARALLEL accessors. */
+/* GIMPLE_OMP_PARALLEL accessors. */
static inline tree
-gs_omp_parallel_clauses (gimple gs)
+gimple_omp_parallel_clauses (gimple gs)
{
- GS_CHECK (gs, GS_OMP_PARALLEL);
- return gs->gs_omp_parallel.clauses;
+ GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
+ return gs->gimple_omp_parallel.clauses;
}
static inline void
-gs_omp_parallel_set_clauses (gimple gs, tree clauses)
+gimple_omp_parallel_set_clauses (gimple gs, tree clauses)
{
- GS_CHECK (gs, GS_OMP_PARALLEL);
- gs->gs_omp_parallel.clauses = clauses;
+ GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
+ gs->gimple_omp_parallel.clauses = clauses;
}
static inline tree
-gs_omp_parallel_child_fn (gimple gs)
+gimple_omp_parallel_child_fn (gimple gs)
{
- GS_CHECK (gs, GS_OMP_PARALLEL);
- return gs->gs_omp_parallel.child_fn;
+ GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
+ return gs->gimple_omp_parallel.child_fn;
}
static inline void
-gs_omp_parallel_set_child_fn (gimple gs, tree child_fn)
+gimple_omp_parallel_set_child_fn (gimple gs, tree child_fn)
{
- GS_CHECK (gs, GS_OMP_PARALLEL);
- gs->gs_omp_parallel.child_fn = child_fn;
+ GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
+ gs->gimple_omp_parallel.child_fn = child_fn;
}
static inline tree
-gs_omp_parallel_data_arg (gimple gs)
+gimple_omp_parallel_data_arg (gimple gs)
{
- GS_CHECK (gs, GS_OMP_PARALLEL);
- return gs->gs_omp_parallel.data_arg;
+ GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
+ return gs->gimple_omp_parallel.data_arg;
}
static inline void
-gs_omp_parallel_set_data_arg (gimple gs, tree data_arg)
+gimple_omp_parallel_set_data_arg (gimple gs, tree data_arg)
{
- GS_CHECK (gs, GS_OMP_PARALLEL);
- gs->gs_omp_parallel.data_arg = data_arg;
+ GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
+ gs->gimple_omp_parallel.data_arg = data_arg;
}
-/* GS_OMP_SECTION accessors. */
+/* GIMPLE_OMP_SECTION accessors. */
-/* GS_OMP_SINGLE accessors. */
+/* GIMPLE_OMP_SINGLE accessors. */
static inline tree
-gs_omp_single_clauses (gimple gs)
+gimple_omp_single_clauses (gimple gs)
{
- GS_CHECK (gs, GS_OMP_SINGLE);
- return gs->gs_omp_single.clauses;
+ GIMPLE_CHECK (gs, GIMPLE_OMP_SINGLE);
+ return gs->gimple_omp_single.clauses;
}
static inline void
-gs_omp_single_set_clauses (gimple gs, tree clauses)
+gimple_omp_single_set_clauses (gimple gs, tree clauses)
{
- GS_CHECK (gs, GS_OMP_SINGLE);
- gs->gs_omp_single.clauses = clauses;
+ GIMPLE_CHECK (gs, GIMPLE_OMP_SINGLE);
+ gs->gimple_omp_single.clauses = clauses;
}
static inline tree
-gs_omp_sections_clauses (gimple gs)
+gimple_omp_sections_clauses (gimple gs)
{
- GS_CHECK (gs, GS_OMP_SECTIONS);
- return gs->gs_omp_sections.clauses;
+ GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
+ return gs->gimple_omp_sections.clauses;
}
static inline void
-gs_omp_sections_set_clauses (gimple gs, tree clauses)
+gimple_omp_sections_set_clauses (gimple gs, tree clauses)
{
- GS_CHECK (gs, GS_OMP_SECTIONS);
- gs->gs_omp_sections.clauses = clauses;
+ GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
+ gs->gimple_omp_sections.clauses = clauses;
}
/* get or set the OMP_FOR_COND stored in the subcode flags */
static inline void
-gs_assign_omp_for_cond (gimple gs, enum gs_cond cond)
+gimple_assign_omp_for_cond (gimple gs, enum gimple_cond cond)
{
- GS_CHECK (gs, GS_OMP_FOR);
- GS_SUBCODE_FLAGS (gs) = cond;
+ GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
+ GIMPLE_SUBCODE_FLAGS (gs) = cond;
}
-static inline enum gs_cond
-gs_omp_for_cond (gimple gs)
+static inline enum gimple_cond
+gimple_omp_for_cond (gimple gs)
{
- GS_CHECK (gs, GS_OMP_FOR);
- return (enum gs_cond) GS_SUBCODE_FLAGS (gs);
+ GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
+ return (enum gimple_cond) GIMPLE_SUBCODE_FLAGS (gs);
}
-/* GS_RETURN accessors. */
+/* GIMPLE_RETURN accessors. */
static inline tree
-gs_return_retval (gimple gs)
+gimple_return_retval (gimple gs)
{
- GS_CHECK (gs, GS_RETURN);
- return gs->gs_return.retval;
+ GIMPLE_CHECK (gs, GIMPLE_RETURN);
+ return gs->gimple_return.retval;
}
static inline void
-gs_return_set_retval (gimple gs, tree retval)
+gimple_return_set_retval (gimple gs, tree retval)
{
- GS_CHECK (gs, GS_RETURN);
- gs->gs_return.retval = retval;
+ GIMPLE_CHECK (gs, GIMPLE_RETURN);
+ gs->gimple_return.retval = retval;
}
/* Append sequence SRC to the end of sequence DST. */
static inline void
-gs_seq_append (gs_seq dst, gs_seq src)
+gimple_seq_append (gimple_seq dst, gimple_seq src)
{
- if (!gs_seq_empty_p (src))
- gs_add (dst, gs_seq_first (src));
+ if (!gimple_seq_empty_p (src))
+ gimple_add (dst, gimple_seq_first (src));
}
static inline void
-gs_add_subcode_flag (gimple g, unsigned int flag)
+gimple_add_subcode_flag (gimple g, unsigned int flag)
{
- GS_SUBCODE_FLAGS (g) |= flag;
+ GIMPLE_SUBCODE_FLAGS (g) |= flag;
}
#include "gimple-iterator.h"
Index: gcc/config/i386/i386.c
===================================================================
--- gcc/config/i386/i386.c (revision 126694)
+++ gcc/config/i386/i386.c (working copy)
@@ -4753,7 +4753,7 @@ ix86_va_start (tree valist, rtx nextarg)
/* Implement va_arg. */
static tree
-ix86_gimplify_va_arg (tree valist, tree type, gs_seq pre_p, gs_seq post_p)
+ix86_gimplify_va_arg (tree valist, tree type, gimple_seq pre_p, gimple_seq post_p)
{
static const int intreg[6] = { 0, 1, 2, 3, 4, 5 };
tree f_gpr, f_fpr, f_ovf, f_sav;
Index: gcc/langhooks-def.h
===================================================================
--- gcc/langhooks-def.h (revision 126694)
+++ gcc/langhooks-def.h (working copy)
@@ -79,7 +79,7 @@ extern tree lhd_callgraph_analyze_expr (
/* Declarations for tree gimplification hooks. */
-extern int lhd_gimplify_expr (tree *, gs_seq, gs_seq);
+extern int lhd_gimplify_expr (tree *, gimple_seq, gimple_seq);
extern enum omp_clause_default_kind lhd_omp_predetermined_sharing (tree);
extern tree lhd_omp_assignment (tree, tree, tree);
struct gimplify_omp_ctx;