aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringBase.cpp
diff options
context:
space:
mode:
authorEllis Hoag <ellis.sparky.hoag@gmail.com>2024-10-28 09:45:03 -0700
committerGitHub <noreply@github.com>2024-10-28 09:45:03 -0700
commit6ab26eab4f1e06f2da7b3183c55666ad57f8866e (patch)
tree8d58cecc95cfea7a335f12e325e952263cb3db3e /llvm/lib/CodeGen/TargetLoweringBase.cpp
parent92412c106f5275b4b385f7c2d882008181de2854 (diff)
downloadllvm-6ab26eab4f1e06f2da7b3183c55666ad57f8866e.zip
llvm-6ab26eab4f1e06f2da7b3183c55666ad57f8866e.tar.gz
llvm-6ab26eab4f1e06f2da7b3183c55666ad57f8866e.tar.bz2
Check hasOptSize() in shouldOptimizeForSize() (#112626)
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringBase.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp
index 7a28f78..cab0ed2 100644
--- a/llvm/lib/CodeGen/TargetLoweringBase.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp
@@ -1633,7 +1633,6 @@ bool TargetLoweringBase::isSuitableForJumpTable(const SwitchInst *SI,
// performed in findJumpTable() in SelectionDAGBuiler and
// getEstimatedNumberOfCaseClusters() in BasicTTIImpl.
const bool OptForSize =
- SI->getParent()->getParent()->hasOptSize() ||
llvm::shouldOptimizeForSize(SI->getParent(), PSI, BFI);
const unsigned MinDensity = getMinimumJumpTableDensity(OptForSize);
const unsigned MaxJumpTableSize = getMaximumJumpTableSize();