1. A method for modifying a program having a plurality of barrier statements comprising: identifying dependence relations between statements in the program and enforcement associations between said barrier statements and said dependence relations; classifying said dependence relations as being either of a first type, which are enforceable by point-to-point synchronization or of a second type, which are not enforceable by point-to-point synchronization; determining a subset of said plurality of barrier statements which will enforce said dependence relations of said second type; and replacing at least one of said plurality of barrier statements, which is not in said subset, with a point-to-point synchronization; wherein, for each dependence relation, said classifying comprises: projecting said dependence relation onto each thread in the program to generate a projection relation; and determining, for each thread in the projection relation, whether there is at most one other thread on which said thread depends by computing an inverse of said projection relation, composing said inverse of said projection relation with said projection relation, and subtracting a result of said composing step with an identity relation.
3. The method of claim 1 , wherein said step of identifying dependence relations between statements in the parallel program further comprises the steps of: identifying a first subset of said dependence relations by transitively reducing said dependence relations; and removing intra-thread dependence relations from said first subset to create a second subset of said dependence relations.