Skip to content

Commit 9529223

Browse files
authored
[Comgr][NFC] Small formatting fixes (#241)
1 parent 5999f9f commit 9529223

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

amd/comgr/src/comgr-compiler.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@
8080
#include "llvm/Support/MemoryBuffer.h"
8181
#include "llvm/Support/Path.h"
8282
#include "llvm/Support/Signals.h"
83-
#include "llvm/Support/WithColor.h"
8483
#include "llvm/Support/VirtualFileSystem.h"
84+
#include "llvm/Support/WithColor.h"
8585
#include "llvm/TargetParser/Host.h"
8686

8787
#ifndef COMGR_DISABLE_SPIRV
@@ -992,8 +992,9 @@ AMDGPUCompiler::addTargetIdentifierFlags(llvm::StringRef IdentStr,
992992
} else {
993993
// Triple and CPU
994994
Args.push_back("-target");
995-
Args.push_back(Saver.save(Twine(Ident.Arch) + "-" + Ident.Vendor + "-" +
996-
Ident.OS).data());
995+
Args.push_back(
996+
Saver.save(Twine(Ident.Arch) + "-" + Ident.Vendor + "-" + Ident.OS)
997+
.data());
997998
Args.push_back(Saver.save(Twine("-mcpu=") + GPUArch).data());
998999
}
9991000

@@ -1866,8 +1867,8 @@ amd_comgr_status_t AMDGPUCompiler::linkToExecutable() {
18661867
amd_comgr_status_t AMDGPUCompiler::translateSpirvToBitcode() {
18671868
#ifdef COMGR_DISABLE_SPIRV
18681869
LogS << "Calling AMDGPUCompiler::translateSpirvToBitcode() not supported "
1869-
<< "Comgr is built with -DCOMGR_DISABLE_SPIRV. Re-build LLVM and Comgr "
1870-
<< "with LLVM-SPIRV-Translator support to continue.\n";
1870+
<< "Comgr is built with -DCOMGR_DISABLE_SPIRV. Re-build LLVM and Comgr "
1871+
<< "with LLVM-SPIRV-Translator support to continue.\n";
18711872
return AMD_COMGR_STATUS_ERROR;
18721873
#else
18731874
if (auto Status = createTmpDirs()) {
@@ -1930,8 +1931,8 @@ amd_comgr_status_t AMDGPUCompiler::translateSpirvToBitcode() {
19301931
}
19311932

19321933
LogS << "SPIR-V Translation: amd-llvm-spirv -r --spirv-target-env=CL2.0 "
1933-
<< getFilePath(Input, InputDir) << " "
1934-
<< getFilePath(Output, OutputDir) << " (command line equivalent)\n";
1934+
<< getFilePath(Input, InputDir) << " "
1935+
<< getFilePath(Output, OutputDir) << " (command line equivalent)\n";
19351936

19361937
if (env::shouldSaveTemps()) {
19371938
if (auto Status = outputToFile(Output, getFilePath(Output, OutputDir))) {

amd/comgr/test/unbundle_hip_test.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ int main(int Argc, char *Argv[]) {
134134
"hip-amdgcn-amd-amdhsa-unknown-gfx900"};
135135
size_t BundleEntryIDsCount =
136136
sizeof(BundleEntryIDs) / sizeof(BundleEntryIDs[0]);
137-
Status = amd_comgr_action_info_set_bundle_entry_ids(ActionInfoUnbundle,
138-
BundleEntryIDs, BundleEntryIDsCount);
137+
Status = amd_comgr_action_info_set_bundle_entry_ids(
138+
ActionInfoUnbundle, BundleEntryIDs, BundleEntryIDsCount);
139139

140140
// Unbundle
141141
Status = amd_comgr_create_data_set(&DataSetUnbundled);
@@ -183,10 +183,10 @@ int main(int Argc, char *Argv[]) {
183183
checkError(Status, "amd_comgr_release_data");
184184

185185
// TODO: Re-enable after finalizing LLVM PR #122629
186-
//if (BytesSize != 0) {
187-
// printf("Bitcode host element size: %ld (expected 0)\n", BytesSize);
188-
// exit(1);
189-
//}
186+
// if (BytesSize != 0) {
187+
// printf("Bitcode host element size: %ld (expected 0)\n", BytesSize);
188+
// exit(1);
189+
// }
190190

191191
// bitcode hip-gfx900 element (non-empty)
192192
Status = amd_comgr_action_data_get_data(
@@ -249,7 +249,7 @@ int main(int Argc, char *Argv[]) {
249249
checkError(Status, "amd_comgr_release_data");
250250

251251
// TODO: Re-enable after finalizing LLVM PR #122629
252-
//if (BytesSize != 0) {
252+
// if (BytesSize != 0) {
253253
// printf("Object host element size: %ld (expected empty)\n", BytesSize);
254254
// exit(1);
255255
//}

0 commit comments

Comments
 (0)