[lld] [flang] [llvm] [clang] [AMDGPU] Introduce Code Object V6 (PR #76954)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 10 02:28:15 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 40236257ea9d1e451daee5c0938bd23abd5d1450 df3227d73e03b5d013e14293013e54da120c0b77 -- clang/lib/CodeGen/CGBuiltin.cpp clang/lib/Driver/ToolChains/CommonArgs.cpp flang/lib/Frontend/CompilerInvocation.cpp lld/ELF/Arch/AMDGPU.cpp llvm/include/llvm/BinaryFormat/ELF.h llvm/include/llvm/Support/AMDGPUMetadata.h llvm/include/llvm/Support/ScopedPrinter.h llvm/include/llvm/Target/TargetOptions.h llvm/lib/ObjectYAML/ELFYAML.cpp llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.h llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.h llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h llvm/tools/llvm-readobj/ELFDumper.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/ObjectYAML/ELFYAML.cpp b/llvm/lib/ObjectYAML/ELFYAML.cpp
index 7e3426aa8e..ff7151e016 100644
--- a/llvm/lib/ObjectYAML/ELFYAML.cpp
+++ b/llvm/lib/ObjectYAML/ELFYAML.cpp
@@ -621,9 +621,12 @@ void ScalarBitSetTraits<ELFYAML::ELF_EF>::bitset(IO &IO,
BCase(EF_AMDGPU_FEATURE_SRAMECC_V3);
break;
case ELF::ELFABIVERSION_AMDGPU_HSA_V6:
- for(unsigned K = ELF::EF_AMDGPU_GENERIC_VERSION_MIN; K <= ELF::EF_AMDGPU_GENERIC_VERSION_MAX; ++K) {
+ for (unsigned K = ELF::EF_AMDGPU_GENERIC_VERSION_MIN;
+ K <= ELF::EF_AMDGPU_GENERIC_VERSION_MAX; ++K) {
std::string Key = "EF_AMDGPU_GENERIC_VERSION_V" + std::to_string(K);
- IO.maskedBitSetCase(Value, Key.c_str(), K << ELF::EF_AMDGPU_GENERIC_VERSION_OFFSET, ELF::EF_AMDGPU_GENERIC_VERSION);
+ IO.maskedBitSetCase(Value, Key.c_str(),
+ K << ELF::EF_AMDGPU_GENERIC_VERSION_OFFSET,
+ ELF::EF_AMDGPU_GENERIC_VERSION);
}
[[fallthrough]];
case ELF::ELFABIVERSION_AMDGPU_HSA_V4:
diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp
index 8f19873de1..88eef3f343 100644
--- a/llvm/tools/llvm-readobj/ELFDumper.cpp
+++ b/llvm/tools/llvm-readobj/ELFDumper.cpp
@@ -3641,8 +3641,10 @@ template <class ELFT> void GNUELFDumper<ELFT>::printFileHeaders() {
unsigned(ELF::EF_AMDGPU_FEATURE_XNACK_V4),
unsigned(ELF::EF_AMDGPU_FEATURE_SRAMECC_V4),
unsigned(ELF::EF_AMDGPU_GENERIC_VERSION));
- if(auto GenericV = e.e_flags & ELF::EF_AMDGPU_GENERIC_VERSION) {
- ElfFlags += ", generic_v" + to_string(GenericV >> ELF::EF_AMDGPU_GENERIC_VERSION_OFFSET);
+ if (auto GenericV = e.e_flags & ELF::EF_AMDGPU_GENERIC_VERSION) {
+ ElfFlags +=
+ ", generic_v" +
+ to_string(GenericV >> ELF::EF_AMDGPU_GENERIC_VERSION_OFFSET);
}
break;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/76954
More information about the cfe-commits
mailing list