This is an archive of the discontinued LLVM Phabricator instance.

[NFC][Debugify] Rename OptCustomPassManager into DebugifyCustomPassManager
ClosedPublic

Authored by djtodoro on Jul 8 2020, 5:57 AM.

Details

Summary

In addition, move the definition of the class into the Debugify.h, so we can use it from different levels.

The motivation for this is D82547.

Diff Detail

Event Timeline

djtodoro created this revision.Jul 8 2020, 5:57 AM
vsk added inline comments.Jul 13 2020, 1:52 PM
llvm/include/llvm/IR/LegacyPassManager.h
100 ↗(On Diff #276395)

The layering for this seems a bit strange, as LegacyPassManager doesn't have much to do with 'debugify'. How does moving the class into Debugify.h, and the class implementation into Debugify.cpp sound? That way, the new-PM version of this can live in the same files.

100 ↗(On Diff #276395)

To be clear: I'm not asking that you implement a new-PM version of this, it's just some future-proofing.

djtodoro marked an inline comment as done.Jul 14 2020, 4:15 AM
djtodoro added inline comments.
llvm/include/llvm/IR/LegacyPassManager.h
100 ↗(On Diff #276395)

Nice point, thanks!

I'd rather keep the class def in the Debugify.h in order to avoid linking additional stuff into the libLLVMTransformUtils (for example, isBitcodeWriterPass() won't be available while linking without CMake changes). WDYT?

djtodoro updated this revision to Diff 277776.Jul 14 2020, 4:27 AM
  • Move the def of DebugifyCustomPassManager into the Debugify.h
vsk accepted this revision.Jul 20 2020, 6:13 PM

Lgtm.

This revision is now accepted and ready to land.Jul 20 2020, 6:13 PM
djtodoro edited the summary of this revision. (Show Details)Jul 20 2020, 11:26 PM

@vsk Thanks!

This revision was automatically updated to reflect the committed changes.