diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2013-01-05 10:05:26 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2013-01-05 10:05:26 +0000 |
commit | b8f6cb7c49e26122cdea2270de57449aa52f389f (patch) | |
tree | f8b8d02c75cb5427fd636e24a9cb031f3f019a4c /lib/Transforms/Utils/SimplifyCFG.cpp | |
parent | 9980b8a0bd4c5dfb67909a2de7720076881e6525 (diff) |
Switch SimplifyCFG over to the TargetTransformInfo interface rather than
the ScalarTargetTransformInfo interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171617 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r-- | lib/Transforms/Utils/SimplifyCFG.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index 321a744b8d..d4039507dc 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/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 |