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

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 23 00:50:12 PDT 2016


sanjoy added inline comments.

================
Comment at: include/llvm/Analysis/LoopAccessAnalysis.h:530
@@ +529,3 @@
+  LoopAccessInfo &operator=(LoopAccessInfo &&LAI) {
+    if (this == &LAI)
+      return *this;
----------------
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?


http://reviews.llvm.org/D21636





More information about the llvm-commits mailing list