Use WeakVH instead of WeakTrackingVH in AliasSetTracker's UnkownInsts
authorSanjoy Das <sanjoy@playingwithpointers.com>
Mon, 1 May 2017 17:07:56 +0000 (17:07 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Mon, 1 May 2017 17:07:56 +0000 (17:07 +0000)
commitddebb703fc6e831f94d7305eab2e1e8547785a7f
tree9180d2954ee6be13dfc8e982018dc8a5f514335f
parentf1c0eafd5b10d33d957457ef292c56e6bab17938
Use WeakVH instead of WeakTrackingVH in AliasSetTracker's UnkownInsts

In cases where an instruction (a call site, say) is RAUW'ed with some
other value (this is possible via the `returned` attribute, for
instance), 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.

This relands r301426.

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