HomePhabricator

Add a speculative execution pass

Description

Add a speculative execution pass

Summary:
This is a pass for speculative execution of instructions for simple if-then (triangle) control flow. It's aimed at GPUs, but could perhaps be used in other contexts. Enabling this pass gives us a 1.0% geomean improvement on Google benchmark suites, with one benchmark improving 33%.

Credit goes to Jingyue Wu for writing an earlier version of this pass.

Patched by Bjarke Roune.

Test Plan:
This patch adds a set of tests in test/Transforms/SpeculativeExecution/spec.ll
The pass is controlled by a flag which defaults to having the pass not run.

Reviewers: eliben, dberlin, meheff, jingyue, hfinkel

Reviewed By: jingyue, hfinkel

Subscribers: majnemer, jholewinski, llvm-commits

Differential Revision: http://reviews.llvm.org/D9360

Details

Committed
jingyueMay 15 2015, 10:54 AM
Reviewer
jingyue
Differential Revision
D9360: Add a speculative execution pass
Parents
rL237458: Revert "Canonicalize min/max expressions correctly."
Branches
Unknown
Tags
Unknown

Event Timeline

hiraditya added inline comments.
/llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
234

Extra new line.