[llvm] [FunctionAttrs] deduce attr `cold` on functions if all CG paths call a `cold` function (PR #101298)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 31 00:50:29 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 7a80c86726f7c37128bfee3618707c1607f5014d 85efc82366a64fbe5287b7bc9d20853b06d147f6 --extensions cpp -- llvm/lib/Transforms/IPO/FunctionAttrs.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
index 918842a33f..23b1065e2c 100644
--- a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
@@ -1746,7 +1746,6 @@ static bool canReturn(Function &F) {
return false;
}
-
// Set the noreturn function attribute if possible.
static void addNoReturnAttrs(const SCCNodeSet &SCCNodes,
SmallSet<Function *, 8> &Changed) {
@@ -1850,7 +1849,6 @@ static bool functionWillReturn(const Function &F) {
});
}
-
// Set the willreturn function attribute if possible.
static void addWillReturn(const SCCNodeSet &SCCNodes,
SmallSet<Function *, 8> &Changed) {
@@ -1864,8 +1862,6 @@ static void addWillReturn(const SCCNodeSet &SCCNodes,
}
}
-
-
static SCCNodesResult createSCCNodeSet(ArrayRef<Function *> Functions) {
SCCNodesResult Res;
Res.HasUnknownCall = false;
``````````
</details>
https://github.com/llvm/llvm-project/pull/101298
More information about the llvm-commits
mailing list