In yklua's LLVM AOT IR, we see stuff like:
getelementptr i8, ptr %394, i64 -67108860
Which is surprising.
This is a curated list of meta-tracing reading material ordered by date.
There's a lot out there about meta-traing (the pypy blog contains hundreds of posts alone), so this isn't an exhaustive list. I've slimed it down using the following loose criteria:
| cd /usr/ports/pobj/pypy-7.3.11/pypy3.9-v7.3.11-src && LD_LIBRARY_PATH=. LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/include LD_LIBRARY_PATH=. PYTHONPATH=/usr/ports/pobj/pypy-7.3.11/pypy3.9 | |
| -v7.3.11-src/lib_pypy ./pypy3.9-c lib_pypy/pypy_tools/build_cffi_imports.py | |
| /usr/ports/pobj/pypy-7.3.11/pypy3.9-v7.3.11-src/lib-python/3/hashlib.py:181: RuntimeWarning: The _hashlib module is not available, falling back to a much slower implementation (No module named '_ | |
| pypy_openssl') | |
| warnings.warn("The _hashlib module is not available, falling back " | |
| ERROR:root:code for hash blake2b was not fou |
| $ LD_LIBRARY_PATH=`pwd`/pypy/goal ./pypy/goal/pypy3.9-c -m compileall ./pypy/lib_pypy | |
| debug: WARNING: Library path not found, using compiled-in sys.path, with | |
| debug: WARNING: sys.prefix = '/usr/ports/pobj/pypy-7.3.11/pypy3.9-v7.3.11-src' | |
| debug: WARNING: Make sure the pypy3 binary is kept inside its tree of files. | |
| debug: WARNING: It is ok to create a symlink to it from somewhere else. | |
| Traceback (most recent call last): | |
| File "/usr/ports/pobj/pypy-7.3.11/pypy3.9-v7.3.11-src/lib-python/3/runpy.py", line 200, in _run_module_as_main | |
| return _run_code(code, main_globals, None, | |
| File "/usr/ports/pobj/pypy-7.3.11/pypy3.9-v7.3.11-src/lib-python/3/runpy.py", line 87, in _run_code | |
| exec(code, run_globals) |
| arrakis:edd> doas btrace trace.bt 44773 | |
| tracing pid 44773 | |
| [1671642769235478231 +1671642769235478231] tid=313009 >>>20 | |
| [1671642769235482014 +3783] tid=313009 >>>46 | |
| [1671642769235516315 +34301] tid=313009 >>>86 | |
| [1671642769235464974 +1671642769235464974] tid=313009 <<<4 | |
| [1671642769235478799 +13825] tid=313009 <<<20 | |
| [1671642769235509958 +31159] tid=313009 <<<46 | |
| [1671642769235539757 +23442] tid=313009 >>>119 | |
| [1671642769235541846 +2089] tid=313009 >>>103 |
| 00000000000106d0 <sem_destroy@@GLIBC_2.2.5>: | |
| 106d0: 31 c0 xor %eax,%eax | |
| 106d2: c3 retq |
The goal is to fix llvm/llvm-project#21657
TLDR: Passing illegally-typed live variable operands to
| diff --git a/llvm/include/llvm/CodeGen/ISDOpcodes.h b/llvm/include/llvm/CodeGen/ISDOpcodes.h | |
| index ea1d3170acba..531edff27c70 100644 | |
| --- a/llvm/include/llvm/CodeGen/ISDOpcodes.h | |
| +++ b/llvm/include/llvm/CodeGen/ISDOpcodes.h | |
| @@ -1269,6 +1269,9 @@ enum NodeType { | |
| #define BEGIN_REGISTER_VP_SDNODE(VPSDID, ...) VPSDID, | |
| #include "llvm/IR/VPIntrinsics.def" | |
| + // The `llvm.experimental.stackmap` intrinsic. | |
| + STACKMAP, |
| diff --git a/bin/run_docker_ci_job b/bin/run_docker_ci_job | |
| index bfd5689..4936468 100755 | |
| --- a/bin/run_docker_ci_job | |
| +++ b/bin/run_docker_ci_job | |
| @@ -26,13 +26,16 @@ run_image() { | |
| # Image name must be unique to the buildbot worker so that workers don't clash. | |
| image_tag=${LOGNAME}-${repo}-${suffix} | |
| + # The container will be run as the worker's "host user". The image is | |
| + # expected to create a user with the same UID. |
| diff --git a/llvm/include/llvm/CodeGen/ISDOpcodes.h b/llvm/include/llvm/CodeGen/ISDOpcodes.h | |
| index ea1d3170acba..531edff27c70 100644 | |
| --- a/llvm/include/llvm/CodeGen/ISDOpcodes.h | |
| +++ b/llvm/include/llvm/CodeGen/ISDOpcodes.h | |
| @@ -1269,6 +1269,9 @@ enum NodeType { | |
| #define BEGIN_REGISTER_VP_SDNODE(VPSDID, ...) VPSDID, | |
| #include "llvm/IR/VPIntrinsics.def" | |
| + // The `llvm.experimental.stackmap` intrinsic. | |
| + STACKMAP, |