[llvm] r277415 - Minor code cleanups. NFC.
Junmo Park via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 1 21:38:28 PDT 2016
Author: flyingforyou
Date: Mon Aug 1 23:38:27 2016
New Revision: 277415
URL: http://llvm.org/viewvc/llvm-project?rev=277415&view=rev
Log:
Minor code cleanups. NFC.
Modified:
llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=277415&r1=277414&r2=277415&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Mon Aug 1 23:38:27 2016
@@ -5045,7 +5045,7 @@ static bool isSwitchDense(ArrayRef<int64
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
// 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);
More information about the llvm-commits
mailing list