aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python
diff options
context:
space:
mode:
authorSlava Zakharin <szakharin@nvidia.com>2024-08-21 13:37:03 -0700
committerGitHub <noreply@github.com>2024-08-21 13:37:03 -0700
commitcfd4c1805ead139f84a4465719c49cca53f07f27 (patch)
tree343e3a2b41f699eeb4464118783ee566f456577d /lldb/source/Plugins/ScriptInterpreter/Python
parent84fa7b438e1fba0c88b21784e716926017b9fe49 (diff)
downloadllvm-cfd4c1805ead139f84a4465719c49cca53f07f27.zip
llvm-cfd4c1805ead139f84a4465719c49cca53f07f27.tar.gz
llvm-cfd4c1805ead139f84a4465719c49cca53f07f27.tar.bz2
[RFC][flang] Replace special symbols in uniqued global names. (#104859)
This change addresses more "issues" as the one resolved in #71338. Some targets (e.g. NVPTX) do not accept global names containing `.`. In particular, the global variables created to represent the runtime information of derived types use `.` in their names. A derived type's descriptor object may be used in the device code, e.g. to initialize a descriptor of a variable of this type. Thus, the runtime type info objects may need to be compiled for the device. Moreover, at least the derived types' descriptor objects may need to be registered (think of `omp declare target`) for the host-device association so that the addendum pointer can be properly mapped to the device for descriptors using a derived type's descriptor as their addendum pointer. The registration implies knowing the name of the global variable in the device image so that proper host code can be created. So it is better to name the globals the same way for the host and the device. CompilerGeneratedNamesConversion pass renames all uniqued globals such that the special symbols (currently `.`) are replaced with `X`. The pass is supposed to be run for the host and the device. An option is added to FIR-to-LLVM conversion pass to indicate whether the new pass has been run before or not. This setting affects how the codegen computes the names of the derived types' descriptors for FIR derived types. fir::NameUniquer now allows `X` to be part of a name, because the name deconstruction may be applied to the mangled names after CompilerGeneratedNamesConversion pass.
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python')
0 files changed, 0 insertions, 0 deletions