This is an archive of the discontinued LLVM Phabricator instance.

[PredicateInfo] return true when the function was modified
AbandonedPublic

Authored by jeroen.dobbelaere on Jul 14 2021, 7:37 AM.

Details

Summary

The PredicateInfo dumper potentially modifies the function it is analyzing. When that is the case it should report so and return true.

This fixes a bug that shows up with the old pass manager and EXPENSIVE_CHECKS. It was reported In D91661#2875179 by @jroelofs

Diff Detail

Event Timeline

jeroen.dobbelaere requested review of this revision.Jul 14 2021, 7:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 14 2021, 7:37 AM
jroelofs accepted this revision.Jul 14 2021, 1:56 PM

Thank you! LGTM

This revision is now accepted and ready to land.Jul 14 2021, 1:56 PM
fhahn added a comment.Jul 15 2021, 7:18 AM

This fixes a bug that shows up with the old pass manager and EXPENSIVE_CHECKS. It was reported In D91661#2875179 by @jroelofs

Ok, so the reason is that PredicateInfo does not remove the declarations it created after D91661 and also does not remove the ssa_copy calls? It might be better to restore the behaviour, otherwise we will have to update all passes that use PredicateInfo to mark the function/module as changed, which seems a bit unfortunate.

This fixes a bug that shows up with the old pass manager and EXPENSIVE_CHECKS. It was reported In D91661#2875179 by @jroelofs

Ok, so the reason is that PredicateInfo does not remove the declarations it created after D91661 and also does not remove the ssa_copy calls? It might be better to restore the behaviour, otherwise we will have to update all passes that use PredicateInfo to mark the function/module as changed, which seems a bit unfortunate.

I see. The reverted patch did much more than just fix the name clashes in an ad hoc way. Let me come up with patch that again cleans up what was produced.

jeroen.dobbelaere abandoned this revision.Jul 16 2021, 4:17 AM