SeparateConstOffsetFromGEP: Pass address space to isLegalAddressingMode
[oota-llvm.git] / lib / Transforms / Scalar / SpeculativeExecution.cpp
index d32e109444284ab4ef41a7f10e5be9731d086005..ff3f00a2e2f85daba2f20d2b2cc5f5630ddb8bfc 100644 (file)
 // 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"