This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Fix running ResourceUsageAnalysis
ClosedPublic

Authored by sebastian-ne on Jul 21 2021, 8:47 AM.

Details

Summary

Clear the map when running the analysis multiple times.
The assertion below that should ensure that every function is only
analyzed once triggered sometimes (once every ~70 compiles of some
graphics pipelines).

If someone knows how to add a testcase, that would be nice, because
I don't know how to test for this.

Diff Detail

Event Timeline

sebastian-ne created this revision.Jul 21 2021, 8:47 AM
sebastian-ne requested review of this revision.Jul 21 2021, 8:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 21 2021, 8:47 AM
arsenm accepted this revision.Jul 21 2021, 10:10 AM

I don't think there's a way to test this short of a unit test running a custom pass pipeline

This revision is now accepted and ready to land.Jul 21 2021, 10:10 AM

If you want to you can emit some debugging message after clearing the map and have a llc lit test with the debug flag to CHECK the debugging message.

The previous fix here was actually wrong (and failed lit tests), resetting the map should be done in doInitialization.

This revision was landed with ongoing or failed builds.Jul 23 2021, 12:34 AM
This revision was automatically updated to reflect the committed changes.