[llvm] [MemCpyOpt] Merge memset and skip unrelated clobber in one scan (PR #90350)

via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 06:04:57 PDT 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 37eb9c9632fb5e82827d1a0559f2279e9a9f1969 f0df87b9e1869167677f56e73c6a014206836ac9 -- llvm/include/llvm/Transforms/Scalar/MemCpyOptimizer.h llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp b/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
index 4f445a54f1..3418f13f4f 100644
--- a/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
+++ b/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
@@ -207,7 +207,6 @@ public:
 
   bool flush(MemorySSAUpdater *MSSAU, Instruction *InsertPoint,
              MemoryUseOrDef *&MemInsertPoint);
-
 };
 
 } // end anonymous namespace
@@ -435,7 +434,8 @@ static void combineAAMetadata(Instruction *ReplInst, Instruction *I) {
 }
 
 // Return the byte value of instruction.
-static Value * isCandidateToMergeIntoMemset(Instruction *I, const DataLayout &DL) {
+static Value *isCandidateToMergeIntoMemset(Instruction *I,
+                                           const DataLayout &DL) {
   if (auto *SI = dyn_cast<StoreInst>(I)) {
     Value *StoredVal = SI->getValueOperand();
 

``````````

</details>


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


More information about the llvm-commits mailing list