Go to file
Pavel Labath d739636ccf Revert "[lldb] Use OrcMCJITReplacement rather than MCJIT as the underlying JIT for LLDB"
This commit really did not introduce any functional changes (for most
people) but it turns out it's not for the reason we thought it was.

The reason wasn't that Orc is a perfect drop-in replacement for MCJIT,
but it was because we were never using Orc in the first place, as it was
not initialized.

Orc's initialization relies on a global constructor in the LLVMOrcJIT.a.
Since this archive does not expose any symbols referenced from other
object files, it does not get linked into liblldb when linking against
llvm components statically. However, in an LLVM_LINK_LLVM_DYLIB=On
build, LLVMOrcJit.a is linked into libLLVM.so using --whole-archive, so
the global constructor does end up firing.

The result of using Orc jit is pr34194, where lldb fails to evaluate
even very simple expressions. This bug can be reproduced in
non-LLVM_LINK_LLVM_DYLIB builds by making sure Orc jit is linked into
liblldb, for example by #including
llvm/ExecutionEngine/OrcMCJITReplacement.h in IRExecutionUnit.cpp (and
adding OrcJIT as a dependency to the relevant CMakeLists.txt file). The
bug reproduces (at least) on linux and osx.

The root cause of the bug seems to be related to relocation processing.
It seems Orc processes relocations earlier than the system it is
replacing. This means the relocation processing happens before we have
had a chance to remap section load addresses to reflect their address in
the target process memory, so they end up pointing to locations in the
lldb's address space instead.

I am not sure whether this is a bug in Orc jit, or in how we are using
it from lldb, but in any case it is preventing us from using Orc right
now. Reverting this fixes LLVM_LINK_LLVM_DYLIB build, and makes it clear
that we are in fact *not* using Orc, and we never really were.

This reverts commit r279327.

llvm-svn: 318039
2017-11-13 14:03:17 +00:00
clang [X86] test/testn intrinsics lowering to IR. clang side 2017-11-13 12:50:52 +00:00
clang-tools-extra [clangd] Fix compilation database detection 2017-11-09 21:45:27 +00:00
compiler-rt [asan] Add CMake hook to override shadow scale in compiler_rt 2017-11-13 14:02:27 +00:00
debuginfo-tests [debuginfo-tests] Make debuginfo-tests work in a standard configuration. 2017-11-10 20:57:57 +00:00
libclc native_exp10: Switch implementation to llvm intrinsic 2017-11-10 22:16:41 +00:00
libcxx Put the status in the wrong column 2017-11-13 04:15:39 +00:00
libcxxabi Fix ASAN build with older compiler-rt versions. 2017-09-14 22:37:34 +00:00
libunwind Add ifdefs around ELF specific parts of UnwindRegisters*.S for arm 2017-11-04 21:01:31 +00:00
lld Simplify. NFC. 2017-11-11 01:59:47 +00:00
lldb Revert "[lldb] Use OrcMCJITReplacement rather than MCJIT as the underlying JIT for LLDB" 2017-11-13 14:03:17 +00:00
llgo irgen: Create functions instead of global variables for builtin hash and equal algorithms. 2017-06-04 22:11:28 +00:00
llvm [X86] test/testn intrinsics lowering to IR. llvm part. 2017-11-13 12:51:18 +00:00
openmp [OMPT] Provide initialization for Mac OS X 2017-11-11 13:59:48 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly [polly] Remove redundant return [NFC] 2017-11-10 20:33:08 +00:00
README.md Add an svn project to contain the files that appear at the root of the 2017-10-19 21:09:49 +00:00

README.md

Low Level Virtual Machine (LLVM)

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