This is an archive of the discontinued LLVM Phabricator instance.

[debug-info] If one sees a spill with a dbg.addr use, salvageDebugInfo upon it and don't hoist it.
ClosedPublic

Authored by gottesmm on Feb 11 2022, 12:34 PM.

Details

Summary

This ensures that if we have a dbg.addr in a coroutine funclet that is on one of
our function arguments, that the dbg.addr is not mapped to undef and also that
later it isn't hoisted to the front of the basic block. Instead it remains at
its original cloned location.

rdar://83957028

Diff Detail

Event Timeline

gottesmm created this revision.Feb 11 2022, 12:34 PM
gottesmm updated this revision to Diff 408001.Feb 11 2022, 12:51 PM
This comment was removed by gottesmm.
gottesmm published this revision for review.Feb 11 2022, 12:51 PM

Just publishing for review.

Herald added a project: Restricted Project. · View Herald TranscriptFeb 11 2022, 12:51 PM
gottesmm updated this revision to Diff 408005.EditedFeb 11 2022, 12:54 PM

In the test I purposely put in an llvm.dbg.value(undef) to make sure that we
properly propagated it through coroutine splitting so that I can use it to make
moved values unavailable. But I forgot to add it to the FileCheck... so in this small update I just added the pattern to the FileCheck.

I noticed that I messed up a comment (see inlined spot). I am going to wait for the testing to finish and then I am going to just update the comment and push (if I can).

llvm/lib/Transforms/Coroutines/CoroFrame.cpp
2591–2592

Specifically this comment.

The failure on Debian an error in compiler-rt in TSAN:

FAILED: projects/compiler-rt/lib/tsan/rtl/CMakeFiles/GotsanRuntimeCheck /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/lib/tsan/rtl/CMakeFiles/GotsanRuntimeCheck 

cd /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/lib/tsan/go && env "CC=/usr/bin/clang " EXTRA_CFLAGS= IN_TMPDIR=1 SILENT=1 /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/lib/tsan/rtl/../go/buildgo.sh

/usr/bin/ld: /tmp/gotsan.xgO3uXKcfl/race_linux_amd64.syso: in function `__sanitizer::ThreadDescriptorSize()':

gotsan.cpp:(.text+0x3d8b3): undefined reference to `dlsym'

In contrast, the windows build ran to completion, running the tests, etc.

I just verified by hand that the windows builder actually ran these tests via looking at the log and they passed.

gottesmm updated this revision to Diff 408062.Feb 11 2022, 2:52 PM

Just fixed a comment in the code. I thinkoed the comment in the original
commit. This is NFC.

This revision was not accepted when it landed; it landed in state Needs Review.Feb 11 2022, 3:15 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.