Multithreaded architectures provide an opportunity for efficiently exe
cuting programs with irregular parallelism and/or irregular locality.
This paper presents a strategy that makes use of the multithreaded exe
cution model without exposing multithreading to the programmer. Our ap
proach is to design simple extensions to C, and to provide compiler su
pport that automatically translates high-level C programs into lower-l
evel threaded programs. In this paper we present EARTH-C our extended
C language which contains simple constructs for specifying control par
allelism, data locality, shared variables and atomic operations. Based
on EARTH-C, we describe compiler techniques that are used for transla
ting to lower-level Threaded-C programs for the EARTH multithreaded ar
chitecture. We demonstrate our approach with six benchmark programs. W
e show that even naive EARTH-C programs can lead to reasonable perform
ance, and that more advanced EARTH-C programs can give performance ver
y close to hand-coded threated-C programs.