diff options
author | Richard Henderson <rth@redhat.com> | 2001-12-27 14:19:59 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2001-12-27 14:19:59 -0800 |
commit | df8992f8f3270619b200bd065b3da9de118efc77 (patch) | |
tree | a7f9af2b63f2968b5377756f9c3886f53c2600dd /gcc/function.c | |
parent | bb2ae697ab610f10045da76435c9934d06dce608 (diff) | |
download | gcc-df8992f8f3270619b200bd065b3da9de118efc77.zip gcc-df8992f8f3270619b200bd065b3da9de118efc77.tar.gz gcc-df8992f8f3270619b200bd065b3da9de118efc77.tar.bz2 |
haifa-sched.c (reemit_other_notes): New.
* haifa-sched.c (reemit_other_notes): New.
(schedule_block): Use it.
* sched-ebb.c (schedule_ebbs): Call remove_unnecessary_notes.
* sched-rgn.c (schedule_insns): Likewise.
* cfglayout.c (remove_scope_notes): Handle removing note at
the end of the insn chain.
* function.c (debug_find_var_in_block_tree): New.
* gcc.dg/debug-1.c, gcc.dg/debug-2.c: New.
From-SVN: r48333
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/function.c b/gcc/function.c index f5a3102..097aea4 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -277,6 +277,7 @@ static void reorder_fix_fragments PARAMS ((tree)); static tree blocks_nreverse PARAMS ((tree)); static int all_blocks PARAMS ((tree, tree *)); static tree *get_block_vector PARAMS ((tree, int *)); +extern tree debug_find_var_in_block_tree PARAMS ((tree, tree)); /* We always define `record_insns' even if its not used so that we can always export `prologue_epilogue_contains'. */ static void record_insns PARAMS ((rtx, varray_type *)) ATTRIBUTE_UNUSED; @@ -6051,6 +6052,29 @@ number_blocks (fn) return; } + +/* If VAR is present in a subblock of BLOCK, return the subblock. */ + +tree +debug_find_var_in_block_tree (var, block) + tree var; + tree block; +{ + tree t; + + for (t = BLOCK_VARS (block); t; t = TREE_CHAIN (t)) + if (t == var) + return block; + + for (t = BLOCK_SUBBLOCKS (block); t; t = TREE_CHAIN (t)) + { + tree ret = debug_find_var_in_block_tree (var, t); + if (ret) + return ret; + } + + return NULL_TREE; +} /* Allocate a function structure and reset its contents to the defaults. */ |