diff options
author | Stephen Hines <srhines@google.com> | 2014-04-23 16:57:46 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-04-24 15:53:16 -0700 |
commit | 36b56886974eae4f9c5ebc96befd3e7bfe5de338 (patch) | |
tree | e6cfb69fbbd937f450eeb83bfb83b9da3b01275a /include/llvm/Transforms/Utils/SimplifyIndVar.h | |
parent | 69a8640022b04415ae9fac62f8ab090601d8f889 (diff) | |
download | external_llvm-36b56886974eae4f9c5ebc96befd3e7bfe5de338.zip external_llvm-36b56886974eae4f9c5ebc96befd3e7bfe5de338.tar.gz external_llvm-36b56886974eae4f9c5ebc96befd3e7bfe5de338.tar.bz2 |
Update to LLVM 3.5a.
Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
Diffstat (limited to 'include/llvm/Transforms/Utils/SimplifyIndVar.h')
-rw-r--r-- | include/llvm/Transforms/Utils/SimplifyIndVar.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/include/llvm/Transforms/Utils/SimplifyIndVar.h b/include/llvm/Transforms/Utils/SimplifyIndVar.h index 7e97e21..dedeca3 100644 --- a/include/llvm/Transforms/Utils/SimplifyIndVar.h +++ b/include/llvm/Transforms/Utils/SimplifyIndVar.h @@ -16,12 +16,13 @@ #ifndef LLVM_TRANSFORMS_UTILS_SIMPLIFYINDVAR_H #define LLVM_TRANSFORMS_UTILS_SIMPLIFYINDVAR_H +#include "llvm/IR/ValueHandle.h" #include "llvm/Support/CommandLine.h" -#include "llvm/Support/ValueHandle.h" namespace llvm { class CastInst; +class DominatorTree; class IVUsers; class Loop; class LPPassManager; @@ -31,9 +32,25 @@ class ScalarEvolution; /// Interface for visiting interesting IV users that are recognized but not /// simplified by this utility. class IVVisitor { +protected: + const DominatorTree *DT; + bool ShouldSplitOverflowIntrinsics; + virtual void anchor(); public: + IVVisitor(): DT(NULL), ShouldSplitOverflowIntrinsics(false) {} virtual ~IVVisitor() {} + + const DominatorTree *getDomTree() const { return DT; } + + bool shouldSplitOverflowInstrinsics() const { + return ShouldSplitOverflowIntrinsics; + } + void setSplitOverflowIntrinsics() { + ShouldSplitOverflowIntrinsics = true; + assert(DT && "Splitting overflow intrinsics requires a DomTree."); + } + virtual void visitCast(CastInst *Cast) = 0; }; |