Parallelizing Sequential Applications Using a Profile-driven Approach