[flang] [llvm] [clang] [Flang] Add code-object-version option (PR #72638)
Dominik Adamski via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 22 03:32:10 PST 2023
================
@@ -85,6 +85,19 @@ class CodeGenOptions : public CodeGenOptionsBase {
RK_WithPattern, // Remark pattern specified via '-Rgroup=regexp'.
};
+ /// \brief Enumeration value for AMDGPU code object version, which is the
+ /// code object version times 100.
+ enum class CodeObjectVersionKind {
+ COV_None,
+ COV_2 = 200, // Unsupported.
+ COV_3 = 300, // Unsupported.
----------------
DominikAdamski wrote:
COV_NONE means no emit of global item
COV_2,COV_3 -> unsupported
If user does not specify version then default version COV_4 is set
see file for more information about code-object version: https://llvm.org/docs/AMDGPUUsage.html#code-object-metadata .
BTW. Is it possible to set the default version for Flang in similar way as it is done for Clang? Could we use similar macro: MarshallingInfoEnum<TargetOpts<"CodeObjectVersion">, "COV_4"> file ( https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Driver/Options.td#L4716 ); and replace Clang struct TargetOpts with Flang struct ?
https://github.com/llvm/llvm-project/pull/72638
More information about the cfe-commits
mailing list