[clang] [llvm] [ValueLattice][SCCP] Do not track undefs (PR #107105)

via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 3 06:23:56 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 0797c184c636889f2897746dc71390ae28005c7c be08a5a9d2e9a56b3e9fa08b970aeec7ee3e2b0e --extensions cpp,h -- llvm/include/llvm/Analysis/ValueLattice.h llvm/include/llvm/Transforms/Utils/SCCPSolver.h llvm/lib/Analysis/ValueLattice.cpp llvm/lib/Transforms/IPO/FunctionSpecialization.cpp llvm/lib/Transforms/IPO/SCCP.cpp llvm/lib/Transforms/Scalar/SCCP.cpp llvm/lib/Transforms/Utils/SCCPSolver.cpp llvm/unittests/Analysis/ValueLatticeTest.cpp llvm/unittests/Transforms/IPO/FunctionSpecializationTest.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/Utils/SCCPSolver.cpp b/llvm/lib/Transforms/Utils/SCCPSolver.cpp
index 50f1e3f1e4..db14198b5b 100644
--- a/llvm/lib/Transforms/Utils/SCCPSolver.cpp
+++ b/llvm/lib/Transforms/Utils/SCCPSolver.cpp
@@ -814,9 +814,7 @@ public:
     handleCallResult(*Call);
   }
 
-  void resetInvalidated() {
-    Invalidated.clear();
-  }
+  void resetInvalidated() { Invalidated.clear(); }
 
   const ValueLatticeElement &getLatticeValueFor(Value *V) const {
     assert(!V->getType()->isStructTy() &&
@@ -2044,9 +2042,7 @@ void SCCPSolver::resetLatticeValueFor(CallBase *Call) {
   Visitor->resetLatticeValueFor(Call);
 }
 
-void SCCPSolver::resetInvalidated() {
-  Visitor->resetInvalidated();
-}
+void SCCPSolver::resetInvalidated() { Visitor->resetInvalidated(); }
 
 const ValueLatticeElement &SCCPSolver::getLatticeValueFor(Value *V) const {
   return Visitor->getLatticeValueFor(V);

``````````

</details>


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


More information about the cfe-commits mailing list