Page MenuHomePhabricator

[DebugInfo][NFC] Refactor BinOp and GEP salvaging in salvageDebugInfoImpl out to separate functions
ClosedPublic

Authored by StephenTozer on Dec 8 2020, 8:13 AM.

Details

Summary

This patch is a precursor to D91722, which has a more comprehensive refactor of debug info salvaging. This patch simply refactors out the salvaging of GEP and BinOp instructions into separate functions, in preparation for the larger changes introduced in those areas in the aforementioned patch; there should be no functional change as a result of this refactor.

Diff Detail

Event Timeline

StephenTozer created this revision.Dec 8 2020, 8:13 AM
StephenTozer requested review of this revision.Dec 8 2020, 8:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 8 2020, 8:13 AM
dstenb accepted this revision.Dec 8 2020, 9:17 AM

Thanks!

This revision is now accepted and ready to land.Dec 8 2020, 9:17 AM
MaskRay added inline comments.Dec 8 2020, 2:51 PM
llvm/lib/Transforms/Utils/Local.cpp
26

https://llvm.org/docs/CodingStandards.html#use-namespace-qualifiers-to-implement-previously-declared-functions

Functions should either be static or namespace qualified (like bool llvm::foobar() { ... }

aprantl accepted this revision.Dec 10 2020, 8:42 AM
StephenTozer added inline comments.Dec 10 2020, 10:06 AM
llvm/lib/Transforms/Utils/Local.cpp
26

I believe this only applies to functions declared in the header; this new batch of functions are not declared in a header, or even earlier within this source (this is the declaration).

This revision was landed with ongoing or failed builds.Mar 10 2021, 10:05 AM
This revision was automatically updated to reflect the committed changes.