









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!










Today and next time Y
Background for HW » Using and modifying trimaran Y
Region formation – traces, superblocks, hyperblocks » Loop unrolling » Branch optimizations Y
Needed software Y
Y
Y
Y
Y
Y
2.8.1 – officially » 2.95 should work, I have it working with 2. Y
Y
Y
Y
dot – http://www.research.att.com/sw/tools/graphviz » xvcg – source on course webpage (./configure, make)
Installation – Step 1 Y
Y
trimaran/envrc – should have everything you need » Modify first line to define path to your trimaran » Add to your .cshrc, source trimaran/envrc y So you don’t forget
Trimaran overview C source Frontend – parsing, profiling function inlining, memory dep analysis. Also, does some backend stuff – region formation, optimization Impact Lcode Backend – analysis, optimization, scheduling register allocation, code generation Elcor Rebel Emulator – emulate VLIW semantics using C code – “compiled simulation” Simu C emulation code
Running trimaran Y
Start with this » Compile strcpy with basic blocks to test install » Lots of documentation at http://www.trimaran.org Y
Command line way to invoke entire system – Gui calls this » “tcc –help” to get options » “tcc –bench strcpy” to run strcpy with basic blocks Y
To run trimaran on a benchmark, need some setup y source, compile flags, link flags y input for profiling the code y output to check it ran properly y To add a new benchmark, follow the organization that is there » 583test1, 583test2, 583test3, 583test4 for HW
Elcor – Directory structure Y
Y
type make in src to build elcor Y
Machine descriptions for the target processor » hmdes2 = high level machine description – for human » lmdes2 = low-level machine description – for compiler » hc = script to convert hmdes2 to lmdes » hpl_pd_elcor_std.hmdes2 – includes other files Y
Compiler switches broken into groups y DRIVER_DEFAULTS , ANALYSIS_DEFAULTS, etc. y Changing switch values X Modify ***_DEFAULTS file X -Fswitch=value on the command-line
Running Elcor manually Y
tcc –bench 583test Y
impact_intermediate » elcor_intermediate y 583test1.O_tr.tgz – impact output / elcor input (bridge code) X Impact assembly (called Lcode or Mcode) X This is what you will run Elcor manually on X Untar this file ± file1.O_tr, file2.O_tr, … ± 1 file per original C source file y 583test1.O_el.tgz – elcor output X Rebel y host_layout_info.md – data structure organization stuff » simu_intermediate
Running simu manually Y
Converts Rebel to C » Models VLIW architecture properly y predicates, NUAL, etc. » Allows testing the compiler is correct! Y
codegen –el test1.O_el –o test1.c –Finput_format=rebel \ –Femulate_unscheduled=yes –Femulate_virtual_regs=yes y test1.c y benchmark_data_init.simu.c » Note need host_layout_info.md in the directory » gcc –I/home/mahlke/trimaran/simu/src/Emulib \ –L/home/mahlke/trimaran/simu/lib *.c –lequals –lm » ./a.out > output, diff output verses expected output
Modifying elcor Y
“homegrown” version of STL y list y dlist y slist y tuples (Pair, Triple, Quad) y hast_set y hash_map y hash_table y eString y map y vector y bit_vector y matrix » Use these a lot – read .h file