search for: addpassestoemitmachinecode

Displaying 20 results from an estimated 22 matches for "addpassestoemitmachinecode".

2009 Sep 15
2
[LLVMdev] Registering a MachineFunctionPass to JIT codegen
Hi all, I can't find a way to add a MachineFunctionPass to the common codegen passes (LLVMTargetMachine::addPassesToEmitMachineCode) while JITting (the pass manager is associated with the jitstate of the JIT and I can't access it because it's private). Have I missed something? Or adding a MachineFunctionPass to codegen requires to change the LLVMTargetMachine::addPassesToEmitMachineCode function? Thanks, Nicolas
2006 Feb 28
1
[LLVMdev] Re: Directly generating binary file
Chris Lattner wrote: >> The TargetMachine class has a method 'addPassesToEmitMachineCode', that's >> suitable for that, but that method also requires an instance of >> MachineCodeEmitter. > > Actually, you probably want to plug into the addPassesToEmitFile API, when > FileType is set to ObjectFile. X86TargetMachine::addPassesToEmitFile > demonstrates h...
2006 Feb 27
2
[LLVMdev] Directly generating binary file
Hi! I'm looking for a way to make the the "llc" tool (or any other tool), directly produce a binary file for some target. The TargetMachine class has a method 'addPassesToEmitMachineCode', that's suitable for that, but that method also requires an instance of MachineCodeEmitter. The existing MachineCodeEmitter derived classes are either debug-only (writing to std::cerr), or for JIT, or for ELF (which is not used anywhere, BTW). Ideally, I'd like to create my own Machi...
2006 Feb 27
0
[LLVMdev] Directly generating binary file
On Mon, 27 Feb 2006, Vladimir Prus wrote: > I'm looking for a way to make the the "llc" tool (or any other tool), > directly produce a binary file for some target. ok > The TargetMachine class has a method 'addPassesToEmitMachineCode', that's > suitable for that, but that method also requires an instance of > MachineCodeEmitter. Actually, you probably want to plug into the addPassesToEmitFile API, when FileType is set to ObjectFile. X86TargetMachine::addPassesToEmitFile demonstrates how to do this. > The e...
2009 Jun 17
1
[LLVMdev] Undocumented API changes
...pplications without first invoking llvm_start_multithreaded(). Please begin to update your client applications now if this affects you, as I will be throwing the switch in SVN sooner rather than later. 3. The change you should make: every call to addPassesToEmitFile, addPassesToEmitFileFinish, addPassesToEmitMachineCode, or addCommonCodeGenPasses should pass an optimization level enum rather than true / false for "Fast". The enum is in llvm/Target/TargetMachine.h: namespace CodeGenOpt { enum Level { Default, None, Aggressive }; } 4. The LLVM IR opcodes Add, Sub, and Mul have been e...
2009 Sep 15
0
[LLVMdev] Registering a MachineFunctionPass to JIT codegen
On Sep 14, 2009, at 10:54 PM, Nicolas Geoffray wrote: > Hi all, > > I can't find a way to add a MachineFunctionPass to the common codegen > passes (LLVMTargetMachine::addPassesToEmitMachineCode) while JITting > (the pass manager is associated with the jitstate of the JIT and I > can't > access it because it's private). Have I missed something? Or adding a > MachineFunctionPass to codegen requires to change the > LLVMTargetMachine::addPassesToEmitMachineCode functi...
2011 Sep 19
1
[LLVMdev] Seg Fault when creating an execution engine
...ESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000120 0x0000000107c06643 in llvm::LLVMTargetMachine::addCommonCodeGenPasses () (gdb) bt #0 0x0000000107c06643 in llvm::LLVMTargetMachine::addCommonCodeGenPasses () #1 0x0000000107c05c6b in llvm::LLVMTargetMachine::addPassesToEmitMachineCode () #2 0x0000000107ead7ab in llvm::JIT::JIT () #3 0x0000000107eaac21 in llvm::JIT::createJIT () #4 0x0000000107e2cbe4 in llvm::EngineBuilder::create () #5 0x0000000107e315b0 in LLVMCreateExecutionEngineForModule () #6 0x00000001002b1444 in ffi_call_unix64 () at darwin64.S:75 #7 0x00007fff5fbfc...
2011 Aug 10
1
[LLVMdev] How to emit a simple stream of machine code.
...e raw machine code, one instruction after another. I think I've already implemented everything in the backend that is required to do this, but I'm not sure how to get a pointer to the emitted machine code stream so I can send it to the GPU. I'm guessing that I need to use the function addPassesToEmitMachineCode(PassManagerBase &PM,JITCodeEmitter &JCE, CodeGenOpt::Level OptLevel, bool DisableVerify), but I'm not sure how to extract the code from the JITCodeEmitter, or if this is even the right place to start. What is the best way for me to accomplish this? Thanks, Tom
2007 Jul 15
2
[LLVMdev] JIT Leaks?
...t It's a size 16 leak *grin*. But MallocDebug reports as leaks 2.4M start 2.4M operator new(unsigned long) 2.4M MDmalloc 2.4M main 2.4M llvm::PMDataManager::add(llvm::Pass*, bool) 2.4M llvm::LoopPass::assignPassManager(llvm::PMStack&, llvm::PassManagerType) 2.4M llvm::LLVMTargetMachine::addPassesToEmitMachineCode (llvm::FunctionPassManager&, llvm::MachineCodeEmitter&, bool) 2.4M llvm::JIT::JIT[in-charge](llvm::ModuleProvider*, llvm::TargetMachine&, llvm::TargetJITInfo&) 2.4M llvm::JIT::create(llvm::ModuleProvider*, std::basic_string<char, std::char_traits<char>, std::allocator&...
2009 Jun 17
10
[LLVMdev] Segmentation fault - Kaleidoscope
On Jun 17, 2009, at 9:46 AM, Paul Melis wrote: > FWIW, I'm also suddenly experiencing segfaults in code that used to > work > a few days ago (I'm using svn). This may be unrelated to the problem > described below, but perhaps it's the same thing. > > In my case it seems that creating an ExecutionEngine has changed. I > used > to do > > Module* Mod
2007 Jul 15
0
[LLVMdev] JIT Leaks?
...locDebug reports as leaks > > 2.4M start > 2.4M operator new(unsigned long) > 2.4M MDmalloc > 2.4M main > 2.4M llvm::PMDataManager::add(llvm::Pass*, bool) > 2.4M llvm::LoopPass::assignPassManager(llvm::PMStack&, > llvm::PassManagerType) > 2.4M llvm::LLVMTargetMachine::addPassesToEmitMachineCode > (llvm::FunctionPassManager&, llvm::MachineCodeEmitter&, bool) > 2.4M llvm::JIT::JIT[in-charge](llvm::ModuleProvider*, > llvm::TargetMachine&, llvm::TargetJITInfo&) > 2.4M llvm::JIT::create(llvm::ModuleProvider*, std::basic_string<char, > std::char_traits<char&...
2005 Jan 18
0
[LLVMdev] Re: LLVM to SUIF-MACH VM binary
...o either add a > new virtual method to the TargetMachine class "addPassesToEmitObjectFile", > which will enable your functionality, or you can build it into the LLC > tool directly. If you chose to build it into LLC, you can use the results > of the MachineCodeEmitter and addPassesToEmitMachineCode. At this point, > I'm not sure which way will work best for you. > > If possible, it would be nice if you could make your .o file writing code > as target-independent as possible (potentially defining a new > TargetObjectFile interface for any hooks you need). In particular...
2005 Jan 18
5
[LLVMdev] Re: LLVM to SUIF-MACH VM binary
...is, you can choose to either add a new virtual method to the TargetMachine class "addPassesToEmitObjectFile", which will enable your functionality, or you can build it into the LLC tool directly. If you chose to build it into LLC, you can use the results of the MachineCodeEmitter and addPassesToEmitMachineCode. At this point, I'm not sure which way will work best for you. If possible, it would be nice if you could make your .o file writing code as target-independent as possible (potentially defining a new TargetObjectFile interface for any hooks you need). In particular, if MACH-SUIF is an ELF...
2009 Apr 30
0
[LLVMdev] Change in JIT
...the code generator to indicate whether you wanted "fast" code generation or normal code generation. Now, we have a finer-grained control over this. An enum value is passed instead of a boolean flag. The change you should make: every call to addPassesToEmitFile, addPassesToEmitFileFinish, addPassesToEmitMachineCode, or addCommonCodeGenPasses should pass an optimization level enum rather than true / false for "Fast". The enum is in llvm/Target/TargetMachine.h: namespace CodeGenOpt { enum Level { Default, None, Aggressive }; } The "Default" enum is the old, non-fast version...
2009 Oct 19
0
[LLVMdev] IMPORTANT: Post-regalloc scheduling and JIT
...hat can easily increase the codegen time by 10% or more. For this reason, I've added a new code generation optimization level CodeGenOpt::Less. If you are using the LLVM x86 JIT, you *should* initialize the with this optimization level to avoid running the pass (see LLVMTargetMachine::addPassesToEmitMachineCode). Evan
2010 Oct 14
1
[LLVMdev] print machine code using llvm c++ api
Hi, I know using llc i can print machine code (-print-machineinstrs). How can i print machine code using llvm c++ api.. i looked into llc code but not able to find it.. Thanks & Regards, Pachauri
2011 Mar 24
1
[LLVMdev] How to add a pass to JIT
Hi, Please tell how can I add a pass in the JIT (Just-in-time) compiler of LLVM? Thanks.
2013 Oct 04
1
[LLVMdev] Runtime optimizer
Hello, Please, I need more information on the runtime optimizer used in the LLVM JIT. - Where can I find it in the LLVM source code? - Are those runtime optimizations done on the LLVM representation code or on the machine code? Sara -------------- next part -------------- An HTML attachment was scrubbed... URL:
2007 Jul 14
0
[LLVMdev] JIT Leaks?
On 2007-07-14, at 13:56, Anton Korobeynikov wrote: >> You can find out what exactly leaks with the help of valgrind. > > It seems, that Paolo is on Mac OS X. No valgrind there :( All is not lost… http://developer.apple.com/documentation/Performance/Conceptual/ ManagingMemory/Articles/FindingLeaks.html — Gordon
2009 Jun 17
0
[LLVMdev] Undocumented API changes
...lieve that this is true anymore. However, the reason for this series of changes is to make LLVM multithread safe, so that you can have multiple threads JIT'ing at the same time etc. > 3. > The change you should make: every call to addPassesToEmitFile, > addPassesToEmitFileFinish, addPassesToEmitMachineCode, or > addCommonCodeGenPasses should pass an optimization level enum rather > than true / false for "Fast". The enum is in > llvm/Target/TargetMachine.h: This was made to give more control over optimization level. > 4. > The LLVM IR opcodes Add, Sub, and Mul have been each...