[llvm] r231334 - Revert r231104, "unique_ptrify FullDependenceAnalysis::DV", to appease msc18 C2280.

David Blaikie dblaikie at gmail.com
Wed Mar 4 17:48:46 PST 2015


On Wed, Mar 4, 2015 at 5:25 PM, NAKAMURA Takumi <geek4civic at gmail.com>
wrote:

> Author: chapuni
> Date: Wed Mar  4 19:25:06 2015
> New Revision: 231334
>
> URL: http://llvm.org/viewvc/llvm-project?rev=231334&view=rev
> Log:
> Revert r231104, "unique_ptrify FullDependenceAnalysis::DV", to appease
> msc18 C2280.
>

That just requires providing a move ctor since MSVC won't synthesize one,
right? ("FullDependence(FullDependence&&) = default;")


>
> Modified:
>     llvm/trunk/include/llvm/Analysis/DependenceAnalysis.h
>     llvm/trunk/lib/Analysis/DependenceAnalysis.cpp
>
> Modified: llvm/trunk/include/llvm/Analysis/DependenceAnalysis.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DependenceAnalysis.h?rev=231334&r1=231333&r2=231334&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/Analysis/DependenceAnalysis.h (original)
> +++ llvm/trunk/include/llvm/Analysis/DependenceAnalysis.h Wed Mar  4
> 19:25:06 2015
> @@ -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;
>    };
>
>
> Modified: llvm/trunk/lib/Analysis/DependenceAnalysis.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DependenceAnalysis.cpp?rev=231334&r1=231333&r2=231334&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Analysis/DependenceAnalysis.cpp (original)
> +++ llvm/trunk/lib/Analysis/DependenceAnalysis.cpp Wed Mar  4 19:25:06 2015
> @@ -226,12 +226,16 @@ bool Dependence::isScalar(unsigned level
>
>  //===----------------------------------------------------------------------===//
>  // 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.
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150304/3d26a4e9/attachment.html>


More information about the llvm-commits mailing list