OSDN Git Service

Analysis: Only allow the move-constructor for IVUsers
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sun, 11 Sep 2016 22:11:37 +0000 (22:11 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sun, 11 Sep 2016 22:11:37 +0000 (22:11 +0000)
commit97e83d02907645dda5465d1ee6c102edaaf35ecb
tree449bb7a5e9d45c79709ba13f2d61aead27c1c8a2
parent661e8f4c30003452167834ad6a9c1940bc214ffc
Analysis: Only allow the move-constructor for IVUsers

Force IVUsers to be moved instead of copied, properly update Parent
pointers in IVStrideUse when IVUsers is moved, and make sure we have
move constructors available in iplist and ilist.

I came across this in a WIP patch that deleted the copy constructors
from ilist.  I was surprised to find that IVUsersAnalysis couldn't be
registered in the new pass manager.

It's not clear to me whether IVUsers was getting moved only when empty,
but if it was being moved when it was non-empty then this fixes a
pointer invalidation bug and should give some sort of speedup.  Note
that the bugfix would be necessary even for a copy constructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281181 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/ilist.h
include/llvm/Analysis/IVUsers.h