OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* basic-block.h (EDGE_CRITICAL): Remove; renumber other flags.
[pf3gnuchains/gcc-fork.git]
/
gcc
/
basic-block.h
diff --git
a/gcc/basic-block.h
b/gcc/basic-block.h
index
bddba84
..
95ee0dd
100644
(file)
--- a/
gcc/basic-block.h
+++ b/
gcc/basic-block.h
@@
-1,25
+1,25
@@
/* Define control and data flow tables, and regsets.
Copyright (C) 1987, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
/* Define control and data flow tables, and regsets.
Copyright (C) 1987, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
-This file is part of G
NU
CC.
+This file is part of GCC.
-G
NU CC 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 (at your option)
-
any later
version.
+G
CC 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 (at your option) any later
+version.
-G
NU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See th
e
-
GNU General Public License
for more details.
+G
CC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public Licens
e
+for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
-along with G
NU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-
Boston, MA
02111-1307, USA. */
+along with G
CC; see the file COPYING. If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA. */
#ifndef GCC_BASIC_BLOCK_H
#ifndef GCC_BASIC_BLOCK_H
-#define GCC_BASIC_BLOCK_H
+#define GCC_BASIC_BLOCK_H
#include "bitmap.h"
#include "sbitmap.h"
#include "bitmap.h"
#include "sbitmap.h"
@@
-114,7
+114,7
@@
do { \
/* Grow any tables needed when the number of registers is calculated
or extended. For the linked list allocation, nothing needs to
be done, other than zero the statistics on the first allocation. */
/* Grow any tables needed when the number of registers is calculated
or extended. For the linked list allocation, nothing needs to
be done, other than zero the statistics on the first allocation. */
-#define MAX_REGNO_REG_SET(NUM_REGS, NEW_P, RENUMBER_P)
+#define MAX_REGNO_REG_SET(NUM_REGS, NEW_P, RENUMBER_P)
/* Type we use to hold basic block counters. Should be at least 64bit. */
typedef HOST_WIDEST_INT gcov_type;
/* Type we use to hold basic block counters. Should be at least 64bit. */
typedef HOST_WIDEST_INT gcov_type;
@@
-140,11
+140,11
@@
typedef struct edge_def {
} *edge;
#define EDGE_FALLTHRU 1
} *edge;
#define EDGE_FALLTHRU 1
-#define EDGE_
CRITIC
AL 2
-#define EDGE_ABNORMAL
4
-#define EDGE_
ABNORMAL_CALL
8
-#define EDGE_
EH
16
-#define EDGE_
FAKE
32
+#define EDGE_
ABNORM
AL 2
+#define EDGE_ABNORMAL
_CALL
4
+#define EDGE_
EH
8
+#define EDGE_
FAKE
16
+#define EDGE_
DFS_BACK
32
#define EDGE_COMPLEX (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL | EDGE_EH)
#define EDGE_COMPLEX (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL | EDGE_EH)
@@
-214,13
+214,19
@@
typedef struct basic_block_def {
/* Expected number of executions: calculated in profile.c. */
gcov_type count;
/* Expected number of executions: calculated in profile.c. */
gcov_type count;
-
+
/* Expected frequency. Normalized to be in range 0 to BB_FREQ_MAX. */
int frequency;
/* Expected frequency. Normalized to be in range 0 to BB_FREQ_MAX. */
int frequency;
+
+ /* Various flags. See BB_* below. */
+ int flags;
} *basic_block;
} *basic_block;
-
+
#define BB_FREQ_MAX 10000
#define BB_FREQ_MAX 10000
+/* Masks for basic_block.flags. */
+#define BB_REACHABLE 1
+
/* Number of basic blocks in the current function. */
extern int n_basic_blocks;
/* Number of basic blocks in the current function. */
extern int n_basic_blocks;
@@
-239,6
+245,12
@@
extern varray_type basic_block_info;
extern regset regs_live_at_setjmp;
extern regset regs_live_at_setjmp;
+/* Special labels found during CFG build. */
+
+extern rtx label_value_list, tail_recursion_label_list;
+
+extern struct obstack flow_obstack;
+
/* Indexed by n, gives number of basic block that (REG n) is used in.
If the value is REG_BLOCK_GLOBAL (-2),
it means (REG n) is used in more than one basic block.
/* Indexed by n, gives number of basic block that (REG n) is used in.
If the value is REG_BLOCK_GLOBAL (-2),
it means (REG n) is used in more than one basic block.
@@
-289,20
+301,27
@@
extern void commit_edge_insertions PARAMS ((void));
extern void remove_fake_edges PARAMS ((void));
extern void add_noreturn_fake_exit_edges PARAMS ((void));
extern void connect_infinite_loops_to_exit PARAMS ((void));
extern void remove_fake_edges PARAMS ((void));
extern void add_noreturn_fake_exit_edges PARAMS ((void));
extern void connect_infinite_loops_to_exit PARAMS ((void));
-extern int flow_call_edges_add
PARAMS ((sbitmap));
+extern int flow_call_edges_add PARAMS ((sbitmap));
extern rtx flow_delete_insn PARAMS ((rtx));
extern void flow_delete_insn_chain PARAMS ((rtx, rtx));
extern rtx flow_delete_insn PARAMS ((rtx));
extern void flow_delete_insn_chain PARAMS ((rtx, rtx));
-extern void make_edge PARAMS ((sbitmap *, basic_block,
+extern edge cached_make_edge PARAMS ((sbitmap *, basic_block,
+ basic_block, int));
+extern edge make_edge PARAMS ((basic_block,
+ basic_block, int));
+extern edge make_single_succ_edge PARAMS ((basic_block,
basic_block, int));
extern void remove_edge PARAMS ((edge));
extern void redirect_edge_succ PARAMS ((edge, basic_block));
basic_block, int));
extern void remove_edge PARAMS ((edge));
extern void redirect_edge_succ PARAMS ((edge, basic_block));
-extern
void
redirect_edge_succ_nodup PARAMS ((edge, basic_block));
+extern
edge
redirect_edge_succ_nodup PARAMS ((edge, basic_block));
extern void redirect_edge_pred PARAMS ((edge, basic_block));
extern void redirect_edge_pred PARAMS ((edge, basic_block));
-extern void create_basic_block PARAMS ((int, rtx, rtx, rtx));
+extern basic_block create_basic_block_structure PARAMS ((int, rtx, rtx, rtx));
+extern basic_block create_basic_block PARAMS ((int, rtx, rtx));
extern int flow_delete_block PARAMS ((basic_block));
extern void merge_blocks_nomove PARAMS ((basic_block, basic_block));
extern void tidy_fallthru_edge PARAMS ((edge, basic_block,
basic_block));
extern int flow_delete_block PARAMS ((basic_block));
extern void merge_blocks_nomove PARAMS ((basic_block, basic_block));
extern void tidy_fallthru_edge PARAMS ((edge, basic_block,
basic_block));
+extern void tidy_fallthru_edges PARAMS ((void));
+extern void flow_reverse_top_sort_order_compute PARAMS ((int *));
extern int flow_depth_first_order_compute PARAMS ((int *, int *));
extern void dump_edge_info PARAMS ((FILE *, edge, int));
extern void clear_edges PARAMS ((void));
extern int flow_depth_first_order_compute PARAMS ((int *, int *));
extern void dump_edge_info PARAMS ((FILE *, edge, int));
extern void clear_edges PARAMS ((void));
@@
-324,7
+343,7
@@
struct loop
/* Basic block of loop pre-header or NULL if it does not exist. */
basic_block pre_header;
/* Basic block of loop pre-header or NULL if it does not exist. */
basic_block pre_header;
- /* Array of edges along the pre-header extended basic block trace.
+ /* Array of edges along the pre-header extended basic block trace.
The source of the first edge is the root node of pre-header
extended basic block, if it exists. */
edge *pre_header_edges;
The source of the first edge is the root node of pre-header
extended basic block, if it exists. */
edge *pre_header_edges;
@@
-418,7
+437,7
@@
struct loop
/* List of all LABEL_REFs which refer to code labels outside the
loop. Used by routines that need to know all loop exits, such as
final_biv_value and final_giv_value.
/* List of all LABEL_REFs which refer to code labels outside the
loop. Used by routines that need to know all loop exits, such as
final_biv_value and final_giv_value.
-
+
This does not include loop exits due to return instructions.
This is because all bivs and givs are pseudos, and hence must be
dead after a return, so the presense of a return does not affect
This does not include loop exits due to return instructions.
This is because all bivs and givs are pseudos, and hence must be
dead after a return, so the presense of a return does not affect
@@
-478,7
+497,7
@@
extern void flow_loop_dump PARAMS ((const struct loop *, FILE *,
extern int flow_loop_scan PARAMS ((struct loops *, struct loop *, int));
/* This structure maintains an edge list vector. */
extern int flow_loop_scan PARAMS ((struct loops *, struct loop *, int));
/* This structure maintains an edge list vector. */
-struct edge_list
+struct edge_list
{
int num_blocks;
int num_edges;
{
int num_blocks;
int num_edges;
@@
-517,11
+536,15
@@
struct edge_list
+ REG_BR_PROB_BASE / 2) \
/ REG_BR_PROB_BASE)
+ REG_BR_PROB_BASE / 2) \
/ REG_BR_PROB_BASE)
+/* Return nonzero if edge is critical. */
+#define EDGE_CRITICAL_P(e) ((e)->src->succ->succ_next \
+ && (e)->dest->pred->pred_next)
+
struct edge_list * create_edge_list PARAMS ((void));
void free_edge_list PARAMS ((struct edge_list *));
void print_edge_list PARAMS ((FILE *, struct edge_list *));
void verify_edge_list PARAMS ((FILE *, struct edge_list *));
struct edge_list * create_edge_list PARAMS ((void));
void free_edge_list PARAMS ((struct edge_list *));
void print_edge_list PARAMS ((FILE *, struct edge_list *));
void verify_edge_list PARAMS ((FILE *, struct edge_list *));
-int find_edge_index PARAMS ((struct edge_list *,
+int find_edge_index PARAMS ((struct edge_list *,
basic_block, basic_block));
basic_block, basic_block));
@@
-551,15
+574,17
@@
enum update_life_extent
to care REG_DEAD notes. */
#define CLEANUP_PRE_SIBCALL 8 /* Do not get confused by code hidden
inside call_placeholders.. */
to care REG_DEAD notes. */
#define CLEANUP_PRE_SIBCALL 8 /* Do not get confused by code hidden
inside call_placeholders.. */
+#define CLEANUP_PRE_LOOP 16 /* Take care to preserve syntactic loop
+ notes. */
/* Flags for loop discovery. */
/* Flags for loop discovery. */
-#define LOOP_TREE 1 /* Build loop hierarchy tree. */
+#define LOOP_TREE 1 /* Build loop hierarchy tree. */
#define LOOP_PRE_HEADER 2 /* Analyse loop pre-header. */
#define LOOP_PRE_HEADER 2 /* Analyse loop pre-header. */
-#define LOOP_ENTRY_EDGES 4 /* Find entry edges. */
-#define LOOP_EXIT_EDGES 8 /* Find exit edges. */
+#define LOOP_ENTRY_EDGES 4 /* Find entry edges. */
+#define LOOP_EXIT_EDGES 8 /* Find exit edges. */
#define LOOP_EDGES (LOOP_ENTRY_EDGES | LOOP_EXIT_EDGES)
#define LOOP_EDGES (LOOP_ENTRY_EDGES | LOOP_EXIT_EDGES)
-#define LOOP_EXITS_DOMS 16 /* Find nodes that dom. all exits. */
-#define LOOP_ALL 31 /* All of the above */
+#define LOOP_EXITS_DOMS 16 /* Find nodes that dom. all exits. */
+#define LOOP_ALL 31 /* All of the above */
extern void life_analysis PARAMS ((rtx, FILE *, int));
extern void update_life_info PARAMS ((sbitmap, enum update_life_extent,
extern void life_analysis PARAMS ((rtx, FILE *, int));
extern void update_life_info PARAMS ((sbitmap, enum update_life_extent,
@@
-575,13
+600,13
@@
extern struct propagate_block_info *init_propagate_block_info
extern void free_propagate_block_info PARAMS ((struct propagate_block_info *));
/* In lcm.c */
extern void free_propagate_block_info PARAMS ((struct propagate_block_info *));
/* In lcm.c */
-extern struct edge_list *pre_edge_lcm PARAMS ((FILE *, int, sbitmap *,
- sbitmap *, sbitmap *,
+extern struct edge_list *pre_edge_lcm PARAMS ((FILE *, int, sbitmap *,
+ sbitmap *, sbitmap *,
sbitmap *, sbitmap **,
sbitmap **));
extern struct edge_list *pre_edge_rev_lcm PARAMS ((FILE *, int, sbitmap *,
sbitmap *, sbitmap **,
sbitmap **));
extern struct edge_list *pre_edge_rev_lcm PARAMS ((FILE *, int, sbitmap *,
- sbitmap *, sbitmap *,
- sbitmap *, sbitmap **,
+ sbitmap *, sbitmap *,
+ sbitmap *, sbitmap **,
sbitmap **));
extern void compute_available PARAMS ((sbitmap *, sbitmap *,
sbitmap *, sbitmap *));
sbitmap **));
extern void compute_available PARAMS ((sbitmap *, sbitmap *,
sbitmap *, sbitmap *));
@@
-608,13
+633,18
@@
extern void allocate_bb_life_data PARAMS ((void));
extern void find_unreachable_blocks PARAMS ((void));
extern void delete_noop_moves PARAMS ((rtx));
extern basic_block redirect_edge_and_branch_force PARAMS ((edge, basic_block));
extern void find_unreachable_blocks PARAMS ((void));
extern void delete_noop_moves PARAMS ((rtx));
extern basic_block redirect_edge_and_branch_force PARAMS ((edge, basic_block));
+extern basic_block force_nonfallthru PARAMS ((edge));
extern bool redirect_edge_and_branch PARAMS ((edge, basic_block));
extern rtx block_label PARAMS ((basic_block));
extern bool forwarder_block_p PARAMS ((basic_block));
extern bool redirect_edge_and_branch PARAMS ((edge, basic_block));
extern rtx block_label PARAMS ((basic_block));
extern bool forwarder_block_p PARAMS ((basic_block));
-extern
void
purge_all_dead_edges PARAMS ((void));
-extern
void
purge_dead_edges PARAMS ((basic_block));
+extern
bool
purge_all_dead_edges PARAMS ((void));
+extern
bool
purge_dead_edges PARAMS ((basic_block));
extern void find_sub_basic_blocks PARAMS ((basic_block));
extern void find_sub_basic_blocks PARAMS ((basic_block));
-
+extern bool can_fallthru PARAMS ((basic_block, basic_block));
+extern void flow_nodes_print PARAMS ((const char *, const sbitmap,
+ FILE *));
+extern void flow_edge_list_print PARAMS ((const char *, const edge *,
+ int, FILE *));
/* This function is always defined so it can be called from the
debugger, and it is declared extern so we don't get warnings about
/* This function is always defined so it can be called from the
debugger, and it is declared extern so we don't get warnings about
@@
-632,22
+662,23
@@
typedef int (*conflict_graph_enum_fn) PARAMS ((int, int, void *));
/* Prototypes of operations on conflict graphs. */
/* Prototypes of operations on conflict graphs. */
-extern conflict_graph conflict_graph_new
+extern conflict_graph conflict_graph_new
PARAMS ((int));
extern void conflict_graph_delete PARAMS ((conflict_graph));
PARAMS ((int));
extern void conflict_graph_delete PARAMS ((conflict_graph));
-extern int conflict_graph_add PARAMS ((conflict_graph,
+extern int conflict_graph_add PARAMS ((conflict_graph,
int, int));
int, int));
-extern int conflict_graph_conflict_p PARAMS ((conflict_graph,
+extern int conflict_graph_conflict_p PARAMS ((conflict_graph,
int, int));
int, int));
-extern void conflict_graph_enum PARAMS ((conflict_graph, int,
- conflict_graph_enum_fn,
+extern void conflict_graph_enum PARAMS ((conflict_graph, int,
+ conflict_graph_enum_fn,
void *));
extern void conflict_graph_merge_regs PARAMS ((conflict_graph, int,
int));
extern void conflict_graph_print PARAMS ((conflict_graph, FILE*));
void *));
extern void conflict_graph_merge_regs PARAMS ((conflict_graph, int,
int));
extern void conflict_graph_print PARAMS ((conflict_graph, FILE*));
-extern conflict_graph conflict_graph_compute
+extern conflict_graph conflict_graph_compute
PARAMS ((regset,
partition));
PARAMS ((regset,
partition));
+extern bool mark_dfs_back_edges PARAMS ((void));
/* In dominance.c */
/* In dominance.c */