[llvm] Reland [AMDGPU] Add AMDGPU specific variadic operation MCExprs (PR #84562)

via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 8 12:40:23 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 1c6e09c27f2216070abe5c268fb6269aeea97e68 6e8f701094e0cb106cf3a10e8e8afb22172a9008 -- llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.cpp llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.h llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.cpp b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.cpp
index f0fa014547..5266a9918c 100644
--- a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.cpp
+++ b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.cpp
@@ -20,10 +20,13 @@ using namespace llvm;
 const AMDGPUVariadicMCExpr *
 AMDGPUVariadicMCExpr::create(VariadicKind Kind, ArrayRef<const MCExpr *> Args,
                              MCContext &Ctx) {
-  // Storage for the argument's 'const MCExpr*' allocated through MCContext new placement which means that AMDGPUVariadicMCExpr objects and all of its contents will now be allocated through MCContext new placement.
+  // Storage for the argument's 'const MCExpr*' allocated through MCContext new
+  // placement which means that AMDGPUVariadicMCExpr objects and all of its
+  // contents will now be allocated through MCContext new placement.
   //
-  // Will result in an asan failure if allocated on the heap (e.g., through SmallVector's grow).
-  const MCExpr **CtxArgs = new (Ctx) const MCExpr*[Args.size()];
+  // Will result in an asan failure if allocated on the heap (e.g., through
+  // SmallVector's grow).
+  const MCExpr **CtxArgs = new (Ctx) const MCExpr *[Args.size()];
   for (size_t i = 0; i < Args.size(); ++i)
     CtxArgs[i] = Args[i];
   return new (Ctx) AMDGPUVariadicMCExpr(Kind, ArrayRef(CtxArgs, Args.size()));

``````````

</details>


https://github.com/llvm/llvm-project/pull/84562


More information about the llvm-commits mailing list