aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
authorMichael Buch <michaelbuch12@gmail.com>2025-06-17 15:24:26 +0100
committerGitHub <noreply@github.com>2025-06-17 15:24:26 +0100
commit0a7b0c844c59189ad4f5072b73d7dfdfd78e76b7 (patch)
tree3c0d04a79a48ce50b60796e42f1504e080ac40af /llvm/lib/Transforms/Utils/InlineFunction.cpp
parent35f6d917206d79ab0e3d382a36ca05ccc13983d5 (diff)
downloadllvm-0a7b0c844c59189ad4f5072b73d7dfdfd78e76b7.zip
llvm-0a7b0c844c59189ad4f5072b73d7dfdfd78e76b7.tar.gz
llvm-0a7b0c844c59189ad4f5072b73d7dfdfd78e76b7.tar.bz2
[lldb][Expression] Remove IR pointer checker (#144483)
Currently when jitting expressions, LLDB scans the IR instructions of the `$__lldb_expr` and will insert a call to a utility function for each load/store instruction. The purpose of the utility funciton is to dereference the load/store operand. If that operand was an invalid pointer the utility function would trap and LLDB asks the IR checker whether it was responsible for the trap, in which case it prints out an error message saying the expression dereferenced an invalid pointer. This is a lot of setup for not much gain. In fact, creating/running this utility expression shows up as ~2% of the expression evaluation time (though we cache them for subsequent expressions). And the error message we get out of it is arguably less useful than if we hadn't instrumented the IR. It was also untested. Before: ``` (lldb) expr int a = *returns_invalid_ptr() error: Execution was interrupted, reason: Attempted to dereference an invalid pointer.. The process has been returned to the state before expression evaluation. ``` After: ``` (lldb) expr int a = *returns_invalid_ptr() error: Expression execution was interrupted: EXC_BAD_ACCESS (code=1, address=0x5). The process has been returned to the state before expression evaluation. ``` This patch removes this IR checker.
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
0 files changed, 0 insertions, 0 deletions