gpu-compute, hsail: call discardFetch() from the WF

because every taken branch causes fetch to be discarded, we move the call
to the WF to avoid to have to call it from each and every branch instruction
type.
This commit is contained in:
Tony Gutierrez 2016-10-26 22:47:27 -04:00
parent 00a6346c91
commit c7a79c9a42
2 changed files with 2 additions and 3 deletions

View file

@ -133,7 +133,6 @@ namespace HsailISA
// Rpc and execution mask remain the same // Rpc and execution mask remain the same
w->pc(getTargetPc()); w->pc(getTargetPc());
} }
w->discardFetch();
} }
class BrnDirectInst : public BrnInstBase<LabelOperand> class BrnDirectInst : public BrnInstBase<LabelOperand>
@ -293,7 +292,6 @@ namespace HsailISA
w->pushToReconvergenceStack(true_pc, rpc, true_mask); w->pushToReconvergenceStack(true_pc, rpc, true_mask);
} }
assert(w->pc() != curr_pc); assert(w->pc() != curr_pc);
w->discardFetch();
} }
@ -405,7 +403,6 @@ namespace HsailISA
// Rpc and execution mask remain the same // Rpc and execution mask remain the same
w->pc(getTargetPc()); w->pc(getTargetPc());
} }
w->discardFetch();
} }
class BrDirectInst : public BrInstBase<LabelOperand> class BrDirectInst : public BrInstBase<LabelOperand>

View file

@ -675,6 +675,8 @@ Wavefront::exec()
} else { } else {
instructionBuffer.pop_front(); instructionBuffer.pop_front();
} }
} else {
discardFetch();
} }
if (computeUnit->shader->hsail_mode==Shader::SIMT) { if (computeUnit->shader->hsail_mode==Shader::SIMT) {