f



How is this problem solved in praxis (if at all)

When designing a compiler automatically parallelizing
programs after data-flow analysis, it would be desirable
if the number of communications (or thread switches when
run on fewer processors than threads) between threads would
be minimized. 
How is this problem solved in praxis (if at all)?

Best regards,

Henning

0
fernau (5)
6/24/2003 5:22:37 AM
comp.parallel 2866 articles. 0 followers. Post Follow

1 Replies
631 Views

Similar Articles

[PageSpeed] 20

I think what you're asking is "how can I minimize the number of
barrier synchronizations inserted by an autoparallelizing compiler
into my code to preserve correctness".

Or you could be asking about minimizing context switches, but
the answer to that would be O/S-specific.

I've not done this sort of compiler work, but at first glance it seems
like a straightforward product of dependence analysis.  When no
data (or control) dependence exists between consecutive lines of
code, no barrier is necessary.  When one does exist, a sync must
be inserted.

That said, it seems like the real work would be in resequencing
the code (at IR level) so that the dependencies could be moved
as far apart as possible (or more precisely, the number of dependency
transitions in the code would be minimized over a given sequence of
instructions).

BTW, this question might be better answered in comp.compilers.

     Randy

Henning Fernau wrote:
> When designing a compiler automatically parallelizing
> programs after data-flow analysis, it would be desirable
> if the number of communications (or thread switches when
> run on fewer processors than threads) between threads would
> be minimized. 
> How is this problem solved in praxis (if at all)?

-- 
Randy Crawford             http://cac.engin.umich.edu
crwfrd_DESPAM_@umich.edu   http://www-personal.engin.umich.edu/~crwfrd

0
6/24/2003 10:54:04 PM
Reply: