diff options
author | Jingyue Wu <jingyue@google.com> | 2015-05-19 20:52:45 +0000 |
---|---|---|
committer | Jingyue Wu <jingyue@google.com> | 2015-05-19 20:52:45 +0000 |
commit | 5db9cba0669dabc23e3e04502b0ab567d5e3af82 (patch) | |
tree | b52d4cf9100278cd70dacb298bd3502ba0af23af /llvm/lib/Transforms | |
parent | edde50331d74ca945f43a89a2ecd03aec200972c (diff) | |
download | bcm5719-llvm-5db9cba0669dabc23e3e04502b0ab567d5e3af82.tar.gz bcm5719-llvm-5db9cba0669dabc23e3e04502b0ab567d5e3af82.zip |
[Speculation] NFC: more header comments
explaining how it differs from SpeculativeExecuteBB in SimplifyCFG.
llvm-svn: 237724
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp b/llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp index d32e1094442..ff3f00a2e2f 100644 --- a/llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp +++ b/llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp @@ -41,6 +41,15 @@ // Later passes sink back much of the speculated code that did not enable // further optimization. // +// This pass is more aggressive than the function SpeculativeyExecuteBB in +// SimplifyCFG. SimplifyCFG will not speculate if no selects are introduced and +// it will speculate at most one instruction. It also will not speculate if +// there is a value defined in the if-block that is only used in the then-block. +// These restrictions make sense since the speculation in SimplifyCFG seems +// aimed at introducing cheap selects, while this pass is intended to do more +// aggressive speculation while counting on later passes to either capitalize on +// that or clean it up. +// //===----------------------------------------------------------------------===// #include "llvm/ADT/SmallSet.h" |