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.
This ASTTransformer adds an inline attribute to any CUDA __device__ kernel
that does not have the attribute. Inlining solves a problem caused by
incremental compilation of PTX code. In a normal compiler, all definitions
of __global__ and __device__ kernels are in the same translation unit. In
the incremental compiler, each kernel has its own translation unit. In case
a __global__ kernel uses a __device__ function, this design caused an error.
Instead of generating the PTX code of the __device__ kernel in the same file
as the __global__ kernel, there is only an external declaration of the
__device__ function. However, normal PTX code does not support an external
declaration of functions.
The transformer only works if the target device is nvptx.
- change CUDA to CUDAHost and add CUDADevice to the InvocationOptions
- in the PTX mode, some ASTTransformer will not be used, which are useful for the x86 mode
This patch teaches cling to detect if the essential libraries have modulemaps
and if necessary it adds an overlay around libc and std.
This tightens the implementation and makes cling standalone easier to run in
-fmodules mode.
This patch tightens the implementation of the collection of modulemap files.
It still gathers all 'system' modulemaps necessary for cling to run if
-fno-implicit-module-maps is specified.
This patch should unbreak our osx builds.
If we use -fimplicit-module-maps this means that cling will find all files called
module.modulemap on the include paths. In certain cases the same modulemap can
be present in two locations causing module redefinition errors.
This patch teaches cling to work with explicitly specified modulemaps in
-fno-implicit-module-maps mode. It moves the generation of the overlay file
closer to the CIFactory so that we can reuse the modulemap loading code before
the interpreter object was set up.
The patch also turns off the implicit module map discovery and explicitly
specifies the ROOT-related modulemap files. The modulemap files need to be
enumerated in both TCling and rootcling. Rootcling requires -fno-rtti build mode
and we cannot use the utilities in TROOT (also because rootcling_stage1 is
built before libCore). This requires the extraction of the `GetSysRoot`,
`GetIncludeDir` and `GetEtcDir` in the `ROOT::FoundationUtils` which is can be
used throughout the entire core component.
This fixes ROOT-10354.
The system integrity protection (SIP) on osx blocks 'dangerous' env variables
when spawning a new process. The MetaProcessor command `.!` which calls the
shell does not propagate (DY)LD_LIBRARY_PATH variables which prevents cling
from finding the modules.
This patch introduces a new env variable CLING_PREBUILT_MODULE_PATH which
contains the prebuilt modules' location where cling should look for modules.
Patch by Alexander Penev!
* Change some LangOptions for MSVC
Add 'MSVCCompat' flag and set 'ThreadsafeStatics = 0' (this fixes crash when running line.cxx and text.cxx root7 tests in interpreted mode)
* Add a 'FIXME' comment (thanks Axel for the suggestion)
* Fix for JITted variables on Windows
Fixes global, static, and "const int" variables access from experimental PyROOT on Windows
* formatting
* Use mangledName.compare() instead of mangledName.find() and add comments
* Small modification from Wim
As requested by vgvassilev, DefinitionShadower is disabled by default in ClinG
and enabled manually in TCling, i.e. usable from the ROOT prompt and Jupyter
notebooks.
If we preload modules using cling::Interpreter::loadModule the
deserializations of the module initializers (such as global variables).
We want the behavior of clang::Sema::ActOnModuleImport, however, it requires
valid source locations.
This patch ignores the ImportDecls which presumably came from loadModule.
Original commit message:
"Over the years we have a pathological issue with cling when it calls directly
compiler API. Most of the API assume they are called from code residing in a
text file. This code has valid source locations which can be used for
comparisons and things like point of instantiation for template instantiations.
This means that whenever a clang API requires a valid source location, cling
should have an interface which gives a pseudo-valid, commonly-rooted unique
source location.
We are bitten by this fact when preloading modules as if we have diagnostics
they cannot be ordered due to the fact that the compared decls from two
different modules do not have a common includer.
This patch avoids using an API and relies on a textual form which does not have
this problem at the cost of synthesizing an extra string."
Over the years we have a pathological issue with cling when it calls directly
compiler API. Most of the API assume they are called from code residing in a
text file. This code has valid source locations which can be used for
comparisons and things like point of instantiation for template instantiations.
This means that whenever a clang API requires a valid source location, cling
should have an interface which gives a pseudo-valid, commonly-rooted unique
source location.
We are bitten by this fact when preloading modules as if we have diagnostics
they cannot be ordered due to the fact that the compared decls from two
different modules do not have a common includer.
This patch avoids using an API and relies on a textual form which does not have
this problem at the cost of synthesizing an extra string.
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.
libc++ comes with a builtin modulemap and is using "std" as the
module name for the STL. To stay consistent we should use the same
name (and "std" is anyway a better name).
We have user library search paths which come from LD_LIBRARY_PATH or similar;
and system library search paths which are coming from the platform.
This patch enables external users performing symbol resolution to filter out
system search paths when they know the symbol cannot be there.
Now, TClingCallbacks can merge the modules vs non-modules code paths, where
the modules prebuilt path is essentially our LD_LIBRARY_PATH.
If the constructor of the contained object is not run (e.g. because
assembling its arguments triggered an exception), the dtor must not
be run when destructing the cling::Value. Detect this case by imprinting
canary bytes into the contained object bytes: if they have changed,
run the dtor, if not assume that the constructor has failed.
This will cause false positives in those cases where the constructor
is not modifying the first object bytes: in these cases, the dtor
is not run even though the ctor is run. That is still better than
the other case (where the dtor crashes because no ctor was run).
ACLiC now synthesizes a modulemap with a suffix _ACLiC_dict.modulemap. The file
contains the source file to be compiled and the corresponding library.
The modulemap is then passed to rootcling via -fmodule-map-file= flag to avoid
naming clashes with possibly existing other modulemap files.
This patch teaches cling to work with the -fmodule-map-file= flag.
ACLiC supports automatic inclusion of Rtypes.h (making ClassDef macro
available). Modules are built in isolation and are resilient to #include
of Rtypes.h at rootcling startup time. We make module Core (containing Rtypes.h)
visible via a newly implemented callback.
The transactions are useful to buffer Decls before sending them to CodeGen,
to verify semantic validity before emitting. If there is no codegen,
DeclCollecting them wastes CPU cycles during PCH generation time
because all headers are in one single transaction. Of course this also
speeds up regular rootcling invocations.
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.
This should solve the problem we have been seeing with cmsUnload. The problem stems from the fact that TCling::AutoParseImplRecurse
uses the address of the current transactions has an index/key when registering a class in fTransactionHeadersMap.
On some platforms TInterpreter.h is parsed late, i.e. during the compilation of:
gInterpreter->AutoParse("SiStripCluster");
consequently (as AutoParse does not create its own transaction), the transactions that contains
the parsin of TInterpreter is the last one committed before AutoParseImplRecurse is executed.
Without the parsing of TInterpreter.h then that transaction is return by fInterpreter->getCurrentTransaction().
With the parsing of TInterpreter.h, during the commit of the transaction of the callbacks are triggered
and one of the decl is a constant (kFALSE) and thus, in TCling::HandleNewDecl, provokes the execution of
if (gROOT->GetListOfGlobals()->FindObject(ND->getNameAsString().c_str()))
return;
which will triggered the creation of a Transaction, however since the last top level transaction was
just switch to the state 'Committed', the new transaction will not be nested and thus
IncrementalParser::endTransaction will set the current transaction to 'nullptr'.
And this value of nullptr for the key of fTransactionHeadersMap is neither guaranteed to be unique
nor handled properly by the rest of the code.
It is unclear why this problem have surfaced recently.
On a failing machine, rebuilding with a 2 month old commit (ad9e5c42cb) still exhibits the problem.
The implementation of class->library mapping makes a call to the
LookupHelper::findScope. This makes the recursive invocations to
LookupHelper::findScope -> ... -> LookupHelper::findScope happen more often.
On my systems (RHEL7 and Android Termux) PAGE_SIZE is defined to 4096 in /usr/include/sys/user.h . The enum then produces a compile-term error.
Adding this change resolves this error for me.