1. A method, comprising: analyzing source codes of a main thread to identify helper thread candidate code regions, the source codes including one or more code regions, each code region corresponding to a sequence of instructions representing an iteration loop in the source codes, the one or more code regions sharing at least one instruction in the source codes; estimating a communication cost to communicate live-in information computed by the main thread from the main thread to a helper thread for each code region; estimating a computation cost to compute live-in information by the helper thread for each code region; comparing the communication cost to the computation cost for each code region; selecting a loop level represented by a code region from the one or more code regions for one or more helper threads with respect to the main thread based on a trade-off between the communication cost and the computation cost; and generating codes for the one or more helper threads, the one or more helper threads being speculatively executed in parallel with the main thread to perform one or more tasks for the selected code region of the main thread.