Lines Matching refs:TableSize
5793 Module &M, uint64_t TableSize, ConstantInt *Offset,
5803 static bool WouldFitInRegister(const DataLayout &DL, uint64_t TableSize,
5847 Module &M, uint64_t TableSize, ConstantInt *Offset, in SwitchLookupTable() argument
5851 assert(TableSize >= Values.size() && "Can't fit values in table!"); in SwitchLookupTable()
5859 SmallVector<Constant *, 64> TableContents(TableSize); in SwitchLookupTable()
5873 if (Values.size() < TableSize) { in SwitchLookupTable()
5877 for (uint64_t I = 0; I < TableSize; ++I) { in SwitchLookupTable()
5899 assert(TableSize >= 2 && "Should be a SingleValue table."); in SwitchLookupTable()
5901 for (uint64_t I = 0; I < TableSize; ++I) { in SwitchLookupTable()
5931 if (WouldFitInRegister(DL, TableSize, ValueType)) { in SwitchLookupTable()
5933 APInt TableInt(TableSize * IT->getBitWidth(), 0); in SwitchLookupTable()
5934 for (uint64_t I = TableSize; I > 0; --I) { in SwitchLookupTable()
5950 ArrayType *ArrayTy = ArrayType::get(ValueType, TableSize); in SwitchLookupTable()
6000 uint64_t TableSize = in BuildLookup() local
6002 if (TableSize > (1ULL << std::min(IT->getBitWidth() - 1, 63u))) in BuildLookup()
6019 uint64_t TableSize, in WouldFitInRegister() argument
6028 if (TableSize >= UINT_MAX / IT->getBitWidth()) in WouldFitInRegister()
6030 return DL.fitsInLegalInteger(TableSize * IT->getBitWidth()); in WouldFitInRegister()
6081 ShouldBuildLookupTable(SwitchInst *SI, uint64_t TableSize, in ShouldBuildLookupTable() argument
6084 if (SI->getNumCases() > TableSize) in ShouldBuildLookupTable()
6098 SwitchLookupTable::WouldFitInRegister(DL, TableSize, Ty); in ShouldBuildLookupTable()
6115 return isSwitchDense(SI->getNumCases(), TableSize); in ShouldBuildLookupTable()
6306 uint64_t TableSize; in SwitchToLookupTable() local
6308 TableSize = MaxCaseVal->getLimitedValue() + 1; in SwitchToLookupTable()
6310 TableSize = in SwitchToLookupTable()
6313 bool TableHasHoles = (NumResults < TableSize); in SwitchToLookupTable()
6319 if (!DL.fitsInLegalInteger(TableSize)) in SwitchToLookupTable()
6323 if (!ShouldBuildLookupTable(SI, TableSize, TTI, DL, ResultTypes)) in SwitchToLookupTable()
6350 assert(MaxTableSize >= TableSize && in SwitchToLookupTable()
6359 const bool GeneratingCoveredLookupTable = (MaxTableSize == TableSize); in SwitchToLookupTable()
6370 TableIndex, ConstantInt::get(MinCaseVal->getType(), TableSize)); in SwitchToLookupTable()
6390 uint64_t TableSizePowOf2 = NextPowerOf2(std::max(7ULL, TableSize - 1ULL)); in SwitchToLookupTable()
6435 SwitchLookupTable Table(Mod, TableSize, TableIndexOffset, ResultList, DV, in SwitchToLookupTable()