[PATCH] D21636: [PM] LoopAccessInfo Refactor #2

David Li via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 23 09:13:45 PDT 2016


davidxl added inline comments.

================
Comment at: include/llvm/Analysis/LoopAccessAnalysis.h:530
@@ +529,3 @@
+  LoopAccessInfo &operator=(LoopAccessInfo &&LAI) {
+    if (this == &LAI)
+      return *this;
----------------
sanjoy wrote:
> majnemer wrote:
> > sanjoy wrote:
> > > This looks strange -- when will this check be true?
> > Self assignment.
> I mean -- do we need to support
> 
> ```
> x = std::move(x);
> ```
> 
> ?  Or is it better to assert out in such cases?  Are there ways such an assignment can come up organically?
not likely. I can change it to assert as you suggested.


http://reviews.llvm.org/D21636





More information about the llvm-commits mailing list