This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Move the findDbg* functions into DebugInfo.cpp
ClosedPublic

Authored by Orlando on Apr 16 2021, 2:53 AM.

Details

Summary

Move the findDbg* functions into lib/IR/DebugInfo.cpp from
lib/Transforms/Utils/Local.cpp.

D99169 adds a call to a function (findDbgUsers) that lives in
lib/Transforms/Utils/Local.cpp (LLVMTransformUtils) from lib/IR/Value.cpp
(LLVMCore). The Core lib doesn't include TransformUtils. The builtbots caught
this here: https://lab.llvm.org/buildbot/#/builders/109/builds/12664. This patch
moves the function, and the 3 similar ones for consistency, into DebugInfo.cpp
which is part of LLVMCore.

Diff Detail

Event Timeline

Orlando created this revision.Apr 16 2021, 2:53 AM
Orlando requested review of this revision.Apr 16 2021, 2:53 AM
Orlando added a reviewer: rnk.Apr 16 2021, 3:17 AM
This revision is now accepted and ready to land.Apr 16 2021, 2:43 PM
rnk accepted this revision.Apr 16 2021, 3:28 PM

lgtm

llvm/include/llvm/IR/DebugInfo.h
37

Not related, but we should remove dbg.addr since it sounds like dbg.value+DW_OP_deref is the preferred representation of the same thing.

Thanks all.

llvm/include/llvm/IR/DebugInfo.h
37

Would we need to discuss this on llvm-dev (or create a ticket) before hand?

I know @jmorse has mentioned elsewhere liking the idea of having a separate intrinsic to describe memory locations.

My only experience with dbg.addr is when I tried using them as an alternative to dbg.value+DW_OP_deref while working on PR47946. I ran into some problems with them there but I didn't dig too deep.

This revision was landed with ongoing or failed builds.Apr 19 2021, 2:31 AM
This revision was automatically updated to reflect the committed changes.