|
II|llilllllll|il|i the VLSI journal ELSEVIER
INTEGRATION, the VLSI Journal 17 (1994) 241-252
On the complexity of allocation problems in high-level synthesis Klaus Jansen Fachbereich IV, Mathematik und lnformatik, Universitgit Trier, 54 286 Trier, Germany
Received 22 November 1993; revised 11 July 1994
Abstract
In this paper, we study the problem of processor allocation. Given a scheduled flow graph with a constant number of conditional branches, the problem is to find an assignment of the operations in the flow graph to a minimum number of processors. We show that this problem is NP-complete even if the flow graph has at most one conditional branch. Finally, we show that another related problem in high-level synthesis (mentioned as an open problem on the 24th Design Automation Conference), the so-called register allocation problem, is also NP-complete. Key words: Allocation; Coloring
1. Introduction
High-level synthesis begins with a behavioral specification of a digital system and produces a register-transfer level structure that realizes the given behavior [ 3 ]. The two major tasks in high-level synthesis are scheduling and hardware allocation. Hardware allocation is an assignment of functional units to arithmetic and logical operations, of registers to variables, and of interconnections between registers and functional units. The goal of these optimization tasks is to minimize the total amount of hardware elements. For an overview about different methods to solve these problems, we refer to [2,4,14]. In the synthesis, branching flow graphs are used to model the behaviour of a program [9,10]. First, the operations in a branching flow graph are scheduled to time intervals. Next, the operations are assigned to hardware elements which are called processors. In this step a conflict graph for the operations is generated which contains the information whether or not a pair of operations can be executed by the same processor. An assignment of the operations to a minimum number of processors corresponds directly to a minimum coloring of the conflict graph (see [ 16,18,20,21 ] ). The problem of finding a minimum coloring is one of the hardest graph optimization problems. As not all undirected graphs are conflict graphs, we get only a subproblem of the general coloring problem. 0167-9260/94/$07.00 (~) 1994 Elsevier Science B.V. All rights reserved SSDI 0167-9260(94)0001 2-3
K. Jansen~INTEGRATION, the VLSI Journal 17 (1994) 241-252
242
First attempts to classify conflict graphs in high-level synthesis are given by [ 18,20]. A classification of the conflict graphs for flow graphs with conditional branches is described in [ 12]. Moreover, it is shown that the decision problem to find a coloring with at most five colors restricted to these graphs is NP-complete. Therefore, the problem to find an assignment of the operations to at most five processors is shown to be NP-complete. If the branching flow graph has no conditional branches or if we have single-cycle functional units without chaining (i.e. a single execution step), then the problem is easier and the conflict graphs (interval graphs and cographs) can be colored in linear time [8,19]. On the other hand, the complexity of the allocation problem with a constant number of conditional branches in the flow graph was still open. In this paper, we analyse the class of conflict graphs with at most one conditional branch. In particular, we show that the processor allocation problem remains NP-complete for multi-cycle functional units (i.e. multiple execution steps). Another open problem, the register allocation problem, in high level synthesis is mentioned by Kurdahi and Parker [13]. Given a flow graph with conditional branches, the problem is to find an assignment of the variables to a minimum number of registers. There are many algorithms which work on unconditional register sharing [11,17,21]. However, when there are conditional branches in the flow graph the results by these algorithms are less satisfactory. Only few heuristics, without known about the complexity of this problem, are proposed to handle conditional register sharing [1,13,15]. Here, we show that the register allocation problem is NP-complete even if we have at most one conditional branch. The paper is organized as follows. Section 2 gives the definition of the problem and shows its relation to the coloring problem of a special graph class. Then, Section 3 proves the NP-completeness result. Finally, the last section relates the processor problem to the register allocation problem.
2. The problem definition A branching flow graph, or simply flow graph, is an acyclic digraph D = (V,E) with vertex set V and edge set E. The vertex set V is a union of a set of operations Op and a set of branching vertices F U J where F is a set of fork vertices and J is a set of join vertices. The simplest flow graph is a digraph with only one operation vertex. Given single operation flow graphs the class of all branching flow graphs can be generated recursively by the following operations. The first operation connects two disjoint flow graphs Di = (Vii, Ei) for i = 0, 1 with any (evt. empty) subset of edges from
{(v,v')ldo,t(v) = din(v') = O,v
E
Vo, v' E V1},
where do,t(v) ( d i n ( v ) ) denotes the out-degree (in-degree) of the vertex v. Using this operation we can connect two flow graphs in series or using an empty subset we can construct a flow graph consisting of two independent parts. The second operation constructs a conditional branch, which is identified by two unique vertices, a fork vertex f E F and a join vertex j E J. Given two disjoint flow graphs Di = (Vi, El) for i = 0, 1 and two new branching vertices f and j, a new flow graph D = (V,E) is generated. The vertex set V is equal to Vo U V1 U { f , j} and the edge set E is given by
E, U
U ( (f, v)Iv
4 . ( v ) = O) U ( (v, j)Iv C
do.,(v) = 0).
K. Jansen~INTEGRATION,the VLSI Journal 17 (1994) 241-252
243
Fig. 1. A 1-branching flow graph. To specify two different branching parts, we give the directed edges e = ( f , v) E E a weight we = i for v E V/. Using this operation, the fork vertex f has in-degree din(f) = 0, the join vertex j has out-degree do,,(j) = 0 and all other vertices lie on a directed path from f to j. We call a flow graph 1-branching flow graph, if the second operation is applied at most one times. Using a pair of branching vertices f and j, we can divide the flow graph into two different parts. Let V ( f , j ) be the operations lying on a directed path from f to j, and let Vi(f,j) for i E {0, 1} be the operations in V ( f , j ) which can be reached over an /-weighted directed edge ( f , v ) E E. Depending on a control of the branching vertices only one of the sets Vo(f,j) or V l ( f , j ) can be executed. For a control function 0 : F --~ {0, 1}, the set of executed operations for 0 is defined by
Opo = Op \ U V(,_C,(f))(f,j). fEF
A set of operations Op¢ is also called an execution trace. In Fig. 1 we give an example of a flow graph with one conditional branch and seven operations {1 . . . . . 7}. The execution traces are { 1 , 3 , 4 . . . . . 7} and {2,4 . . . . . 7}. In a schedule for the flow graph, each operation v E Op is assigned an interval Iv on the positive real line such that for each pair of operations v -7/v' with directed path from v to v' in the digraph and x E Iv, y E Iv,, we have x < y. A feasible schedule for our example is given by 11 = I4 = [ 1,2], 15 =•6 = [ 3 , 4 ] , 12=13 = [4,5] and 17= [ 5 , 6 ] . For each scheduled flow graph a conflict graph I = (Op, El) is defined with an edge e = (v, v') E El between two different operations v, v' E Op, if and only if there is at least one execution trace Op¢ with {v, v'} C Opt, and Iv M IL,, --/0. In other words, if there is at least one trace which executes two operations v, v' at a time step t E Iv M Iv,, then these operations cannot be assigned to the same processor. In our example we see that operations 5 and 6 are incompatible, but operations 2 and 3 can be assigned to the same processor. To describe the conflict graphs we now give some definitions about undirected graphs. A graph (V, E) is complete, if each pair of vertices v, v' E V with v ~ v' is connected by an edge {v, #} E E. Given a graph G = (V,E), a subset of vertices C C V is a clique of G, if each pair v,v' E C is connected by an edge. If for each pair v, v' of a subset U C V with v 5¢ v' there is no edge
244
K. Jansen~INTEGRATION, the VLS1 Journal 17 (1994) 241-252
in the graph, then U is called an independent set of G. A k-coloring of a graph G is a mapping f : V ~ {1 . . . . . k} with f ( v ) q f ( v ' ) for each pair v , v ' C V, v 5Lv' with {v,v'} E E. The minimum number of colors to color a graph G is called the chromatic number of G. A graph G = (V,E) is perfect [6] if for each subgraph GIA of G induced by a set A C V, the maximum clique size of GIA is equal to the chromatic number of GIA. An interesting subclass of the perfect graphs are the interval graphs. These are graphs that can be modeled as a set of intervals on the real line, with an edge between two vertices if their corresponding intervals share a point. For graphs Gi = (Vi, El) the union of Gl and G2, U(G1, G2) is given by (I/1 U V2, El U E2). The intersection N(G~, G2) of two graphs Gi = (V~,Ei) with the same set of vertices V1 = ½ is given by the intersection of the edge sets Et n E2. The conflict graph for a 1-branching flow graph is equal to the intersection of two graphs. The first graph is an interval graph given by the execution intervals for the operations, and the second is a non disjoint union of two complete graphs, one complete graph for each execution trace. We call these undirected graphs 1-branching graphs. Then, the problem to find an assignment of the operations to a minimum number of processors in a 1-branching flow graph can be described as follows:
Problem: Coloring of 1-branching graphs. Instance: A graph G = (V, E) given as the intersection of an interval graph G1 = (V, El ) and a union of two complete graphs G2 = (I/2, E2), G3 = (I/3, E3), where V2 U V3 = V, and an integer k E lXl. Question: Is there a k-coloring of the graph G ? Since perfect graphs can be colored with a minimum number of colors in polynomial time [ 7], one idea is to analyse whether conflict graphs are perfect. This is, however, not true for all conflict graphs, because a cycle of length five, which is non-perfect, is the intersection of an interval graph with intervals I~ = [1,1],12 = [1,3],I3 = [3,3],14 = [2,3] and ls = [1,2] and a union of two complete graphs defined on the sets {1,3,4, 5} and {1,2, 3}.
3. Complexity result In this section we show that the coloring problem is NP-complete for 1-branching graphs. Then, it is improbable that the problem can be solved in polynomial time, unless P = NP. For the NPcompleteness proof we use a reduction from the numerical 3-dimensional matching problem. This problem is defined as follows by Garey and Johnson [ 5 ].
Problem: Numerical 3-dimensional matching. Instance: Disjoint sets W = {wL Wm} , X = {xl . . . . . Xm} and Y = {Yl . . . . . y,,} of positive integers and a bound Z E lXl such that ~,~cwuxur a = mZ. Question: Is there a partition of W U X U Y into m disjoint sets Ai such that each Ai contains exactly one element from each of W, X and Y and such that for each 1 < i < m, ~"~aEai a = Z ? . . . . .
This problem remains NP-complete if we require that a < Z/2 for all elements a C W U X U Y . This can be proved by transforming the original problem to one where this assumption holds--simply add the value Z to each a E W U X U Y and use the 4 • Z instead of Z.
Theorem 1. The coloring problem restricted to 1-branching graphs remains NP-complete.
K. Jansen~INTEGRATION, the VLSI Journal 17 (1994) 241-252
245
[o11121314151617181911o111[12113114115116117118119q2o[211221231
rl r~
r,
]
l'2 pl P2
b,.,
t at a2 I
el
[
q][
c,.2
bl,2
I
f2
q~I
t
I b2.2
fl
I I I
L
c1.,
[ c2.1
I
]
g2
c2,2 I
I d2 dl
I h2 h,
Fig. 2. Example for the construction of an interval graph. Proof. Clearly, any coloring problem is in NP. We give a transformation from the numerical 3dimensional matching problem to the coloring problem. Given an instance of the matching problem with sets W, X, Y, let W = {w~ . . . . . win}, X = (xl . . . . . Xm} and Y = {Yl . . . . . Ym}. We assume, that wm is the largest integer in the set W (i.e. w,~ >_ wi for each 1 < i < m). From this, we first give the construction of a set of intervals for the interval graph. ( l ) For each wi E W, take an interval ai = [ 0, wi + i + 1 ), (2) for each wi E W, xj E X, take an interval bi,j = [Wi + i + 1, Wi + X i + (m + 2) + ( j Z ) ), (3) for each x i C X,yg E Y, take an interval Cj,k = [ ( j + 1 ) Z - Yk + m + 2, ( m + 1 ) ( Z + 1 ) + k + 1 ), (4) for each Yk C Y, take an interval dk = [ ( m + 1 ) ( Z + 1) + k + 1, ( m + 1 ) ( Z + 2 ) + 2 ) , (5) for each wi E W, take intervals ei,l = [ O, Wi -q- i + 1 ) for 1 < l < m -- 1, (6) for each 1 < j _< m and 1 < 1 _< m - 1, take intervals fj, t = [ 1 , j Z + m + 2 ) and gj, t = [ ( j + 1 ) Z + m + 1, ( m + 1 ) ( Z + 2 ) + 1). (7) for each 1 < k < m and 1 < l < m - 1, take intervals hk.t = [ ( m + 1 ) ( Z + 1) + k + 1, (m + 1 ) ( Z + 2) + 2 ) , (8) for 1 < i < m, take an interval Pi = [0, ( m + 1 ) ( Z + 2 ) + 2 ) , (9) for 1 < i < m ( m - 1), take intervals ri = [ w i n + m + 1 , ( m + 1 ) ( Z + 2 ) + 1), qi = [ ( m + 1 ) ( Z + 2) + 1, ( m + 1 ) ( Z + 2 ) + 2), r~ = [1, ( m + 1 ) ( Z + 1) + 2 ) and ql = [0, 1). An example is shown in Fig. 2, where we have Wl = 1, w2 = 2, xl = 1, x2 = 1, Yl = 2, Y2 = 3 and Z = 5, m = 2. Since m - 1 is equal to one, the second index for the intervals e, f, g and h is removed. Denote the set of all intervals ai ( 1 < i < m) by A. In a similar way, define sets B, C, D, E, F, G, H, P, R, R', Q and Q'; each of these sets contains all intervals with the same letter. First, let us consider which sets of vertices form cliques in the interval graph. These are A U E U P U Q', A U E U F U P U R',
K. Jansen~INTEGRATION, the VLSI Journal 17 (1994) 241-252
246
B U F U P U R ~, P U R U R', C U G U P U R, D U G U Hto P U R, D U H U P U Q and possibly further sets depending on the instance. Now we define two complete graphs with the following vertex sets:
AUBUCUDUEUFUGUHUQUQ',
(1)
EU HU P U Ru R'UQ UQq
(2)
Then, the intersection of the union of these two graphs and the interval graph is the input graph of the coloring problem. This input graph is a 1-branching graph. The sizes of the sets are IAI --- JDI = IPI = m, IBI = [CI = m 2 and the sizes of the other sets are IEI = IVl = [ a l = I n l = I a l = I a ' l = Iel = IRq = m ( m - 1). In total, we get 10m 2 - 5m vertices. In the next part we assume that the input graph has a partition into 2m 2 - m independent sets U~ . . . . . U2m2-m which induces a 2m 2 - m coloring and we show that there is a solution of the matching problem. We split the proof into three claims. The first claim is to distribute a part of the vertices into three groups of independent sets {U~ . . . . . Um}, {Urn+ 1. . . . . Urn2} and {Um2+l . . . . . U z m 2 _ m } . Using this distribution, we show that m vertices of A,B and C must lie in the first group and that the remaining m 2 - m vertices of B and C must lie in the second and third group, respectively. The second claim shows that several groups of vertices must lie together in the same independent sets. Using this result we can show that each independent set U~. . . . . U,, of the first group contains a triple of the form ai, bi,j, Cj,l~ which corresponds directly to one set A = {wi, xj, Yk} of the matching problem. The third claim proves that each element of W, X and Y is contained in these sets. Then, the equivalence between a solution of the matching problem and the coloring problem is shown. Now, we start with the first claim. The distribution of the vertices in the three groups is shown in Fig. 3; each group of independent sets is bordered by a dashbox. Claim 2. We can assume that the independent s e t s U 1 . . . . . U2m 2 --m have the following form: (1) {ai, pi, d~(i) } C U~ for each 1 < i < m, where fl : {1 . . . . . m} --~ {1 . . . . . m} is a permutation. m2
(2) E U G U Q U R C U i = m + I (3) F U H U Q' u R' C
Ui.
IUi=m2+l 12m2-m f i "
Proof. We prove only the first assertion; similar arguments hold for (2) and (3). Let P C uim_-iU i. Since the sets A U E U Q~ and E U P U Qt are cliques in the one branching graph and since the size of the set A U E U Q' is 2m 2 - m, for each 1 < i < m, there is a vertex a E A with {a} C Ui. Apply the same argument to the sets D U H U Q and H U P t0 Q, for each 1 < i < m, we have a vertex d E D with {d} C Ui. Then, it is clear that assertion (1) is true. [] Since F covers the third group of independent sets and G covers the second, and since the sets F U B and C U G are cliques, we get for the vertices bi,j E B and cj,k C C •
BC
U m2
i=lUi,
m I / 2m2--m Ui" • C C U i : l Ui U k..)i=m2+l
If we delete the vertices of the independent sets Um+~. . . . . U2m:-m, we have exactly m vertices of each of the sets A, B, C, D and P. We now study "cuts" between two sets of vertices in the graph. Consider the following three
247
K. Jansen~INTEGRATION, the VLSI Journal 17 (1994) 241-252
P _
--I
_
I
J
D
A
m
R m
I
I
J
[
E
G I
Q
I m
I
R' I
Q,
I
F
H I
Fig. 3. The assumption in Claim 2. AUE BUF C
and B and C U G and D U H .
For the first cut we refer to Fig. 4. It shows the intervals to those vertices of A U E on the left side, and those of B on the right side. Since several intervals intersect and since both sets have size m 2, there are few possibilities to put pairs of vertices from A U E and B together in m 2 independent sets. These possibilities for all three cuts are described in Claim 3. C l a i m 3. The following three assertions are true: (1) Fix i, and let U be an independent set with bi,j E U N B. Then, there ai E U or there is a vertex ei,l E E, 1 < l < m - 1 with ei,t E U. (2) Fix j, and let U be an independent set with bi,j E U N B or with f i j a vertex c/,k E C, 1 <_ k <_ m with Cj,k E U or there is a vertex gj, t E gj, t E U. (3) Fix k, and let U be an independent set with ej, k E U M C. Then, there dk E U or there is a vertex hk,t E H with hk,l E U.
is a vertex ai E A with E U M F. Then, there is G, 1 < l < rn - 1 with is a vertex dk E D with
Proof. We prove only the first assertion. The other two can be proved in the same way. The first assertion means that there is no independent set U in the coloring with ({bij, ee,t} C U or {bij, ai,) C U) for i ~ i'. Assume that this is not true. We have m 2 independent sets where each set contains exactly one element of A or E and one of B. Let bij be a vertex with smallest index i, such that bij
K. Jansen~INTEGRATION, the VLSI Journal 17 (1994) 241-252
248
bl,l bL2
al el,l
el,m-1
I
]
hi,,, a2 e2,1
b2,1
] ]
b2,2
e2,m- I
I
b2~m
am em,1
1
bm,l bm,2
era,m- 1
]
bm,m
I ]
Fig. 4. T h e cut b e t w e e n A O E and B.
lies in an independent set containing a vertex ee,t or ae for i ~ i'. If i < i', then the intervals overlap and the vertices are connected by an edge. This is impossible for vertices of an independent set and gives a contradiction for the case i < i'. Otherwise, if i > i', each vertex be,,k C B with i" less than i lies in an independent set containing a vertex ee,,t or ai,,. Then, also the vertices ei,,l and ae lie in independent sets containing a v e r t e x bi,.k. This is also impossible and gives a contradiction. [] From this analysis of cuts, we may now assume that the independent sets contain pairs of intervals, as illustrated in the following table. Take, for example, there is no independent set which contains {ai, bill} o r {el,l, bill, } for i ~ i ' . first vertex ai or e~._ b_,j o r fj,_ c-,i
second vertex
bicj,_ or g j,_ dk or hk,-
1< i < m 1 <_ j <_ m 1 <_ k <_ m
Now consider the graph after deleting the independent sets Um+l U 2 m 2 _ m . We now have exactly m vertices of each of the sets A, B, C, D and P and m independent sets Ui with {ai, Pi, da(i)} C Ui, m 1 < i < m where /3 is a permutation. Let us denote --U = tAi= ~ U;. In the next claim we show that the index sets {jlb~j c U} and {k[cj, k E U} are equal to {1 . . . . . m}. This implies that each element of the matching instance is chosen exactly once. For the proof of the claim we refer to Fig. 5. In this picture we have three blocks, one corresponds to the first m independent sets with vertices from A, B, C, D and P. The remaining m 2 - m vertices of B and C are distributed in the other two groups containing the vertices of F and G. . . . . .
K. Jansen~INTEGRATION, the VLSI Journal 17 (1994) 241-252
A
B
..
B
•
C
D
249
P
G
° •
I
C
I Fig. 5. The distribution of intervals used in Claim 4. C l a i m 4. The first m independent sets have the form: U~ = {a~, Pi, bi,~u), Ca(i),~(i), dB(i) },
where ce, fl : {1 . . . . . m} ~ {1 . . . . . m} are permutations. P r o o f . Let (ai, Pi, d#(i)} be a subset of the independent set Ui for 1 < i < m as given above. Using the results o f the cut analysis to a~ and dt~u~, each independent set Ui contains additionally a vertex b~,~u~ and a vertex c~i~,~i~. Assume on the contrary that a is not a permutation. Then, there are at least two vertices b~j and b~,j with i ~ i' in the first m independent sets for a fixed j . Then, in the next m 2 - m independent sets we have at most m - 2 vertices b~,,,j E B with index j . In addition, we m 2
know that G C U~=m+~ Ui, and that each vertex gj,_ lies an independent set containing a vertex b _ j . Therefore we need m - 1 vertices b~,,,j with index j , and this gives a contradiction. [] Now we can prove that there is a partition o f W U X U Y into sets Ai with exactly one element o f W, X and Y and with ~-]~a(:Ai s ( a ) = Z iff the constructed one branching graph has a 2m 2 - m coloring. Let U1 . . . . . U2,,2_,, be such a coloring. Then we can assume that the second and third group of independent sets contain the vertices E U F U G U H U Q u Q' u R U R'. Then, using the analysis above, the independent sets Ui, 1 < i < m have the form
Ui = { ai, bi,a(i), ca(i),B(i), d~u), Pi}
K. Jansen~INTEGRATION, the VLSI Journal 17 (1994) 241-252
250
where a, fl are permutations of { 1. . . . . m}. Using the fact that each set U, is an independent set, we have wi + x,~i) + Y~i) < Z. Since the a ( i ) and f l ( i ) are permutations of {1 . . . . . m}, we get
~--~w~ + x,~fi) + y~i) = ~ w i -~- x i -~- y~. i=1
i=l m
rt!
172
Applying the equality ~i=~ wi + ~i=l xj + ~k=~ Yk = m Z , we get for each 1 < i < m, w; + x,,<~) + Y,
As consequence of above, we get the following result:
Theorem 5. The problem to decide whether there is an assignment of scheduled operations in a flow graph with one conditional branch to k processors is NP-complete.
4. Register allocation In this section we give a direct consequence of our result to another open problem in hardware design, mentioned by Kurdahi and Parker [ 13 ]. This problem is known as register allocation problem. The data part of a flow graph is described by three sets V,V~n,Vou, and two mappings vi,, rout : Op ~ 2 v. The set V is the set of variables, and V~n,Vo,, C V are the input and output variables of the flow graph, respectively. This description means that each operation op E Op combines different values of variables v E vin(op) and generates values for the variables in Vout(Op). Usually, the following assumptions are used: • lv,.(op)l _< 2 and Ivo.,(op)l = 1 for each operation op E Op, and • each variable v E V appears only one times as an output variable. After the computation of a schedule for the operations in the flow graph, each operation op E Op is assigned an interval lop with start point Sop of the execution and end point eop. Then, for each
K. Jansen~INTEGRATION, the VLSI Journal 17 (1994) 241-252
251
variable v E V and each execution trace Opo the life times can be generated. These are the times, in which a value of a variable must be stored in an hardware element as a register. A variable v E V is alive at a time step z of the execution, if and only if (1) v E V/n or there is an operation op E Opt, with v E Uout(op), eop ~ Z and if (2) v E Vout or there is an operation op' E Op¢ with v E vin(op'), z < Sop,. Clearly, the life times of a variable for one execution trace form an interval. Let T0 (v) be the interval in which a variable v E V is alive. Two variables v, v t E V, v ~ v' are incompatible, if there is at least one execution trace Opo with T~,(v) N Tc,(v') 5~ (~. In other words, two variables cannot be assigned to the same register, if there is at least one trace such that the life times of the variables intersect. Using this relation, we define the conflict graph for the variables of a flow graph. The problem of finding an assignment of the variables to k registers is also equivalent to a coloring problem of the corresponding conflict graph. However, these graphs are a generalization of the conflict graphs for operations. So we get directly the following result:
Theorem 6. The problem to decide whether there is an assignment of the variables in a scheduled flow graph with one conditional branch to k registers is NP-complete. Proof. By reduction from the processor allocation problem. We use for each operation op E Op a chain of operations where the first operation generates a variable Vop and where the last operation uses the value of Vop as an input variable; for the other input and output variables of the operations in the chain we take distinct variables. []
5. Conclusion We have shown that the processor and register allocation problem is NP-complete if the corresponding flow graph has at least one conditional branch. In the problem instance, we have multi-cycle and uniform functional units (see e.g. [ 14] ) to execute the operations. If we have overlapping functionality, the allocation problem becomes harder [ 12] and is even NP-complete for single-cycle functional units. In the future, we plan to study the general conflict graphs in the register allocation problem as described by [ 15]. Moreover, it is interesting to obtain algorithms with known good approximation ratios such that the generated number of registers by the heuristic is at most p × to* where to* is the minimum number of needed registers for the problem instance and where p is a small constant.
Acknowledgement The author thanks Tiow Seng Tan for helpful discussions.
References [ 1] R.A. Bergamaschi, R. Camposano and M. Payer, Data-path synthesis using path analysis, 28th Design Automation Conference (1991) 591-595.
252
K. Jansen~INTEGRATION, the VLSI Journal 17 (1994) 241-252
[2] R. Camposano and W. Wolf, High-Level Synthesis (Kluwer, Dordrecht, 1992). [3] M.C. MacFarland, A.C. Parker and R. Camposano, Tutorial on high-level synthesis, 25th Design Automation Conference (1988) 330-336. [4] D. Gajski, N. Dutt, A. Wu and S. Lin, High-Level Synthesis: Introduction to Chip and System Design (Kluwer, Dordrecht, 1992). [5] M.R. Garey and D.S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness (Freeman, San Francisco, 1979). [6] M.C. Golumbic, Algorithmic Graph Theory and Perfect Graphs (Academic Press, New York, 1980). [7] M. Grtitschel, L. Lov~lsz and A. Schrijver, The ellipsoid method and its consequence in combinatorial optimization, Combinatorica 1 (1981) 169-197. [8] U.I. Gupta, D.T. Lee and J.Y.-T. Leung, Efficient algorithms for interval graphs and circular arc graphs, Networks 12 (1982) 459--467. [9] F.G. Heath, P.W. Foulk and D.Y. Li, Analysis and restructuring of concurrent systems using prolog, lEE Proceedings 5 (1984) 169-176. [10] M.S. Hecht, Flow Analysis of Computer Programs (Elsevier, New York, 1977). [ 11 ] C.Y. Huang, Y.S. Chen, Y.L. Lin and Y.C. Hsu, Data path allocation based on bipartite weighted matching, 27th Design Automation Conference (1990) 499-503. [ 12] K. Jansen, Processor-optimization for flow graphs, Theoretical Computer Science 104 (1992) 285-298. [13] F.J. Kurdahi and A.C. Parker, Real: a program for register allocation, 24th Design Automation Conference (1987) 210-215. [ 14] P. Michel, U. Lauther and P. Duzy, The Synthesis Approach to Digital System Design (Kluwer, Dordrecht, 1992). [15] C. Park, T. Kim and C.L. Liu, Register allocation for general data flow graphs, 2nd European Design Automation Conference (1993) 232-237. [16] P.G. Paulin and J.P. Knight, Scheduling and binding algorithms for high-level synthesis, 26th Design Automation Conference (1989) 1-6. [ 17] P.G. Paulin and J.P. Knight, Fource-directed scheduling for the behavioral synthesis of ASIC's, IEEE Transactions on CAD 6 (1989) 661-679. [ 18 ] P. Pfahler, Automated datapath synthesis: a compilation approach, Microprocessing and Microprogramming 21 (1987) 577-584. [ 19] D. Seinsche, On a property of the class of n-colorable graphs, Journal Combinatorial Theory 16 (1974) 191-193. [20] D.L. Springer and D.E. Thomas, Exploiting the special structure of conflict and compatibility graphs in high-level synthesis, International Conference on Computer Aided Design (1990) 254-257. [ 21 ] C.J. Tseng and D. Siewiorek, Automated synthesis of data paths in digital systems, IEEE Transactions on CAD 6 (1989) 379-395.
Klaus Jansen was born in Viersen (Germany) in 1961. He studied at the RWTH Aachen where he got his diplom degree in Computer Science in 1986. In 1990 he received his Ph.D. degree in Mathematics from the Universit~it Trier. Since then, Dr. Jansen works as Assistant Professor in Trier. His current research interests include computational geometry, algorithmic graph theory, VLSI synthesis, scheduling theory and parallel processing.