mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-07 11:08:46 +00:00
Minor code cleanups. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277415 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f21ab36404
commit
f29090aa9b
@ -5045,7 +5045,7 @@ static bool isSwitchDense(ArrayRef<int64_t> Values) {
|
||||
uint64_t NumCases = Values.size();
|
||||
// 40% is the default density for building a jump table in optsize/minsize mode.
|
||||
uint64_t MinDensity = 40;
|
||||
|
||||
|
||||
return NumCases * 100 >= Range * MinDensity;
|
||||
}
|
||||
|
||||
@ -5123,7 +5123,7 @@ static bool ReduceSwitchRange(SwitchInst *SI, IRBuilder<> &Builder,
|
||||
// shift and puts the shifted-off bits in the uppermost bits. If any of these
|
||||
// are nonzero then the switch condition will be very large and will hit the
|
||||
// default case.
|
||||
|
||||
|
||||
auto *Ty = cast<IntegerType>(SI->getCondition()->getType());
|
||||
Builder.SetInsertPoint(SI);
|
||||
auto *ShiftC = ConstantInt::get(Ty, Shift);
|
||||
|
Loading…
x
Reference in New Issue
Block a user