673a1d63a4
Add llvm module pass to generate unique cuda module ctor/dtor names. This llvm module pass address the follow problem. Every llvm module has a cuda ctor and dtor (if a cuda fatbinary exist), with at least a function call to register the fatbinary. The ctor/dtor can also include function calls to register global functions and variables at runtime, depending on user's code. The lazy compilation detects functions by the name. If the name (symbol) already exists it uses the existing translation. Otherwise it translates the function on first use (but it never translates twice). Without the module pass, Cling will always use the translation of the first module. The testcase use the reflection of the gCling interpreter object. It takes two random modules and compare the symbols of the cuda module ctor and dtor. Also add function, which change the symbol of the cuda module ctor and dtor to preprocessor compliant symbols. |
||
---|---|---|
.. | ||
Autoloading | ||
CodeGeneration | ||
CodeUnloading | ||
Driver | ||
ErrorRecovery | ||
Extensions | ||
Interfaces | ||
LibraryCall | ||
Lookup | ||
MultipleInterpreters | ||
NullDeref | ||
Pragmas | ||
Prompt | ||
Recursion | ||
SourceCall | ||
Utils | ||
CMakeLists.txt | ||
lit.cfg | ||
lit.site.cfg.in |