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 | 9021c7001eeb755f7109906db1deb49de9d09708 (patch) | |
tree | 07b48f0c4c979d3ed16a7ed475d61095f25cf3f7 /lib/Transforms | |
parent | c52ca08c5625d6368b91c37cdf4b312e2e7b6fb9 (diff) | |
download | external_llvm-9021c7001eeb755f7109906db1deb49de9d09708.zip external_llvm-9021c7001eeb755f7109906db1deb49de9d09708.tar.gz external_llvm-9021c7001eeb755f7109906db1deb49de9d09708.tar.bz2 |
Clear split info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40944 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/LoopIndexSplit.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/LoopIndexSplit.cpp b/lib/Transforms/Scalar/LoopIndexSplit.cpp index 37adeef..1d110e1 100644 --- a/lib/Transforms/Scalar/LoopIndexSplit.cpp +++ b/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(); } } } |