Use WeakVH instead of WeakTrackingVH in AliasSetTracker's UnkownInsts
authorSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 26 Apr 2017 16:21:02 +0000 (16:21 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 26 Apr 2017 16:21:02 +0000 (16:21 +0000)
commit8b32b8195448ee2b70133ca920291842cc61e6b2
tree7cb34c99149c20c961a80a737213fc73cf070071
parent7de051ba0c4632dc5fcabc4f17cdf0cedf97724e
Use WeakVH instead of WeakTrackingVH in AliasSetTracker's UnkownInsts

Summary:
In cases where an instruction (a call site, say) is RAUW'ed with some
other value (this is possible via the `returned` attribute, amongst
other things), we want the slot in UnknownInsts to point to the
original Instruction we wanted to track, not the value it got replaced
by.

Fixes PR32587.

Reviewers: davide

Subscribers: mcrosier, llvm-commits

Differential Revision: https://reviews.llvm.org/D32268

llvm-svn: 301426
llvm/include/llvm/Analysis/AliasSetTracker.h
llvm/test/Analysis/AliasSet/unknown-inst-tracking.ll [new file with mode: 0644]