[PATCH] D154080: [DebugInfo][RemoveDIs] Add conversion utilities between dbg.value form and DPValue new-debug-info form

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 07:46:44 PST 2023


jmorse added a comment.

It looks like the major parts of the compile-time regression was down to the Metadata-handling changes in D153990 <https://reviews.llvm.org/D153990>, specifically handling DIArgList differently to other MDNodes causes a big IR-switch statement to not be optimised away, and that has a knock-on effect on inlining decisions all around Metadata.cpp. This is unfortunate, but it's also subject to change, as we're planning on re-profiling and then reimplementing how metadata-tracking works at a later date, once we're confident there are no more invasive changes. I've had some close chats with @StephenTozer and he's got some ideas on what we could change in the future to avoid an eventual regression.

Thus, in the meantime, I'm going to reland with the small key segments #ifdef'd away with the EXPERIMENTAL_DEBUGINFO_ITERATORS flag. This is enabled on this buildbot: https://lab.llvm.org/buildbot/#/builders/275 so it's not like we're landing dead code that will rot immediately.

The net result: DIArgList's are going to continue to be distinct without the compile-time flag on, which is alright because there can only ever be one reference to them, baked into a MetadataAsValue object that can be directly looked up out of LLVMContext (which is how things currently work). With the compile-time flag on, they'll be unique'd, and will require replaceable references to them to be maintained, because DebugValueUser's (aka DPValues) can refer to them.

(Compile-of-clang-time regression fixed by switching to forward declarations).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154080/new/

https://reviews.llvm.org/D154080



More information about the llvm-commits mailing list