aboutsummaryrefslogtreecommitdiff
path: root/gcc/ddg.h
diff options
context:
space:
mode:
authorRoman Zhuykov <zhroma@ispras.ru>2019-12-13 17:02:53 +0000
committerRoman Zhuykov <zhroma@gcc.gnu.org>2019-12-13 17:02:53 +0000
commit728c2e5eeaa91cf708f2b1b1f996653a7eebae59 (patch)
tree62136a55af00cbdc3a1f6358607258019c789b02 /gcc/ddg.h
parent7b945b19ad7cebebbaaf4eec44a7a572233ab91b (diff)
downloadgcc-728c2e5eeaa91cf708f2b1b1f996653a7eebae59.zip
gcc-728c2e5eeaa91cf708f2b1b1f996653a7eebae59.tar.gz
gcc-728c2e5eeaa91cf708f2b1b1f996653a7eebae59.tar.bz2
modulo-sched: speed up DDG analysis (PR90001)
PR rtl-optimization/90001 * ddg.c (create_ddg): Init max_dist array for each node. (free_ddg): Free max_dist array. (create_ddg_edge): Use bool field instead of aux union. (set_recurrence_length): Use prepared max_dist information instead of calling longest_simple_path. (create_scc): Remove graph argument, fill node's aux.count with SCC id, and move set_recurrence_length call to... (create_ddg_all_sccs): ...here, after filling all max_dist arrays using Floyd–Warshall-like algorithm. (update_dist_to_successors): Remove the whole function. (longest_simple_path): Likewise. * ddg.h (struct ddg_node): Add max_dist pointer. (struct ddg_edge): Use bool field instead of unused aux union. From-SVN: r279375
Diffstat (limited to 'gcc/ddg.h')
-rw-r--r--gcc/ddg.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/ddg.h b/gcc/ddg.h
index 3bfc2c8..aff3561 100644
--- a/gcc/ddg.h
+++ b/gcc/ddg.h
@@ -64,6 +64,10 @@ struct ddg_node
sbitmap successors;
sbitmap predecessors;
+ /* Temporary array used for Floyd-Warshall algorithm to find
+ scc recurrence length. */
+ int *max_dist;
+
/* For general use by algorithms manipulating the ddg. */
union {
int count;
@@ -95,11 +99,8 @@ struct ddg_edge
ddg_edge_ptr next_in;
ddg_edge_ptr next_out;
- /* For general use by algorithms manipulating the ddg. */
- union {
- int count;
- void *info;
- } aux;
+ /* Is true when edge is already in scc. */
+ bool in_scc;
};
/* This structure holds the Data Dependence Graph for a basic block. */
@@ -178,7 +179,6 @@ ddg_all_sccs_ptr create_ddg_all_sccs (ddg_ptr);
void free_ddg_all_sccs (ddg_all_sccs_ptr);
int find_nodes_on_paths (sbitmap result, ddg_ptr, sbitmap from, sbitmap to);
-int longest_simple_path (ddg_ptr, int from, int to, sbitmap via);
bool autoinc_var_is_used_p (rtx_insn *, rtx_insn *);