This is an archive of the discontinued LLVM Phabricator instance.

Use a WeakVH for UnknownInstructions in AliasSetTracker
ClosedPublic

Authored by sanjoy on Mar 10 2017, 2:30 PM.

Details

Summary

This change solves the same problem as D30726, except that this only
throws out the bathwater.

AST was not correctly tracking and deleting UnknownInstructions via
handles. The existing code only tracks "pointers" in its
ASTCallbackVH, so an UnknownInstruction (that isn't also def'ing a
pointer used by another memory instruction) never gets a
ASTCallbackVH.

There are two other ways to solve this problem:

  • Use the PointerRec scheme for both known and unknown instructions.
  • Use a CallbackVH that erases the offending Instruction from the UnknownInstruction list.

Both of the above changes seemed to be significantly (and unnecessarily
IMO) more complex than this.

Diff Detail

Repository
rL LLVM

Event Timeline

sanjoy created this revision.Mar 10 2017, 2:30 PM
chandlerc accepted this revision.Mar 10 2017, 5:04 PM

Nice, I like it.

This revision is now accepted and ready to land.Mar 10 2017, 5:04 PM
dberlin accepted this revision.Mar 10 2017, 5:06 PM

+1
nice work ;)

This revision was automatically updated to reflect the committed changes.