search for: initializenativetargetasmparser

Displaying 20 results from an estimated 23 matches for "initializenativetargetasmparser".

2012 May 13
1
[LLVMdev] Unable to link in X86AsmParser.cpp into lli
Hi, Using the trunk of svn. I'm trying to get inline-asm working on X86. So I added call to: > InitializeNativeTargetAsmParser() during initialization. However, this causes a linking error: > llvm[2]: Linking Debug+Asserts executable lli > /local/mnt/workspace/ashoknn/crd/neo/llvm/proto/llvmsvn/build/tools/lli/Debug+Asserts/lli.o: In function `llvm::InitializeNativeTargetAsmParser()': > /local/mnt/workspace...
2012 May 14
2
[LLVMdev] MCJIT
I was able to get past the error by calling InitializeNativeTargetAsmParser() in my code. Now I have a failure in resolving external libraries, so looking into that (recompiled with --enable-ffi but I now get an error LLVMgold.so not found). Then I hda to disable the following code in lib/Target/X86/X86CodeEmitter.cpp: > case TargetOpcode::INLINEASM: >...
2012 May 14
0
[LLVMdev] MCJIT
...I switched to trunk). It *IS* used and the MCJIT constructor is being invoked. So I reverted my changes, and recompiled and ran lli, but it gives the error: > LLVM ERROR: Inline asm not supported by this streamer because we don't have an asm parser for this target I add back the call to InitializeNativeTargetAsmParser() in lli.cpp, but compilation fails: > make[4]: Leaving directory `/local/mnt/workspace/ashoknn/crd/neo/llvm/proto/llvmsvn/build/tools/clang/tools/arcmt-test' > /local/mnt/workspace/ashoknn/crd/neo/llvm/proto/llvmsvn/build/tools/lli/Debug+Asserts/lli.o: In function `llvm::InitializeNativ...
2012 May 14
2
[LLVMdev] MCJIT
On 5/14/2012 10:28 AM, Jim Grosbach wrote: > > On May 14, 2012, at 10:21 AM, Ashok Nalkund<ashoknn at qualcomm.com> wrote: > >> On 5/14/2012 9:51 AM, Jim Grosbach wrote: >>> >>>>> >>>>> If you're hitting that code, you're running the old JIT (which does indeed not support inline assembly), not the MCJIT. >>>>>
2012 May 14
0
[LLVMdev] MCJIT
On May 14, 2012, at 9:07 AM, Ashok Nalkund <ashoknn at qualcomm.com> wrote: > I was able to get past the error by calling InitializeNativeTargetAsmParser() in my code. Now I have a failure in resolving external libraries, so looking into that (recompiled with --enable-ffi but I now get an error LLVMgold.so not found). > > Then I hda to disable the following code in lib/Target/X86/X86CodeEmitter.cpp: >> case TargetOpcode::INLINEASM:...
2012 May 14
2
[LLVMdev] MCJIT
...uctor is being invoked. > OK, cool. That's good news. > So I reverted my changes, and recompiled and ran lli, but it gives the error: >> LLVM ERROR: Inline asm not supported by this streamer because we don't have an asm parser for this target > > I add back the call to InitializeNativeTargetAsmParser() in lli.cpp, but compilation fails: Makes sense. >> make[4]: Leaving directory `/local/mnt/workspace/ashoknn/crd/neo/llvm/proto/llvmsvn/build/tools/clang/tools/arcmt-test' >> /local/mnt/workspace/ashoknn/crd/neo/llvm/proto/llvmsvn/build/tools/lli/Debug+Asserts/lli.o: In function...
2019 Sep 19
3
"corrupted size vs. prev_size" when calling ExecutionSession::lookup()
...ler that generate IR code and run it on the JIT, and there randomly crashed due to "corrupted size vs. prev_size" depends on the IR code generated from the source code. Here's how I created the 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...
2015 Mar 20
2
[LLVMdev] LLVM Exception Handling
...extern void test() ; extern "C" void exec(void*) { test(); } ### main.cpp // necessary includes here.... static void test() { throw 1; } int main(int, const char **) { llvm::InitializeNativeTarget(); llvm::InitializeNativeTargetAsmPrinter(); llvm::InitializeNativeTargetAsmParser(); llvm::LLVMContext &Context = llvm::getGlobalContext(); llvm::SMDiagnostic Err; std::unique_ptr<llvm::Module> Mod = llvm::parseIRFile("test.ll", Err, Context); std::string triple = llvm::sys::getProcessTriple(); Mod->setTargetTriple(triple);...
2013 Feb 08
1
[LLVMdev] JIT on armhf
...> > LLVM ERROR: Target does not support MC emission! > > Do I need to do anything else? IIRC, this error might be due to not linking against the MCJIT library component. Add the appropriate flags to your build config, and also ensure that you call InitializeNativeTargetAsmPrinter() and InitializeNativeTargetAsmParser(). > Also, what's the code quality of MCJIT compared to the old JIT? As I'm > basically compiling statically at runtime, I don't mind if LLVM spends > time generating the code --- I'm using a module pass, eager code > generation and setOptLevel(llvm::CodeGenOpt::Aggress...
2012 May 14
2
[LLVMdev] MCJIT
On 5/14/2012 9:18 AM, Jim Grosbach wrote: > > On May 14, 2012, at 9:07 AM, Ashok Nalkund<ashoknn at qualcomm.com> wrote: > >> I was able to get past the error by calling InitializeNativeTargetAsmParser() in my code. Now I have a failure in resolving external libraries, so looking into that (recompiled with --enable-ffi but I now get an error LLVMgold.so not found). >> >> Then I hda to disable the following code in lib/Target/X86/X86CodeEmitter.cpp: >>> case TargetOpcode...
2016 Sep 19
3
llvm interpreter does not find function defined by addGlobalMapping
...e/GenericValue.h> #include <llvm/IR/LegacyPassManager.h> #include <llvm/IR/IRBuilder.h> extern "C" double testFunction(){ return 42.0; } int main() { // initialization needed for JIT llvm::InitializeNativeTarget(); llvm::InitializeNativeTargetAsmPrinter(); llvm::InitializeNativeTargetAsmParser(); llvm::LLVMContext &context(llvm::getGlobalContext()); llvm::Module *pModule = new llvm::Module("a module", context); // Here the EngineKind-flag decides if JIT or interpreter is used. auto pExecutionEngine = llvm::EngineBuilder(std::unique_ptr<llvm::Module>(pModule)...
2013 Feb 18
1
[LLVMdev] [llvm-c] Proposal: Make LLVMInitializeNativeTarget and co. non-inline
...TargetInfos () void llvm::InitializeAllTargets () void llvm::InitializeAllTargetMCs () void llvm::InitializeAllAsmPrinters () void llvm::InitializeAllAsmParsers () void llvm::InitializeAllDisassemblers () bool llvm::InitializeNativeTarget () bool llvm::InitializeNativeTargetAsmPrinter () bool llvm::InitializeNativeTargetAsmParser () bool llvm::InitializeNativeTargetDisassembler ()
2012 Nov 05
1
[LLVMdev] Unable to Run Inline Asm with MCJIT
Hi Jim, Thanks for the reply. I was able to figure out the problem in 'lli'. InitializeNativeTargetAsmParser() was missing in lli. I should have replied back saying that the problem was resolved. Hope I didn't waste your time. Regards, Amit ________________________________ From: Jim Grosbach [grosbach at apple.com] Sent: Monday, November 05, 2012 2:07 PM To: Amit Arya Cc: LLVM Developers Mailing List...
2012 May 14
0
[LLVMdev] MCJIT
Inline asm should work in the MCJIT just as well as it does in statically compiled code. It's the same code path for both. The error you're seeing indicates that something isn't configured in a way the compiler understands. -Jim On May 12, 2012, at 10:48 AM, Ashok Nalkund wrote: > Can you also tell about inline-asm support in MCJIT for x86? I've been > trying to get it to
2012 May 12
2
[LLVMdev] MCJIT
Can you also tell about inline-asm support in MCJIT for x86? I've been trying to get it to work (my previous post: "JIT support for inline asm on Linux"), I get an error: > LLVM ERROR: Inline asm not supported by this streamer because we don't > have an asm parser for this target thanks, ashok On 5/11/2012 12:44 PM, Kaylor, Andrew wrote: > Hi Braxton, > > I
2019 Jan 02
2
JIT compiler, Windows, external functions like cos
...typedef double(__cdecl *JitCompiledFn)(double); int main() { // "sqrt" works. //const char externalFnName[] = "sqrt"; // "cos", "sin", etc. fails. const char externalFnName[] = "cos"; InitializeNativeTarget(); InitializeNativeTargetAsmPrinter(); InitializeNativeTargetAsmParser(); LLVMContext context; IRBuilder<> builder(context); std::unique_ptr<llvm::Module> module(new Module("TestModule", context)); Module* pModule = module.get(); auto externalFn_IR = cast<Function>(pModule->getOrInsertFunction("externalFn", Type::getDoubl...
2012 May 14
0
[LLVMdev] MCJIT
...ay 14, 2012, at 9:42 AM, Ashok Nalkund <ashoknn at qualcomm.com> wrote: > > On 5/14/2012 9:18 AM, Jim Grosbach wrote: >> >> On May 14, 2012, at 9:07 AM, Ashok Nalkund<ashoknn at qualcomm.com> wrote: >> >>> I was able to get past the error by calling InitializeNativeTargetAsmParser() in my code. Now I have a failure in resolving external libraries, so looking into that (recompiled with --enable-ffi but I now get an error LLVMgold.so not found). >>> >>> Then I hda to disable the following code in lib/Target/X86/X86CodeEmitter.cpp: >>>> case...
2013 Feb 08
0
[LLVMdev] JIT on armhf
On 08/02/13 15:42, David Tweed wrote: > | For ARM, you will need to use the MCJIT ExecutionEngine as the legacy > | one is broken for ARM. (call EngineBuilder::setUseMCJIT()). > > Also remember to include the correct MCJIT headers not the JIT one's: > calling setUseMCJIT() with the old JIT headers are the only ones being > included just constructs an old JIT, it doesn't
2012 Dec 13
0
[LLVMdev] Memory leaks after llvm_shutdown
...cutionEngine/JIT.h> #include <llvm/Support/ManagedStatic.h> using namespace std; using namespace llvm; static llvm_shutdown_obj llvm_cleaner; int main(int argc, char** argv) { LLVMContext context;// getGlobalContext(); InitializeNativeTarget(); InitializeNativeTargetAsmPrinter(); InitializeNativeTargetAsmParser(); Linker llvm_linker (StringRef("llvm_test"), StringRef("MergedModule"), context, Linker::Verbose); if(argc >= 3){ int next_module_idx = 2; Linker::ItemList linkItems; while (next_module_idx < argc ){ bool is_native = false; linkItems.push_back(make...
2012 Nov 05
0
[LLVMdev] Unable to Run Inline Asm with MCJIT
Hi Amit, You're not doing anything wrong. This is an error in 'lli' not properly initializing the native target libraries. Fixed in SVN trunk r167392. -Jim On Nov 4, 2012, at 4:09 PM, Amit Arya <aarya at cs.stonybrook.edu> wrote: > Hi, > > I am first year PhD student at Stony Brook University. For one of my projects I am trying to JIT compile and run a C program