IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Replaced the old version of the PTX compiler which used external tools and llvm::ExecuteAndWait with an internal implementation. The new incremental PTX compiler uses a modified version of the cling::Interpreter instance. The instance can process the PTX built-ins and generates LLVM IR. The LLVM IR is be compiled to PTX via an additional NVPTX backend implemented in the IncrementalCUDADeviceCompiler.
The new implementation has many advantages:
- it's much faster than the old version
- less error-prone because the ASTPrinter and some unnecessary cling transformations are avoided
- reduction of problems in searching for external tools (can be very complicated on HPC systems)
The IncrementalCUDADeviceCompiler is moved from the cling::IncrementalParser to the cling::Interpreter, because the second interpreter needs the input without wrappers or transformations.
If the ValuePrinter runtime header gets included,
a transaction might be emitted, and the transaction
containing the function body cannot be found anymore.
This causes roottest/root/meta/getFuncBody.C to fail
with runtime modules.
This patch moves the ROOT-specific rdict.pcm optimization in the EXTENSION_BLOCK
of a C++ module file.
This reduces the generated artifacts and simplifies the loading of a rdict pcm
file as it is now part of the C++ module file. This patch paves our way to
using the global module indexing.
Clang allows third party shared libraries to provide user-defined
extensions. For example, a custom libTemplateInstantiation.so can
visualize all template instantiation chains in clang. To enable it
one needs to pass a set of options such as -fplugin.
Cling should be able to inherently work with clang plugins. However,
cling still does not make full use of the clang driver where the plugin
setup is handled.
This patch enables plugins in cling and extends them in some aspects.
In particular, cling allows loading of plugins from shared libraries
but also if they are linked to the same library where cling is. This is
very useful in cases where cling runs itself in a shared library (eg
libCling). Users of libCling (such as ROOT) prefer to keep all llvm and
clang related symbols local to avoid symbol clashes if there is another
version of clang and llvm linked against a package. This can be done by
dlopen-ing libCling with RTLD_LOCAL visibility mode. Then the only way
for clang plugins to work in this scenario is to be linked to libCling.
Patch by Aleksandr Efremov and me.
- little changes at comments and code style
- try to use const in IncrementalCUDADeviceCompiler, where is possible
- move CUDA device code compiler instance to IncrementalParser
- change the members of CuArgs to const and adjust the setCuArgs method
- use std::vector<string> instead llvm::Smallvector<const char *> to build argv for executeAndWait
- improve the error messages of generatePCH(), generatePTX() and generateFatbinary()
- replace m_Counter with a copy in IncrementalCUDADeviceCompiler to avoid involuntary changes
The function implementation was moved to a static function in
the DeclCollector in commit 858120920f51a3ea8f689d19f2a2fa1cc3981eb1
about 'Emit Decls as DeclCollector sees them'.
Don't blindly run through initialization; make sure things are going according to plan.
If not handle it and run destructors without crashing.
Return standard error codes from main.
The transformers have to be set later in the initialization for 2 reasons:
- to avoid the null deref check before the check pointer function is declared
in the RuntimeUniverse;
- to avoid useless checks.
Now that we can easily revert Transactions' IR (by unloading their
module) we do not need to queue the Decls before emitting them.
This enables EndOfTU actions to be emitted seeminglessly, without
extra transactions, or explicit post-EndOfTU-emission: each
Transaction will have its TU finalized exactly once.
This in turn allows us to turn on Debug emission - which relies on
being invoked exactly once per Module.
Transformers must be invoked before emitting Decls. They are now
invoked for each Decl; WrapperTransformers are invoked when seeing
a wrapper decl. They do not see the "full transaction AST" anymore
- luckily none of our transformers requires this and actually become
simpler because of this change.
This also fixes a bug where the relative sequencing of parsed and
deserialized Decls was lost (parsed was emitted before deserialized).
Remove unused IRTransactions; they should really be llvm::Pass-es.
We don't have them anyway.
Disable a few transformations if the Decl isFromASTFile.
When reverting a Transaction, also revert its nested ones.
In the ValueExtractionSynthesizer, pass the ValuePrinter option as
int, instead of the transaction pointer - that might have changed
(at least its options) by the time we invoke the wrapper.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# Explicit paths specified without -i or -o; assuming --only paths...
# rebase in progress; onto b3d9f92
# You are currently splitting a commit while rebasing branch 'declcollector-emits-v2' on 'b3d9f92'.
#
# Changes to be committed:
# modified: interpreter/cling/include/cling/Interpreter/RuntimeUniverse.h
# modified: interpreter/cling/lib/Interpreter/AutoSynthesizer.cpp
# modified: interpreter/cling/lib/Interpreter/AutoSynthesizer.h
# modified: interpreter/cling/lib/Interpreter/CheckEmptyTransactionTransformer.cpp
# modified: interpreter/cling/lib/Interpreter/CheckEmptyTransactionTransformer.h
# modified: interpreter/cling/lib/Interpreter/DeclCollector.cpp
# modified: interpreter/cling/lib/Interpreter/DeclCollector.h
# modified: interpreter/cling/lib/Interpreter/DeclExtractor.cpp
# modified: interpreter/cling/lib/Interpreter/DeclExtractor.h
# modified: interpreter/cling/lib/Interpreter/DynamicLookup.cpp
# modified: interpreter/cling/lib/Interpreter/DynamicLookup.h
# modified: interpreter/cling/lib/Interpreter/IncrementalParser.cpp
# modified: interpreter/cling/lib/Interpreter/IncrementalParser.h
# modified: interpreter/cling/lib/Interpreter/NullDerefProtectionTransformer.cpp
# modified: interpreter/cling/lib/Interpreter/NullDerefProtectionTransformer.h
# modified: interpreter/cling/lib/Interpreter/TransactionTransformer.cpp
# modified: interpreter/cling/lib/Interpreter/TransactionTransformer.h
# modified: interpreter/cling/lib/Interpreter/TransactionUnloader.cpp
# modified: interpreter/cling/lib/Interpreter/ValueExtractionSynthesizer.cpp
# modified: interpreter/cling/lib/Interpreter/ValueExtractionSynthesizer.h
# modified: interpreter/cling/lib/Interpreter/ValuePrinterSynthesizer.cpp
# modified: interpreter/cling/lib/Interpreter/ValuePrinterSynthesizer.h
#
# Untracked files:
# .idea/
# 0001-Fix-llvm-merge-issue.patch
# 0002-Fix-warnings.patch
# 0003-Keep-weak-symbols-around-subsequent-transactions-mig.patch
# T.cxx
# T.cxx~
# TMVA.root
# a.out
# boost.root
# config/Makefile.depend~
# core/textinput/src/textinput/TerminalDisplayWin.cpp.orig
# ct.root
# data.root
# interpreter/cling/76fc2055249da7b03148a7d4197a279e9943f012.patch
# interpreter/cling/lib/Interpreter/CIFactory.cpp~
# interpreter/cling/lib/Interpreter/DeclCollector.h~
# interpreter/cling/lib/Interpreter/DynamicLibraryManager.cpp~
# modulemap-one-header-per-file.txt
# osrm-routed
# tiles.tar.bz2
# tmva_class_example.root
# tutorials/v3.root
# weights/
#
MCJIT needs to finalize modules. To simplify the interface with MCJIT, each
transaction now has its own module. It gets created when the previous module
gets passed to the execution engine; the first one is created by
clang::CreateLLVMCodeGen(). CodeGen now releases the module such that it can be
added to the execution engine.
This enables simple use cases of cling with MCJIT; most notably cross-module
linking is still missing.
We might have a memory buffer taht causes the creation of other memory
buffers - which hang from our parent memory buffer, and get parsed before
we pop the diagnostics. The pop location must thus not be the end of our
memory buffer - because those later memory buffers might have created
later DiagStorePoints. Simply use the end location of the last memory
buffer - there cannot be any later Diag pop than that within our call.
__cxa_atexit is generated by clang::CodeGen upon seeing the first static
destructor. Instead of trying to provoke that we just continue to search for it.
Remove trigger__cxa_atexit(), we will just remap until successful.
Remove unused dso parameter.
Instead of friending just provide a function.
Pass a transaction, the typesafe way.
When this oce comes from a #include through ParseForModules():
class A{} g;
A should be emitted, but not g.
This is now tested in roottest/root/meta/templateAutoload.
We had two different codepath for codegeneration. The first one was for
declarations that came from text and the second one for declarations that came
from 'ExternalSource' such as PCH. In the latter case we had to do some
extra equilibristics to emulate a PCM and ignore generating code for decls with
static storage, because it will clash with the loading of the library that already
contains them.
The advantage of the new implementation is that instead of communicating the
deserialized decls to ROOT via some fishy deserialization listeners we can use
the cling::Transaction as we use it for decls that came from code.