This is an archive of the discontinued LLVM Phabricator instance.

[PredicateInfo] Add a helper routine to remove SSA copies from a Function.
AbandonedPublic

Authored by mcrosier on Aug 10 2017, 2:11 PM.

Details

Summary

Also make it configurable so when PredicateInfo is destroyed the SSA copies are automatically removed if requested by the user.

While NewGVN takes care of these copies on the fly the expectation is that most passes will clean up after the fact. Doing this directly in PredicateInfo is much easier and faster.

Just looking for some feedback to see if I'm going in the right direction here..

Chad

Diff Detail

Event Timeline

mcrosier created this revision.Aug 10 2017, 2:11 PM
davide edited edge metadata.Aug 10 2017, 11:25 PM

I'm not necessarily against this, and I think having PI garbage collecting the intrinsics is a good thing.
What I'm wondering here if you hit a case when this actually matters? I and Dan debugged several cases where PI intrinsics weren't reclaimed but those were all legitimate bugs in NewGVN.
In case we decide to use PI for some other pass (LVI is an obvious candidate) then having this logic handled in the utility may make things easier.

I'm not necessarily against this, and I think having PI garbage collecting the intrinsics is a good thing.
What I'm wondering here if you hit a case when this actually matters? I and Dan debugged several cases where PI intrinsics weren't reclaimed but those were all legitimate bugs in NewGVN.
In case we decide to use PI for some other pass (LVI is an obvious candidate) then having this logic handled in the utility may make things easier.

I have a patch in flight that uses PI along with this routine. The patch isn't yet in a state to be reviewed, but I figured I'd post this just to make sure I was on the right track w.r.t. cleaning up the ssa copies.. Approval for this can certainly be deferred until I have my WIP in a reviewable state.

mcrosier abandoned this revision.Aug 18 2017, 9:55 AM

We can revisit this once there's a use case.