This is an archive of the discontinued LLVM Phabricator instance.

[PM] refactoring of LoopAccessInfo /NFC
ClosedPublic

Authored by davidxl on Jun 21 2016, 12:00 PM.

Details

Summary

LoopAccessInfo will be the result type managed by a loop analysis pass. The result type needs to define move constructors so that result objects can be passed from analysis pass to the analysis manager/cache.

This refactoring makes it easier to define move constructors for LoopAccessInfo.

Diff Detail

Event Timeline

davidxl updated this revision to Diff 61415.Jun 21 2016, 12:00 PM
davidxl retitled this revision from to [PM] refactoring of LoopAccessInfo /NFC.
davidxl updated this object.
davidxl added reviewers: anemet, davide.
davidxl added a subscriber: llvm-commits.
davide accepted this revision.Jun 22 2016, 12:33 PM
davide edited edge metadata.

David, this one sounds reasonable to me. Adam?

This revision is now accepted and ready to land.Jun 22 2016, 12:33 PM
anemet accepted this revision.Jun 22 2016, 3:38 PM
anemet edited edge metadata.

LGTM too with the change below.

include/llvm/Analysis/LoopAccessAnalysis.h
617–623

Please add a comment saying that these are pointers to facilitate the move ctor.

silvas added a subscriber: silvas.Jun 22 2016, 3:48 PM
silvas added inline comments.
include/llvm/Analysis/LoopAccessAnalysis.h
617–623

This might not be relevant, but FYI there is a gotcha with MSVC 2013 where it can't synthesize a move ctor. Just a heads up in case there are bot problems with this patch.

This caused me problems when porting JumpThreading. See http://reviews.llvm.org/rL272607 in particular the manually defined move constructor with the comment "// Hack for MSVC 2013 which seems like it can't synthesize this.".

The fix there is based on the earlier r216244 that gave insight into the problem.

Ok -- I plan to explicitly define move ctors in the second stage change.

thanks,

David

This revision was automatically updated to reflect the committed changes.