diff options
author | Michael Matz <matz@suse.de> | 2012-10-23 16:29:03 +0000 |
---|---|---|
committer | Michael Matz <matz@suse.de> | 2012-10-23 16:29:03 +0000 |
commit | 973eeb6490b43d3e3d82d6549ddd8ced1a39d94c (patch) | |
tree | dfe78d2bb02f7a92114b50acf3f8662a56351922 /gcc/gimple.h | |
parent | 77f4d3b10a9194f6cdf9e715fe45a65b2c821e3f (diff) |
* tree-ssa-operands.h (struct def_optype_d, def_optype_p): Remove.
(ssa_operands.free_defs): Remove.
(DEF_OP_PTR, DEF_OP): Remove.
(struct ssa_operand_iterator_d): Remove 'defs', add 'flags'
members, rename 'phi_stmt' to 'stmt', 'phi_i' to 'i' and 'num_phi'
to 'numops'.
* gimple.h (gimple_statement_with_ops.def_ops): Remove.
(gimple_def_ops, gimple_set_def_ops): Remove.
(gimple_vdef_op): Don't take const gimple, adjust.
(gimple_asm_input_op, gimple_asm_input_op_ptr,
gimple_asm_set_input_op, gimple_asm_output_op,
gimple_asm_output_op_ptr, gimple_asm_set_output_op): Adjust asserts,
and rewrite to move def operands to front.
(gimple_asm_clobber_op, gimple_asm_set_clobber_op,
gimple_asm_label_op, gimple_asm_set_label_op): Correct asserts.
* tree-ssa-operands.c (build_defs): Remove.
(init_ssa_operands): Don't initialize it.
(fini_ssa_operands): Don't free it.
(cleanup_build_arrays): Don't truncate it.
(finalize_ssa_stmt_operands): Don't assert on it.
(alloc_def, add_def_op, append_def): Remove.
(finalize_ssa_defs): Remove building of def_ops list.
(finalize_ssa_uses): Don't mark for SSA renaming here, ...
(add_stmt_operand): ... but here, don't call append_def.
(get_indirect_ref_operands): Remove recurse_on_base argument.
(get_expr_operands): Adjust call to get_indirect_ref_operands.
(verify_ssa_operands): Don't check def operands.
(free_stmt_operands): Don't free def operands.
* gimple.c (gimple_copy): Don't clear def operands.
* tree-flow-inline.h (op_iter_next_use): Adjust to explicitely
handle def operand.
(op_iter_next_tree, op_iter_next_def): Ditto.
(clear_and_done_ssa_iter): Clear new fields.
(op_iter_init): Adjust to setup new iterator structure.
(op_iter_init_phiuse): Adjust.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@192721 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple.h')
-rw-r--r-- | gcc/gimple.h | 99 |
1 files changed, 37 insertions, 62 deletions
diff --git a/gcc/gimple.h b/gcc/gimple.h index c4cdb1a309a..bca1e149227 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -220,12 +220,11 @@ struct GTY(()) gimple_statement_with_ops_base /* [ WORD 1-6 ] */ struct gimple_statement_base gsbase; - /* [ WORD 7-8 ] + /* [ WORD 7 ] SSA operand vectors. NOTE: It should be possible to amalgamate these vectors with the operand vector OP. However, the SSA operand vectors are organized differently and contain more information (like immediate use chaining). */ - struct def_optype_d GTY((skip (""))) *def_ops; struct use_optype_d GTY((skip (""))) *use_ops; }; @@ -234,10 +233,10 @@ struct GTY(()) gimple_statement_with_ops_base struct GTY(()) gimple_statement_with_ops { - /* [ WORD 1-8 ] */ + /* [ WORD 1-7 ] */ struct gimple_statement_with_ops_base opbase; - /* [ WORD 9 ] + /* [ WORD 8 ] Operand vector. NOTE! This must always be the last field of this structure. In particular, this means that this structure cannot be embedded inside another one. */ @@ -249,10 +248,10 @@ struct GTY(()) gimple_statement_with_ops struct GTY(()) gimple_statement_with_memory_ops_base { - /* [ WORD 1-8 ] */ + /* [ WORD 1-7 ] */ struct gimple_statement_with_ops_base opbase; - /* [ WORD 9-10 ] + /* [ WORD 8-9 ] Virtual operands for this statement. The GC will pick them up via the ssa_names array. */ tree GTY((skip (""))) vdef; @@ -264,10 +263,10 @@ struct GTY(()) gimple_statement_with_memory_ops_base struct GTY(()) gimple_statement_with_memory_ops { - /* [ WORD 1-10 ] */ + /* [ WORD 1-9 ] */ struct gimple_statement_with_memory_ops_base membase; - /* [ WORD 11 ] + /* [ WORD 10 ] Operand vector. NOTE! This must always be the last field of this structure. In particular, this means that this structure cannot be embedded inside another one. */ @@ -279,20 +278,20 @@ struct GTY(()) gimple_statement_with_memory_ops struct GTY(()) gimple_statement_call { - /* [ WORD 1-10 ] */ + /* [ WORD 1-9 ] */ struct gimple_statement_with_memory_ops_base membase; - /* [ WORD 11-14 ] */ + /* [ WORD 10-13 ] */ struct pt_solution call_used; struct pt_solution call_clobbered; - /* [ WORD 15 ] */ + /* [ WORD 14 ] */ union GTY ((desc ("%1.membase.opbase.gsbase.subcode & GF_CALL_INTERNAL"))) { tree GTY ((tag ("0"))) fntype; enum internal_fn GTY ((tag ("GF_CALL_INTERNAL"))) internal_fn; } u; - /* [ WORD 16 ] + /* [ WORD 15 ] Operand vector. NOTE! This must always be the last field of this structure. In particular, this means that this structure cannot be embedded inside another one. */ @@ -464,21 +463,21 @@ struct GTY(()) gimple_statement_wce { struct GTY(()) gimple_statement_asm { - /* [ WORD 1-10 ] */ + /* [ WORD 1-9 ] */ struct gimple_statement_with_memory_ops_base membase; - /* [ WORD 11 ] + /* [ WORD 10 ] __asm__ statement. */ const char *string; - /* [ WORD 12 ] + /* [ WORD 11 ] Number of inputs, outputs, clobbers, labels. */ unsigned char ni; unsigned char no; unsigned char nc; unsigned char nl; - /* [ WORD 13 ] + /* [ WORD 12 ] Operand vector. NOTE! This must always be the last field of this structure. In particular, this means that this structure cannot be embedded inside another one. */ @@ -669,13 +668,13 @@ struct GTY(()) gimple_statement_omp_atomic_store { struct GTY(()) gimple_statement_transaction { - /* [ WORD 1-10 ] */ + /* [ WORD 1-9 ] */ struct gimple_statement_with_memory_ops_base gsbase; - /* [ WORD 11 ] */ + /* [ WORD 10 ] */ gimple_seq body; - /* [ WORD 12 ] */ + /* [ WORD 11 ] */ tree label; }; @@ -1372,27 +1371,6 @@ gimple_has_mem_ops (const_gimple g) } -/* Return the set of DEF operands for statement G. */ - -static inline struct def_optype_d * -gimple_def_ops (const_gimple g) -{ - if (!gimple_has_ops (g)) - return NULL; - return g->gsops.opbase.def_ops; -} - - -/* Set DEF to be the set of DEF operands for statement G. */ - -static inline void -gimple_set_def_ops (gimple g, struct def_optype_d *def) -{ - gcc_gimple_checking_assert (gimple_has_ops (g)); - g->gsops.opbase.def_ops = def; -} - - /* Return the set of USE operands for statement G. */ static inline struct use_optype_d * @@ -1432,15 +1410,12 @@ gimple_vuse_op (const_gimple g) /* Return the set of VDEF operand for statement G. */ static inline def_operand_p -gimple_vdef_op (const_gimple g) +gimple_vdef_op (gimple g) { - struct def_optype_d *ops; if (!gimple_has_mem_ops (g)) return NULL_DEF_OPERAND_P; - ops = g->gsops.opbase.def_ops; - if (ops - && DEF_OP_PTR (ops) == &g->gsmembase.vdef) - return DEF_OP_PTR (ops); + if (g->gsmembase.vdef) + return &g->gsmembase.vdef; return NULL_DEF_OPERAND_P; } @@ -2941,8 +2916,8 @@ static inline tree gimple_asm_input_op (const_gimple gs, unsigned index) { GIMPLE_CHECK (gs, GIMPLE_ASM); - gcc_gimple_checking_assert (index <= gs->gimple_asm.ni); - return gimple_op (gs, index); + gcc_gimple_checking_assert (index < gs->gimple_asm.ni); + return gimple_op (gs, index + gs->gimple_asm.no); } /* Return a pointer to input operand INDEX of GIMPLE_ASM GS. */ @@ -2951,8 +2926,8 @@ static inline tree * gimple_asm_input_op_ptr (const_gimple gs, unsigned index) { GIMPLE_CHECK (gs, GIMPLE_ASM); - gcc_gimple_checking_assert (index <= gs->gimple_asm.ni); - return gimple_op_ptr (gs, index); + gcc_gimple_checking_assert (index < gs->gimple_asm.ni); + return gimple_op_ptr (gs, index + gs->gimple_asm.no); } @@ -2962,9 +2937,9 @@ static inline void gimple_asm_set_input_op (gimple gs, unsigned index, tree in_op) { GIMPLE_CHECK (gs, GIMPLE_ASM); - gcc_gimple_checking_assert (index <= gs->gimple_asm.ni + gcc_gimple_checking_assert (index < gs->gimple_asm.ni && TREE_CODE (in_op) == TREE_LIST); - gimple_set_op (gs, index, in_op); + gimple_set_op (gs, index + gs->gimple_asm.no, in_op); } @@ -2974,8 +2949,8 @@ static inline tree gimple_asm_output_op (const_gimple gs, unsigned index) { GIMPLE_CHECK (gs, GIMPLE_ASM); - gcc_gimple_checking_assert (index <= gs->gimple_asm.no); - return gimple_op (gs, index + gs->gimple_asm.ni); + gcc_gimple_checking_assert (index < gs->gimple_asm.no); + return gimple_op (gs, index); } /* Return a pointer to output operand INDEX of GIMPLE_ASM GS. */ @@ -2984,8 +2959,8 @@ static inline tree * gimple_asm_output_op_ptr (const_gimple gs, unsigned index) { GIMPLE_CHECK (gs, GIMPLE_ASM); - gcc_gimple_checking_assert (index <= gs->gimple_asm.no); - return gimple_op_ptr (gs, index + gs->gimple_asm.ni); + gcc_gimple_checking_assert (index < gs->gimple_asm.no); + return gimple_op_ptr (gs, index); } @@ -2995,9 +2970,9 @@ static inline void gimple_asm_set_output_op (gimple gs, unsigned index, tree out_op) { GIMPLE_CHECK (gs, GIMPLE_ASM); - gcc_gimple_checking_assert (index <= gs->gimple_asm.no + gcc_gimple_checking_assert (index < gs->gimple_asm.no && TREE_CODE (out_op) == TREE_LIST); - gimple_set_op (gs, index + gs->gimple_asm.ni, out_op); + gimple_set_op (gs, index, out_op); } @@ -3007,7 +2982,7 @@ static inline tree gimple_asm_clobber_op (const_gimple gs, unsigned index) { GIMPLE_CHECK (gs, GIMPLE_ASM); - gcc_gimple_checking_assert (index <= gs->gimple_asm.nc); + gcc_gimple_checking_assert (index < gs->gimple_asm.nc); return gimple_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.no); } @@ -3018,7 +2993,7 @@ static inline void gimple_asm_set_clobber_op (gimple gs, unsigned index, tree clobber_op) { GIMPLE_CHECK (gs, GIMPLE_ASM); - gcc_gimple_checking_assert (index <= gs->gimple_asm.nc + gcc_gimple_checking_assert (index < gs->gimple_asm.nc && TREE_CODE (clobber_op) == TREE_LIST); gimple_set_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.no, clobber_op); } @@ -3029,7 +3004,7 @@ static inline tree gimple_asm_label_op (const_gimple gs, unsigned index) { GIMPLE_CHECK (gs, GIMPLE_ASM); - gcc_gimple_checking_assert (index <= gs->gimple_asm.nl); + gcc_gimple_checking_assert (index < gs->gimple_asm.nl); return gimple_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.nc); } @@ -3039,7 +3014,7 @@ static inline void gimple_asm_set_label_op (gimple gs, unsigned index, tree label_op) { GIMPLE_CHECK (gs, GIMPLE_ASM); - gcc_gimple_checking_assert (index <= gs->gimple_asm.nl + gcc_gimple_checking_assert (index < gs->gimple_asm.nl && TREE_CODE (label_op) == TREE_LIST); gimple_set_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.nc, label_op); } |