diff options
author | Ellis Hoag <ellis.sparky.hoag@gmail.com> | 2024-10-28 09:45:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-28 09:45:03 -0700 |
commit | 6ab26eab4f1e06f2da7b3183c55666ad57f8866e (patch) | |
tree | 8d58cecc95cfea7a335f12e325e952263cb3db3e /llvm/lib/Transforms/IPO/FunctionSpecialization.cpp | |
parent | 92412c106f5275b4b385f7c2d882008181de2854 (diff) | |
download | llvm-6ab26eab4f1e06f2da7b3183c55666ad57f8866e.zip llvm-6ab26eab4f1e06f2da7b3183c55666ad57f8866e.tar.gz llvm-6ab26eab4f1e06f2da7b3183c55666ad57f8866e.tar.bz2 |
Check hasOptSize() in shouldOptimizeForSize() (#112626)
Diffstat (limited to 'llvm/lib/Transforms/IPO/FunctionSpecialization.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/FunctionSpecialization.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionSpecialization.cpp b/llvm/lib/Transforms/IPO/FunctionSpecialization.cpp index 20249a2..48971e9 100644 --- a/llvm/lib/Transforms/IPO/FunctionSpecialization.cpp +++ b/llvm/lib/Transforms/IPO/FunctionSpecialization.cpp @@ -1001,8 +1001,7 @@ bool FunctionSpecializer::isCandidateFunction(Function *F) { return false; // If we're optimizing the function for size, we shouldn't specialize it. - if (F->hasOptSize() || - shouldOptimizeForSize(F, nullptr, nullptr, PGSOQueryType::IRPass)) + if (shouldOptimizeForSize(F, nullptr, nullptr, PGSOQueryType::IRPass)) return false; // Exit if the function is not executable. There's no point in specializing |