/llvm-project/llvm/unittests/Support/ |
H A D | MemoryBufferTest.cpp | 117 ErrorOr<OwningBuffer> MB = MemoryBuffer::getOpenFile(*File, TestPath, 6); in TEST_F() 118 ASSERT_NO_ERROR(MB.getError()); in TEST_F() 119 EXPECT_EQ("123456", MB.get()->getBuffer()); in TEST_F() 145 ErrorOr<OwningBuffer> MB = MemoryBuffer::getFile(TestPath.c_str()); in TEST_F() 146 std::error_code EC = MB.getError(); in TEST_F() 149 const char *BufData = MB.get()->getBufferStart(); in TEST_F() 195 ErrorOr<OwningBuffer> MB = in TEST_F() 198 ASSERT_NO_ERROR(MB.getError()); in TEST_F() 199 EXPECT_EQ(MB.get()->getBuffer(), "foofoofoofoofoo"); in TEST_F() 314 ErrorOr<OwningBuffer> MB in TEST_F() 116 ErrorOr<OwningBuffer> MB = MemoryBuffer::getOpenFile(*File, TestPath, 6); TEST_F() local 144 ErrorOr<OwningBuffer> MB = MemoryBuffer::getFile(TestPath.c_str()); TEST_F() local 194 ErrorOr<OwningBuffer> MB = TEST_F() local 313 ErrorOr<OwningBuffer> MB = MemoryBuffer::getFileSlice(TestPath.str(), TEST_F() local 359 WritableMemoryBuffer &MB = **MBOrError; TEST_F() local 368 auto &MB = **MBOrError; TEST_F() local 389 WriteThroughMemoryBuffer &MB = **MBOrError; TEST_F() local 398 auto &MB = **MBOrError; TEST_F() local 442 SmallVectorMemoryBuffer MB(std::move(Data), TEST() local 454 SmallVectorMemoryBuffer MB(std::move(Data), TEST() local [all...] |
H A D | MemoryBufferRefTest.cpp | 22 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/llvm/unittests/ProfileData/ |
H A D | PGOCtxProfReaderWriterTest.cpp | 106 ErrorOr<std::unique_ptr<MemoryBuffer>> MB = in TEST_F() 108 ASSERT_TRUE(!!MB); in TEST_F() 109 ASSERT_NE(*MB, nullptr); in TEST_F() 112 BitcodeAnalyzer BA((*MB)->getBuffer()); in TEST_F() 123 PGOCtxProfileReader Reader((*MB)->getBuffer()); in TEST_F() 156 auto MB = MemoryBuffer::getFile(ProfileFile.path()); in TEST_F() 157 ASSERT_TRUE(!!MB); in TEST_F() 158 ASSERT_NE(*MB, nullptr); in TEST_F() 159 PGOCtxProfileReader Reader((*MB)->getBuffer()); in TEST_F() 192 auto MB in TEST_F() 105 ErrorOr<std::unique_ptr<MemoryBuffer>> MB = TEST_F() local 134 auto MB = MemoryBuffer::getFile(ProfileFile.path()); TEST_F() local 173 auto MB = MemoryBuffer::getFile(ProfileFile.path()); TEST_F() local 195 auto MB = MemoryBuffer::getFile(ProfileFile.path()); TEST_F() local 219 auto MB = MemoryBuffer::getFile(ProfileFile.path()); TEST_F() local 246 auto MB = MemoryBuffer::getFile(ProfileFile.path()); TEST_F() local [all...] |
/llvm-project/llvm/unittests/Bitstream/ |
H A D | BitstreamWriterTest.cpp | 86 ErrorOr<std::unique_ptr<MemoryBuffer>> MB = in TEST_P() local 88 ASSERT_TRUE(!!MB); in TEST_P() 89 ASSERT_NE(*MB, nullptr); in TEST_P() 90 BitstreamCursor Cursor((*MB)->getBuffer()); in TEST_P() 104 ErrorOr<std::unique_ptr<MemoryBuffer>> MB = in TEST_P() local 106 ASSERT_TRUE(!!MB); in TEST_P() 107 ASSERT_NE(*MB, nullptr); in TEST_P() 108 BitstreamCursor Cursor((*MB)->getBuffer()); in TEST_P() 129 ErrorOr<std::unique_ptr<MemoryBuffer>> MB = in TEST_P() local 131 ASSERT_TRUE(!!MB); in TEST_P() [all …]
|
/llvm-project/llvm/lib/ToolDrivers/llvm-lib/ |
H A D | LibDriver.cpp | 101 ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> MB = in openFile() 104 if (std::error_code EC = MB.getError()) { in openFile() 109 return std::move(*MB); in findInputFile() 165 static Expected<COFF::MachineTypes> getCOFFFileMachine(MemoryBufferRef MB) { in getCOFFFileMachine() 167 auto Obj = object::COFFObjectFile::create(MB); in getCOFFFileMachine() 183 static Expected<COFF::MachineTypes> getBitcodeFileMachine(MemoryBufferRef MB) { in getBitcodeFileMachine() 184 Expected<std::string> TripleStr = getBitcodeTargetTriple(MB); in getBitcodeFileMachine() 227 std::string &LibMachineSource, MemoryBufferRef MB) { in appendFile() 228 file_magic Magic = identify_magic(MB.getBuffer()); in appendFile() 233 llvm::errs() << MB in appendFile() 98 ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> MB = openFile() local 162 getCOFFFileMachine(MemoryBufferRef MB) getCOFFFileMachine() argument 179 getBitcodeFileMachine(MemoryBufferRef MB) getBitcodeFileMachine() argument 221 appendFile(std::vector<NewArchiveMember> & Members,COFF::MachineTypes & LibMachine,std::string & LibMachineSource,MemoryBufferRef MB) appendFile() argument 377 std::unique_ptr<MemoryBuffer> MB = libDriverMain() local [all...] |
/llvm-project/llvm/tools/llvm-c-test/ |
H A D | object.c | 21 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 D | module.c | 28 LLVMMemoryBufferRef MB; in llvm_load_module() local 32 if (LLVMCreateMemoryBufferWithSTDIN(&MB, &msg)) { in llvm_load_module() 41 Ret = LLVMGetBitcodeModuleInContext2(C, MB, &M); in llvm_load_module() 43 Ret = LLVMParseBitcodeInContext2(C, MB, &M); in llvm_load_module() 46 Ret = LLVMGetBitcodeModuleInContext(C, MB, &M, &msg); in llvm_load_module() 48 Ret = LLVMParseBitcodeInContext(C, MB, &M, &msg); in llvm_load_module() 53 LLVMDisposeMemoryBuffer(MB); in llvm_load_module() 58 LLVMDisposeMemoryBuffer(MB); in llvm_load_module()
|
H A D | diagnostic.c | 62 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/mlir/examples/minimal-opt/ |
H A D | README.md | 19 | `mlir-minimal-opt` | 1.62MB | 1.32MB | 1.36MB | 1.17MB | 1.07MB | 20 | `mlir-minimal-opt-canonicalize` | 1.83MB | 1.40MB | 1.45MB | 1.25MB | 1.14MB |
|
/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/Shared/ |
H A D | VTuneSharedStructs.h | 87 static size_t size(const VTuneMethodBatch &MB) { in size() argument 88 return SPSVTuneMethodBatch::AsArgList::size(MB.Methods, MB.Strings); in size() 91 static bool deserialize(SPSInputBuffer &IB, VTuneMethodBatch &MB) { in deserialize() argument 92 return SPSVTuneMethodBatch::AsArgList::deserialize(IB, MB.Methods, in deserialize() 93 MB.Strings); in deserialize() 96 static bool serialize(SPSOutputBuffer &OB, const VTuneMethodBatch &MB) { in serialize() argument 97 return SPSVTuneMethodBatch::AsArgList::serialize(OB, MB.Methods, in serialize() 98 MB.Strings); in serialize()
|
/llvm-project/llvm/lib/Support/ |
H A D | Memory.cpp | 43 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 D | MemoryBuffer.cpp | 98 template<typename MB> 99 class MemoryBufferMem : public MB { 122 template <typename MB> 123 static ErrorOr<std::unique_ptr<MB>> 190 template <typename MB> 206 template<typename MB> 207 class MemoryBufferMMapFile : public MB { 225 : MFR(FD, Mapmode<MB>, getLegalMapSize(Len, Offset), in MemoryBufferMMapFile() 268 template <typename MB> 269 static ErrorOr<std::unique_ptr<MB>> [all...] |
H A D | SpecialCaseList.cpp | 90 std::unique_ptr<SpecialCaseList> SpecialCaseList::create(const MemoryBuffer *MB, in create() argument 93 if (SCL->createInternal(MB, Error)) in create() 125 bool SpecialCaseList::createInternal(const MemoryBuffer *MB, in createInternal() argument 127 if (!parse(MB, Error)) in createInternal() 146 bool SpecialCaseList::parse(const MemoryBuffer *MB, std::string &Error) { in parse() argument 158 bool UseGlobs = !MB->getBuffer().starts_with("#!special-case-list-v1\n"); in parse() 160 for (line_iterator LineIt(*MB, /*SkipBlanks=*/true, /*CommentMarker=*/'#'); in parse()
|
/llvm-project/compiler-rt/lib/orc/tests/unit/ |
H A D | extensible_rtti_test.cpp | 33 MyBase MB; in TEST() local 37 // Check MB properties. in TEST() 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/clang/lib/Rewrite/ |
H A D | Rewriter.cpp | 149 StringRef MB = SourceMgr->getBufferData(FID); in getRangeSize() 150 I->second.Initialize(MB.begin(), MB.end()); in getRangeSize() 165 StringRef MB = SourceMgr->getBufferData(FID); in getRangeSize() 176 while (isWhitespaceExceptNL(MB[i])) 178 indentSpace = MB.substr(lineOffs, i-lineOffs); 242 StringRef MB = SourceMgr->getBufferData(FID); in getEditBuffer() 243 return ReplaceText(start, origLength, MB.substr(newOffs, newLength)); in getEditBuffer() 266 StringRef MB = SourceMgr->getBufferData(FID); in InsertText() 283 while (isWhitespaceExceptNL(MB[ in InsertText() 244 StringRef MB = SourceMgr->getBufferData(FID); getEditBuffer() local 260 StringRef MB = SourceMgr->getBufferData(FID); InsertText() local 337 StringRef MB = SourceMgr->getBufferData(FID); ReplaceText() local 361 StringRef MB = SourceMgr->getBufferData(FID); IncreaseIndentation() local [all...] |
/llvm-project/llvm/lib/ExecutionEngine/ |
H A D | SectionMemoryManager.cpp | 103 sys::MemoryBlock MB = MMapper->allocateMappedMemory( in allocateSection() 112 MemGroup.Near = MB; in allocateSection() 117 CodeMem.Near = MB; in allocateSection() 119 RODataMem.Near = MB; in allocateSection() 121 RWDataMem.Near = MB; in allocateSection() 124 MemGroup.AllocatedMem.push_back(MB); in allocateSection() 125 Addr = (uintptr_t)MB.base(); in allocateSection() 126 uintptr_t EndOfBlock = Addr + MB.allocatedSize(); in allocateSection() 205 for (sys::MemoryBlock &MB : MemGroup.PendingMem) in applyMemoryGroupPermissions() 206 if (std::error_code EC = MMapper->protectMappedMemory(MB, Permission in applyMemoryGroupPermissions() 104 sys::MemoryBlock MB = MMapper->allocateMappedMemory( allocateSection() local [all...] |
/llvm-project/third-party/benchmark/docs/ |
H A D | tools.md | 45 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 66 BM_copy/8 223 ns 223 ns 3146977 34.2338MB/s [all …]
|
/llvm-project/llvm/unittests/ExecutionEngine/Orc/ |
H A D | RTDyldObjectLinkingLayerTest.cpp | 133 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 D | EPCGenericJITLinkMemoryManagerTest.cpp | 33 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 D | IndirectionUtilsTest.cpp | 20 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/llvm/tools/llvm-rtdyld/ |
H A D | llvm-rtdyld.cpp | 192 SectionInfo(StringRef Name, sys::MemoryBlock MB, unsigned SectionID) in SectionInfo() 193 : 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() 272 sys::MemoryBlock MB((void *)OldSlabOffset, Size); in allocateFromSlab() local 274 FunctionMemory.push_back(SectionInfo(SectionName, MB, SectionID)); in allocateFromSlab() 276 DataMemory.push_back(SectionInfo(SectionName, MB, SectionID)); in allocateFromSlab() 309 sys::MemoryBlock MB = in allocateCodeSection() local [all …]
|
/llvm-project/llvm/lib/ExecutionEngine/Orc/TargetProcess/ |
H A D | JITLoaderVTune.cpp | 31 static Error registerJITLoaderVTuneRegisterImpl(const VTuneMethodBatch &MB) { in registerJITLoaderVTuneRegisterImpl() argument 32 const size_t StringsSize = MB.Strings.size(); in registerJITLoaderVTuneRegisterImpl() 34 for (const auto &MethodInfo : MB.Methods) { in registerJITLoaderVTuneRegisterImpl() 41 const_cast<char *>(MB.Strings.at(MethodInfo.NameSI).data()); in registerJITLoaderVTuneRegisterImpl() 47 const_cast<char *>(MB.Strings.at(MethodInfo.ClassFileSI).data()); in registerJITLoaderVTuneRegisterImpl() 53 const_cast<char *>(MB.Strings.at(MethodInfo.SourceFileSI).data()); in registerJITLoaderVTuneRegisterImpl() 191 static Error unsupportedBatch(const VTuneMethodBatch &MB) { in unsupportedBatch() argument
|
H A D | SimpleExecutorMemoryManager.cpp | 26 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/llvm/lib/ToolDrivers/llvm-dlltool/ |
H A D | DlltoolDriver.cpp | 65 ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> MB = MemoryBuffer::getFile(Path); in openFile() 67 if (std::error_code EC = MB.getError()) { in openFile() 72 return std::move(*MB); in getEmulation() 125 std::unique_ptr<MemoryBuffer> MB = openFile(DefFileName); in parseModuleDefinition() 126 if (!MB) in parseModuleDefinition() 129 if (!MB->getBufferSize()) { in parseModuleDefinition() 135 *MB, Machine, /*MingwDef=*/true, AddUnderscores); in parseModuleDefinition() 62 ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> MB = MemoryBuffer::getFile(Path); openFile() local 119 std::unique_ptr<MemoryBuffer> MB = openFile(DefFileName); parseModuleDefinition() local
|
/llvm-project/llvm/tools/llvm-dis/ |
H A D | llvm-dis.cpp | 215 std::unique_ptr<MemoryBuffer> MB = std::move(BufferOrErr.get()); in main() 217 BitcodeFileContents IF = ExitOnErr(llvm::getBitcodeFileContents(*MB)); in main() 225 BitcodeModule MB = IF.Mods[I]; in main() 231 MB.getLazyModule(Context, MaterializeMetadata, SetImporting)); in main() 238 BitcodeLTOInfo LTOInfo = ExitOnErr(MB.getLTOInfo()); in main() 241 Index = ExitOnErr(MB.getSummary()); in main() 197 std::unique_ptr<MemoryBuffer> MB = std::move(BufferOrErr.get()); main() local 207 BitcodeModule MB = IF.Mods[I]; main() local
|