Switch SimplifyCFG over to the TargetTransformInfo interface rather than

the ScalarTargetTransformInfo interface.

llvm-svn: 171617
This commit is contained in:
Chandler Carruth 2013-01-05 10:05:26 +00:00
parent 6fe147fb3a
commit 6db43e6ca3
1 changed files with 2 additions and 4 deletions

View File

@ -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