diff options
| author | Devang Patel <dpatel@apple.com> | 2007-08-08 21:18:27 +0000 |
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2007-08-08 21:18:27 +0000 |
| commit | 8abc5c82b7249237ce365ad3bc7412876ed79af1 (patch) | |
| tree | 547e96467c0d9e26b8212be041f3bb649ac8cf5f /llvm/lib/Transforms | |
| parent | f054db3242ad5628863830bdb0a117fc1f7136a6 (diff) | |
| download | bcm5719-llvm-8abc5c82b7249237ce365ad3bc7412876ed79af1.tar.gz bcm5719-llvm-8abc5c82b7249237ce365ad3bc7412876ed79af1.zip | |
Clear split info.
llvm-svn: 40944
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp b/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp index 37adeeff337..1d110e17438 100644 --- a/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp +++ b/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp @@ -65,6 +65,15 @@ namespace { // Loop exit condition. ICmpInst *ExitCondition; + + // Clear split info. + void clear() { + IndVar = NULL; + SplitValue = NULL; + ExitValue = NULL; + SplitCondition = NULL; + ExitCondition = NULL; + } }; private: @@ -193,6 +202,8 @@ void LoopIndexSplit::findSplitCondition() { if (SD.SplitCondition) { SD.IndVar = PN; SplitData.push_back(SD); + // Before reusing SD for next split condition clear its content. + SD.clear(); } } } |

