This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
tuples: misc fixes
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 25 Apr 2007 10:45:18 -0400
- Subject: tuples: misc fixes
This fixes a few typos, adds some Makefile dependencies, and adds
the GS_SEQ_EMPTY_P macro.
Committed to branch.
* gimple-ir.h (GS_SEQ_EMPTY_P): New.
Move gs_build_return, gs_add, and gimple_statement_structure
prototypes.
(gs_assign_operand): Fix typos in gss.
Include gimple-iterator.h.
* Makefile.in (GIMPLE_IR_H): Add gimple-iterator.h.
(TREE_GIMPLE_H): Same.
Index: gimple-ir.h
===================================================================
--- gimple-ir.h (revision 124091)
+++ gimple-ir.h (working copy)
@@ -39,6 +39,7 @@ enum gs_code {
#define GS_SEQ_FIRST(S) (S)->first
#define GS_SEQ_LAST(S) (S)->last
#define GS_SEQ_INIT {0, 0}
+#define GS_SEQ_EMPTY_P(S) (!GS_SEQ_FIRST ((S)))
struct gs_sequence
{
gimple first;
@@ -317,6 +318,10 @@ union gimple_statement_d GTY ((desc ("gi
struct gimple_statement_omp_single GTY ((tag ("GSS_OMP_SINGLE"))) gs_omp_single;
};
+extern gimple gs_build_return (bool, tree);
+extern enum gimple_statement_structure_enum gimple_statement_structure (gimple);
+extern void gs_add (gimple, gs_seq);
+
/* Error out if a gimple tuple is addressed incorrectly. */
#if defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 2007)
@@ -348,7 +353,7 @@ extern void gs_check_failed (const gimpl
static inline tree
gs_assign_operand (gimple gs, int opno)
{
- enum gimple_statement_structure gss;
+ enum gimple_statement_structure_enum gss;
GS_CHECK (gs, GS_ASSIGN);
@@ -356,9 +361,9 @@ gs_assign_operand (gimple gs, int opno)
if (gss == GSS_ASSIGN_BINARY)
return gs->gs_assign_binary.op[opno];
else if (gss == GSS_ASSIGN_UNARY_REG)
- return gs->gs_assign_unary_reg[opno];
+ return gs->gs_assign_unary_reg.op[opno];
else if (gss == GSS_ASSIGN_UNARY_MEM)
- return gs->gs_assign_unary_mem[opno];
+ return gs->gs_assign_unary_mem.op[opno];
gcc_unreachable ();
return NULL;
@@ -385,8 +390,6 @@ gs_return_operand_retval (gimple gs)
#define GS_RETURN_OPERAND_RETVAL(G) (*gs_return_operand_retval ((G)))
+#include "gimple-iterator.h"
+
#endif /* GCC_GIMPLE_IR_H */
-
-extern gimple gs_build_return (bool, tree);
-extern enum gimple_statement_structure_enum gimple_statement_structure (gimple);
-extern void gs_add (gimple, gs_seq);
Index: Makefile.in
===================================================================
--- Makefile.in (revision 124091)
+++ Makefile.in (working copy)
@@ -734,7 +734,7 @@ PARAMS_H = params.h params.def
BUILTINS_DEF = builtins.def sync-builtins.def omp-builtins.def
TREE_H = tree.h tree.def $(MACHMODE_H) tree-check.h $(BUILTINS_DEF) \
input.h statistics.h vec.h treestruct.def $(HASHTAB_H)
-GIMPLE_IR_H = gimple-ir.h gs.def gsstruct.def
+GIMPLE_IR_H = gimple-ir.h gs.def gsstruct.def gimple-iterator.h
BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h varray.h $(PARTITION_H) \
hard-reg-set.h cfghooks.h $(OBSTACK_H)
GCOV_IO_H = gcov-io.h gcov-iov.h auto-host.h
@@ -776,7 +776,7 @@ MKDEPS_H = $(srcdir)/../libcpp/include/m
SYMTAB_H = $(srcdir)/../libcpp/include/symtab.h
CPP_ID_DATA_H = $(CPPLIB_H) $(srcdir)/../libcpp/include/cpp-id-data.h
TREE_DUMP_H = tree-dump.h $(SPLAY_TREE_H)
-TREE_GIMPLE_H = tree-gimple.h tree-iterator.h gimple-ir.h
+TREE_GIMPLE_H = tree-gimple.h tree-iterator.h gimple-ir.h gimple-iterator.h
TREE_FLOW_H = tree-flow.h tree-flow-inline.h tree-ssa-operands.h \
bitmap.h $(BASIC_BLOCK_H) hard-reg-set.h $(TREE_GIMPLE_H) \
$(HASHTAB_H) $(CGRAPH_H) $(IPA_REFERENCE_H)