Generally speculation only executes one side of the branch. Speculative threading has been proposed using SMT to execute both sides, but usually you're better off trusting the branch predictor and using threads as non-speculative state.
Speculation down both sides is independent of SMT and if I remember correct there were proposals to do this - especially where the branch predictor "knew" it wasn't doing a good job on a branch (no point going down both sides of a 99.9% predicted branch).
The problem is that you rapidly run out of execution resources (what if there are more branches to follow, for example) and you will burn lots of energy executing things that don't happen (not to mention speculatively loading things that aren't needed, etc). I remember seeing some papers on the limits of ILP and I think this was one of the 'extreme' ideas (speculation down multiple paths).
Comments
Generally speculation only executes one side of the branch. Speculative threading has been proposed using SMT to execute both sides, but usually you're better off trusting the branch predictor and using threads as non-speculative state.
Speculation down both sides is independent of SMT and if I remember correct there were proposals to do this - especially where the branch predictor "knew" it wasn't doing a good job on a branch (no point going down both sides of a 99.9% predicted branch).
The problem is that you rapidly run out of execution resources (what if there are more branches to follow, for example) and you will burn lots of energy executing things that don't happen (not to mention speculatively loading things that aren't needed, etc). I remember seeing some papers on the limits of ILP and I think this was one of the 'extreme' ideas (speculation down multiple paths).
To execute both sides, the fetch unit needs to have multiple program counters which is essentially a form of SMT.