[all-commits] [llvm/llvm-project] 0c32ff: [OpenMP] Add type to firstprivate symbol for const...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Thu Jun 10 06:02:43 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0c32ffceedca2a0d7026fc142bab8ac259131386
https://github.com/llvm/llvm-project/commit/0c32ffceedca2a0d7026fc142bab8ac259131386
Author: Joseph Huber <jhuber6 at vols.utk.edu>
Date: 2021-06-10 (Thu, 10 Jun 2021)
Changed paths:
M clang/lib/CodeGen/CGOpenMPRuntime.cpp
M clang/test/OpenMP/nvptx_target_firstprivate_codegen.cpp
Log Message:
-----------
[OpenMP] Add type to firstprivate symbol for const firstprivate values
Clang will create a global value put in constant memory if an aggregate value
is declared firstprivate in the target device. The symbol name only uses the
name of the firstprivate variable, so symbol name conflicts will occur if the
variable is allowed to have different types through templates. An example of
this behvaiour is shown in https://godbolt.org/z/EsMjYh47n. This patch adds the
mangled type name to the symbol to avoid such naming conflicts. This fixes
https://bugs.llvm.org/show_bug.cgi?id=50642.
Reviewed By: ABataev
Differential Revision: https://reviews.llvm.org/D103995
More information about the All-commits
mailing list