[llvm] [DirectX][ShaderFlags] Add analysis for `WaveOps` flag (PR #118140)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 22 15:15:49 PST 2025
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 011b618644113996e2c0a8e57db40f89d20878e3 898854ef4474057d66fe424bcda9eefce492d296 --extensions cpp -- llvm/lib/Target/DirectX/DXILShaderFlags.cpp llvm/utils/TableGen/DXILEmitter.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/DirectX/DXILShaderFlags.cpp b/llvm/lib/Target/DirectX/DXILShaderFlags.cpp
index e4632643e5..c3bc359779 100644
--- a/llvm/lib/Target/DirectX/DXILShaderFlags.cpp
+++ b/llvm/lib/Target/DirectX/DXILShaderFlags.cpp
@@ -11,8 +11,8 @@
///
//===----------------------------------------------------------------------===//
-#include "DXILConstants.h"
#include "DXILShaderFlags.h"
+#include "DXILConstants.h"
#include "DirectX.h"
#include "llvm/ADT/SCCIterator.h"
#include "llvm/ADT/SmallVector.h"
@@ -34,8 +34,10 @@ using namespace llvm::dxil;
static dxil::Properties getOpCodeProperties(dxil::OpCode OpCode) {
dxil::Properties Props;
switch (OpCode) {
-#define DXIL_OP_PROPERTIES(OpCode, ...) \
- case OpCode: Props = dxil::Properties{__VA_ARGS__}; break;
+#define DXIL_OP_PROPERTIES(OpCode, ...) \
+ case OpCode: \
+ Props = dxil::Properties{__VA_ARGS__}; \
+ break;
#include "DXILOperation.inc"
}
return Props;
@@ -43,8 +45,9 @@ static dxil::Properties getOpCodeProperties(dxil::OpCode OpCode) {
static bool checkWaveOps(Intrinsic::ID IID) {
switch (IID) {
-#define DXIL_OP_INTRINSIC(OpCode, IntrinsicID, ...) \
- case IntrinsicID: return getOpCodeProperties(OpCode).IsWave;
+#define DXIL_OP_INTRINSIC(OpCode, IntrinsicID, ...) \
+ case IntrinsicID: \
+ return getOpCodeProperties(OpCode).IsWave;
#include "DXILOperation.inc"
}
return false;
diff --git a/llvm/utils/TableGen/DXILEmitter.cpp b/llvm/utils/TableGen/DXILEmitter.cpp
index 6e94821a30..f40dfcfd14 100644
--- a/llvm/utils/TableGen/DXILEmitter.cpp
+++ b/llvm/utils/TableGen/DXILEmitter.cpp
@@ -380,15 +380,17 @@ static bool containsRec(ArrayRef<const Record *> Recs, const Record *Rec) {
return false;
}
-// Iterate through AllRecords and output 'true' if there is a Rec with the same name in
-// CurRecords, output all others as 'false' to create a boolean table.
+// Iterate through AllRecords and output 'true' if there is a Rec with the same
+// name in CurRecords, output all others as 'false' to create a boolean table.
// Eg)
// In:
// CurRecords->getName() = {"Cat"}
// DefinedRecords->getName() = {"Dog", "Cat", "Cow"}
// Out:
// false, true, false
-static void emitBoolTable(ArrayRef<const Record *> CurRecords, ArrayRef<const Record *> AllRecords, raw_ostream &OS) {
+static void emitBoolTable(ArrayRef<const Record *> CurRecords,
+ ArrayRef<const Record *> AllRecords,
+ raw_ostream &OS) {
for (const Record *Rec : AllRecords) {
std::string HasRec = ", false";
if (containsRec(CurRecords, Rec))
``````````
</details>
https://github.com/llvm/llvm-project/pull/118140
More information about the llvm-commits
mailing list