search for: setmoduleinfo

Displaying 16 results from an estimated 16 matches for "setmoduleinfo".

2007 Dec 11
0
[LLVMdev] Exception handling in JIT
...rPtr; > + > + // Allocate the space. > + CurBufferPtr += Size; > + > + // Check for buffer overflow. > + if (CurBufferPtr >= BufferEnd) { > + CurBufferPtr = BufferEnd; > + Result = 0; > + } > + return Result; > + } > + > + void setModuleInfo(MachineModuleInfo* M) { > + MMI = M; > + } > +}; > + > +} // End llvm namespace > + > +#endif > Index: include/llvm/CodeGen/MachineCodeEmitter.h > =================================================================== > --- include/llvm/CodeGen/MachineCodeEmitter.h (r...
2007 Dec 12
3
[LLVMdev] Exception handling in JIT
.... >> + CurBufferPtr += Size; >> + >> + // Check for buffer overflow. >> + if (CurBufferPtr >= BufferEnd) { >> + CurBufferPtr = BufferEnd; >> + Result = 0; >> + } >> + return Result; >> + } >> + >> + void setModuleInfo(MachineModuleInfo* M) { >> + MMI = M; >> + } >> +}; >> + >> +} // End llvm namespace >> + >> +#endif >> Index: include/llvm/CodeGen/MachineCodeEmitter.h >> =================================================================== >> --- incl...
2007 Dec 10
2
[LLVMdev] Exception handling in JIT
Hi everyone, Here's a patch that enables exception handling when jitting. I've copy/pasted _many_code from lib/Codegen/DwarfWriter.cpp, so we may need to factorize it, but the functionality is there and I'm very happy with it :) lli should now be able to execute the output from llvm-gcc when using exceptions (the UnwindInst instruction is not involved in this patch). Just add the
2008 Feb 04
0
[LLVMdev] Exception handling in JIT
...gt; LabelID, only usable > + /// after the LabelID has been emitted. > + /// > + virtual intptr_t getLabelAddress(uint64_t LabelID) const = 0; > + > + /// Specifies the MachineModuleInfo object. This is used for > exception handling > + /// purposes. > + virtual void setModuleInfo(MachineModuleInfo* Info) = 0; > }; > > } // End llvm namespace > Index: lib/CodeGen/LLVMTargetMachine.cpp > =================================================================== > --- lib/CodeGen/LLVMTargetMachine.cpp (revision 46612) > +++ lib/CodeGen/LLVMTargetMachine.cpp (work...
2008 Feb 01
2
[LLVMdev] Exception handling in JIT
Dear all, Here's a new patch with Evan's comments (thx Evan!) and some cleanups. Now the (duplicated) exception handling code is in a new file: lib/ExecutionEngine/JIT/JITDwarfEmitter. This patch should work on linux/x86 and linux/ppc (tested). Nicolas -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: jit-exceptions.patch URL:
2008 Mar 30
3
[LLVMdev] Being able to know the jitted code-size before emitting
Hi everyone, vmkit requires to know the size of a jitted method before emitting the method. This allows to allocate the correct size for the method. The attached patch creates this functionality when the flag SizedMemoryCode is on. In order to implement this functionality, i had to virtualize some MachineCodeEmitter functions. Is it OK to commit the patch? Thanks, Nicolas --------------
2008 Apr 01
2
[LLVMdev] Being able to know the jitted code-size before emitting
..._t getLabelAddress(uint64_t LabelID) const { >> + assert(LabelLocations.size() > (unsigned)LabelID && >> + LabelLocations[LabelID] && "Label not emitted!"); >> + return LabelLocations[LabelID]; >> + } >> + virtual void setModuleInfo(llvm::MachineModuleInfo*) {} >> +}; >> + >> +} // end llvm namespace >> + >> +#endif >> Index: include/llvm/CodeGen/MachineCodeEmitter.h >> =================================================================== >> --- include/llvm/CodeGen/MachineCodeEmit...
2008 Mar 31
0
[LLVMdev] Being able to know the jitted code-size before emitting
...t; + virtual intptr_t getLabelAddress(uint64_t LabelID) const { > + assert(LabelLocations.size() > (unsigned)LabelID && > + LabelLocations[LabelID] && "Label not emitted!"); > + return LabelLocations[LabelID]; > + } > + virtual void setModuleInfo(llvm::MachineModuleInfo*) {} > +}; > + > +} // end llvm namespace > + > +#endif > Index: include/llvm/CodeGen/MachineCodeEmitter.h > =================================================================== > --- include/llvm/CodeGen/MachineCodeEmitter.h (revision 48143) > +++...
2008 Apr 01
0
[LLVMdev] Being able to know the jitted code-size before emitting
...int64_t LabelID) const { >>> + assert(LabelLocations.size() > (unsigned)LabelID && >>> + LabelLocations[LabelID] && "Label not emitted!"); >>> + return LabelLocations[LabelID]; >>> + } >>> + virtual void setModuleInfo(llvm::MachineModuleInfo*) {} >>> +}; >>> + >>> +} // end llvm namespace >>> + >>> +#endif >>> Index: include/llvm/CodeGen/MachineCodeEmitter.h >>> =================================================================== >>> --- incl...
2008 Apr 04
3
[LLVMdev] Being able to know the jitted code-size before emitting
...st { >>>> + assert(LabelLocations.size() > (unsigned)LabelID && >>>> + LabelLocations[LabelID] && "Label not emitted!"); >>>> + return LabelLocations[LabelID]; >>>> + } >>>> + virtual void setModuleInfo(llvm::MachineModuleInfo*) {} >>>> +}; >>>> + >>>> +} // end llvm namespace >>>> + >>>> +#endif >>>> Index: include/llvm/CodeGen/MachineCodeEmitter.h >>>> =============================================================...
2008 Apr 05
2
[LLVMdev] Being able to know the jitted code-size before emitting
...t(LabelLocations.size() > (unsigned)LabelID && >>>>>> + LabelLocations[LabelID] && "Label not emitted!"); >>>>>> + return LabelLocations[LabelID]; >>>>>> + } >>>>>> + virtual void setModuleInfo(llvm::MachineModuleInfo*) {} >>>>>> +}; >>>>>> + >>>>>> +} // end llvm namespace >>>>>> + >>>>>> +#endif >>>>>> Index: include/llvm/CodeGen/MachineCodeEmitter.h >>>>>> = &g...
2008 Apr 05
0
[LLVMdev] Being able to know the jitted code-size before emitting
....size() > (unsigned)LabelID && >>>>>>> + LabelLocations[LabelID] && "Label not emitted!"); >>>>>>> + return LabelLocations[LabelID]; >>>>>>> + } >>>>>>> + virtual void setModuleInfo(llvm::MachineModuleInfo*) {} >>>>>>> +}; >>>>>>> + >>>>>>> +} // end llvm namespace >>>>>>> + >>>>>>> +#endif >>>>>>> Index: include/llvm/CodeGen/MachineCodeEmitter.h >&g...
2008 Apr 04
0
[LLVMdev] Being able to know the jitted code-size before emitting
...;> + assert(LabelLocations.size() > (unsigned)LabelID && >>>>> + LabelLocations[LabelID] && "Label not emitted!"); >>>>> + return LabelLocations[LabelID]; >>>>> + } >>>>> + virtual void setModuleInfo(llvm::MachineModuleInfo*) {} >>>>> +}; >>>>> + >>>>> +} // end llvm namespace >>>>> + >>>>> +#endif >>>>> Index: include/llvm/CodeGen/MachineCodeEmitter.h >>>>> = >>>>> =========...
2008 Apr 07
2
[LLVMdev] Being able to know the jitted code-size before emitting
...signed)LabelID && >>>>>>>> + LabelLocations[LabelID] && "Label not emitted!"); >>>>>>>> + return LabelLocations[LabelID]; >>>>>>>> + } >>>>>>>> + virtual void setModuleInfo(llvm::MachineModuleInfo*) {} >>>>>>>> +}; >>>>>>>> + >>>>>>>> +} // end llvm namespace >>>>>>>> + >>>>>>>> +#endif >>>>>>>> Index: include/llvm/CodeGen/Mac...
2008 Apr 07
0
[LLVMdev] Being able to know the jitted code-size before emitting
...gt;> + LabelLocations[LabelID] && "Label not >>>>>>>>> emitted!"); >>>>>>>>> + return LabelLocations[LabelID]; >>>>>>>>> + } >>>>>>>>> + virtual void setModuleInfo(llvm::MachineModuleInfo*) {} >>>>>>>>> +}; >>>>>>>>> + >>>>>>>>> +} // end llvm namespace >>>>>>>>> + >>>>>>>>> +#endif >>>>>>>>> Index:...
2008 Apr 17
1
[LLVMdev] Being able to know the jitted code-size before emitting
Thx again Evan for the review. Here's a new patch for the JIT in itself. The major changes are: 1) A JITMemoryManager now has a flag saying "I require to know the size of what you want to emit" 2) DwarfJITEmitter is augmented with GetSize* functions 3) JITEmitter::startFunction checks if the JITMemoryManager requires to know the size. If so, it computes it and gives it through the