This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Refactor the implementation of pass crash reproducers
ClosedPublic

Authored by rriddle on May 4 2021, 1:21 PM.

Details

Summary

The current implementation has several key limitations and weirdness, e.g local reproducers don't support dynamic pass pipelines, error messages don't include the passes that failed, etc. This revision refactors the implementation to support more use cases, and also be much cleaner.

The main change in this revision, aside from moving the implementation out of Pass.cpp and into its own file, is the addition of a crash recovery pass instrumentation. For local reproducers, this instrumentation handles setting up the recovery context before executing each pass. For global reproducers, the instrumentation is used to provide a more detailed error message, containing information about which passes are running and on which operations.

Example of new message:

error: Failures have been detected while processing an MLIR pass pipeline
note: Pipeline failed while executing [`TestCrashRecoveryPass` on 'module' operation: @foo]: reproducer generated at `crash-recovery.mlir.tmp`

Depends On D101853

Diff Detail

Event Timeline

rriddle created this revision.May 4 2021, 1:21 PM
rriddle requested review of this revision.May 4 2021, 1:21 PM

What's the status on landing this? I am eagerly awaiting the ability to effectively debug dynamic pipelines.

What's the status on landing this? I am eagerly awaiting the ability to effectively debug dynamic pipelines.

Just waiting for someone to review, let me add some others.

silvas accepted this revision.May 19 2021, 12:17 PM
This revision is now accepted and ready to land.May 19 2021, 12:17 PM
This revision was landed with ongoing or failed builds.May 19 2021, 5:03 PM
This revision was automatically updated to reflect the committed changes.