Retargeting Open 64 to A RISC processor A
- Slides: 15
Retargeting Open 64 to A RISC processor -- A Student’s Perspective Author: Huimin Cui Xiaobing Feng 2009. 03 1
Motivation l Retarget is of significance for Open 64 – Good retarget-ability brings more targets – more targets support brings more user. l But there is no detailed manual – To show to retarget step by step, to let even a green-hand can do the porting. – To give an overview of the performance just after retarget done. 2
Retarget Procedure l Summarized a detailed procedure for future retarget – – 3 File creation order Building order Listed all the files that require modification How to fix up some critical files
Retarget Procedure —our methodology(1) l 1 st step – Verify basic compiler issues, l C Front-end l IR transformation l Code generation l Simple Library Function Call – Naïve Hello. World 4
Retarget Procedure —our methodology(2) l 2 nd step – Verify ABI/CFlow – Variations of Hello. World l Change Data types of parameters l Add control-flow: branch & loop l 3 rd step – Verify optimization FRAMEWORK – -O 0, -O 2, -O 3
Retarget Procedure —our methodology(3) l 4 th step – Further verify CG/optimizations/multiple procedures – Stanford benchmark, -O 0 to –O 3 l 5 th step – Verify c++ FE/loop optimizations – Abstraction penalty benchmark, -O 0 to –O 3 6
Retarget Procedure—some points l In most cases, it’s easier to tailor the files from existing ones l Make the compiler work, then make it perform l Use debugging tools of isolation/tracing/ dumping 7
Discussion—Easy of Retarget l Took a student 2 months l Dealt with – – ISA ABI Code Generation Some machine-dependent functions l Passed the benchmarks, (-O 0 to –O 3) – Stanford Benchmark – Abstraction Penalty Benchmark – Some applications from CPU 2000, bzip 2 & mcf 8
Discussion—Performance (1) l NO machine-dependent performance tuning after retarget. – competitive or better performance compared to a matured GCC-Mips compiler – obvious performance improvement from –O 2 to – O 3, especially for C++ programs with higher abstraction levels. 9
Discussion—Performance(2) Performance of abstraction penalty, -O 2 and –O 3 The higher, the better 10
Discussion—Performance(3) Performance of Stanford Benchmark The lower, the better 11
Discussion—Performance(4) Performance of bzip 2 & mcf 12
Suggestions l Can the flags distributed in multiple files be merged into one file? – Eg. Endianness l Can some graphic tools be developed for view IR, flow, etc? 13
Summary l A detailed retarget procedure (derived from Fred Chow’s document) – Shared our methodology l Discussed two retargeting issues – Ease of retarget – Performance l Some suggestions
Questions & Comments? l please mail to: huimin. cui@gmail. com 15