forked from OSchip/llvm-project
[PM] Add a SpeculativeExecution pass for targets with divergent branches.
Summary: This IR pass is helpful for GPUs, and other targets with divergent branches. It's a nop on targets without divergent branches. Reviewers: chandlerc Subscribers: llvm-commits, jingyue, rnk, joker.eph, tra Differential Revision: http://reviews.llvm.org/D18626 llvm-svn: 266399
This commit is contained in:
parent
cad81cf6b3
commit
cf63b64fc6
|
@ -234,6 +234,8 @@ void PassManagerBuilder::addFunctionSimplificationPasses(
|
|||
else
|
||||
MPM.add(createScalarReplAggregatesPass(-1, false));
|
||||
MPM.add(createEarlyCSEPass()); // Catch trivial redundancies
|
||||
// Speculative execution if the target has divergent branches; otherwise nop.
|
||||
MPM.add(createSpeculativeExecutionIfHasBranchDivergencePass());
|
||||
MPM.add(createJumpThreadingPass()); // Thread jumps.
|
||||
MPM.add(createCorrelatedValuePropagationPass()); // Propagate conditionals
|
||||
MPM.add(createCFGSimplificationPass()); // Merge & remove BBs
|
||||
|
|
Loading…
Reference in New Issue