  In this paper, we focus on the need for two approaches to optimize producer
and consumer synchronization for auto-parallelizing compiler. Emphasis is
placed on the construction of a criterion model by which the compiler reduce
the number of synchronization operations needed to synchronize the dependence
in a loop and perform optimization reduces the overhead of enforcing all
dependence. In accordance with our study, we transform to modify and eliminate
dependence on iteration space diagram (ISD), and carry out the problems of
acyclic and cyclic dependence in detail. we eliminate partial dependence and
optimize the synchronize instructions. Some didactic examples are included to
illustrate the optimize procedure.
