aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2013-01-05 10:05:26 +0000
committerChandler Carruth <chandlerc@gmail.com>2013-01-05 10:05:26 +0000
commit6db43e6ca3fd1b39dd7579aff708ac5e45967456 (patch)
tree3c9bd06f6e7c3cf3a0e77b4aa25656de948a24df /llvm/lib/Transforms/Utils/SimplifyCFG.cpp
parent6fe147fb3aeedc17e17c18e35a2e5fed4ef4c311 (diff)
downloadllvm-6db43e6ca3fd1b39dd7579aff708ac5e45967456.zip
llvm-6db43e6ca3fd1b39dd7579aff708ac5e45967456.tar.gz
llvm-6db43e6ca3fd1b39dd7579aff708ac5e45967456.tar.bz2
Switch SimplifyCFG over to the TargetTransformInfo interface rather than
the ScalarTargetTransformInfo interface. llvm-svn: 171617
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyCFG.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index 321a744..d403950 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -3523,8 +3523,7 @@ static bool ShouldBuildLookupTable(SwitchInst *SI,
Type *Ty = I->second;
// Saturate this flag to true.
- HasIllegalType = HasIllegalType ||
- !TTI->getScalarTargetTransformInfo()->isTypeLegal(Ty);
+ HasIllegalType = HasIllegalType || !TTI->isTypeLegal(Ty);
// Saturate this flag to false.
AllTablesFitInRegister = AllTablesFitInRegister &&
@@ -3561,8 +3560,7 @@ static bool SwitchToLookupTable(SwitchInst *SI,
assert(SI->getNumCases() > 1 && "Degenerate switch?");
// Only build lookup table when we have a target that supports it.
- if (!TTI || !TTI->getScalarTargetTransformInfo() ||
- !TTI->getScalarTargetTransformInfo()->shouldBuildLookupTables())
+ if (!TTI || !TTI->shouldBuildLookupTables())
return false;
// FIXME: If the switch is too sparse for a lookup table, perhaps we could