Lines Matching full:seg

32     auto &Seg = Segments[{Sec.getMemProt(), Sec.getMemLifetime()}];  in BasicLayout()  local
35 Seg.ContentBlocks.push_back(B); in BasicLayout()
37 Seg.ZeroFillBlocks.push_back(B); in BasicLayout()
52 auto &Seg = KV.second; in BasicLayout() local
54 llvm::sort(Seg.ContentBlocks, CompareBlocks); in BasicLayout()
55 llvm::sort(Seg.ZeroFillBlocks, CompareBlocks); in BasicLayout()
57 for (auto *B : Seg.ContentBlocks) { in BasicLayout()
58 Seg.ContentSize = alignToBlock(Seg.ContentSize, *B); in BasicLayout()
59 Seg.ContentSize += B->getSize(); in BasicLayout()
60 Seg.Alignment = std::max(Seg.Alignment, Align(B->getAlignment())); in BasicLayout()
63 uint64_t SegEndOffset = Seg.ContentSize; in BasicLayout()
64 for (auto *B : Seg.ZeroFillBlocks) { in BasicLayout()
67 Seg.Alignment = std::max(Seg.Alignment, Align(B->getAlignment())); in BasicLayout()
69 Seg.ZeroFillSize = SegEndOffset - Seg.ContentSize; in BasicLayout()
72 dbgs() << " Seg " << KV.first in BasicLayout()
73 << ": content-size=" << formatv("{0:x}", Seg.ContentSize) in BasicLayout()
74 << ", zero-fill-size=" << formatv("{0:x}", Seg.ZeroFillSize) in BasicLayout()
75 << ", align=" << formatv("{0:x}", Seg.Alignment.value()) << "\n"; in BasicLayout()
86 auto &Seg = KV.second; in getContiguousPageBasedLayoutSizes() local
88 if (Seg.Alignment > PageSize) in getContiguousPageBasedLayoutSizes()
92 uint64_t SegSize = alignTo(Seg.ContentSize + Seg.ZeroFillSize, PageSize); in getContiguousPageBasedLayoutSizes()
104 auto &Seg = KV.second; in apply() local
106 assert(!(Seg.ContentBlocks.empty() && Seg.ZeroFillBlocks.empty()) && in apply()
109 for (auto *B : Seg.ContentBlocks) { in apply()
111 Seg.Addr = alignToBlock(Seg.Addr, *B); in apply()
112 Seg.NextWorkingMemOffset = alignToBlock(Seg.NextWorkingMemOffset, *B); in apply()
115 B->setAddress(Seg.Addr); in apply()
116 Seg.Addr += B->getSize(); in apply()
120 memcpy(Seg.WorkingMem + Seg.NextWorkingMemOffset, B->getContent().data(), in apply()
123 {Seg.WorkingMem + Seg.NextWorkingMemOffset, B->getSize()}); in apply()
124 Seg.NextWorkingMemOffset += B->getSize(); in apply()
127 for (auto *B : Seg.ZeroFillBlocks) { in apply()
129 Seg.Addr = alignToBlock(Seg.Addr, *B); in apply()
131 B->setAddress(Seg.Addr); in apply()
132 Seg.Addr += B->getSize(); in apply()
135 Seg.ContentBlocks.clear(); in apply()
136 Seg.ZeroFillBlocks.clear(); in apply()
165 auto &Seg = KV.second; in Create() local
177 if (Seg.ContentSize != 0) { in Create()
179 orc::ExecutorAddr(alignTo(NextAddr.getValue(), Seg.ContentAlign)); in Create()
181 G->createMutableContentBlock(Sec, G->allocateBuffer(Seg.ContentSize), in Create()
182 NextAddr, Seg.ContentAlign.value(), 0); in Create()
184 NextAddr += Seg.ContentSize; in Create()
305 auto &Seg = KV.second; in applyProtections() local
310 alignTo(Seg.ContentSize + Seg.ZeroFillSize, MemMgr.PageSize); in applyProtections()
311 sys::MemoryBlock MB(Seg.WorkingMem, SegSize); in applyProtections()
420 auto &Seg = KV.second; in allocate() local
426 Seg.WorkingMem = SegAddr.toPtr<char *>(); in allocate()
427 Seg.Addr = SegAddr; in allocate()
429 SegAddr += alignTo(Seg.ContentSize + Seg.ZeroFillSize, PageSize); in allocate()