[PATCH] D76389: [NewPM] Run the Speculative Execution Pass only if the target has divergent branches
Matt Arsenault via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 14 08:00:04 PDT 2020
arsenm added inline comments.
================
Comment at: llvm/include/llvm/Transforms/Scalar/SpeculativeExecution.h:97
+
+class SpeculativeExecutionIfHasBranchDivergencePass
+ : public SpeculativeExecutionPassImpl,
----------------
Still define a second pass
================
Comment at: llvm/lib/Passes/PassBuilder.cpp:435
if (Level.getSpeedupLevel() > 1) {
- FPM.addPass(SpeculativeExecutionPass());
+ FPM.addPass(SpeculativeExecutionIfHasBranchDivergencePass());
----------------
leonardchan wrote:
> arsenm wrote:
> > I don't expect this to be a separate pass, just added based on a divergent target
> Updated such that the current pass is used, although it's a bit more difficult to test since the same pass name will appear when dumping the passes.
There's a check for divergent branches in the builder so you don't need to run the pass at all
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76389/new/
https://reviews.llvm.org/D76389
More information about the cfe-commits
mailing list