aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-flow-inline.h
diff options
context:
space:
mode:
authorAndrew Macleod <amacleod@gcc.gnu.org>2013-10-02 13:19:29 +0000
committerAndrew Macleod <amacleod@gcc.gnu.org>2013-10-02 13:19:29 +0000
commitcf2d1b38ca73de548c3a1c2cbe5441faa72d3e71 (patch)
tree375ad6b99eeeb983ea0bb3b3219f6c281da0b899 /gcc/tree-flow-inline.h
parent1d2151c67a26096c792c6f6be9d1bac3a8cce703 (diff)
downloadgcc-cf2d1b38ca73de548c3a1c2cbe5441faa72d3e71.zip
gcc-cf2d1b38ca73de548c3a1c2cbe5441faa72d3e71.tar.gz
gcc-cf2d1b38ca73de548c3a1c2cbe5441faa72d3e71.tar.bz2
tree-flow.h: Include new .h files.
* tree-flow.h: Include new .h files. Move prototypes. * tree-cfgcleanup.h: New file. Add prototypes from tree-flow.h. * tree-dfa.h: New File. Add prototypes from tree-flow.h. (get_addr_base_and_unit_offset_1) Move from tree-flow-inline.h. * tree-pretty-print.h: Add prototypes from tree-flow.h. * tree-into-ssa.h: New File. Add prototypes from tree-flow.h. ({debug|dump}*): Move debugging prototypes out of tree-into-ssa.c. * tree-into-ssa.c ({debug|dump}*): Move prototypes to header file. * tree.h (get_ref_base_and_extent): Move prototype out. * tree-flow-inline.h (get_addr_base_and_unit_offset_1): Move to tree-dfa.h. * gimple-low.h: New File. Add prototypes from tree-flow.h. * gimple-low.c (try_catch_may_fallthru, block_may_fallthru): Move to... * tree.c (try_catch_may_fallthru, block_may_fallthru): Here. * tree-scalar-evolution.c: Include tree.h. * sese.c: Include tree.h. * dumpfile.c: Move gimple-pretty-print.h include after tree.h. * dwarf2out.c: Include tree-dfa.h. * tree-chrec.c: Include tree.h. * tree-data-ref.c: Include tree.h. From-SVN: r203113
Diffstat (limited to 'gcc/tree-flow-inline.h')
-rw-r--r--gcc/tree-flow-inline.h191
1 files changed, 0 insertions, 191 deletions
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h
index b3a6d4b..164df95 100644
--- a/gcc/tree-flow-inline.h
+++ b/gcc/tree-flow-inline.h
@@ -42,52 +42,6 @@ gimple_vop (const struct function *fun)
return fun->gimple_df->vop;
}
-/* Initialize the hashtable iterator HTI to point to hashtable TABLE */
-
-static inline void *
-first_htab_element (htab_iterator *hti, htab_t table)
-{
- hti->htab = table;
- hti->slot = table->entries;
- hti->limit = hti->slot + htab_size (table);
- do
- {
- PTR x = *(hti->slot);
- if (x != HTAB_EMPTY_ENTRY && x != HTAB_DELETED_ENTRY)
- break;
- } while (++(hti->slot) < hti->limit);
-
- if (hti->slot < hti->limit)
- return *(hti->slot);
- return NULL;
-}
-
-/* Return current non-empty/deleted slot of the hashtable pointed to by HTI,
- or NULL if we have reached the end. */
-
-static inline bool
-end_htab_p (const htab_iterator *hti)
-{
- if (hti->slot >= hti->limit)
- return true;
- return false;
-}
-
-/* Advance the hashtable iterator pointed to by HTI to the next element of the
- hashtable. */
-
-static inline void *
-next_htab_element (htab_iterator *hti)
-{
- while (++(hti->slot) < hti->limit)
- {
- PTR x = *(hti->slot);
- if (x != HTAB_EMPTY_ENTRY && x != HTAB_DELETED_ENTRY)
- return x;
- };
- return NULL;
-}
-
/* Get the number of the next statement uid to be allocated. */
static inline unsigned int
gimple_stmt_max_uid (struct function *fn)
@@ -240,149 +194,4 @@ gimple_ssa_operands (const struct function *fun)
return &fun->gimple_df->ssa_operands;
}
-
-/* Returns the base object and a constant BITS_PER_UNIT offset in *POFFSET that
- denotes the starting address of the memory access EXP.
- Returns NULL_TREE if the offset is not constant or any component
- is not BITS_PER_UNIT-aligned.
- VALUEIZE if non-NULL is used to valueize SSA names. It should return
- its argument or a constant if the argument is known to be constant. */
-/* ??? This is a static inline here to avoid the overhead of the indirect calls
- to VALUEIZE. But is this overhead really that significant? And should we
- perhaps just rely on WHOPR to specialize the function? */
-
-static inline tree
-get_addr_base_and_unit_offset_1 (tree exp, HOST_WIDE_INT *poffset,
- tree (*valueize) (tree))
-{
- HOST_WIDE_INT byte_offset = 0;
-
- /* Compute cumulative byte-offset for nested component-refs and array-refs,
- and find the ultimate containing object. */
- while (1)
- {
- switch (TREE_CODE (exp))
- {
- case BIT_FIELD_REF:
- {
- HOST_WIDE_INT this_off = TREE_INT_CST_LOW (TREE_OPERAND (exp, 2));
- if (this_off % BITS_PER_UNIT)
- return NULL_TREE;
- byte_offset += this_off / BITS_PER_UNIT;
- }
- break;
-
- case COMPONENT_REF:
- {
- tree field = TREE_OPERAND (exp, 1);
- tree this_offset = component_ref_field_offset (exp);
- HOST_WIDE_INT hthis_offset;
-
- if (!this_offset
- || TREE_CODE (this_offset) != INTEGER_CST
- || (TREE_INT_CST_LOW (DECL_FIELD_BIT_OFFSET (field))
- % BITS_PER_UNIT))
- return NULL_TREE;
-
- hthis_offset = TREE_INT_CST_LOW (this_offset);
- hthis_offset += (TREE_INT_CST_LOW (DECL_FIELD_BIT_OFFSET (field))
- / BITS_PER_UNIT);
- byte_offset += hthis_offset;
- }
- break;
-
- case ARRAY_REF:
- case ARRAY_RANGE_REF:
- {
- tree index = TREE_OPERAND (exp, 1);
- tree low_bound, unit_size;
-
- if (valueize
- && TREE_CODE (index) == SSA_NAME)
- index = (*valueize) (index);
-
- /* If the resulting bit-offset is constant, track it. */
- if (TREE_CODE (index) == INTEGER_CST
- && (low_bound = array_ref_low_bound (exp),
- TREE_CODE (low_bound) == INTEGER_CST)
- && (unit_size = array_ref_element_size (exp),
- TREE_CODE (unit_size) == INTEGER_CST))
- {
- HOST_WIDE_INT hindex = TREE_INT_CST_LOW (index);
-
- hindex -= TREE_INT_CST_LOW (low_bound);
- hindex *= TREE_INT_CST_LOW (unit_size);
- byte_offset += hindex;
- }
- else
- return NULL_TREE;
- }
- break;
-
- case REALPART_EXPR:
- break;
-
- case IMAGPART_EXPR:
- byte_offset += TREE_INT_CST_LOW (TYPE_SIZE_UNIT (TREE_TYPE (exp)));
- break;
-
- case VIEW_CONVERT_EXPR:
- break;
-
- case MEM_REF:
- {
- tree base = TREE_OPERAND (exp, 0);
- if (valueize
- && TREE_CODE (base) == SSA_NAME)
- base = (*valueize) (base);
-
- /* Hand back the decl for MEM[&decl, off]. */
- if (TREE_CODE (base) == ADDR_EXPR)
- {
- if (!integer_zerop (TREE_OPERAND (exp, 1)))
- {
- double_int off = mem_ref_offset (exp);
- gcc_assert (off.high == -1 || off.high == 0);
- byte_offset += off.to_shwi ();
- }
- exp = TREE_OPERAND (base, 0);
- }
- goto done;
- }
-
- case TARGET_MEM_REF:
- {
- tree base = TREE_OPERAND (exp, 0);
- if (valueize
- && TREE_CODE (base) == SSA_NAME)
- base = (*valueize) (base);
-
- /* Hand back the decl for MEM[&decl, off]. */
- if (TREE_CODE (base) == ADDR_EXPR)
- {
- if (TMR_INDEX (exp) || TMR_INDEX2 (exp))
- return NULL_TREE;
- if (!integer_zerop (TMR_OFFSET (exp)))
- {
- double_int off = mem_ref_offset (exp);
- gcc_assert (off.high == -1 || off.high == 0);
- byte_offset += off.to_shwi ();
- }
- exp = TREE_OPERAND (base, 0);
- }
- goto done;
- }
-
- default:
- goto done;
- }
-
- exp = TREE_OPERAND (exp, 0);
- }
-done:
-
- *poffset = byte_offset;
- return exp;
-}
-
#endif /* _TREE_FLOW_INLINE_H */