Home
last modified time | relevance | path

Searched refs:MB (Results 1 – 25 of 135) sorted by relevance

123456

/llvm-project-15.0.7/llvm/unittests/Support/
H A DMemoryBufferTest.cpp117 ASSERT_NO_ERROR(MB.getError()); in TEST_F()
145 std::error_code EC = MB.getError(); in TEST_F()
190 ErrorOr<OwningBuffer> MB = in TEST_F() local
193 ASSERT_NO_ERROR(MB.getError()); in TEST_F()
295 std::error_code EC = MB.getError(); in TEST_F()
342 ASSERT_EQ(MB.getBufferEnd(), MB.getBufferStart() + MB.getBufferSize()); in TEST_F()
348 auto &MB = **MBOrError; in TEST_F() local
372 ASSERT_EQ(MB.getBufferEnd(), MB.getBufferStart() + MB.getBufferSize()); in TEST_F()
378 auto &MB = **MBOrError; in TEST_F() local
424 EXPECT_EQ(MB.getBufferSize(), 9u); in TEST()
[all …]
H A DMemoryBufferRefTest.cpp22 std::unique_ptr<MemoryBuffer> MB(MemoryBuffer::getMemBuffer("data", "id")); in TEST() local
23 MemoryBufferRef MBR(*MB); in TEST()
25 EXPECT_EQ(MB->getBufferStart(), MBR.getBufferStart()); in TEST()
26 EXPECT_EQ(MB->getBufferIdentifier(), MBR.getBufferIdentifier()); in TEST()
31 std::unique_ptr<MemoryBuffer> MB(MemoryBuffer::getMemBuffer(Data, "id")); in TEST() local
32 MemoryBufferRef Ref(*MB); in TEST()
34 MemoryBufferRef NoIdentifier(MB->getBuffer(), ""); in TEST()
35 MemoryBufferRef NoData("", MB->getBufferIdentifier()); in TEST()
36 MemoryBufferRef Same(MB->getBuffer(), MB->getBufferIdentifier()); in TEST()
/llvm-project-15.0.7/llvm/tools/llvm-c-test/
H A Dobject.c21 LLVMMemoryBufferRef MB; in llvm_object_list_sections() local
26 if (LLVMCreateMemoryBufferWithSTDIN(&MB, &outBufferErr)) { in llvm_object_list_sections()
33 O = LLVMCreateBinary(MB, LLVMGetGlobalContext(), &outBinaryErr); in llvm_object_list_sections()
52 LLVMDisposeMemoryBuffer(MB); in llvm_object_list_sections()
58 LLVMMemoryBufferRef MB; in llvm_object_list_symbols() local
64 if (LLVMCreateMemoryBufferWithSTDIN(&MB, &outBufferErr)) { in llvm_object_list_symbols()
71 O = LLVMCreateBinary(MB, LLVMGetGlobalContext(), &outBinaryErr); in llvm_object_list_symbols()
94 LLVMDisposeMemoryBuffer(MB); in llvm_object_list_symbols()
H A Dmodule.c28 LLVMMemoryBufferRef MB; in llvm_load_module() local
32 if (LLVMCreateMemoryBufferWithSTDIN(&MB, &msg)) { in llvm_load_module()
42 Ret = LLVMGetBitcodeModule2(MB, &M); in llvm_load_module()
44 Ret = LLVMParseBitcode2(MB, &M); in llvm_load_module()
47 Ret = LLVMGetBitcodeModule(MB, &M, &msg); in llvm_load_module()
49 Ret = LLVMParseBitcode(MB, &M, &msg); in llvm_load_module()
54 LLVMDisposeMemoryBuffer(MB); in llvm_load_module()
59 LLVMDisposeMemoryBuffer(MB); in llvm_load_module()
H A Ddiagnostic.c62 LLVMMemoryBufferRef MB; in llvm_test_diagnostic_handler() local
64 if (LLVMCreateMemoryBufferWithSTDIN(&MB, &msg)) { in llvm_test_diagnostic_handler()
72 int Ret = LLVMGetBitcodeModule2(MB, &M); in llvm_test_diagnostic_handler()
74 LLVMDisposeMemoryBuffer(MB); in llvm_test_diagnostic_handler()
/llvm-project-15.0.7/third-party/benchmark/docs/
H A Dtools.md45 BM_memcpy/8 36 ns 36 ns 19101577 211.669MB/s
46 BM_memcpy/64 76 ns 76 ns 9412571 800.199MB/s
50 BM_copy/8 222 ns 222 ns 3137987 34.3772MB/s
51 BM_copy/64 1608 ns 1608 ns 432758 37.9501MB/s
52 BM_copy/512 12589 ns 12589 ns 54806 38.7867MB/s
53 BM_copy/1024 25169 ns 25169 ns 27713 38.8003MB/s
54 BM_copy/8192 201165 ns 201112 ns 3486 38.8466MB/s
61 BM_memcpy/8 36 ns 36 ns 19397903 211.255MB/s
62 BM_memcpy/64 73 ns 73 ns 9691174 839.635MB/s
121 BM_copy/8 227 ns 227 ns 3038700 33.6264MB/s
[all …]
/llvm-project-15.0.7/llvm/lib/Support/
H A DMemory.cpp43 raw_ostream &operator<<(raw_ostream &OS, const MemoryBlock &MB) { in operator <<() argument
44 return OS << "[ " << MB.base() << " .. " in operator <<()
45 << (void *)((char *)MB.base() + MB.allocatedSize()) << " ] (" in operator <<()
46 << MB.allocatedSize() << " bytes)"; in operator <<()
H A DMemoryBuffer.cpp86 template<typename MB>
87 class MemoryBufferMem : public MB {
109 template <typename MB>
110 static ErrorOr<std::unique_ptr<MB>>
170 template <typename MB>
186 template<typename MB>
245 template <typename MB>
246 static ErrorOr<std::unique_ptr<MB>>
251 template <typename MB>
426 template <typename MB>
[all …]
H A DSpecialCaseList.cpp81 std::unique_ptr<SpecialCaseList> SpecialCaseList::create(const MemoryBuffer *MB, in create() argument
84 if (SCL->createInternal(MB, Error)) in create()
117 bool SpecialCaseList::createInternal(const MemoryBuffer *MB, in createInternal() argument
120 if (!parse(MB, Sections, Error)) in createInternal()
125 bool SpecialCaseList::parse(const MemoryBuffer *MB, in parse() argument
130 MB->getBuffer().split(Lines, '\n'); in parse()
/llvm-project-15.0.7/llvm/lib/ToolDrivers/llvm-lib/
H A DLibDriver.cpp144 auto Obj = object::COFFObjectFile::create(MB); in getCOFFFileMachine()
161 Expected<std::string> TripleStr = getBitcodeTargetTriple(MB); in getBitcodeFileMachine()
183 file_magic Magic = identify_magic(MB.getBuffer()); in appendFile()
188 llvm::errs() << MB.getBufferIdentifier() in appendFile()
200 object::Archive Archive(MB, Err); in appendFile()
201 fatalOpenError(std::move(Err), MB.getBufferIdentifier()); in appendFile()
216 fatalOpenError(std::move(Err), MB.getBufferIdentifier()); in appendFile()
229 (Magic == file_magic::coff_object) ? getCOFFFileMachine(MB) in appendFile()
230 : getBitcodeFileMachine(MB); in appendFile()
234 llvm::errs() << MB.getBufferIdentifier() << ": " in appendFile()
[all …]
/llvm-project-15.0.7/compiler-rt/lib/orc/unittests/
H A Dextensible_rtti_test.cpp33 MyBase MB; in TEST() local
38 EXPECT_TRUE(isa<RTTIRoot>(MB)); in TEST()
39 EXPECT_TRUE(isa<MyBase>(MB)); in TEST()
40 EXPECT_FALSE(isa<MyDerivedA>(MB)); in TEST()
41 EXPECT_FALSE(isa<MyDerivedB>(MB)); in TEST()
/llvm-project-15.0.7/llvm/lib/ExecutionEngine/
H A DSectionMemoryManager.cpp104 sys::MemoryBlock MB = MMapper.allocateMappedMemory( in allocateSection() local
113 MemGroup.Near = MB; in allocateSection()
118 CodeMem.Near = MB; in allocateSection()
120 RODataMem.Near = MB; in allocateSection()
122 RWDataMem.Near = MB; in allocateSection()
125 MemGroup.AllocatedMem.push_back(MB); in allocateSection()
126 Addr = (uintptr_t)MB.base(); in allocateSection()
127 uintptr_t EndOfBlock = Addr + MB.allocatedSize(); in allocateSection()
206 for (sys::MemoryBlock &MB : MemGroup.PendingMem) in applyMemoryGroupPermissions()
207 if (std::error_code EC = MMapper.protectMappedMemory(MB, Permissions)) in applyMemoryGroupPermissions()
/llvm-project-15.0.7/clang/lib/Rewrite/
H A DRewriter.cpp248 StringRef MB = SourceMgr->getBufferData(FID); in getEditBuffer() local
249 I->second.Initialize(MB.begin(), MB.end()); in getEditBuffer()
264 StringRef MB = SourceMgr->getBufferData(FID); in InsertText() local
275 while (isWhitespaceExceptNL(MB[i])) in InsertText()
277 indentSpace = MB.substr(lineOffs, i-lineOffs); in InsertText()
341 StringRef MB = SourceMgr->getBufferData(FID); in ReplaceText() local
365 StringRef MB = SourceMgr->getBufferData(FID); in IncreaseIndentation() local
382 while (isWhitespaceExceptNL(MB[i])) in IncreaseIndentation()
387 while (isWhitespaceExceptNL(MB[i])) in IncreaseIndentation()
403 while (isWhitespaceExceptNL(MB[i])) in IncreaseIndentation()
[all …]
/llvm-project-15.0.7/llvm/unittests/ExecutionEngine/Orc/
H A DRTDyldObjectLinkingLayerTest.cpp133 ModuleBuilder MB(*TSCtx.getContext(), TM->getTargetTriple().str(), "dummy"); in TEST() local
134 MB.getModule()->setDataLayout(TM->createDataLayout()); in TEST()
136 Function *FooImpl = MB.createFunctionDecl( in TEST()
144 Function *BarImpl = MB.createFunctionDecl( in TEST()
152 M = ThreadSafeModule(MB.takeModule(), std::move(TSCtx)); in TEST()
211 ModuleBuilder MB(*TSCtx.getContext(), TM->getTargetTriple().str(), "dummy"); in TEST() local
212 MB.getModule()->setDataLayout(TM->createDataLayout()); in TEST()
214 Function *FooImpl = MB.createFunctionDecl( in TEST()
222 M = ThreadSafeModule(MB.takeModule(), std::move(TSCtx)); in TEST()
H A DEPCGenericJITLinkMemoryManagerTest.cpp33 auto MB = sys::Memory::allocateMappedMemory( in reserve() local
37 Blocks[MB.base()] = sys::OwningMemoryBlock(std::move(MB)); in reserve()
38 return ExecutorAddr::fromPtr(MB.base()); in reserve()
69 auto MB = std::move(I->second); in deallocate() local
71 if (auto EC = MB.release()) in deallocate()
H A DIndirectionUtilsTest.cpp20 ModuleBuilder MB(Context, "x86_64-apple-macosx10.10", ""); in TEST() local
25 Function *F = MB.createFunctionDecl(FTy, ""); in TEST()
35 auto ImplPtr = orc::createImplPointer(*F->getType(), *MB.getModule(), "", nullptr); in TEST()
/llvm-project-15.0.7/llvm/lib/ToolDrivers/llvm-dlltool/
H A DDlltoolDriver.cpp59 ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> MB = MemoryBuffer::getFile(Path); in openFile() local
61 if (std::error_code EC = MB.getError()) { in openFile()
66 return std::move(*MB); in openFile()
141 std::unique_ptr<MemoryBuffer> MB = in dlltoolDriverMain() local
143 if (!MB) in dlltoolDriverMain()
146 if (!MB->getBufferSize()) { in dlltoolDriverMain()
166 parseCOFFModuleDefinition(*MB, Machine, true); in dlltoolDriverMain()
/llvm-project-15.0.7/llvm/tools/llvm-rtdyld/
H A Dllvm-rtdyld.cpp193 : Name(std::string(Name)), MB(std::move(MB)), SectionID(SectionID) {} in SectionInfo()
195 sys::MemoryBlock MB; member
251 sys::MemoryBlock MB = in preallocateSlab() local
256 if (!MB.base()) in preallocateSlab()
260 PreallocSlab = MB; in preallocateSlab()
309 sys::MemoryBlock MB = in allocateCodeSection() local
314 if (!MB.base()) in allocateCodeSection()
318 return (uint8_t*)MB.base(); in allocateCodeSection()
338 sys::MemoryBlock MB = in allocateDataSection() local
343 if (!MB.base()) in allocateDataSection()
[all …]
/llvm-project-15.0.7/llvm/lib/ExecutionEngine/Orc/TargetProcess/
H A DSimpleExecutorMemoryManager.cpp26 auto MB = sys::Memory::allocateMappedMemory( in allocate() local
31 assert(!Allocations.count(MB.base()) && "Duplicate allocation addr"); in allocate()
32 Allocations[MB.base()].Size = Size; in allocate()
33 return ExecutorAddr::fromPtr(MB.base()); in allocate()
102 sys::MemoryBlock MB(AllocToDestroy.first, AllocToDestroy.second.Size); in finalize() local
103 if (auto EC = sys::Memory::releaseMappedMemory(MB)) in finalize()
220 sys::MemoryBlock MB(Base, A.Size); in deallocateImpl() local
221 if (auto EC = sys::Memory::releaseMappedMemory(MB)) in deallocateImpl()
/llvm-project-15.0.7/llvm/tools/llvm-dis/
H A Dllvm-dis.cpp189 std::unique_ptr<MemoryBuffer> MB = std::move(BufferOrErr.get()); in main() local
191 BitcodeFileContents IF = ExitOnErr(llvm::getBitcodeFileContents(*MB)); in main()
199 BitcodeModule MB = IF.Mods[I]; in main() local
205 MB.getLazyModule(Context, MaterializeMetadata, SetImporting)); in main()
212 BitcodeLTOInfo LTOInfo = ExitOnErr(MB.getLTOInfo()); in main()
215 Index = ExitOnErr(MB.getSummary()); in main()
/llvm-project-15.0.7/llvm/lib/Target/PowerPC/MCTargetDesc/
H A DPPCMCTargetDesc.h57 static inline bool isRunOfOnes(unsigned Val, unsigned &MB, unsigned &ME) { in isRunOfOnes() argument
63 MB = countLeadingZeros(Val); in isRunOfOnes()
73 MB = countLeadingZeros((Val - 1) ^ Val) + 1; in isRunOfOnes()
81 static inline bool isRunOfOnes64(uint64_t Val, unsigned &MB, unsigned &ME) { in isRunOfOnes64() argument
87 MB = countLeadingZeros(Val); in isRunOfOnes64()
97 MB = countLeadingZeros((Val - 1) ^ Val) + 1; in isRunOfOnes64()
/llvm-project-15.0.7/clang/test/SemaCXX/
H A Dcode-seg.cpp37 template <typename T> struct __declspec(code_seg("my_base")) MB : T { }; struct
39 MB<Base1> mb1; // ok
40 MB<Base2> mb2;
/llvm-project-15.0.7/bolt/tools/merge-fdata/
H A Dmerge-fdata.cpp247 ErrorOr<std::unique_ptr<MemoryBuffer>> MB = in isYAML() local
249 if (std::error_code EC = MB.getError()) in isYAML()
251 StringRef Buffer = MB.get()->getBuffer(); in isYAML()
265 ErrorOr<std::unique_ptr<MemoryBuffer>> MB = in mergeLegacyProfiles() local
267 if (std::error_code EC = MB.getError()) in mergeLegacyProfiles()
271 StringRef Buf = MB.get()->getBuffer(); in mergeLegacyProfiles()
360 ErrorOr<std::unique_ptr<MemoryBuffer>> MB = in main() local
362 if (std::error_code EC = MB.getError()) in main()
364 yaml::Input YamlInput(MB.get()->getBuffer()); in main()
/llvm-project-15.0.7/llvm/lib/Debuginfod/
H A DHTTPServer.cpp50 MemoryBuffer *MB = MBOrErr->release(); in streamFile() local
51 Request.setResponse({200u, "application/octet-stream", MB->getBufferSize(), in streamFile()
53 return MB->getBuffer().substr(Offset, Length); in streamFile()
55 [=](bool Success) { delete MB; }}); in streamFile()
/llvm-project-15.0.7/llvm/include/llvm/Support/
H A DSpecialCaseList.h79 static std::unique_ptr<SpecialCaseList> create(const MemoryBuffer *MB,
112 bool createInternal(const MemoryBuffer *MB, std::string &Error);
147 bool parse(const MemoryBuffer *MB, StringMap<size_t> &SectionsMap,

123456