Lines Matching refs:TableSize

4877       Module &M, uint64_t TableSize, ConstantInt *Offset,
4887 static bool WouldFitInRegister(const DataLayout &DL, uint64_t TableSize,
4931 Module &M, uint64_t TableSize, ConstantInt *Offset, in SwitchLookupTable() argument
4935 assert(TableSize >= Values.size() && "Can't fit values in table!"); in SwitchLookupTable()
4943 SmallVector<Constant *, 64> TableContents(TableSize); in SwitchLookupTable()
4957 if (Values.size() < TableSize) { in SwitchLookupTable()
4961 for (uint64_t I = 0; I < TableSize; ++I) { in SwitchLookupTable()
4983 assert(TableSize >= 2 && "Should be a SingleValue table."); in SwitchLookupTable()
4985 for (uint64_t I = 0; I < TableSize; ++I) { in SwitchLookupTable()
5015 if (WouldFitInRegister(DL, TableSize, ValueType)) { in SwitchLookupTable()
5017 APInt TableInt(TableSize * IT->getBitWidth(), 0); in SwitchLookupTable()
5018 for (uint64_t I = TableSize; I > 0; --I) { in SwitchLookupTable()
5034 ArrayType *ArrayTy = ArrayType::get(ValueType, TableSize); in SwitchLookupTable()
5084 uint64_t TableSize = in BuildLookup() local
5086 if (TableSize > (1ULL << (IT->getBitWidth() - 1))) in BuildLookup()
5101 uint64_t TableSize, in WouldFitInRegister() argument
5110 if (TableSize >= UINT_MAX / IT->getBitWidth()) in WouldFitInRegister()
5112 return DL.fitsInLegalInteger(TableSize * IT->getBitWidth()); in WouldFitInRegister()
5118 ShouldBuildLookupTable(SwitchInst *SI, uint64_t TableSize, in ShouldBuildLookupTable() argument
5121 if (SI->getNumCases() > TableSize || TableSize >= UINT64_MAX / 10) in ShouldBuildLookupTable()
5135 SwitchLookupTable::WouldFitInRegister(DL, TableSize, Ty); in ShouldBuildLookupTable()
5155 return SI->getNumCases() * 10 >= TableSize * 4; in ShouldBuildLookupTable()
5315 uint64_t TableSize = RangeSpread.getLimitedValue() + 1; in SwitchToLookupTable() local
5316 bool TableHasHoles = (NumResults < TableSize); in SwitchToLookupTable()
5330 if (!DL.fitsInLegalInteger(TableSize)) in SwitchToLookupTable()
5340 if (!ShouldBuildLookupTable(SI, TableSize, TTI, DL, ResultTypes)) in SwitchToLookupTable()
5361 assert(MaxTableSize >= TableSize && in SwitchToLookupTable()
5370 const bool GeneratingCoveredLookupTable = (MaxTableSize == TableSize); in SwitchToLookupTable()
5379 TableIndex, ConstantInt::get(MinCaseVal->getType(), TableSize)); in SwitchToLookupTable()
5397 uint64_t TableSizePowOf2 = NextPowerOf2(std::max(7ULL, TableSize - 1ULL)); in SwitchToLookupTable()
5438 SwitchLookupTable Table(Mod, TableSize, MinCaseVal, ResultList, DV, DL, in SwitchToLookupTable()