Lines Matching refs:CharUnits

57 static CharUnits getTypeStoreSize(CodeGenModule &CGM, llvm::Type *type) {  in getTypeStoreSize()
58 return CharUnits::fromQuantity(CGM.getDataLayout().getTypeStoreSize(type)); in getTypeStoreSize()
61 static CharUnits getTypeAllocSize(CodeGenModule &CGM, llvm::Type *type) { in getTypeAllocSize()
62 return CharUnits::fromQuantity(CGM.getDataLayout().getTypeAllocSize(type)); in getTypeAllocSize()
65 void SwiftAggLowering::addTypedData(QualType type, CharUnits begin) { in addTypedData()
108 if (atomicPadding > CharUnits::Zero()) in addTypedData()
120 void SwiftAggLowering::addTypedData(const RecordDecl *record, CharUnits begin) { in addTypedData()
124 void SwiftAggLowering::addTypedData(const RecordDecl *record, CharUnits begin, in addTypedData()
186 CharUnits recordBegin, in addBitFieldData()
196 CharUnits bitfieldByteBegin = ctx.toCharUnitsFromBits(bitfieldBitBegin); in addBitFieldData()
202 CharUnits bitfieldByteEnd = in addBitFieldData()
203 ctx.toCharUnitsFromBits(bitfieldBitLast) + CharUnits::One(); in addBitFieldData()
208 void SwiftAggLowering::addTypedData(llvm::Type *type, CharUnits begin) { in addTypedData()
214 CharUnits begin, CharUnits end) { in addTypedData()
247 CharUnits begin, CharUnits end) { in addLegalTypedData()
274 CharUnits begin, CharUnits end) { in addEntry()
338 CharUnits eltSize = in addEntry()
406 CharUnits eltSize = getTypeStoreSize(CGM, eltTy); in splitVectorEntry()
410 CharUnits begin = Entries[index].Begin; in splitVectorEntry()
424 static CharUnits getOffsetAtStartOfUnit(CharUnits offset, CharUnits unitSize) { in getOffsetAtStartOfUnit()
427 return CharUnits::fromQuantity(offset.getQuantity() & unitMask); in getOffsetAtStartOfUnit()
430 static bool areBytesInSameUnit(CharUnits first, CharUnits second, in areBytesInSameUnit()
431 CharUnits chunkSize) { in areBytesInSameUnit()
458 CharUnits chunkSize) { in shouldMergeEntries()
462 if (!areBytesInSameUnit(first.End - CharUnits::One(), second.Begin, in shouldMergeEntries()
478 const CharUnits chunkSize = getMaximumVoluntaryIntegerSize(CGM); in finish()
531 CharUnits localBegin = begin; in finish()
532 CharUnits chunkBegin = getOffsetAtStartOfUnit(localBegin, chunkSize); in finish()
533 CharUnits chunkEnd = chunkBegin + chunkSize; in finish()
534 CharUnits localEnd = std::min(end, chunkEnd); in finish()
537 CharUnits unitSize = CharUnits::One(); in finish()
538 CharUnits unitBegin, unitEnd; in finish()
581 CharUnits lastEnd = CharUnits::Zero(); in getCoerceAndExpandTypes()
595 if (!packed && !entry.Begin.isMultipleOf(CharUnits::fromQuantity( in getCoerceAndExpandTypes()
653 CharUnits swiftcall::getMaximumVoluntaryIntegerSize(CodeGenModule &CGM) { in getMaximumVoluntaryIntegerSize()
659 CharUnits swiftcall::getNaturalAlignment(CodeGenModule &CGM, llvm::Type *type) { in getNaturalAlignment()
665 return CharUnits::fromQuantity(size); in getNaturalAlignment()
688 bool swiftcall::isLegalVectorType(CodeGenModule &CGM, CharUnits vectorSize, in isLegalVectorType()
695 bool swiftcall::isLegalVectorType(CodeGenModule &CGM, CharUnits vectorSize, in isLegalVectorType()
702 swiftcall::splitLegalVectorType(CodeGenModule &CGM, CharUnits vectorSize, in splitLegalVectorType()
716 void swiftcall::legalizeVectorType(CodeGenModule &CGM, CharUnits origVectorSize, in legalizeVectorType()
742 CharUnits eltSize = (origVectorSize / numElts); in legalizeVectorType()
743 CharUnits candidateSize = eltSize * candidateNumElts; in legalizeVectorType()
800 CharUnits alignmentForIndirect) { in classifyExpandedType()
821 lowering.addTypedData(recordType->getDecl(), CharUnits::Zero(), layout); in classifyType()
836 lowering.addTypedData(type, CharUnits::Zero()); in classifyType()
839 CharUnits alignment = CGM.getContext().getTypeAlignInChars(type); in classifyType()