90 likes | 103 Views
A Brief History of Retargetable Compilers. Philip Sweany 12/3/15. In the Beginning …. “Compilers” (early 1950s) were basically a group of assembly language instructions that could be “sewn” together Once actual compilers were available, the search for “reusable” compilers started.
E N D
A Brief History of Retargetable Compilers Philip Sweany 12/3/15
In the Beginning … • “Compilers” (early 1950s) were basically a group of assembly language instructions that could be “sewn” together • Once actual compilers were available, the search for “reusable” compilers started
The Nirvana of Retargetable Compilers • Start with M languages and N instruction sets • Build M (language dependent) front ends • Build N (machine dependent) back ends • Viola ! – M * N compilers
Alas • No such thing as • Machine independent front-end (parser) • Language independent back-end (code gen) • So, M*N compilers were of poor quality • Portable C compiler (pcc) (1970s) was sort of an example but even then much work needed to retarget
PO, HOP, CHOP • Efforts shifted from retargetable per se to code generation that could “easily” map from one instruction set to another • Portable Optimizer (PO) • CISC architectures • Replace set(s) of N instructions with a set of < N • Long time (and much work) to “target” to new machine • HOP, CHOP were “improvements”
Modern Retargetable Compiler(s) • GCC “solves” retargetable issue, RIGHT? • Well, …, perhaps at the instruction level and with great difficulty • LLVM likely (I guess) less cumbersome but still “only” instruction set OR • ROCKET (1990s) • Arcane (prolog like) machine description of ISA AND microarchitecture. 2000 lines of “description.”
The Problem • We’d LIKE a retargetable compiler that • Targets a new machine quickly, easily • Generates code considering the micro-architecture of the computer, not just the ISA • Are these realisitc goals? Maybe
Hardware/Software Co-Design • A different approach • Use software to design hardware for a specific application (or at least group of applications) • Popular in Europe • Still requires a great deal of human expertise and intervention
Pat Burke’s Dissertation • Design retargetable compiler (or at least the machine description for) a “new” type of processor, namely • Heterogeneous multiprocessing on a chip