blob: cb35f13b3861c4fcb6a01e27a740f4837285c1cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
/* Dependence Graph
Copyright (C) 2004 Free Software Foundation, Inc.
Contributed by Devang Patel <dpatel@apple.com>
This file is part of GCC.
GCC 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.
GCC 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 License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#ifndef GCC_TREE_SSA_DG_H
#define GCC_TREE_SSA_DG_H
#include "tree-data-ref.h"
struct dependence_edge_def GTY (())
{
/* Dependence relation */
struct data_dependence_relation *ddr;
/* Links through the predessor and successor lists. */
struct dependence_edge_def *pred_next;
struct dependence_edge_def *succ_next;
/* Source and destination. */
struct dependence_node_def *src;
struct dependence_node_def *dst;
/* Auxiliary info. */
/* PTR GTY ((skip (""))) aux; */
};
typedef struct dependence_edge_def *dependence_edge;
struct dependence_node_def GTY (())
{
int node_id;
/* Statement */
tree stmt;
/* Dependece ddges */
dependence_edge pred;
dependence_edge succ;
/* Next and previous nodes in the chain. */
struct dependence_node_def *next;
struct dependence_node_def *prev;
};
typedef struct dependence_node_def *dependence_node;
#define DN_STMT(node) (node->stmt)
#define DN_ID(node) (node->node_id)
/* Create dependency graph. */
extern void dg_create_graph (struct loops *);
/* Delete dependency graph. */
extern void dg_delete_graph (void);
/* Delete edge from the dependency graph. */
void dg_delete_edge (dependence_edge);
/* Debug dependence graph. */
extern void debug_dg (int);
/* Find data dependence direction between two statements. */
enum data_dependence_direction ddg_direction_between_stmts (tree, tree, int);
/* Find data dependence distance between two statements. */
tree ddg_distance_between_stmts (tree, tree, int);
#endif
|