Compile-time support for efficient data race detection in shared-memory parallel programs