search for: getclosesttargetforjit

Displaying 8 results from an estimated 8 matches for "getclosesttargetforjit".

2009 Mar 08
2
[LLVMdev] addPassesToEmitFile
...time ago (llvm-svn june 2008) I asked here about a way to output the assembly code of my JIT generated code to a string, so I could use it to read it on the screen. I came up with this solution: std::string Err; const llvm::TargetMachineRegistry::entry* _arch = llvm::TargetMachineRegistry::getClosestTargetForJIT(Err); std::string FeaturesStr; llvm::TargetMachine* target(_arch->CtorFn(*_module, FeaturesStr)); assert(target && "Could not allocate target machine!"); std::ostringstream os; target->addPassesToEmitFile(*_passManager, os, llvm::TargetMachine::Assembl...
2009 Mar 08
0
[LLVMdev] addPassesToEmitFile
...8) I asked here about a way to output > the assembly code of my JIT generated code to a string, so I could use > it to read it on the screen. I came up with this solution: > >    std::string Err; >    const llvm::TargetMachineRegistry::entry* _arch = > llvm::TargetMachineRegistry::getClosestTargetForJIT(Err); > >    std::string FeaturesStr; >    llvm::TargetMachine* target(_arch->CtorFn(*_module, FeaturesStr)); >    assert(target && "Could not allocate target machine!"); > >    std::ostringstream os; > >    target->addPassesToEmitFile(*_passManager,...
2009 Mar 09
1
[LLVMdev] addPassesToEmitFile
...ay to output > > the assembly code of my JIT generated code to a string, so I could use > > it to read it on the screen. I came up with this solution: > > >    std::string Err; > >    const llvm::TargetMachineRegistry::entry* _arch = > > llvm::TargetMachineRegistry::getClosestTargetForJIT(Err); > > >    std::string FeaturesStr; > >    llvm::TargetMachine* target(_arch->CtorFn(*_module, FeaturesStr)); > >    assert(target && "Could not allocate target machine!"); > > >    std::ostringstream os; > > >    target->addPassesT...
2008 Oct 07
2
[LLVMdev] Getting target machine specific information at run-time
...ne once per LLVM module, which is still acceptable. I almost implemented this solution, but I have problems accessing the architecture dependent bits of the Module, i.e. TargetMachine objects specific for the current architecture, as selected by the --march option of the compiler. I tried using the getClosestTargetForJIT and getClosestStaticTargetForModule functions of the TargetMachineRegistry class. But all that was without success. I always get back only X86-based targets (which is the target architecture of my development machine) even though I explicitly select another target for cross-compilation by doing -...
2009 Mar 17
0
[LLVMdev] Printing x86 ASM for Function
Dear Maxime, Nyx wrote: > Hello, > > I would like to know how to go about printing the x86 assembly output for a > compiled function (I'm using the JIT). I saw there is a X86IntelAsmPrinter > on doxygen. However, it takes several arguments I don't know how to fill in. > Is there a helper function to create such a pass? Once I have the pass > created, do I just add it
2009 Mar 16
2
[LLVMdev] Printing x86 ASM for Function
Hello, I would like to know how to go about printing the x86 assembly output for a compiled function (I'm using the JIT). I saw there is a X86IntelAsmPrinter on doxygen. However, it takes several arguments I don't know how to fill in. Is there a helper function to create such a pass? Once I have the pass created, do I just add it to a FunctionPassManager? Thank you for your time, -
2008 Oct 08
1
[LLVMdev] Getting target machine specific information at run-time
...gt; still acceptable. I almost implemented this solution, but I have problems > > accessing the architecture dependent bits of the Module, i.e. TargetMachine > > objects specific for the current architecture, as selected by the --march > > option of the compiler. I tried using the getClosestTargetForJIT and > > getClosestStaticTargetForModule functions of the TargetMachineRegistry > > class. But all that was without success. I always get back only X86-based > > targets (which is the target architecture of my development machine) even > > though I explicitly select another t...
2008 May 28
1
[LLVMdev] Asm output while executing
Hello, I'm trying to catch assembly output and do some formatting for its presentation while being executed. I face a problem, which is clear from the error, although I have no clue on how to do it otherwise. If generating the code for its asm output and then for jit execution I get: ********** static llvm::MachineFunction& llvm::MachineFunction::construct(const llvm::Function*, const