[Openmp-commits] [llvm] [openmp] [offload] Improve report printing for kernel recording (PR #204505)
via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jun 18 15:51:13 PDT 2026
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 origin/main HEAD --extensions cpp,h -- offload/libomptarget/device.cpp offload/libomptarget/omptarget.cpp offload/plugins-nextgen/common/include/PluginInterface.h offload/plugins-nextgen/common/include/RecordReplay.h offload/plugins-nextgen/common/src/PluginInterface.cpp offload/plugins-nextgen/common/src/RecordReplay.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/offload/libomptarget/device.cpp b/offload/libomptarget/device.cpp
index 8ab8f0c31..18339e9af 100644
--- a/offload/libomptarget/device.cpp
+++ b/offload/libomptarget/device.cpp
@@ -95,7 +95,8 @@ llvm::Error DeviceTy::init() {
Int32Envar OMPX_RecordDevice("LIBOMPTARGET_RECORD_DEVICE", 0);
StringEnvar OMPX_RecordOutputDir("LIBOMPTARGET_RECORD_DIR", "");
BoolEnvar OMPX_EmitRecordReport("LIBOMPTARGET_RECORD_REPORT", false);
- StringEnvar OMPX_RecordReportFilename("LIBOMPTARGET_RECORD_REPORT_FILENAME", "");
+ StringEnvar OMPX_RecordReportFilename("LIBOMPTARGET_RECORD_REPORT_FILENAME",
+ "");
if (OMPX_RecordDevice != RTLDeviceID)
return llvm::Error::success();
diff --git a/offload/plugins-nextgen/common/include/PluginInterface.h b/offload/plugins-nextgen/common/include/PluginInterface.h
index fe6af4e12..cd7e19814 100644
--- a/offload/plugins-nextgen/common/include/PluginInterface.h
+++ b/offload/plugins-nextgen/common/include/PluginInterface.h
@@ -1252,7 +1252,8 @@ struct GenericDeviceTy : public DeviceAllocatorTy {
Error initRecordReplay(int64_t Size, void *VAddr, bool IsRecord,
bool IsNative, bool SaveOutput, bool EmitReport,
- const char *ReportFilename, const char *OutputDirPath) {
+ const char *ReportFilename,
+ const char *OutputDirPath) {
if (RecordReplay)
return Plugin::error(error::ErrorCode::INVALID_ARGUMENT,
"RR already initialized");
diff --git a/offload/plugins-nextgen/common/include/RecordReplay.h b/offload/plugins-nextgen/common/include/RecordReplay.h
index 887fd444f..ef48b55ff 100644
--- a/offload/plugins-nextgen/common/include/RecordReplay.h
+++ b/offload/plugins-nextgen/common/include/RecordReplay.h
@@ -165,7 +165,8 @@ protected:
public:
RecordReplayTy(StatusTy Status, StringRef OutputDirectoryStr, bool SaveOutput,
- bool EmitReport, StringRef ReportFilename, GenericDeviceTy &Device)
+ bool EmitReport, StringRef ReportFilename,
+ GenericDeviceTy &Device)
: Status(Status), SaveOutput(SaveOutput), EmitReport(EmitReport),
ReportFilename(ReportFilename.str()), Device(Device) {
if (OutputDirectoryStr == "")
@@ -264,8 +265,8 @@ private:
/// The native kernel record replay support.
struct NativeRecordReplayTy : public RecordReplayTy {
NativeRecordReplayTy(StatusTy Status, StringRef OutputDirectoryStr,
- bool SaveOutput, bool EmitReport, StringRef ReportFilename,
- GenericDeviceTy &Device)
+ bool SaveOutput, bool EmitReport,
+ StringRef ReportFilename, GenericDeviceTy &Device)
: RecordReplayTy(Status, OutputDirectoryStr, SaveOutput, EmitReport,
ReportFilename, Device) {}
``````````
</details>
https://github.com/llvm/llvm-project/pull/204505
More information about the Openmp-commits
mailing list