22.08.2013 Views

Parallelizing the Construction of Static Single Assignment Form

Parallelizing the Construction of Static Single Assignment Form

Parallelizing the Construction of Static Single Assignment Form

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

app # methods (% change) mean length (% change) max length<br />

montecarlo 179 (+1%) 20.82 (+18%) 231<br />

raytracer 69 (+6%) 40.31 (+32%) 406<br />

search 32 (+10%) 89.87 (+4%) 484<br />

Table 3: Method statistics for selected benchmarks with inlining applied<br />

even in cases where <strong>the</strong> program was originally written<br />

as a collection <strong>of</strong> small functions.<br />

2. Ano<strong>the</strong>r trend is <strong>the</strong> increasing amount <strong>of</strong> source code<br />

that is produced by automatic code generators. more<br />

source code is produced by code generators. Such programs<br />

do not necessarily have <strong>the</strong> same properties as<br />

human written code. Methods are <strong>of</strong>ten larger, and<br />

loops deeper.<br />

3. There is an increasing need for interprocedural data<br />

flow analysis. In <strong>the</strong> context <strong>of</strong> this paper, <strong>the</strong> SSA<br />

construction operates at a single-procedure level. However<br />

SSA does extend naturally to <strong>the</strong> whole-program<br />

scope [19, 29]. Again, our parallel SSA construction<br />

techniques would be applicable to such large interprocedural<br />

control flow graphs.<br />

Exploiting all <strong>the</strong> available parallel hardware for <strong>the</strong> analysis<br />

<strong>of</strong> such large SSA-based program representations is <strong>the</strong>refore<br />

<strong>of</strong> great importance in reducing compile times.<br />

In overall terms, <strong>the</strong> largest single contributor to compilation<br />

time is parsing. Researchers are working on parallelizing<br />

<strong>the</strong> parsing process [24]. We anticipate that every<br />

significant phase <strong>of</strong> next-generation compilers should be engineered<br />

to take advantage <strong>of</strong> underlying hardware parallelism,<br />

to achieve scalability. This includes <strong>the</strong> data flow<br />

analysis phase, <strong>of</strong> which SSA construction is generally a key<br />

initial step.<br />

One might argue that it would be better to perform sequential<br />

(i.e. single-threaded) SSA-construction on multiple<br />

methods in parallel, ra<strong>the</strong>r than parallelizing SSA construction<br />

for a single method.<br />

However we note that in a JIT compiler or an interactive<br />

compilation server [16], requests for optimizing compilation<br />

<strong>of</strong> methods will occur sporadically, unpredictably and not<br />

necessarily concurrently. Where possible, it would be good<br />

to parallelize both individual method SSA construction, and<br />

handle multiple methods concurrently. We have only tackled<br />

<strong>the</strong> former problem in this paper. Also, in a JIT context, response<br />

time is <strong>of</strong>ten more important than total performance:<br />

so reducing <strong>the</strong> analysis time for <strong>the</strong> largest methods will improve<br />

worst case response time, even if it does not improve<br />

performance on <strong>the</strong> small methods (where performance is<br />

already adequate).<br />

7. REFERENCES<br />

[1] Ashby, S., Eulisse, G., Schmid, S., Tuura, L.: Parallel<br />

compilation <strong>of</strong> CMS s<strong>of</strong>tware. In: Proc. Computing in<br />

High Energy and Nuclear Physics Conference (CHEP)<br />

(2004)<br />

[2] Baalbergen, E.: Design and implementation <strong>of</strong> parallel<br />

make. Computing Systems 1(2), 135–158 (1988)<br />

[3] Bilardi, G., Pingali, K.: Algorithms for computing <strong>the</strong><br />

static single assignment form. Journal <strong>of</strong> <strong>the</strong> ACM<br />

50(3), 375–425 (May 2003)<br />

[4] Blackburn, S.M., Garner, R., H<strong>of</strong>fman, C., Khan,<br />

A.M., McKinley, K.S., Bentzur, R., Diwan, A.,<br />

Feinberg, D., Frampton, D., Guyer, S.Z., Hirzel, M.,<br />

Hosking, A., Jump, M., Lee, H., Moss, J.E.B.,<br />

Phansalkar, A., Stefanović, D., VanDrunen, T., von<br />

Dincklage, D., Wiedermann, B.: The DaCapo<br />

benchmarks: Java benchmarking development and<br />

analysis. In: OOPSLA ’06: Proceedings <strong>of</strong> <strong>the</strong> 21st<br />

annual ACM SIGPLAN conference on<br />

Object-Oriented Programing, Systems, Languages,<br />

and Applications. pp. 169–190 (Oct 2006)<br />

[5] Blum<strong>of</strong>e, R.D., Joerg, C.F., Kuszmaul, B.C.,<br />

Leiserson, C.E., Randall, K.H., Zhou, Y.: Cilk: an<br />

efficient multithreaded runtime system. In:<br />

Proceedings <strong>of</strong> <strong>the</strong> fifth ACM SIGPLAN symposium<br />

on Principles and practice <strong>of</strong> parallel programming.<br />

pp. 207–216. ACM, New York, NY, USA (1995)<br />

[6] Brandis, M.M., Mössenböck, H.: <strong>Single</strong>-pass<br />

generation <strong>of</strong> static single-assignment form for<br />

structured languages. ACM Transactions on<br />

Programming Languages and Systems 16(6),<br />

1684–1698 (Nov 1994)<br />

[7] Cytron, R., Ferrante, J., Rosen, B.K., Wegman, M.N.,<br />

Zadeck, F.K.: Efficiently computing static single<br />

assignment form and <strong>the</strong> control dependence graph.<br />

ACM Trans. Program. Lang. Syst. 13(4), 451–490<br />

(1991)<br />

[8] Das, D., Ramakrishna, U.: A practical and fast<br />

iterative algorithm for φ-function computation using<br />

DJ graphs. ACM Transactions on Programming<br />

Languages and Systems 27(3), 426–440 (2005)<br />

[9] Edvinsson, M., Lowe, W.: A multi-threaded approach<br />

for data-flow analysis. In: Proceedings <strong>of</strong> <strong>the</strong> IPDPS<br />

2010 Workshop on Multi-Threaded Architectures and<br />

Applications (2010)<br />

[10] Hill, M., Marty, M.: Amdahl’s law in <strong>the</strong> multicore<br />

era. IEEE Computer 41(7), 33–38 (2008)<br />

[11] Knoop, J.: Data-flow analysis for multi-core<br />

computing systems: A reminder to reverse data-flow<br />

analysis. In: Martin, F., Nielson, H.R., Riva, C.,<br />

Schordan, M. (eds.) Scalable Program Analysis. No.<br />

08161 in Dagstuhl Seminar Proceedings, Schloss<br />

Dagstuhl - Leibniz-Zentrum fuer Informatik, Germany,<br />

Dagstuhl, Germany (2008), http:<br />

//drops.dagstuhl.de/opus/volltexte/2008/1575<br />

[12] Knuth, D.: An empirical study <strong>of</strong> FORTRAN<br />

programs. S<strong>of</strong>tware: Practice and Experience 1(2),<br />

105–133 (1971)<br />

[13] Kotzmann, T., Wimmer, C., Mössenböck, H.,<br />

Rodriguez, T., Russell, K., Cox, D.: Design <strong>of</strong> <strong>the</strong><br />

Java HotSpot client compiler for Java 6. ACM Trans.<br />

Archit. Code Optim. 5(1), 1–32 (2008)<br />

[14] Lattner, C., Adve, V.: LLVM: A compilation<br />

framework for lifelong program analysis and

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

Saved successfully!

Ooh no, something went wrong!