In this patch, move constructor/assignment operator is defined for LoopAccessInfo. PredicatedScalarEvolution PSE member is also changed to be unique_ptr.
Details
Diff Detail
Event Timeline
Minor drop by comment inline.
include/llvm/Analysis/LoopAccessAnalysis.h | ||
---|---|---|
530 | This looks strange -- when will this check be true? |
include/llvm/Analysis/LoopAccessAnalysis.h | ||
---|---|---|
530 | Self assignment. |
include/llvm/Analysis/LoopAccessAnalysis.h | ||
---|---|---|
530 | 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? |
include/llvm/Analysis/LoopAccessAnalysis.h | ||
---|---|---|
530 | not likely. I can change it to assert as you suggested. |
include/llvm/Analysis/LoopAccessAnalysis.h | ||
---|---|---|
518–527 | Sean mentioned that some compiler (MVS) does not generate default move ctor properly. |
include/llvm/Analysis/LoopAccessAnalysis.h | ||
---|---|---|
518–527 | So they're not different? A comment explaining this would be good. |
Quick comment to avoid a buildbot issue.
include/llvm/Analysis/LoopAccessAnalysis.h | ||
---|---|---|
518 | The issue with MSVC is actually that it can't synthesize this, so = default doesn't help unfortunately. You have to manually write out the entire move ctor like you had it. Just make sure to add a comment " // Hack for MSVC 2013 which seems like it can't synthesize this." or similar. |
The issue with MSVC is actually that it can't synthesize this, so = default doesn't help unfortunately. You have to manually write out the entire move ctor like you had it. Just make sure to add a comment " // Hack for MSVC 2013 which seems like it can't synthesize this." or similar.