Programming frameworks for performance driven speculative parallelization