Skip to content

Conversation

@pedroclobo
Copy link
Member

Empty metadata address components of dbg.assign can be represented as poison values instead of undef values.

Empty metadata address components of `dbg.assign` can be represented as
`poison` values instead of `undef` values.
@llvmbot
Copy link
Member

llvmbot commented Dec 12, 2024

@llvm/pr-subscribers-debuginfo

@llvm/pr-subscribers-llvm-ir

Author: Pedro Lobo (pedroclobo)

Changes

Empty metadata address components of dbg.assign can be represented as poison values instead of undef values.


Full diff: https://github.com/llvm/llvm-project/pull/119760.diff

1 Files Affected:

  • (modified) llvm/lib/IR/IntrinsicInst.cpp (+2-2)
diff --git a/llvm/lib/IR/IntrinsicInst.cpp b/llvm/lib/IR/IntrinsicInst.cpp
index 002bab8e079e50..79795e5691f865 100644
--- a/llvm/lib/IR/IntrinsicInst.cpp
+++ b/llvm/lib/IR/IntrinsicInst.cpp
@@ -223,12 +223,12 @@ void DbgAssignIntrinsic::setAddress(Value *V) {
 void DbgAssignIntrinsic::setKillAddress() {
   if (isKillAddress())
     return;
-  setAddress(UndefValue::get(getAddress()->getType()));
+  setAddress(PoisonValue::get(getAddress()->getType()));
 }
 
 bool DbgAssignIntrinsic::isKillAddress() const {
   Value *Addr = getAddress();
-  return !Addr || isa<UndefValue>(Addr);
+  return !Addr || isa<PoisonValue>(Addr);
 }
 
 void DbgAssignIntrinsic::setValue(Value *V) {

@pedroclobo
Copy link
Member Author

cc @nunoplopes

`undef` should continue to be used here to ensure compatibility with
older IR.
@nunoplopes nunoplopes merged commit 8820de6 into llvm:main Dec 13, 2024
8 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Dec 13, 2024

LLVM Buildbot has detected a new failure on builder lldb-x86_64-debian running on lldb-x86_64-debian while building llvm at step 6 "test".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/12486

Here is the relevant piece of the build log for the reference
Step 6 (test) failure: build (failure)
...
PASS: lldb-api :: tools/lldb-server/TestGdbRemoteRegisterState.py (146 of 2727)
PASS: lldb-api :: functionalities/data-formatter/data-formatter-stl/libcxx-simulators/string/TestDataFormatterLibcxxStringSimulator.py (147 of 2727)
PASS: lldb-api :: lang/cpp/namespace/TestNamespace.py (148 of 2727)
PASS: lldb-api :: commands/target/dump-separate-debug-info/dwo/TestDumpDwo.py (149 of 2727)
PASS: lldb-api :: lang/cpp/namespace_definitions/TestNamespaceDefinitions.py (150 of 2727)
PASS: lldb-api :: commands/command/script/TestCommandScript.py (151 of 2727)
PASS: lldb-api :: functionalities/tail_call_frames/ambiguous_tail_call_seq2/TestAmbiguousTailCallSeq2.py (152 of 2727)
PASS: lldb-api :: functionalities/tail_call_frames/disambiguate_call_site/TestDisambiguateCallSite.py (153 of 2727)
PASS: lldb-shell :: Subprocess/clone-follow-parent-wp.test (154 of 2727)
PASS: lldb-shell :: Subprocess/vfork-follow-child-wp.test (155 of 2727)
FAIL: lldb-api :: functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py (156 of 2727)
******************** TEST 'lldb-api :: functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py' FAILED ********************
Script:
--
/usr/bin/python3 /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env LLVM_LIBS_DIR=/home/worker/2.0.1/lldb-x86_64-debian/build/./lib --env LLVM_INCLUDE_DIR=/home/worker/2.0.1/lldb-x86_64-debian/build/include --env LLVM_TOOLS_DIR=/home/worker/2.0.1/lldb-x86_64-debian/build/./bin --arch x86_64 --build-dir /home/worker/2.0.1/lldb-x86_64-debian/build/lldb-test-build.noindex --lldb-module-cache-dir /home/worker/2.0.1/lldb-x86_64-debian/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/worker/2.0.1/lldb-x86_64-debian/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/worker/2.0.1/lldb-x86_64-debian/build/./bin/lldb --compiler /home/worker/2.0.1/lldb-x86_64-debian/build/./bin/clang --dsymutil /home/worker/2.0.1/lldb-x86_64-debian/build/./bin/dsymutil --make /usr/bin/make --llvm-tools-dir /home/worker/2.0.1/lldb-x86_64-debian/build/./bin --lldb-obj-root /home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb --lldb-libs-dir /home/worker/2.0.1/lldb-x86_64-debian/build/./lib -t /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/test/API/functionalities/thread/thread_specific_break_plus_condition -p TestThreadSpecificBpPlusCondition.py
--
Exit Code: 1

Command Output (stdout):
--
lldb version 20.0.0git (https://github.com/llvm/llvm-project.git revision 8820de68ddf02fe3c73def49ec32bbeca54c2754)
  clang revision 8820de68ddf02fe3c73def49ec32bbeca54c2754
  llvm revision 8820de68ddf02fe3c73def49ec32bbeca54c2754
Skipping the following test categories: ['libc++', 'dsym', 'gmodules', 'debugserver', 'objc']

--
Command Output (stderr):
--
Change dir to: /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/test/API/functionalities/thread/thread_specific_break_plus_condition
UNSUPPORTED: LLDB (/home/worker/2.0.1/lldb-x86_64-debian/build/bin/clang-x86_64) :: test_python_dsym (TestThreadSpecificBpPlusCondition.ThreadSpecificBreakPlusConditionTestCase.test_python_dsym) (test case does not fall in any category of interest for this run) 
runCmd: settings clear -all

output: 

runCmd: settings set symbols.enable-external-lookup false

output: 

runCmd: settings set target.inherit-tcc true

output: 

runCmd: settings set target.disable-aslr false

output: 

runCmd: settings set target.detach-on-error false

output: 

@nunoplopes
Copy link
Member

seems like a spurious failure; the build bot is green again.

@pedroclobo pedroclobo deleted the intrinsic-kill-poison branch December 18, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants