search for: make_uniqu

Displaying 20 results from an estimated 92 matches for "make_uniqu".

Did you mean: make_unique
2017 Nov 13
4
How to objcopy via LLVM toolchain for armv7e-m ELF32LE?
Hi LLVM developers, As PR35281 mentioned: $ llvm-objcopy -O binary llvm-cortex-m7.elf llvm-cortex-m7.bin llvm-objcopy: 'llvm-cortex-m7.elf': The file was not recognized as a valid object file. if (ELFObjectFile<ELF64LE> *o = dyn_cast<ELFObjectFile<ELF64LE>>(&Binary)) https://github.com/llvm-mirror/llvm/blob/master/tools/llvm-objcopy/llvm-objcopy.cpp#L200
2020 Apr 18
2
PerfJITEventListener needs perf-<pid>.map?
I'm trying to use PerfJITEventListener with llvm::orc::LLJITBuilder: 1. perf record -o /tmp/perf.data -- <my_binary_with_event_listener> 2. perf inject -j -v -i /tmp/perf.data -o /tmp/perf.data.jit *jit marker found: ~.debug/jit/llvm-IR-jit-20200417-3c2242/jit-149849.dump* *injecting: ~/.debug/jit/llvm-IR-jit-20200417-3c2242/jit-149849.dump* *write ELF image
2019 Aug 13
3
ORC v2 question
Hi Lang, On Tue, 13 Aug 2019 at 20:47, Lang Hames <lhames at gmail.com> wrote: > > Sorry for the delayed reply. Looks like you have figured out how to solve your issue already. Out of interest, what did you need to do? Do you have anything that you would like to see added to http://llvm.org/docs/ORCv2.html ? > Sorry my post was misleading. I figured out below which was part of the
2020 Oct 01
2
OrcV1 removal
...:BasicIRLayerMaterializationUnit(llvm::orc::IRLayer&, llvm::orc::IRSymbolMapper::ManglingOptions const&, llvm::orc::ThreadSafeModule) (Layer.cpp:131) | | | ->03.53% (97,542B) 0x83B357D: std::_MakeUniq<llvm::orc::BasicIRLayerMaterializationUnit>::__single_object std::make_unique<llvm::orc::BasicIRLayerMaterializationUnit, llvm::orc::IRLayer&, llvm::orc::IRSymbolMapper::ManglingOptions const&, llvm::orc::ThreadSafeModule>(llvm::orc::IRLayer&, llvm::o> | | | ->03.53% (97,542B) 0x83B1C7D: llvm::orc::IRLayer::add(llvm::IntrusiveRefCnt...
2019 Sep 19
3
"corrupted size vs. prev_size" when calling ExecutionSession::lookup()
...JIT: llvm::InitializeNativeTarget(); llvm::InitializeNativeTargetAsmPrinter(); llvm::InitializeNativeTargetAsmParser(); // create jit llvm::orc::ExecutionSession ES; llvm::orc::RTDyldObjectLinkingLayer ObjectLayer(ES, []() { return std::make_unique<llvm::SectionMemoryManager>(); }); auto JTMB = llvm::orc::JITTargetMachineBuilder::detectHost(); auto DL = JTMB->getDefaultDataLayoutForTarget(); llvm::orc::IRCompileLayer CompileLayer(ES, ObjectLayer, llvm::orc::ConcurrentIRCompiler(std::move(*JTMB))); llvm::orc::MangleAndInterne...
2016 May 04
2
OrcLazyJIT for windows
Hi David, This is really cool. I'd love to get this in-tree. There are two ways we could go about this: (1) Make the OrcArchitecture interface ABI-aware so that it can choose the right resolver code, or (2) Replace the OrcArchitecture classes with OrcABI classes. I.e. We'd just a rename OrcX86_64 -> Orc_X86_64_SysV (and rename I386 & AArch64 similarly) , then we add your code as
2016 Feb 19
3
raw_pwrite_stream to string or stdout?
TargetMachine::addPassesToEmitFile(..) requires as its 2nd argument an raw_pwrite_stream. Is it possible to create such a thing which either writes into a standard string or streams to outs() ? Thanks,
2020 Apr 20
2
ORC JIT Weekly #12
...e JITDylib is // deinitialized. ExitOnErr(J.addIRModule(sdt::move(UntrackedModule))); // Explicitly specify tracker. Module symbols can be // - materialized by calling T->emit(); // - removed by calling T->remove(); // - transfered to the JITDylib by calling T->release(); auto T = std::make_unique<ResourceTracker>(); ExitOnErr(J.addIRModule(TrackedModule, T->getKey())); Early feedback on this API sketch is welcome. Otherwise I hope to have early reviews / discussion ready in time for next week. -- Lang. -------------- next part -------------- An HTML attachment was scrubbed... UR...
2014 Sep 25
2
[LLVMdev] New type of smart pointer for LLVM
On Thu, Sep 25, 2014 at 1:44 AM, Renato Golin <renato.golin at linaro.org> wrote: > On 25 September 2014 06:16, David Blaikie <dblaikie at gmail.com> wrote: > > I can go & dredge up some examples if we want to discuss the particular > > merits & whether each of those cases would be better solved in some other > > way, but it seemed pervasive enough in the
2017 Apr 09
2
Possible stack corruption during call to JITSymbol::getAddress()
...t to hold our module. std::vector<std::unique_ptr<Module>> Ms; Ms.push_back(std::move(M)); // Add the set to the JIT with the resolver we created above and a newly // created SectionMemoryManager. return CompileLayer.addModuleSet(std::move(Ms), make_unique<SectionMemoryManager>(), std::move(Resolver)); } JITSymbol findSymbol(const std::string Name) { std::string MangledName; raw_string_ostream MangledNameStream(MangledName); Mangler::getNameWithPrefix(MangledNameStream,...
2017 Apr 08
2
How to insert vector type input parameter for function in C/C++ API?
...you so much Craig! I tried it. But still complaining. Here is the error message during compilation. HowToUseJIT_SIMD_FuncProto.cpp:94:55: error: expected unqualified-id VectorType::(Type::getInt32Ty(Context),4), THIS IS MY CODE: LLVMContext Context; std::unique_ptr<Module> Owner = make_unique<Module>("test", Context); Module *M = Owner.get(); Function *Add1F = cast<Function>(M->getOrInsertFunction("add1", VectorType::(Type::getInt32Ty(Context),4), VectorType::(Type::getInt32Ty(Context),4), //Type::getInt32Ty(Context), //This is...
2016 Mar 23
2
Help with pass manager
...raw_pwrite_stream *outstream = &objoutstream->os(); SmallVector<char, 0> filebuf; std::unique_ptr<raw_svector_ostream> BOS; if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { BOS = make_unique<raw_svector_ostream>(filebuf); outstream = BOS.get(); } AnalysisID StartBeforeID = nullptr; AnalysisID StartAfterID = nullptr; AnalysisID StopAfterID = nullptr; const PassRegistry *PR = PassRegistry::getPassRegistry(); if (...
2017 Apr 17
2
Possible stack corruption during call to JITSymbol::getAddress()
...s.push_back(std::move(M)); >> >> // Add the set to the JIT with the resolver we created above and >> a newly >> // created SectionMemoryManager. >> return CompileLayer.addModuleSet(std::move(Ms), >> make_unique<SectionMemoryMana >> ger>(), >> std::move(Resolver)); >> } >> >> JITSymbol findSymbol(const std::string Name) { >> std::string MangledName; >> raw_string_ostream MangledNameStream(Mangl...
2014 Oct 01
4
[LLVMdev] New type of smart pointer for LLVM
On Wed, Oct 1, 2014 at 3:14 PM, Anton Yartsev <anton.yartsev at gmail.com> wrote: > Ping! > > Suggested is a wrapper over a raw pointer that is intended for freeing > wrapped memory at the end of wrappers lifetime if ownership of a raw > pointer was not taken away during the lifetime of the wrapper. > The main difference from unique_ptr is an ability to access the wrapped
2017 Apr 20
2
Possible stack corruption during call to JITSymbol::getAddress()
...>>> // Add the set to the JIT with the resolver we created above >>>> and a newly >>>> // created SectionMemoryManager. >>>> return CompileLayer.addModuleSet(std::move(Ms), >>>> make_unique<SectionMemoryMana >>>> ger>(), >>>> std::move(Resolver)); >>>> } >>>> >>>> JITSymbol findSymbol(const std::string Name) { >>>> std::string MangledName; >>&gt...
2017 Nov 09
10
Experiment on how to improve our temporary file handing.
Currently a power failure or other hard crash can cause lld leave a temporary file around. The same is true for other llvm tools. As an example, put a breakpoint in Writer.cpp:236 ("writeBuildId()") and restart the run a few times. You will get t.tmp43a735a t.tmp4deeabb t.tmp9bacdd3 t.tmpe4115c4 t.tmpeb01fff The same would happen if there was a fatal error between the
2015 Oct 27
3
Add a mapping to a C++ lambda
...e "llvm/IR/Constants.h"#include "llvm/IR/IRBuilder.h"#include "llvm/Support/ManagedStatic.h"#include "llvm/Support/TargetSelect.h" using namespace llvm; int main() { InitializeNativeTarget(); LLVMContext Context; std::unique_ptr<Module> Owner = make_unique<Module>("SomeModule", Context); Module *M = Owner.get(); FunctionType *lambdaFT = FunctionType::get(Type::getInt32Ty(Context), false); Function *lambdaFN = Function::Create(lambdaFT, Function::ExternalLinkage, "lambda", Owner.get()); auto lambdaBody = []() { retu...
2016 Mar 24
2
Help with pass manager
...eam->os(); >> >> SmallVector<char, 0> filebuf; >> std::unique_ptr<raw_svector_ostream> BOS; >> if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { >> BOS = make_unique<raw_svector_ostream>(filebuf); >> outstream = BOS.get(); >> } >> >> AnalysisID StartBeforeID = nullptr; >> AnalysisID StartAfterID = nullptr; >> AnalysisID StopAfterID = nullptr; >> const P...
2016 Mar 24
0
Help with pass manager
...eam = &objoutstream->os(); > > SmallVector<char, 0> filebuf; > std::unique_ptr<raw_svector_ostream> BOS; > if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { > BOS = make_unique<raw_svector_ostream>(filebuf); > outstream = BOS.get(); > } > > AnalysisID StartBeforeID = nullptr; > AnalysisID StartAfterID = nullptr; > AnalysisID StopAfterID = nullptr; > const PassRegistry *PR = PassRegist...
2020 Oct 02
2
OrcV1 removal
...RLayer&, >> llvm::orc::IRSymbolMapper::ManglingOptions const&, >> llvm::orc::ThreadSafeModule) (Layer.cpp:131) >> | | | ->03.53% (97,542B) 0x83B357D: >> std::_MakeUniq<llvm::orc::BasicIRLayerMaterializationUnit>::__single_object >> std::make_unique<llvm::orc::BasicIRLayerMaterializationUnit, >> llvm::orc::IRLayer&, llvm::orc::IRSymbolMapper::ManglingOptions const&, >> llvm::orc::ThreadSafeModule>(llvm::orc::IRLayer&, llvm::o> >> | | | ->03.53% (97,542B) 0x83B1C7D: >> llvm::orc...