diff options
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();      }    }  } | 

