[llvm] [FMV][GlobalOpt] Statically resolve calls to versioned functions. (PR #87939)

via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 13 11:48: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 461a0d6c56ff2e6beb458bd410bfcf605cd63753 1a564f7901bb3cb5eef1258e2d991499a7e99103 --extensions cpp,h -- llvm/include/llvm/Analysis/TargetTransformInfo.h llvm/include/llvm/Analysis/TargetTransformInfoImpl.h llvm/lib/Analysis/TargetTransformInfo.cpp llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h llvm/lib/TargetParser/AArch64TargetParser.cpp llvm/lib/Transforms/IPO/GlobalOpt.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/TargetParser/AArch64TargetParser.cpp b/llvm/lib/TargetParser/AArch64TargetParser.cpp
index 0b1a7bacda..588ea9a5db 100644
--- a/llvm/lib/TargetParser/AArch64TargetParser.cpp
+++ b/llvm/lib/TargetParser/AArch64TargetParser.cpp
@@ -52,7 +52,7 @@ std::optional<AArch64::FMVInfo>
 lookupFMVByID(llvm::AArch64::ArchExtKind ExtID) {
   for (const auto &I : llvm::AArch64::getFMVInfo())
     if (I.ID && *I.ID == ExtID)
-     return I;
+      return I;
   return {};
 }
 
diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
index 3c2aba774e..a427fbc2f7 100644
--- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
@@ -2753,7 +2753,7 @@ static bool OptimizeNonTrivialIFuncs(
     unsigned I = 0;
     // Now try to redirect calls starting from higher priority callers.
     for (Function *Caller : Callers) {
-      assert (I < Callees.size() && "Found callers of equal priority");
+      assert(I < Callees.size() && "Found callers of equal priority");
 
       Function *Callee = Callees[I];
       uint64_t CallerBits = FeatureMask[Caller];

``````````

</details>


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


More information about the llvm-commits mailing list