This is an archive of the discontinued LLVM Phabricator instance.

[StandardInstrumentations] Check that module analyses are properly invalidated
ClosedPublic

Authored by aeubanks on Mar 16 2023, 9:59 AM.

Diff Detail

Event Timeline

aeubanks created this revision.Mar 16 2023, 9:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 16 2023, 9:59 AM
aeubanks requested review of this revision.Mar 16 2023, 9:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 16 2023, 9:59 AM
nikic added inline comments.Mar 16 2023, 1:13 PM
llvm/lib/Passes/StandardInstrumentations.cpp
1126

Do this outside the pass callback?

1204

Hm, does that mean that in most cases we're going to verify both all functions via the function hash, and then again using the module hash (which includes all function hashes)?

aeubanks added inline comments.Mar 16 2023, 4:11 PM
llvm/lib/Passes/StandardInstrumentations.cpp
1126

might as well be consistent with the FAM code, which requires having some IR to get from the MAM (or we coul pass in the FAM, but that's more work for callers)

1204

yes, but that's fine, it's only doubling this work (which shouldn't matter in expensive checks builds)

we could have the module analysis fetch the hash of each function via the function hash analysis, but at that point we start mixing module and function analyses which I'd like to avoid to keep this conceptually simple and not fall into traps with cross-level analyses (and it would require changes of how we hash modules by combining function hashes rather than hashing everything one after the other, but that's not too much work)

nikic accepted this revision.Mar 17 2023, 1:58 AM

LG

llvm/lib/Passes/StandardInstrumentations.cpp
1204

Okay, let's keep it simple for now...

This revision is now accepted and ready to land.Mar 17 2023, 1:58 AM