Source-Level Transformation Of Legacy Sequential Programs Into Scalable Thread-Parallel Code