HomePhabricator

AliasSetTracker: UnknownInsts should contribute to the refcount

Authored by majnemer on Nov 19 2014, 1:41 AM.

Description

AliasSetTracker: UnknownInsts should contribute to the refcount

AliasSetTracker::addUnknown may create an AliasSet devoid of pointers
just to contain an instruction if no suitable AliasSet already exists.
It will then AliasSet::addUnknownInst and we will be done.

However, it's possible for addUnknown to choose an existing AliasSet to
addUnknownInst.
If this were to occur, we are in a bit of a pickle: removing pointers
from the AliasSet can cause the entire AliasSet to become destroyed,
taking our unknown instructions out with them.

Instead, keep track whether or not our AliasSet has any unknown
instructions.

This fixes PR21582.

llvm-svn: 222338

Details

Committed
majnemerNov 19 2014, 1:41 AM
Parents
rGec66d00933cd: Add missing header
Branches
Unknown
Tags
Unknown