llvm-capstone/llvm
Jeremy Morse 1ce1732f82 [DebugInfo] Use getStableDebugLoc to pick IRBuilder DebugLocs
When IRBuilder is given an insertion position and there is debug-info, it
sets the DebugLoc of newly inserted instructions to the DebugLoc of the
insertion position. Unfortunately, that means if you insert in front of a
debug intrinsics, your "real" instructions get potentially-misleading
source locations from the debug intrinsics. Worse, if you compile -gmlt to
get source locations but no variable locations, you'll get different source
locations to a normal -g build, which is silly.

Rectify this with the getStableDebugLoc method, which skips over any debug
intrinsics to find the next "real" instruction. This is the source location
that you would get if you compile with -gmlt, and it remains stable in the
presence of debug intrinsics. The changed tests show a few locations where
this has been happening, for example selecting line-zero locations for
instrumentation on a perfectly valid call site.

Differential Revision: https://reviews.llvm.org/D159485
2023-09-11 19:00:44 +01:00
..
benchmarks
bindings [IR] Remove support for and/or constant expressions 2023-08-22 09:29:54 +02:00
cmake [Driver] Support GNU ld on Solaris 2023-09-01 21:42:05 +02:00
docs [Convergence] allow non-convergent ops before entry and loop intrinsics (#65939) 2023-09-11 18:26:07 +05:30
examples
include [DebugInfo] Use getStableDebugLoc to pick IRBuilder DebugLocs 2023-09-11 19:00:44 +01:00
lib [DebugInfo] Use getStableDebugLoc to pick IRBuilder DebugLocs 2023-09-11 19:00:44 +01:00
projects
resources
runtimes
test [DebugInfo] Use getStableDebugLoc to pick IRBuilder DebugLocs 2023-09-11 19:00:44 +01:00
tools [llvm-objdump] --adjust-vma adjust symbol table 2023-09-11 09:57:27 +05:30
unittests [SPIR-V] Add SPIR-V logical triple. 2023-09-11 10:15:24 +02:00
utils [X86] Remove _REV instructions from the EVEX2VEX tables (#65752) 2023-09-11 09:54:05 +08:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt
CODE_OWNERS.TXT [NFC] Remove old email 2023-08-25 16:34:22 +01:00
configure
CREDITS.TXT [NFC] Remove old email 2023-08-25 16:34:22 +01:00
LICENSE.TXT
llvm.spec.in
README.txt
RELEASE_TESTERS.TXT

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.