mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 22:28:18 +00:00
Revert "Analysis: unique_ptr-ify DependenceAnalysis::collectCoeffInfo"
This reverts commit r216358. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216431 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -766,10 +766,9 @@ namespace llvm {
|
|||||||
/// collectCoefficientInfo - Walks through the subscript,
|
/// collectCoefficientInfo - Walks through the subscript,
|
||||||
/// collecting each coefficient, the associated loop bounds,
|
/// collecting each coefficient, the associated loop bounds,
|
||||||
/// and recording its positive and negative parts for later use.
|
/// and recording its positive and negative parts for later use.
|
||||||
std::unique_ptr<CoefficientInfo[]>
|
CoefficientInfo *collectCoeffInfo(const SCEV *Subscript,
|
||||||
collectCoeffInfo(const SCEV *Subscript,
|
bool SrcFlag,
|
||||||
bool SrcFlag,
|
const SCEV *&Constant) const;
|
||||||
const SCEV *&Constant) const;
|
|
||||||
|
|
||||||
/// getPositivePart - X^+ = max(X, 0).
|
/// getPositivePart - X^+ = max(X, 0).
|
||||||
///
|
///
|
||||||
|
@@ -2437,14 +2437,11 @@ bool DependenceAnalysis::banerjeeMIVtest(const SCEV *Src,
|
|||||||
++BanerjeeApplications;
|
++BanerjeeApplications;
|
||||||
DEBUG(dbgs() << " Src = " << *Src << '\n');
|
DEBUG(dbgs() << " Src = " << *Src << '\n');
|
||||||
const SCEV *A0;
|
const SCEV *A0;
|
||||||
auto AOwner = collectCoeffInfo(Src, true, A0);
|
CoefficientInfo *A = collectCoeffInfo(Src, true, A0);
|
||||||
auto A = AOwner.get();
|
|
||||||
DEBUG(dbgs() << " Dst = " << *Dst << '\n');
|
DEBUG(dbgs() << " Dst = " << *Dst << '\n');
|
||||||
const SCEV *B0;
|
const SCEV *B0;
|
||||||
auto BOwner = collectCoeffInfo(Dst, false, B0);
|
CoefficientInfo *B = collectCoeffInfo(Dst, false, B0);
|
||||||
auto B = BOwner.get();
|
BoundInfo *Bound = new BoundInfo[MaxLevels + 1];
|
||||||
auto BoundOwner = make_unique<BoundInfo[]>(MaxLevels + 1);
|
|
||||||
auto Bound = BoundOwner.get();
|
|
||||||
const SCEV *Delta = SE->getMinusSCEV(B0, A0);
|
const SCEV *Delta = SE->getMinusSCEV(B0, A0);
|
||||||
DEBUG(dbgs() << "\tDelta = " << *Delta << '\n');
|
DEBUG(dbgs() << "\tDelta = " << *Delta << '\n');
|
||||||
|
|
||||||
@@ -2501,6 +2498,9 @@ bool DependenceAnalysis::banerjeeMIVtest(const SCEV *Src,
|
|||||||
++BanerjeeIndependence;
|
++BanerjeeIndependence;
|
||||||
Disproved = true;
|
Disproved = true;
|
||||||
}
|
}
|
||||||
|
delete [] Bound;
|
||||||
|
delete [] A;
|
||||||
|
delete [] B;
|
||||||
return Disproved;
|
return Disproved;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2818,12 +2818,12 @@ const SCEV *DependenceAnalysis::getNegativePart(const SCEV *X) const {
|
|||||||
// Walks through the subscript,
|
// Walks through the subscript,
|
||||||
// collecting each coefficient, the associated loop bounds,
|
// collecting each coefficient, the associated loop bounds,
|
||||||
// and recording its positive and negative parts for later use.
|
// and recording its positive and negative parts for later use.
|
||||||
std::unique_ptr<DependenceAnalysis::CoefficientInfo[]>
|
DependenceAnalysis::CoefficientInfo *
|
||||||
DependenceAnalysis::collectCoeffInfo(const SCEV *Subscript,
|
DependenceAnalysis::collectCoeffInfo(const SCEV *Subscript,
|
||||||
bool SrcFlag,
|
bool SrcFlag,
|
||||||
const SCEV *&Constant) const {
|
const SCEV *&Constant) const {
|
||||||
const SCEV *Zero = SE->getConstant(Subscript->getType(), 0);
|
const SCEV *Zero = SE->getConstant(Subscript->getType(), 0);
|
||||||
auto CI = make_unique<CoefficientInfo[]>(MaxLevels + 1);
|
CoefficientInfo *CI = new CoefficientInfo[MaxLevels + 1];
|
||||||
for (unsigned K = 1; K <= MaxLevels; ++K) {
|
for (unsigned K = 1; K <= MaxLevels; ++K) {
|
||||||
CI[K].Coeff = Zero;
|
CI[K].Coeff = Zero;
|
||||||
CI[K].PosPart = Zero;
|
CI[K].PosPart = Zero;
|
||||||
|
Reference in New Issue
Block a user