This is an archive of the discontinued LLVM Phabricator instance.

[Debugify] Skip debugifying on special/immutable passes
ClosedPublic

Authored by aeubanks on Nov 16 2020, 11:53 AM.

Details

Summary

With a function pass manager, it would insert debuginfo metadata before
getting to function passes while processing the pass manager, causing
debugify to skip while running the function passes.

Skip special passes + verifier + printing passes. Compared to the legacy
implementation of -debugify-each, this additionally skips verifier
passes. Probably no need to update the legacy version since it will be
obsolete soon.

This fixes 2 instcombine tests using -debugify-each under NPM.

Diff Detail

Event Timeline

aeubanks created this revision.Nov 16 2020, 11:53 AM
aeubanks requested review of this revision.Nov 16 2020, 11:53 AM
MaskRay accepted this revision.Nov 16 2020, 6:50 PM

LGTM.

llvm/lib/Transforms/Utils/Debugify.cpp
67

https://llvm.org/docs/CodingStandards.html#anonymous-namespaces has rules about anonymous namespaces. Note that the existing usage does not stick with the rule.

This revision is now accepted and ready to land.Nov 16 2020, 6:50 PM
aeubanks updated this revision to Diff 305647.Nov 16 2020, 8:40 PM

make function static instead of in anon namespace

This revision was landed with ongoing or failed builds.Nov 16 2020, 8:40 PM
This revision was automatically updated to reflect the committed changes.