






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Scott A. Mahlke David C. Lin’^ William^ Y.^ Chen^ Richard^ E.^ Hank^ Roger^ A.^ Bringmann
Center for Reliable and High-Performance Computing University of Illinois Urbana-Champaign, IL 61801
Predicated execution is an effective technique for dealing with conditional branches in application programs. How- ever, there are several problems associated with conventional compiler support for predicated execution. First, all paths of control are combined into a single path regardless of their execution frequency and size with conventional if-conversion techniques. Second, speculative execution is difficult to com- bine with predicated execution. In this paper, we propose the use of a new structure, referred to as the hyperblock, to overcome these problems. The hyperblock is an efficient structure to utilize predicated execution for both compile- time optimization and scheduling. Preliminary experimen- tal results show that the hyperblock is highly effective for a wide range of superscalar and VLIW processors.
Superscalar and VLIW processors can potentially provide large performance improvements over their scalar predeces- sors by providing multiple data paths and function units. In order to effectively utilize the resources, superscalar and VLIW compilers must expose increasing amounts of instruc- tion level parallelism (ILP). Typically, global optimization and scheduling techniques are utilized by the compiler to find sufficient ILP. A common problem all global optimiza- tion and scheduling strategies must resolve is conditional branches in the target application. Predicated execution is an efficient method to handle conditional branches. Predi- cated or guarded execution refers to the conditional execu- tion of instructions based on the value of a boolean source operand, referred to as the predicate. When the predicate has value T, the instruction is executed normally and when the predicate has value F, the instruction is treated as a no_op. With predicated execution support provided in the architecture, the compiler can eliminate many of the condi- tional branches in an application. The process of eliminating conditional branches from a program to utilize predicated execution support is referred to as if-conversion [l] [2] [3]. If-conversion was initially pro- posed to assist automatic vectorization techniques for loops with conditional branches. If-conversion basically replaces conditional branches in the code with comparison instruc- tions which set a predicate. Instructions control dependent *David Lin is now with Amdahl Corporation, Sunnyvale, CA.
on the branch are then converted to predicated instructions dependent on the value of the corresponding predicate. In this manner, control dependences are converted to data de- pendences in the code. If-conversion can eliminate all non- loop backward branches from a program. Predicated execution support has been used effectively for scheduling both numeric and non-numeric applications. For numeric code, overlapping the execution of multiple loop it- erations using software pipeline scheduling can achieve high- performance on superscalar and VLIW processors [4] [5] [6]. With the abiity to remove branches with predicated exe- cution support, more compact schedules and reduced code expansion are achieved with software pipelining. Software pipelining taking advantage of predicated execution sup- port is productized in the Cydra 5 compiler [7] [8]. For non-numeric applications, decision tree scheduling utilizes guarded instructions to achieve large performance improve- ments on deeply pipelined processors as well as multiple- instruction-issue processors [9]. Guarded instructions allow concurrent execution along multiple paths of control and ex- ecution of instructions before the branches they depend on may be resolved. There are two problems, though, associated with utiliz- ing conventional compiler support for predicated execution. First, if-conversion combines all execution paths in a region (typically an inner loop body) into a single block. There- fore, instructions from the entire region must be examined each time a particular path through the region is entered. When a.ll execution paths are approximately the same size and have the same frequency, this method is very effective. However, the size and frequency of different execution paths typically varies in an inner loop. Infrequently executed paths and execution paths with comparatively larger number of instructions often limit performance of the resultant predi- cated block. Also, execution paths with subroutine calls or unresolvable memory accesses can restrict optimization and scheduling within the predicated block. The second problem is that speculative execution does not fit in conveniently with predicated execution. Speculative or eager execution refers to the execution of an instruction before it is certain its execution is required. With predicated instructions, speculative execution refers to the execution of an instruction before its predicate is calculated. Speculative execution is an important source of ILP for superscalar and VLIW processors by allowing long latency instructions to be initiated much earlier in the schedule.
In this paper, we propose the use of a structure, referred to as the hyperblock, to overcome these two problems. A hyperblock is a set of predicated basic blocks in which con- trol may only enter from the top, but may exit from one or more locations. Hyperblocks are formed using a modi- fied version of if-conversion. Basic blocks are included in a hyperblock based on their execution frequency, size, and in- struction characteristics. Speculative execution is provided by performing predicate promotion within a hyperblock. Su- perscalar optimization, scheduling, and register allocation may also be effectively applied to the resultant hyperblocks. The remainder of this paper consists of four sections. In Section 2, the architecture support we utilize for predicated execution is discussed. Section 3 presents the hyperblock and its associated transformations. In Section 4, a prelim- inary evaluation on the effectiveness of the hyperblock is given. Finally, some concluding remarks are offered in Sec- tion 5.
An architecture supporting predicated execution must be able to conditionally nullify the side effects of selected in- structions. The condition for nullification, the predicate, is stored in a predicate register file and is specified via an ad- ditional source operand added to each instruction. The con- tent of the specified predicate register is used to squash the instruction within the processor pipeline. The architecture chosen for modification to allow predicated execution, the IMPACT architecture model, is a statically scheduled, mul- tiple instruction issue machine supported by the IMPACT-I compiler [lo]. The IMPACT architecture model modifica- tions for predicated execution are baaed upon that of the Cydra 5 system [7]. Our proposed architectural modifica- tions serve to reduce the dependence chain for setting pred- icates and to increase the number of instructions allowed to modify the predicate register file. This section will present the implementation of predicated execution in the Cydra 5, and discuss the implications that the proposed modifications to the IMPACT architecture model will have on the archi- tecture itself, instruction set, and instruction scheduling.
The Cydra 5 system is a VLIW, multiprocessor system uti- lizing a directed-dataflow architecture. Each Cydra 5 in- struction word contains 7 operations, each of which may be individually predicated. An additional source operand added to each operation specifies a predicate located within the predicate register file. The predicate register file is an array of 128 boolean (l-bit) registers. Within the processor pipeline after the operand fetch stage, the predicate spec- ified by each operation is examined. If the content of the predicate register is ‘l’, the instruction is allowed to proceed to the execution stage, otherwise it is squashed. Essentially, operations whose predicates are ‘0’ are converted to no_ops prior to entering the execution stage of the pipeline. The predicate specified by an operation must thus be known by the time the operation leaves the operand fetch stage.
for (i=O; i<lOO; i++) if (A[i] 5 50) (a) j =^ j+2; else j = j+l;
mov rl,O mov r2,O Id r3,addr(A) Ll: Id r4,mem(r3+r2) bgt r4,5O,L add r5,r5, jump L L2: add r5,r5, L3: add rl,rl,l add r2,r2, blt rl,lOO,Ll
mov rl,O mov r2,O Id r3,addr(A) Ll: Id r4,mem(r3+r2) i%t r6,r4, stuff plJ stufF_bar p2,r add r5,r5,2 if p add r5,r5,1 if pl add rl,rl,l add r2,r2, blt rl,lOO,Ll
(b) (c)
Figure 1: Example of if-then-else predication, (a) source code segment, (b) assembly code segment, (c) assembly code segment after predication.
The content of a predicate register may only be modified by one of 3 operations: _stun, stu#bar, or brtop. The stufl operation takes as operands a destination predicate register and a boolean value, as well as, a source predicate register as described above. The boolean value is typically produced us- ing a comparison operation. If the predicate value is ‘I’, the destination predicate register is assigned the boolean value, otherwise the operation is squashed. The stuff-bar operation functions in the same manner, except the destination predi- cate register is set to the inverse of the boolean value when the predicate value is ‘1’. The brtop operation is used for loop control and sets the predicate controlling the next iter- ation by comparing the contents of a loop iteration counter to the loop bound. Figures la and lb show a simple for-loop containing an if- then-else conditional and its corresponding assembly code. To set the mutually exclusive predicates for the different exe- cution paths shown in this example, requires 3 instructions, as shown in Figure lc. First, a comparison must be per- formed, followed by a stufl to set the predicate register for the true path (predicated on pl in Figure lc) and a stufl_bar to set the predicate register for the false path (predicated on p2 in Figure lc). This results in a minimum dependence dis- tance of 2 from the comparison to the first possible reference of the predicate being set.
The proposed modifications to the Cydra 5 method for the IMPACT architecture model seek to reduce the number of instructions’ required to set a predicate and reduce the de- pendence length from the setting of a predicate to its first use. Figure 2 shows a basic model of a superscalar processor
‘In this context, instructionrefers to a superscalarinstruction, as opposed to a VLIW instruction as in Cydra 5.
cussed.
3.1 Hyperblock Block Selection
The first step of hyperblock formation is deciding which ba- sic blocks in a region to include in the hyperblock. The region of blocks to choose from typically is the the body of an inner most loop. However, other regions, including non-loop code with conditionals and outer loops containing nested loops, may be chosen. Conventional techniques for if-conversion predicate all blocks within a single-loop nest region together [13]. For hyperblocks, though, only a subset of the blocks are chosen to improve the effectiveness of com- piler transformations. Also, in programs with many possible paths of execution, combining all paths into a single predi- cated block may produce an overall loss of performance due to limited machine resources (fetch units or function units). To form hyperblocks, three features of each basic block in a region are examined, execution frequency, size, and instruc- tion characteristics. Execution frequency is used to exclude paths of control which are not often executed. Removing infrequent paths reduces optimization and scheduling con- straints for the frequent paths. The second feature is basic block size. Larger basic blocks should be given less prior- ity for inclusion than smaller blocks. Larger blocks utilize many machine resources and thus may reduce the perfor- mance of the control paths through smaller blocks. Finally, the characteristics of the instructions in the basic block are considered for inclusion in the hyperblock. Basic blocks with hazardous instructions, such as procedure calls and unresolv- able memory accesses, are given less priority for inclusion. Typically hazardous instructions reduce the effectiveness of optimization and scheduling for all instructions in the hy- perblock. A heuristic function which considers all three issues is shown below.
The Block Selection Value (BSV) is calculated for each basic block considered for inclusion in the hyperblock. The weight and size of each basic block is normalized against that of the “main path”. The main path is the most likely executed control path through the region of blocks considered for in- clusion in the hyperblock. The hyperblock initially contains only blocks along the main path. The variable bb_char; is the characteristic value of each basic block. The maximum value of bb_chari is 1. Blocks containing hazardous instruc- tions have bb_char; less than 1. The variable K is a machine dependent constant to represent the issue rate of the pro- cessor. Processors with more resources can execute more instructions concurrently, and therefore are likely to take advantage of larger hyperblocks. An example to illustrate hyperblock block selection is shown in Figure 4a. This example shows a weighted con- trol flow graph for a program loop segment. The numbers associated with each node and arc represent the dynamic fre- quency each basic block is entered and each control transfer is traversed, respectively. For simplicity, this example con- siders only block execution frequency as the criterion for hyperblock block selection. The main path in this example
Figure 4: An example of hyperblock formation, (a) af- ter block selection, (b) after tail duplication, (c) after if- conversion.
is blocks A, B, D, and E. Block C is also executed frequently, so it is selected as part of the hyperblock. However, Block F is not executed frequently, and is excluded from the hyper- block.
3.2 Hyperblock Formation After the blocks are selected, two conditions must be satis- lied before the selected blocks may be if-converted and trans- formed into a hyperblock.
from outside basic blocks to the selected blocks other than to the entry block.
selected blocks. These conditions ensure that the hyperblock is entered only from the top, and the instructions in a hyperblock are ex- ecuted at most once before the hyperblock is exited. Tail duplication and loop peeling are used to transform the ba- sic blocks selected for a hyperblock to meet the conditions. After the group of basic blocks satisfies the conditions, they may be transformed using the if-conversion algorithm de- scribed later in this section. Tail Duplication. Tail duplication is used to remove con- trol flow entry points into the selected blocks (other than the entry block) from blocks not selected for inclusion in the hyperblock. In order to remove this control flow, blocks which may be entered from outside the hyperblock are repli- cated. A tail duplication algorithm transforms the control flow graph by first marking all the flow arcs that violate Con- dition 1. Then all selected blocks with a direct or indirect predecessor not in the selected set of blocks are marked. Fi- nally, all the marked blocks are duplicated and the marked flow arcs are adjusted to transfer control to the correspond- ing duplicate blocks. To reduce code expansion, blocks are duplicated at most one time by keeping track of the current set of duplicated blocks.
I.,
Figure 5: An example of loop peeling, (a) original flow graph, (b) after peeling one iteration of the inner loop and tail du- plication.
An example to illustrate tail duplication is shown in Fig- ure 4b. In this example block E contains a control flow entry point from a block not selected for the hyperblock (block F). Therefore, block E is duplicated and the control flow arc from F to E is adjusted to the duplicated block E. The selected blocks after tail duplication are only entered from outside blocks through the entry block, therefore Condition 1 is satisfied. Loop Peeling. For loop nests with inner loops that iter- ate only a small number of times, efficient hyperblocks can be formed by including both outer and inner loops within a hyperblock. However, to satisfy Condition 2, inner loops contained within the selected blocks must be broken. Loop peeling is an efficient transformation to accomplish this task. Loop peeling unravels the first several iterations of a loop, creating a new set of code for each iteration. The peeled iter- ations are then included in the hyperblock, and the original loop body is excluded. A loop is peeled the average number of times it is expected to iterate based on execution profile information. The original loop body then serves to execute when the actual number of iterations exceeds the expected number. An example illustrating loop peeling is shown in Figure 5. All the blocks have been selected for one hyperblock, how- ever there is an inner loop consisting of blocks B and C. The inner loop is thus peeled to eliminate the backedge in the hyperblock. In this example, it assumed the loop executes an average of one iteration. Note also that tail duplication must be applied to duplicate block D after peeling is applied. After peeling and tail duplication (Figure 5b), the resultant hyperblock, blocks A, B’, C’, and D, satisfies Conditions 1 and 2.
Node Splitting. After tail duplication and loop peeling, node splitting may be applied to the set of selected blocks to eliminate dependence8 created by control path merges. At merge points, the execution time of all paths is typically dictated by that of the longest path. The goal of node split- ting is to completely eliminate merge points with sufficient code duplication. Node splitting essentially duplicates all blocks subsequent to the merge point for each path of con-
trol entering the merge point. In this manner, the merge point is completely eliminated by creating a separate copy of the shared blocks for each path of control. Node split- ting is especially effective for high-issue rate processors in control-intensive programs where control and data depen- dences limit the number of independent instructions. A problem with node splitting is that it results in large amounts of code expansion. Excessive node splitting may limit performance within a hyperblock by causing many un- necessary instructions to be fetched and executed. There- fore, only selective node splitting should be performed by the compiler. A heuristic function for node splitting impor- tance is shown below.
The Flow Selection Value (FSV) is calculated for each con- trol flow edge in the blocks selected for the hyperblock that contain two or more incoming edges, e.g., a merge point. Weight-f lowi is the execution frequency of the control flow edge. Size_flowi is the number of instructions that are ex- ecuted from the entry block to the point of the flow edge. The other parameters are the same parameters used in cal- culating the BSV. After the FSVs are computed, the node splitting algorithm proceeds by starting from the node with the largest differences between the FSVs associated with its incoming flow edges. Large differences among FSVs indicate highly unbalanced control flow paths. Thus, basic blocks with the largest difference should be split first. Node split- ting continues until there are no more blocks with 2 or more incoming edges or no difference in FSVs above a certain threshold. Our node splitting algorithm also places an up- per limit on the amount of node splitting applied to each hyperblock. If-conversion. If-conversion replaces a set of basic blocks containing conditional control flow between the blocks with a single block of predicated instructions. Figure 4c illustrates a resultant flow graph after if-conversion is applied. In our current implementation, a variant of the RK if-conversion algorithm is utilized for hyperblock formation [3]. The RK algorithm first calculates control dependence information be- tween all basic blocks selected for the hyperblock [12]. One predicate register is then assigned to all basic blocks with the same set of control dependences. Predicate register defining instructions are inserted into all basic blocks which are the source of the control dependence8 associated with a partic- ular predicate. Next, dataflow analysis is used to deter- mine predicates that may be used before being defined, and inserts resets (pred_clear instructions) to these predicates in the entry block of the hyperblock. Finally, conditional branches between basic blocks selected for the hyperblock are removed, and instructions are predicated based on their assigned predicate. An example code segment illustrating hyperblock forma- tion is shown in Figure 6. In the example, all blocks shown are selected for the hyperblock except block 5. A control entry point from block 5 to 7 is eliminated with tail duplica- tion. If-conversion is then applied to the resultant set of se- lected blocks. A single predicate (pl) is required for this set of blocks. Instructions in block 2 are predicated on pl_true and instructions in block 3 are predicated on PI-false. In-
instructionpromotioril() { for each instruction, op(~), in the hyperblock { if all the following conditions are true:
then do: set pred(c) = pred(y). ) }
Figure 9: Algorithm for type 1 instruction promotion.
the predicated instruction and the instruction which sets the corresponding predicate value. Therefore, instructions can be scheduled before their corresponding predicate are determined. Instruction promotion is effective by allowing long latency instructions, such as memory accesses, to be initiated early. Tirumalai et al. first investigated instruc- tion promotion to enable speculative execution for software pipelined repeat-until loops [13]. In this paper, instruction promotion is extended to more general code sequences in the context of the hyperblock. Promoted instructions execute regardless of their original predicate’s value. Therefore, promoted instructions must not overwrite any register or memory location which is re- quired for correct program execution. Also, exceptions for speculative instructions should only be reported if the spec- ulative instruction was supposed to execute in the original code sequence. Exceptions for speculative instructions are assumed to be handled with sentinel scheduling architecture and compiler support [14]. Therefore, hyperblock instruc- tion promotion concentrates on handling the first condition. Three algorithms for instruction promotion are utilized to handle different types of instructions. The first algorithm, shown in Figure 9, is used for the simplest form of promo- tion (type 1). Type 1 instruction promotion is utilized for instructions with predicates that are not defined multiple times. When the destination of the instruction considered for promotion is not live (defined before used along all possi- ble control paths) at the definition point of its predicate, its predicate can be promoted to that of the predicate defini- tion instruction it is dependent upon. In this manner, each application of type 1 promotion reduces the predicate depth by one until the null predicate is reached. An example illustrating type 1 promotion is shown in Fig- ure 10a (the original code sequence is shown in Figure 6~). The load instruction indicated by the arrow is promoted with a type 1 promotion. Since the instruction which defines pred- icate pl is not predicated, the indicated instruction is also promoted to be always executed. After promotion, the load instruction is no longer flow dependent on the predicate com- parison instruction and can be scheduled in the first cycle of the hyperblock. Type 2 instruction promotion is utilized for instructions with predicates defined multiple times. The algorithm (Fig- ure 11) is similar to type 1 promotion except that the in- struction is promoted all the way to the null predicate. A single level of promotion cannot be utilized due to the mul-
w
Figure 10: Example of hyperblock-specific optimizations, (a) after type 1 instruction promotion, (b) after renaming in- struction promotion, (c) after instruction merging.
instructionpromotion2() { for each instruction, op(z), in the hyperblock ( if all the following conditions are true:
where op(;) is all ops which define pred(z) or ancestors to pred(z). then do: set pred(z) = 0. } }
Figure 11: Algorithm for type 2 instruction promotion.
tiple definitions of the instruction’s predicate each possibly predicated on differing values. Many instructions cannot be promoted due to their desti- nation variable being live on alternate control paths (violate condition 4 in both type 1 and type 2 promotion). Promo- tion can be performed, though, if the destination register of the instruction is renamed. An algorithm to perform re- naming instruction promotion is shown in Figure 12. After an opportunity for renaming promotion is found, uses of the destination of the promoted instruction are updated with the renamed value. A move instruction must be inserted into the hyperblock to restore the value of the original register when the original control path is taken. An example of renaming instruction promotion is shown in Figure lob. The load instruction indicated by the arrow cannot be promoted with either type 1 or type 2 promotion because r4 is live at the definition point of the predicate pl (the use of r4 on the pl_true control path causes the variable to be live at the definition of pl). However, renaming the destination of the load allows it to be promoted. The use of r4 in the subsequent add is also adjusted to the new desti- nation (r5) to account for the renaming. Note also that the move instruction is not necessary here because r4 is immedi- ately redefined. In normal application of this optimization, the move is inserted, and subsequently deleted by dead code elimination. Instruction Merging. Instruction merging combines two instructions in a hyperblock with complementary pred- icates into a single instruction which will execute whether the predicate is true or false. This technique is derived from partial redundancy elimination [15]. The goal of instruction
renamingand_promotion() { for each instruction, op(x), in the hyperbloclt { if all the following conditions are true:
1. op(x) cannot **be promoted by either type 1 or type 2.
for all op(y) in (2). then do: rename deat(x) to new register. rename all arc(y) in (2) to new deat(x). add new move instruction, op(z), immediately following op(x) to move the new deat(x) to the old deat(x). pred(z) = pred(x). pred(x) = 0. ) }
Figure 12: Algorithm for renaming instruction promotion.
instructionmerging() { for each instruction, op(x), in the hyperblock { if all the following conditions are true:
1. op(x) can be promoted with type 1 promotion.
Figure 13: Algorithm for instruction merging.
merging is to remove redundant computations along multi- ple paths of control in the hyperblock. An algorithm to per- form instruction merging is shown in Figure 13. Identical in- structions with complementary predicates are first identified within a hyperblock. When the source operands definitions reaching each instruction are the same, an opportunity for instruction merging is found. Instruction merging is accom- plished by performing a type 1 promotion of the lexically first instruction and eliminating the second instruction.’ In- struction merging not only reduces the size of hyperblocks, but also allows for speculative execution of the resultant in- struction. An example of hyperblock instruction merging is shown Figure 10~. In this code segment, there are two add instruc- tions (add r2, rl, 1) predicated on complementary predicates in the hyperblock. After instruction merging, the first add is promoted with type 1 promotion to the ‘0’ predicate and the second add is eliminated.
3.5 Extending Conventional Compiler Tech- niques to use Hyperblocks After control flow information for hyperblocks is derived (Section 3.3), conventional optimization, register allocation,
2Note that instruction merging may appear to undo some of the effects of node splitting. However, instructions may only be merged when they are dependent on the same instructions for source operands (cond 5), thus node splitting is only undone for instructions it was not effective for.
and instruction scheduling techniques can be extended in a straight forward manner to work with hyperblocks. Differing from basic blocks, control flow within hyperblocks is not se- quential. However, a complete control flow graph among all instructions within a hyperblock may be constructed. There- fore, compiler transformations which utilize the sequential- ity inherent to basic blocks must just be modified to handle arbitrary control flow among instructions. Hyperblocks provide additional opportunities for improve- ment with conventional compiler techniques. Traditional global techniques must be conservative and consider all con- trol paths between basic blocks. Superblock techniques only consider a single path of control at a time through a loop or straight line code and thus may miss some potential opti- mizations that could be found across multiple paths. How- ever, a hyperblock may contain anywhere from one to all paths of control, and therefore can resolve many of the limi- tations of superblock techniques and traditional global tech- niques.
4 Performance Evaluation
In this section, the effectiveness of the hyperblock is analyzed for a set of non-numeric benchmarks.
4.1 Methodology
The hyperblock techniques described in this paper have been implemented in the IMPACT-I compiler. The IMPACT- I compiler is a prototype optimizing compiler designed to generate efficient code for VLIW and superscalar processors. The compiler utilizes a machine description file to generate code for a parameterized superscalar processor. The machine description file characterizes the instruction set, the microarchitecture (including the number and type of instructions that can be fetched/issued in a cycle and the in- struction latencies), and the code scheduling model. For this study, the underlying microarchitecture is assumed to have register interlocking and an instruction set and latencies that are similar to the MIPS R2000. The processor is assumed to support speculative execution of all instructions except store and branch instructions. Furthermore when utilizing hyperblock techniques, the processor is assumed to support predicated execution (as described in Section 2) with an un- limited supply of predicate registers. For each machine configuration, the execution time, as- suming a 100% cache hit rate, is derived from execution- driven simulation. The benchmarks used in this experiment consist of 12 non-numeric programs, 3 from the SPEC set, eqntott, espresso, li, and 9 other commonly used applica- tions, cccp, cmp, compress, grep, lex, qsort, tbl, WC, yacc.
4.2 Results
The performance of the hyperblock techniques are compared for superscalar processors with issue rates 2, 4, and 8. The issue rate is the maximum number of instructions the pro- cessor can fetch and issue per cycle. No limitation has been placed on the combination of instructions that can be is- sued in the same cycle. Performance is reported in terms
Figure 17: Predicate register usage distribution comparison, (PRl) without complementary predicate registers, (PR2) with complementary predicate registers.
nary evaluation of the hyperblock structure. The evaluation does not include compiler optimizations to increase ILP for superscalar processors, such as loop unrolling or induction variable expansion, applied to any structures. Currently, these optimizations are available for superblocks within the IMPACT-I compiler, however they have not been fully im- plemented for the hyperblock. To make a fair comparison, superblock ILP optimizations were disabled for this study. A complete analysis of the hyperblock, though, requires ILP optimizations be applied. In our current research, we are incorporating ILP optimizations with hyperblocks and eval- uating their effectiveness.
Conventional compiler support for predicated execution has two major problems: all paths of control are combined into a single path with conventional if-conversion, and speculative execution is not allowed in predicated blocks. In thii paper, the hyperblock structure is introduced to overcome these problems. Hyperblocks are formed by selectively including basic blocks in the hyperblock according to their execution frequency, size, and instruction characteristics. Systemati- cally excluding basic blocks from the hyperblocks provides additional optimization and scheduling opportunities for in- structions within the hyperblock. Speculative execution is enabled by performing instruction promotion and instruc- tion merging on the resultant hyperblocks. Preliminary ex- perimental results show that hyperblocks can provide sub stantial performance gains over other structures. Hyper- blocks are most effective for higher issue rate processors where there are sufficient resources to schedule instructions for multiple paths of control. However, additional super- scalar optimization and scheduling techniques must be in- corporated with hyperblocks to measure their full effective- ness.
The authors would like to thank Bob Rau at HP Labs along with all members of the IMPACT research group for their comments and suggestions. This research has been sup- ported by JSEP under Contract N00014-90-J-1270, Dr. Lee Hoevel at NCR, the AMD 29K Advanced Processor Devel- opment Division, Matsushita Electric Industrial Co. Ltd.,
Hewlett-Packard, and NASA under Contract NASA NAG 1-613 in cooperation with ICLASS.
PI
131
141
151
[
PI
PO
WI
P
1131
[I
P
Ft. A. Towle, Control and Data Dependence for Program Transformationa. PhD thesis, Department of Computer Sci- ence, University of Ihinois, Urbana-Champai8n IL, 1976. J. R. Allen, K. Kennedy, C. Porterfield, and J. Warren, “Con- version of control dependence to data dependence,” in Pro- ceedinga of the 10th ACM Symposium on Principlea of PTO- gramming Languages, pp. 177-189, January 1983. J. C. H. Park and M. S. SchIansker, “On predicated execu- tion,” Tech. Rep. HPL-91-58, HP Laboratories, Palo Alto, CA, May 1991. B. R. Rau and C. D. Glaeser, “Some scheduling techniques and an easily schedulable horizontal architecture for high performance scientific computing,” in Proceedings of the 20th Annual Workshop on Microprogramming and Microarchitec- lure, pp. 183-198, October 1981. M. S. Lam, ‘Software pipelining: An effective scheduling technique for VLIW machines,” in Proceedings of the ACM SIGPLAN 1988 Conference on Programming Language De- sign and Implementation, pp. 318328, June 1988. A. Aiken and A. Nicolau, “Optimal loop parallehzation,” in Proceeding8of the ACM SIGPLAN 1988 Conference on PTO- gramming Language Design and Implementation, pp. 308- 317, June 1988. B. R. Rau, D. W. L. Yen, W. Yen, and R. A. ,Towle, “The Cydra 5 departmental supercomputer,” IEEE Computer, pp. 12-35, January 1989. J. C. Dehnert, P. Y. T. Hsu, and J. P. Bratt, “Overlapped loop support in the Cydra 5,” in Proceedings oj the 17th International Symposium on Computer Architecture, pp. 26- 38, May 1989. P. Y. T. Hsu and E. S. Davidson, “Highly concurrent scelar processing,” in Proceeding8 of the 13th International Sym- posium on Computer Architecture, pp. 386-395, June 1986. P. P. Chang, S. A. MahIke, W. Y. Chen, N. J. Warter, and W. W. Hwu, “IMPACT: An architectural framework for muhiple-instruction-issue processors,” in Proceedings of the 18th International Symposium on Computer Architec- ture, pp. 266-275, May 1991. W. W. Hwu, S. A. MahIke, W. Y. Chen, P. P. Chang, N. J. Water, R. A. Bringmann, R. G. OueIIette, R. E. Hank, T. Kiyohara, G. E. Haab, J. G. Hohn, and D. M. Lavery, “The superblock: An effective structure for VLIW and su- perscelar compilation,” To appear Journal of Sapercomput- ing, January 1993. J. Ferrante, K. J. Ottenstein, and J. D. Warren, “The program dependence graph and its use in optimization,” ACM Transactions on Programming Languages and Sys- tems, vol. 9, pp. 319-349, July 1987. P. TiiaIai, M. Lee, and M. SchIansker, “ParaIIeIizationof loops with exits on pipelined architectures,” in Proceeding of Supercomputing ‘90, November 1990. S. A. MahIke, W. Y. Chen, W. W. Hwu, B. R. Rau, and M. S. SchIansker, “Sentinel scheduling for VLIW and superscalar processors,” in Proceedings of 5th International Conference on Architectural Support for Programming Languages and Operating Systema, October 1992. E. Morel and C. Renviose, “Global optimization by suppres- sion of partial redundancies,” Communications of the ACM, pp. 96-103, February 1979.