History log of /llvm-project/clang/lib/Interpreter/IncrementalExecutor.cpp (Results 1 – 25 of 34)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1
# a72d7eea 23-Sep-2024 Vassil Vassilev <v.g.vassilev@gmail.com>

[clang-repl] Simplify the value printing logic to enable out-of-process. (#107737)

This patch improves the design of the IncrementalParser and Interpreter
classes. Now the incremental parser is onl

[clang-repl] Simplify the value printing logic to enable out-of-process. (#107737)

This patch improves the design of the IncrementalParser and Interpreter
classes. Now the incremental parser is only responsible for building the
partial translation unit declaration and the AST, while the Interpreter
fills in the lower level llvm::Module and other JIT-related
infrastructure. Finally the Interpreter class now orchestrates the AST
and the LLVM IR with the IncrementalParser and IncrementalExecutor
classes.

The design improvement allows us to rework some of the logic that
extracts an interpreter value into the clang::Value object. The new
implementation simplifies use-cases which are used for out-of-process
execution by allowing interpreter to be inherited or customized with an
clang::ASTConsumer.

This change will enable completing the pretty printing work which is in
llvm/llvm-project#84769

show more ...


Revision tags: llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init
# 9a9546e3 02-Jul-2024 Vassil Vassilev <v.g.vassilev@gmail.com>

[clang-repl] Support wasm execution (#86402)

This commit introduces support for running clang-repl and executing C++
code interactively inside a Javascript engine using WebAssembly when
built with

[clang-repl] Support wasm execution (#86402)

This commit introduces support for running clang-repl and executing C++
code interactively inside a Javascript engine using WebAssembly when
built with Emscripten. This is achieved by producing WASM "shared
libraries" that can be loaded by the Emscripten runtime using dlopen()

More discussion is available in https://reviews.llvm.org/D158140

Co-authored-by: Anubhab Ghosh <anubhabghosh.me@gmail.com>

show more ...


Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3
# 0cf4788d 25-Mar-2024 Stefan Gränitz <stefan.graenitz@gmail.com>

[clang-repl] Factor out CreateJITBuilder() and allow specialization in derived classes (#84461)

The LLJITBuilder interface provides a very convenient way to configure
the ORCv2 JIT engine. Incremen

[clang-repl] Factor out CreateJITBuilder() and allow specialization in derived classes (#84461)

The LLJITBuilder interface provides a very convenient way to configure
the ORCv2 JIT engine. IncrementalExecutor already used it internally to
construct the JIT, but didn't provide external access. This patch lifts
control of the creation process to the Interpreter and allows injection
of a custom instance through the extended interface. The Interpreter's
default behavior remains unchanged and the IncrementalExecutor remains
an implementation detail.

show more ...


Revision tags: llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2
# b2518971 29-Sep-2023 Lang Hames <lhames@gmail.com>

Re-apply "[ORC] Add N_SO and N_OSO stabs entries to MachO debug..." with fixes.

This re-applies db51e572893, which was reverted in 05b1a2cb3e6 due to bot
failures. The DebuggerSupportPlugin now depe

Re-apply "[ORC] Add N_SO and N_OSO stabs entries to MachO debug..." with fixes.

This re-applies db51e572893, which was reverted in 05b1a2cb3e6 due to bot
failures. The DebuggerSupportPlugin now depends on DWARF, so it has been moved
to the new OrcDebugging library (as has the enableDebuggerSupport API).

show more ...


# 61b0f12d 27-Sep-2023 Lang Hames <lhames@gmail.com>

Re-apply "[ORC][LLJIT] Move enable-debugger-support utility out of..."

This re-applies e1a5bb59b91, which was reverted in e5f169f91a8 due to LSan
failures on some bots (see https://github.com/llvm/l

Re-apply "[ORC][LLJIT] Move enable-debugger-support utility out of..."

This re-applies e1a5bb59b91, which was reverted in e5f169f91a8 due to LSan
failures on some bots (see https://github.com/llvm/llvm-project/issues/67586).
The LSan failures were not caused by this patch (just exposed by it), so LSan
was disabled for the failing test in 47625fea5e3. This should be safe to
re-land now.

show more ...


# e5f169f9 23-Sep-2023 Lang Hames <lhames@gmail.com>

Revert "[ORC][LLJIT] Move enable-debugger-support utility out of LLJITBuilder."

This reverts commit e1a5bb59b91d60c0d87feb78f0e0614589a4c927 while I
investigate the bot failure at
https://lab.llvm.o

Revert "[ORC][LLJIT] Move enable-debugger-support utility out of LLJITBuilder."

This reverts commit e1a5bb59b91d60c0d87feb78f0e0614589a4c927 while I
investigate the bot failure at
https://lab.llvm.org/buildbot/#/builders/168/builds/15831

show more ...


# e1a5bb59 22-Sep-2023 Lang Hames <lhames@gmail.com>

[ORC][LLJIT] Move enable-debugger-support utility out of LLJITBuilder.

This change means that debugger support only needs to be linked in if it's
used. The code size of debugger support is expected

[ORC][LLJIT] Move enable-debugger-support utility out of LLJITBuilder.

This change means that debugger support only needs to be linked in if it's
used. The code size of debugger support is expected to increase as we improve
it (e.g. pulling in DWARF parsing), so making it an optional extra is useful
for controlling final binary sizes.

show more ...


Revision tags: llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4
# 452cb7f2 29-Aug-2023 Vassil Vassilev <v.g.vassilev@gmail.com>

Reland "[clang-repl] Adapt to the recent dylib-related changes in ORC."

Original commit message:"

ORC splits into separate dylibs symbols coming from the process and symbols
materialized in the Jit

Reland "[clang-repl] Adapt to the recent dylib-related changes in ORC."

Original commit message:"

ORC splits into separate dylibs symbols coming from the process and symbols
materialized in the Jit. This patch adapts intent of the existing interface and
adds a regression test to make sure both Jit'd and compiled symbols can be found.

Differential revision: https://reviews.llvm.org/D159115
"

This patch disables the test statement on windows as it seems we might have a
bug in the way we model dllimports.

show more ...


# e6cd950d 29-Aug-2023 Vassil Vassilev <v.g.vassilev@gmail.com>

Revert "[clang-repl] Adapt to the recent dylib-related changes in ORC."

This reverts commit 196d8569d46dc5200c44e70cdf839b042148b988 while investigating
bot failure: https://lab.llvm.org/buildbot/#/

Revert "[clang-repl] Adapt to the recent dylib-related changes in ORC."

This reverts commit 196d8569d46dc5200c44e70cdf839b042148b988 while investigating
bot failure: https://lab.llvm.org/buildbot/#/builders/216/builds/26444

show more ...


# 196d8569 29-Aug-2023 Vassil Vassilev <v.g.vassilev@gmail.com>

[clang-repl] Adapt to the recent dylib-related changes in ORC.

ORC splits into separate dylibs symbols coming from the process and symbols
materialized in the Jit. This patch adapts intent of the ex

[clang-repl] Adapt to the recent dylib-related changes in ORC.

ORC splits into separate dylibs symbols coming from the process and symbols
materialized in the Jit. This patch adapts intent of the existing interface and
adds a regression test to make sure both Jit'd and compiled symbols can be found.

Differential revision: https://reviews.llvm.org/D159115

show more ...


Revision tags: llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2
# 310ee08d 18-Apr-2023 Vassil Vassilev <v.g.vassilev@gmail.com>

Reland "[clang-repl] Enable debugging of JIT-ed code."

Original commit message: "
[clang-repl] Enable debugging of JIT-ed code.

This change follows llvm/llvm-project@21b5ebd and makes use of th

Reland "[clang-repl] Enable debugging of JIT-ed code."

Original commit message: "
[clang-repl] Enable debugging of JIT-ed code.

This change follows llvm/llvm-project@21b5ebd and makes use of the jitlink
infrastructure. In order to use this feature inside lldb one needs to run the
lldb command: settings set plugin.jit-loader.gdb.enable on

This works currently only on Darwin since jitlink is not a default ELF/x86-64
backend yet.

Differential revision: https://reviews.llvm.org/D148481
"

This patch reverts commit e64fbf2cca8c4763a058ba59a48ab8e4b8193028 and adds
the missing library dependencies which caused the initial failure.

show more ...


# e64fbf2c 18-Apr-2023 Vassil Vassilev <v.g.vassilev@gmail.com>

Revert "[clang-repl] Enable debugging of JIT-ed code."

This reverts commit 1e4891e681c51f3e2a724b4ac4e42380ec4a9be1.

Some bots complain about undefined llvm_orc_registerJITLoaderGDBAllocAction.


# 1e4891e6 16-Apr-2023 Vassil Vassilev <v.g.vassilev@gmail.com>

[clang-repl] Enable debugging of JIT-ed code.

This change follows llvm/llvm-project@21b5ebd and makes use of the jitlink
infrastructure. In order to use this feature inside lldb one needs to run the

[clang-repl] Enable debugging of JIT-ed code.

This change follows llvm/llvm-project@21b5ebd and makes use of the jitlink
infrastructure. In order to use this feature inside lldb one needs to run the
lldb command: settings set plugin.jit-loader.gdb.enable on

This works currently only on Darwin since jitlink is not a default ELF/x86-64
backend yet.

Differential revision: https://reviews.llvm.org/D148481

show more ...


# fe1f3445 15-Apr-2023 Jun Zhang <jun@junz.org>

[clang-repl] JITTargetAddress --> ExecutorAddr, NFC

Most of Orc and JITLink are movinng away from JITTargetAddress and
use ExecutorAddr instead.

Signed-off-by: Jun Zhang <jun@junz.org>

Differentia

[clang-repl] JITTargetAddress --> ExecutorAddr, NFC

Most of Orc and JITLink are movinng away from JITTargetAddress and
use ExecutorAddr instead.

Signed-off-by: Jun Zhang <jun@junz.org>

Differential Revision: https://reviews.llvm.org/D148434

show more ...


# 231107a8 07-Apr-2023 Lang Hames <lhames@gmail.com>

Re-apply "[ORC] LLJIT updates: ExecutorNativePlatform, default ..." with fixes.

This reapplies 371cb1af61d, which was reverted in 0b2240eda01 due to bot
failures.

The clang-repl test failure is fix

Re-apply "[ORC] LLJIT updates: ExecutorNativePlatform, default ..." with fixes.

This reapplies 371cb1af61d, which was reverted in 0b2240eda01 due to bot
failures.

The clang-repl test failure is fixed by dropping the process symbols definition
generator that was manually attached to the main JITDylib, since LLJIT now
exposes process symbols by default. (The bug was triggered when JIT'd code used
the process atexit provided by the generator, rather than the JIT atexit which
has been moved into the platform JITDylib).

Any LLJIT clients that see crashes in static destructors should likewise remove
any process symbol generators attached to their main JITDylib.

show more ...


Revision tags: llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1
# c619d4f8 28-Jul-2022 Sunho Kim <ksunhokim123@naver.com>

[clang-repl] Support destructors of global objects.

Supports destructors of global objects by properly calling jitdylib deinitialize which calls the global dtors of ir modules.

This supersedes http

[clang-repl] Support destructors of global objects.

Supports destructors of global objects by properly calling jitdylib deinitialize which calls the global dtors of ir modules.

This supersedes https://reviews.llvm.org/D127945. There was an issue when calling deinitialize on windows but it got fixed by https://reviews.llvm.org/D128037.

Reviewed By: v.g.vassilev

Differential Revision: https://reviews.llvm.org/D128589

show more ...


Revision tags: llvmorg-16-init
# f22795de 29-Jun-2022 Jonas Hahnfeld <hahnjo@hahnjo.de>

[Interpreter] Pass target features to JIT

This is required to support RISC-V where the '+d' target feature
indicates the presence of the D instruction set extension, which
changes to the Hard-float

[Interpreter] Pass target features to JIT

This is required to support RISC-V where the '+d' target feature
indicates the presence of the D instruction set extension, which
changes to the Hard-float 'd' ABI.

Differential Revision: https://reviews.llvm.org/D128853

show more ...


# 45b6c381 26-Jun-2022 Sunho Kim <ksunhokim123@gmail.com>

Revert "[clang-repl] Support destructors of global objects."

This reverts commit 9de8b05bfe0de2915d2443d06159396c5f9d389f.


Revision tags: llvmorg-14.0.6
# dea5a9cc 19-Jun-2022 Jun Zhang <jun@junz.org>

[clang-repl] Implement code undo.

In interactive C++ it is convenient to roll back to a previous state of the
compiler. For example:
clang-repl> int x = 42;
clang-repl> %undo
clang-repl> float x = 2

[clang-repl] Implement code undo.

In interactive C++ it is convenient to roll back to a previous state of the
compiler. For example:
clang-repl> int x = 42;
clang-repl> %undo
clang-repl> float x = 24 // not an error

To support this, the patch extends the functionality used to recover from
errors and adds functionality to recover the low-level execution infrastructure.

The current implementation is based on watermarks. It exploits the fact that
at each incremental input the underlying compiler infrastructure is in a valid
state. We can only go N incremental inputs back to a previous valid state. We do
not need and do not do any further dependency tracking.

This patch was co-developed with V. Vassilev, relies on the past work of Purva
Chaudhari in clang-repl and is inspired by the past work on the same feature
in the Cling interpreter.

Co-authored-by: Purva-Chaudhari <purva.chaudhari02@gmail.com>
Co-authored-by: Vassil Vassilev <v.g.vassilev@gmail.com>
Signed-off-by: Jun Zhang <jun@junz.org>

show more ...


# 9de8b05b 26-Jun-2022 Sunho Kim <ksunhokim123@gmail.com>

[clang-repl] Support destructors of global objects.

Supports destructors of global objects by properly calling jitdylib deinitialize which calls the global dtors of ir modules.

This supersedes http

[clang-repl] Support destructors of global objects.

Supports destructors of global objects by properly calling jitdylib deinitialize which calls the global dtors of ir modules.

This supersedes https://reviews.llvm.org/D127945. There was an issue when calling deinitialize on windows but it got fixed by https://reviews.llvm.org/D128037.

Reviewed By: v.g.vassilev

Differential Revision: https://reviews.llvm.org/D128589

show more ...


Revision tags: llvmorg-14.0.5, llvmorg-14.0.4
# 16dcbb53 05-May-2022 Lang Hames <lhames@gmail.com>

[ORC] Return ExecutorAddrs rather than JITEvaluatedSymbols from LLJIT::lookup.

Clients don't care about linkage, and ExecutorAddr is much more ergonomic.


Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3
# 4fb0805c 30-Aug-2021 Vassil Vassilev <v.g.vassilev@gmail.com>

[clang-repl] Allow Interpreter::getSymbolAddress to take a mangled name.


# c24a5808 25-Oct-2021 Vassil Vassilev <v.g.vassilev@gmail.com>

Reinstate "[clang-repl] Re-implement clang-interpreter as a test case."

Original commit message: "
Original commit message: "
Original commit message: "
Original commit message:"

Reinstate "[clang-repl] Re-implement clang-interpreter as a test case."

Original commit message: "
Original commit message: "
Original commit message: "
Original commit message:"
The current infrastructure in lib/Interpreter has a tool, clang-repl, very
similar to clang-interpreter which also allows incremental compilation.

This patch moves clang-interpreter as a test case and drops it as conditionally
built example as we already have clang-repl in place.
"

This patch also ignores ppc due to missing weak symbol for __gxx_personality_v0
which may be a feature request for the jit infrastructure. Also, adds a missing
build system dependency to the orc jit.
"

Additionally, this patch defines a custom exception type and thus avoids the
requirement to include header <exception>, making it easier to deploy across
systems without standard location of the c++ headers.
"

This patch also works around PR49692 and finds a way to use llvm::consumeError
in rtti mode.
"

This patch also checks if stl is built with rtti.

Differential revision: https://reviews.llvm.org/D107049

show more ...


# 04aff395 09-Oct-2021 Leonard Chan <leonardchan@google.com>

Revert "Reland "[clang-repl] Re-implement clang-interpreter as a test case.""

This reverts commit 1dba6b37bdc70210f75a480eff3715ebe1f1d8be.

Reverting because the ClangReplInterpreterExceptionTests

Revert "Reland "[clang-repl] Re-implement clang-interpreter as a test case.""

This reverts commit 1dba6b37bdc70210f75a480eff3715ebe1f1d8be.

Reverting because the ClangReplInterpreterExceptionTests test fails on
our builders with this patch.

show more ...


# 1dba6b37 05-Oct-2021 Vassil Vassilev <v.g.vassilev@gmail.com>

Reland "[clang-repl] Re-implement clang-interpreter as a test case."

Original commit message: "
Original commit message: "
Original commit message:"
The current infrastructur

Reland "[clang-repl] Re-implement clang-interpreter as a test case."

Original commit message: "
Original commit message: "
Original commit message:"
The current infrastructure in lib/Interpreter has a tool, clang-repl, very
similar to clang-interpreter which also allows incremental compilation.

This patch moves clang-interpreter as a test case and drops it as conditionally
built example as we already have clang-repl in place.

Differential revision: https://reviews.llvm.org/D107049
"

This patch also ignores ppc due to missing weak symbol for __gxx_personality_v0
which may be a feature request for the jit infrastructure. Also, adds a missing
build system dependency to the orc jit.
"

Additionally, this patch defines a custom exception type and thus avoids the
requirement to include header <exception>, making it easier to deploy across
systems without standard location of the c++ headers.
"

This patch also works around PR49692 and finds a way to use llvm::consumeError
in rtti mode.

Differential revision: https://reviews.llvm.org/D107049

show more ...


12