21.01.2013 Views

Lecture Notes in Computer Science 4917

Lecture Notes in Computer Science 4917

Lecture Notes in Computer Science 4917

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CLI as an Effective Deployment Format for Embedded Systems 141<br />

x86 SH-4<br />

Fig. 5. Impact of high-level optimizations on performance (config b vs. c)<br />

Understand<strong>in</strong>g the reasons of variations is quite difficult. Even though the<br />

compiler <strong>in</strong>fractucture is the same, each target triggers the heuristics <strong>in</strong> different<br />

ways. For example, <strong>in</strong> the case of bitcount, a <strong>in</strong>ner loop has been unrolled by<br />

the SH-4 compiler and not by the x86 compiler, even though the <strong>in</strong>put file is<br />

identical. This leads to the difference <strong>in</strong> performance seen on Figure 4.<br />

Figure 5 compares the two configurations that use CLI , evaluat<strong>in</strong>g the need<br />

to rerun high-level optimizations <strong>in</strong> the CLI to native translation. The average<br />

slowdown is 1.3% on SH-4 and 4% on x86. Exclud<strong>in</strong>g the extreme case mpeg2enc,<br />

they are respectively 0.4% and 1.3%. Most performance degradations are with<strong>in</strong><br />

5% on the SH-4 and with<strong>in</strong> 10% on the x86. This is a good news because it means<br />

that there is little need to run high-level optimizations on the CLI executable, it<br />

is enough to run the back-end (target specific) optimizer. Some poor results are<br />

expla<strong>in</strong>ed by <strong>in</strong>efficient CLI patterns. Array accesses are expressed <strong>in</strong> GIMPLE<br />

by a s<strong>in</strong>gle node, e.g. a[i]. There is no such abstraction <strong>in</strong> CLI (at least for<br />

non managed data). We are forced to emit the code sequence correspond<strong>in</strong>g to<br />

*(@a+sizeof elem*i). When a loop conta<strong>in</strong>s several array accesses, we repeat<br />

the address computation, but there is no later code cleanup. In configuration<br />

b, the high level loop optimizer moves loop <strong>in</strong>variants and rewrites <strong>in</strong>duction<br />

variables. In configuration c, this does not happen, leav<strong>in</strong>g the back-end with<br />

poor quality code. This is obviously an <strong>in</strong>efficiency we will fix.<br />

Keep also <strong>in</strong> m<strong>in</strong>d that those experiments rely on a prototype implementation<br />

of the CLI to native code generator. Emphasis has been put on correctness, not<br />

yet on quality. Even though the CLI generator is <strong>in</strong> a much better state, we have<br />

identified a number of areas where it could be improved. This lack of tun<strong>in</strong>g also<br />

contributes to the deviation observed <strong>in</strong> the results.<br />

4 Related Work<br />

4.1 Not CLI -Based<br />

In many aspects, the Java framework [17] is the precursor of CLI . Similarly to<br />

CLI , Java def<strong>in</strong>es a bytecode based virtual mach<strong>in</strong>e, a standard library and it

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!