mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 16:19:52 +00:00
Fix style issues from r163302 pointed out by Evan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163491 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -3045,11 +3045,10 @@ static bool GetCaseResults(SwitchInst *SI,
|
||||
/// DefaultResult to fill the holes in the table. If the table ends up
|
||||
/// containing the same result in each element, set *SingleResult to that value
|
||||
/// and return NULL.
|
||||
static GlobalVariable *BuildLookupTable(
|
||||
Module &M,
|
||||
static GlobalVariable *BuildLookupTable(Module &M,
|
||||
uint64_t TableSize,
|
||||
ConstantInt *Offset,
|
||||
const std::vector<std::pair<ConstantInt*,Constant*> >& Results,
|
||||
const SmallVector<std::pair<ConstantInt*, Constant*>, 4>& Results,
|
||||
Constant *DefaultResult,
|
||||
Constant **SingleResult) {
|
||||
assert(Results.size() && "Need values to build lookup table");
|
||||
@@ -3133,7 +3132,7 @@ static bool SwitchToLookupTable(SwitchInst *SI,
|
||||
ConstantInt *MaxCaseVal = CI.getCaseValue();
|
||||
|
||||
BasicBlock *CommonDest = NULL;
|
||||
typedef std::vector<std::pair<ConstantInt*, Constant*> > ResultListTy;
|
||||
typedef SmallVector<std::pair<ConstantInt*, Constant*>, 4> ResultListTy;
|
||||
SmallDenseMap<PHINode*, ResultListTy> ResultLists;
|
||||
SmallDenseMap<PHINode*, Constant*> DefaultResults;
|
||||
SmallDenseMap<PHINode*, Type*> ResultTypes;
|
||||
@@ -3161,7 +3160,6 @@ static bool SwitchToLookupTable(SwitchInst *SI,
|
||||
}
|
||||
|
||||
// Get the resulting values for the default case.
|
||||
{
|
||||
SmallVector<std::pair<PHINode*, Constant*>, 4> DefaultResultsList;
|
||||
if (!GetCaseResults(SI, SI->getDefaultDest(), &CommonDest, DefaultResultsList))
|
||||
return false;
|
||||
@@ -3171,7 +3169,6 @@ static bool SwitchToLookupTable(SwitchInst *SI,
|
||||
DefaultResults[PHI] = Result;
|
||||
ResultTypes[PHI] = Result->getType();
|
||||
}
|
||||
}
|
||||
|
||||
APInt RangeSpread = MaxCaseVal->getValue() - MinCaseVal->getValue();
|
||||
// The table density should be at lest 40%. This is the same criterion as for
|
||||
|
||||
Reference in New Issue
Block a user