summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/Analysis/DependenceAnalysis.h5
-rw-r--r--llvm/lib/Analysis/DependenceAnalysis.cpp14
2 files changed, 13 insertions, 6 deletions
diff --git a/llvm/include/llvm/Analysis/DependenceAnalysis.h b/llvm/include/llvm/Analysis/DependenceAnalysis.h
index 9169b7028b7..e01aa549099 100644
--- a/llvm/include/llvm/Analysis/DependenceAnalysis.h
+++ b/llvm/include/llvm/Analysis/DependenceAnalysis.h
@@ -221,6 +221,9 @@ namespace llvm {
Instruction *Dst,
bool LoopIndependent,
unsigned Levels);
+ ~FullDependence() {
+ delete[] DV;
+ }
/// isLoopIndependent - Returns true if this is a loop-independent
/// dependence.
@@ -267,7 +270,7 @@ namespace llvm {
unsigned short Levels;
bool LoopIndependent;
bool Consistent; // Init to true, then refine.
- std::unique_ptr<DVEntry[]> DV;
+ DVEntry *DV;
friend class DependenceAnalysis;
};
diff --git a/llvm/lib/Analysis/DependenceAnalysis.cpp b/llvm/lib/Analysis/DependenceAnalysis.cpp
index d5d2fb2088c..393ee5c516a 100644
--- a/llvm/lib/Analysis/DependenceAnalysis.cpp
+++ b/llvm/lib/Analysis/DependenceAnalysis.cpp
@@ -226,12 +226,16 @@ bool Dependence::isScalar(unsigned level) const {
//===----------------------------------------------------------------------===//
// FullDependence methods
-FullDependence::FullDependence(Instruction *Source, Instruction *Destination,
+FullDependence::FullDependence(Instruction *Source,
+ Instruction *Destination,
bool PossiblyLoopIndependent,
- unsigned CommonLevels)
- : Dependence(Source, Destination), Levels(CommonLevels),
- LoopIndependent(PossiblyLoopIndependent), Consistent(true),
- DV(CommonLevels ? new DVEntry[CommonLevels] : nullptr) {}
+ unsigned CommonLevels) :
+ Dependence(Source, Destination),
+ Levels(CommonLevels),
+ LoopIndependent(PossiblyLoopIndependent) {
+ Consistent = true;
+ DV = CommonLevels ? new DVEntry[CommonLevels] : nullptr;
+}
// The rest are simple getters that hide the implementation.
OpenPOWER on IntegriCloud