This is an archive of the discontinued LLVM Phabricator instance.

[StandardInstrumentations] Handle initial IR before checking if IR is interesting
ClosedPublic

Authored by aeubanks on Dec 12 2022, 5:21 PM.

Details

Summary

Otherwise we end up in situations where we print thre initial IR after we've already printed some changed IR.

Diff Detail

Event Timeline

aeubanks created this revision.Dec 12 2022, 5:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 12 2022, 5:21 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
aeubanks requested review of this revision.Dec 12 2022, 5:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 12 2022, 5:21 PM
jamieschmeiser accepted this revision.Dec 13 2022, 6:27 AM

I was surprised that your change would require test changes--and that probably points out a bug in my initial design. Only the TextChangeReporter unwraps the module to always use the module in handleInitialIR. This should be lifted out to the call-site so it is consistant with all handlers. It doesn't make sense that the initial IR changes based on filtering (ie, which one prints first). But that is not germaine to this change so...

LGTM

This revision is now accepted and ready to land.Dec 13 2022, 6:27 AM
This revision was landed with ongoing or failed builds.Dec 13 2022, 9:29 AM
This revision was automatically updated to reflect the committed changes.