Page MenuHomePhabricator

[NFC][Debugify] Rename OptCustomPassManager into DebugifyCustomPassManager
ClosedPublic

Authored by djtodoro on Wed, Jul 8, 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.Wed, Jul 8, 5:57 AM
vsk added inline comments.Mon, Jul 13, 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.Tue, Jul 14, 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.Tue, Jul 14, 4:27 AM
  • Move the def of DebugifyCustomPassManager into the Debugify.h
vsk accepted this revision.Mon, Jul 20, 6:13 PM

Lgtm.

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

@vsk Thanks!

This revision was automatically updated to reflect the committed changes.