Horizontal microarchitectures often have features that make it difficult for a compiler to produce good object code from a high-level language. Although the problem of compacted microcode into a near-minimal number of microinstructions has received a great deal of attention, other phases of the compiler have not been studied as thoroughly. This dissertation explores methods of generating quality microcode for horizontal microarchitectures, compacting the microcode, and the interaction between code generation and compaction.
There are often several code sequences that perform the same computation for a given microarchitecture. If the code generation and compaction phases of the compiler are executed sequentially, the code generator may not be able to determine the best code because a code sequence that compacts well in one situation may contain several bottlenecks in another. This dissertation explores three methods of coupling the code generation and compaction phases of the compiler, and concludes that subtle micromachine features make it very difficult to produce good code unless the code generator actually produces several candidate code sequences that are compacted and compared with one another.
This dissertation also explores machine-independent methods of generating microcode. One aspect of the code generation problem--that of generating constants "intelligently"--is discussed in detail. A technique called constant unfolding is presented that can be used to produce code sequences that generate constants in "unusual" ways during execution; such code sequences often lead to more compact code when the literal field of the microinstruction is a bottleneck.
The classical microcode compaction problem is also examined. We show that this NP-complete problem can be solved in polynomial time if the number of registers in the micromachine is bounded, and use this result to argue that the problem is not general enough. A heuristic algorithm is presented for solving the general problem.
Cited By
- Pister M and Kästner D Generic software pipelining at the assembly level Proceedings of the 2005 workshop on Software and compilers for embedded systems, (50-61)
- Muchnick S and Gibbons P (2004). Efficient instruction scheduling for a pipelined architecture, ACM SIGPLAN Notices, 39:4, (167-174), Online publication date: 1-Apr-2004.
- Wilken K, Liu J and Heffernan M Optimal instruction scheduling using integer programming Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation, (121-133)
- Wilken K, Liu J and Heffernan M (2019). Optimal instruction scheduling using integer programming, ACM SIGPLAN Notices, 35:5, (121-133), Online publication date: 1-May-2000.
- Leupers R and Marwedel P Using compilers for heterogeneous system design Proceedings of the IFIP WG10.3 working conference on Parallel architectures and compilation techniques, (273-276)
- Leupers R, Schenk W and Marwedel P Retargetable assembly code generation by bootstrapping Proceedings of the 7th international symposium on High-level synthesis, (88-93)
- Marwedel P Tree-based mapping of algorithms to predefined structures Proceedings of the 1993 IEEE/ACM international conference on Computer-aided design, (586-593)
- Allan V, Su B, Wijaya P and Wang J (1992). Foresighted Instruction Scheduling Under Timing Constraints, IEEE Transactions on Computers, 41:9, (1169-1172), Online publication date: 1-Sep-1992.
- Allen V, Janardhan J, Lee R and Srinivas M (1992). Enhanced region scheduling on a program dependence graph, ACM SIGMICRO Newsletter, 23:1-2, (72-80), Online publication date: 10-Dec-1992.
- Vegdahl S (2019). A dynamic-programming technique for compacting loops, ACM SIGMICRO Newsletter, 23:1-2, (180-188), Online publication date: 10-Dec-1992.
- Allen V, Janardhan J, Lee R and Srinivas M Enhanced region scheduling on a program dependence graph Proceedings of the 25th annual international symposium on Microarchitecture, (72-80)
- Vegdahl S A dynamic-programming technique for compacting loops Proceedings of the 25th annual international symposium on Microarchitecture, (180-188)
- Jones R and Allan V Software pipelining Proceedings of the 24th annual international symposium on Microarchitecture, (82-92)
- Beaty S Genetic algorithms and instruction scheduling Proceedings of the 24th annual international symposium on Microarchitecture, (206-211)
- Beaty S, Whitley D and Johnson G (1991). Motivation and framework for using genetic algorithms for microcode compaction, ACM SIGMICRO Newsletter, 22:1, (20-27), Online publication date: 1-Jan-1991.
- Sweany P and Beaty S Post-compaction register assignment in a retargetable compiler Proceedings of the 23rd annual workshop and symposium on Microprogramming and microarchitecture, (107-116)
- Beaty S, Whitley D and Johnson G Motivation and framework for using genetic algorithms for microcode compaction Proceedings of the 23rd annual workshop and symposium on Microprogramming and microarchitecture, (117-124)
- Nowak L and Marwedel P Verification of hardware descriptions by retargetable code generation Proceedings of the 26th ACM/IEEE Design Automation Conference, (441-447)
- Allan V Peephole optimization as a targeting and coupling tool Proceedings of the 22nd annual workshop on Microprogramming and microarchitecture, (112-121)
- Wijaya P and Allan V Incremental foresighted local compaction Proceedings of the 22nd annual workshop on Microprogramming and microarchitecture, (163-171)
- Linn J and Ardoin C All example of using pseudofields to eliminate version shuffling in horizontal code compaction Proceedings of the 22nd annual workshop on Microprogramming and microarchitecture, (172-180)
- Allan V (1989). Peephole optimization as a targeting and coupling tool, ACM SIGMICRO Newsletter, 20:3, (112-121), Online publication date: 1-Aug-1989.
- Wijaya P and Allan V (1989). Incremental foresighted local compaction, ACM SIGMICRO Newsletter, 20:3, (163-171), Online publication date: 1-Aug-1989.
- Linn J and Ardoin C (1989). All example of using pseudofields to eliminate version shuffling in horizontal code compaction, ACM SIGMICRO Newsletter, 20:3, (172-180), Online publication date: 1-Aug-1989.
- Mueller R, Duda M, Sweany P and Walicki J (2019). Horizon, IEEE Transactions on Software Engineering, 14:5, (575-583), Online publication date: 1-May-1988.
- Allen V and Mueller R (2019). Compaction with General Synchronous Timing, IEEE Transactions on Software Engineering, 14:5, (595-599), Online publication date: 1-May-1988.
- Howland M, Mueller R and Sweany P (1988). Trace scheduling optimization in a retargetable microcode compiler, ACM SIGMICRO Newsletter, 19:1-2, (45-49), Online publication date: 1-Jun-1988.
- Nowak L (1988). Graph based retargetable microcode compilation in the MIMOLA design system, ACM SIGMICRO Newsletter, 19:1-2, (50-53), Online publication date: 1-Jun-1988.
- Allan V Data dependency graph bracing Proceedings of the 21st annual workshop on Microprogramming and microarchitecture, (91-93)
- Andrews M and Lam F A new rapid prototyping firmware (RPF) tool Proceedings of the 21st annual workshop on Microprogramming and microarchitecture, (94-96)
- Molnar S and Surles M A microprogramming support tool for pipelined architectures Proceedings of the 21st annual workshop on Microprogramming and microarchitecture, (108-110)
- Su B, Wang J and Xia J Global microcode compaction under timing constraints Proceedings of the 21st annual workshop on Microprogramming and microarchitecture, (116-118)
- Allen V and Mueller R (1987). Phase coupling for horizontal microcode generation, ACM SIGMICRO Newsletter, 18:4, (24-29), Online publication date: 1-Dec-1987.
- Su B, Ding S, Wang J and Xia J Microcode compaction with timing constraints Proceedings of the 20th annual workshop on Microprogramming, (59-68)
- Howland M, Mueller R and Sweany P Trace scheduling optimization in a retargetable microcode compiler Proceedings of the 20th annual workshop on Microprogramming, (106-114)
- Allan V and Mueller R Phase coupling for horizontal microcode generation Proceedings of the 20th annual workshop on Microprogramming, (115-125)
- Nowak L Graph based retargetable microcode compilation in the MIMOLA design system Proceedings of the 20th annual workshop on Microprogramming, (126-132)
- Gibbons P and Muchnick S Efficient instruction scheduling for a pipelined architecture Proceedings of the 1986 SIGPLAN symposium on Compiler construction, (11-16)
- Gibbons P and Muchnick S (2019). Efficient instruction scheduling for a pipelined architecture, ACM SIGPLAN Notices, 21:7, (11-16), Online publication date: 1-Jul-1986.
- Su B, Ding S and Xia J (1986). URPR—An extension of URCR for software pipelining, ACM SIGMICRO Newsletter, 17:4, (94-103), Online publication date: 21-Dec-1986.
- Su B, Ding S and Xia J URPR—An extension of URCR for software pipelining Proceedings of the 19th annual workshop on Microprogramming, (94-103)
- Vegdahl S (1985). The design of an interactive compiler for optimizing microprograms, ACM SIGMICRO Newsletter, 16:4, (129-136), Online publication date: 1-Dec-1985.
- Vegdahl S The design of an interactive compiler for optimizing microprograms Proceedings of the 18th annual workshop on Microprogramming, (129-136)
- Mueller R, Duda M and O'Haire S (1984). A survey of resource allocation methods in optimizing microcode compilers, ACM SIGMICRO Newsletter, 15:4, (285-295), Online publication date: 1-Dec-1984.
- Dasgupta S (1984). A model of clocked micro-architectures for firmware engineering and design automation applications, ACM SIGMICRO Newsletter, 15:4, (298-308), Online publication date: 1-Dec-1984.
- Mueller R, Duda M and O'Haire S A survey of resource allocation methods in optimizing microcode compilers Proceedings of the 17th annual workshop on Microprogramming, (285-295)
- Dasgupta S A model of clocked micro-architectures for firmware engineering and design automation applications Proceedings of the 17th annual workshop on Microprogramming, (298-308)
- Mueller R, Allan V and Varghese J (1984). The Complexity of Horizontal Word Encoding in Microprogrammed Machines, IEEE Transactions on Computers, 33:10, (938-939), Online publication date: 1-Oct-1984.
- Mueller R and Varghese J (1983). Flow graph machine models in microcode synthesis, ACM SIGMICRO Newsletter, 14:4, (159-167), Online publication date: 1-Dec-1983.
- Larsen T, Landskov D and Shriver B (1983). A resource request model for microcode compaction, ACM SIGMICRO Newsletter, 14:4, (215-226), Online publication date: 1-Dec-1983.
- Vegdahl S (1983). A new perspective on the classical microcode compaction problem, ACM SIGMICRO Newsletter, 14:1, (11-14), Online publication date: 1-Mar-1983.
Recommendations
Some Experiments in Local Microcode Compaction for Horizontal Machines
Microcode compaction is an essential tool for the compilation of high-level language microprograms into microinstructions with parallel microoperations. The purpose of the research reported in this paper is to compare four microcode compaction methods ...
Phase coupling and constant generation in an optimizing microcode compiler
MICRO 15: Proceedings of the 15th annual workshop on MicroprogrammingThe designer of an optimizing compiler must concern himself with the order in which optimization phases are performed; a pair of phases may be interdependent in the sense that each phase could benefit from information produced by the other. In a ...
Speculative Code Compaction: Eliminating Dead Code via Speculative Microcode Transformations
MICRO '22: Proceedings of the 55th Annual IEEE/ACM International Symposium on MicroarchitectureThe computing landscape has been increasingly characterized by processor architectures with increasing core counts, while a majority of the software applications remain inherently sequential. Although state-of-the-art compilers feature sophisticated ...