A method for run-time prediction of a next caller of a shared functional
unit, wherein the shared functional unit is operable to be called by two
or more callers out of a plurality of callers. The shared functional unit
and the plurality of callers are operable to execute in parallel on a
parallel execution unit. The run-time prediction is used for data flow
programs. The run-time prediction detects a calling pattern of the
plurality of callers of the shared functional unit and predicts the next
caller out of the plurality of callers of the shared functional unit. The
run-time prediction then loads state information associated with the next
caller out of the plurality of callers.