similar to: [LLVMdev] create dummy function

Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] create dummy function"

2009 Nov 05
3
[LLVMdev] create dummy function
Thank you very much for you help, Renato! I read through paper you referred and also this document - http://llvm.org/docs/tutorial/JITTutorial1.html Following these instructions to create successful function I run into some problems: 1) llvm::getGlobalContext() does not exists anymore? "llvm/LLVMContext.h" too? 2) creating instance of IRBuilder don't require template (from tutorial
2009 Nov 05
0
[LLVMdev] create dummy function
2009/11/5 Oleg Knut <oleg77 at gmail.com>: > Hello, > I have a simple question. How to create "dummy" function which will > have no functionality behind (return nothing and do nothing)? > Currently I'm trying to do this: > > llvm::Constant* c = Module.getOrInsertFunction("dummy", > FunctionThatNeedsToBeReplaced.getFunctionType()); >
2009 Nov 15
0
[LLVMdev] create dummy function
What exactly is M in that code you posted? Oleg Knut wrote: > > Thank you very much for you help, Renato! > > I read through paper you referred and also this document - > http://llvm.org/docs/tutorial/JITTutorial1.html > > Following these instructions to create successful function I run into > some problems: > 1) llvm::getGlobalContext() does not exists anymore?
2009 Oct 18
5
[LLVMdev] JIT and security
Hello, I'm writing JIT compiler that will run a third party code. My goal is to build it with security layer that will allow me to prevent some basic operation that possibly can harm JIT application host computer. Maybe some of you can guide me on how to do following operations: 1) prevent system calls 2) memory allocation management (set some limits that can't be used by JIT)
2009 Oct 23
0
[LLVMdev] JIT and security
2009/10/18 Oleg Knut <oleg77 at gmail.com>: > Maybe some of you can guide me on how to do following operations: >  1) prevent system calls >  2) memory allocation management (set some limits that can't be used > by JIT) >  3) CPU power limiting Hi Oleg, This is totally system dependent, it'd be *very* hard to do it multi-platform. On Unix, a good part of it is
2014 Jan 21
4
[LLVMdev] MCJIT versus getLazyBitcodeModule?
Thanks for the pointers. Am I correct in assuming that putting the precompiled bitcode into a second module and linking (or using the object caches) would result in ordinary function calls, but would not be able to inline the functions? -- lg On Jan 21, 2014, at 11:55 AM, Kaylor, Andrew <andrew.kaylor at intel.com> wrote: > I would say that the incompatibility is by design. Not
2010 Jan 04
0
[LLVMdev] Getting Kaleidoscope to compile
Probably you missed to install llvm-dev package with headers for llvm. 2010/1/4 Russell Wallace <russell.wallace at gmail.com> > Hi all, > > I've started work on a new programming language for which I am > considering using LLVM as the backend, and trying to experiment with > it using the Kaleidoscope demo compiler. > > Taking the full source listing from >
2014 Jan 26
2
[LLVMdev] MCJIT versus getLazyBitcodeModule?
Hi Gael, I tried converting to your approach but I had some issues making sure that all symbols accessed by the jit modules have entries in the dynamic symbol table. To be specific, my current approach is to use MCJIT (using an objectcache) to JIT the runtime module and then let MCJIT handle linking any references from the jit'd modules; I just experimented with what I think you're doing,
2012 Nov 03
1
[LLVMdev] import/export functions between Modules
I'm having trouble figuring out how to export/import IR functions at the C++ API level. I think I've got the linking part figured out, but I need to get the functions exporting from one module into another. I see how I can iterate over the functions in one, but I'm not clear on how to expose this name/reference into the other module. Is there a simple example/tutorial of this
2010 Jan 04
4
[LLVMdev] Getting Kaleidoscope to compile
Hi all, I've started work on a new programming language for which I am considering using LLVM as the backend, and trying to experiment with it using the Kaleidoscope demo compiler. Taking the full source listing from http://llvm.org/docs/tutorial/LangImpl3.html#code and trying to compile it with the provided instructions gives me the following errors: a at a-desktop:~$ g++ -g -O3 toy.cpp
2008 Sep 13
3
[LLVMdev] Duplicate Function with duplicated Arguments
I'm now writing a pass and I wanna ask a question about how to duplicate the function and add duplicated arguments in llvm, for example: func(int a, char *b) -> func(int a, char *b, int a1, char *b1) I'm now stuck at using "getOrInsertFunction" and how to handle "getArgumentList", please share your opinion, thanks a lot! James
2015 Mar 10
4
[LLVMdev] noob IR builder question
I am trying to get a handle on IR builder, at least some basics. I ran through a tutorial here: Create a working compiler with the LLVM framework, Part 1 <http://www.ibm.com/developerworks/library/os-createcompilerllvm1/>, and it worked well enough. I have some simple code that creates a hello world IR. I am trying to now bring in some concepts from the Kaleidoscope tutorial, namely
2009 Aug 31
3
[LLVMdev] rdynamic on Mac
Hi all, My example compiler is working fine on Linux, including the extern'd functions (via -rdynamic flag on linker), but a friend on a MacOS (Darwin) cannot find the extern'd function. LLVM ERROR: Program used external function 'printVar' which could not be resolved! I've read some posts on the web indicating problems with the -rdynamic option on Mac's GCC, but I'm
2011 Aug 29
3
[LLVMdev] [PATCH] Split init.trampoline into init.trampoline & adjust.trampoline
Hi! Attached patches split init.trampoline into adjust.trampoline and init.trampoline, like in gcc. As mentioned in the previous mail, I've not made a documentation patch, since I'm not sure about what the documented semantics of llvm.adjust.trampoline should be. Thanks! -- Sanjoy Das http://playingwithpointers.com -------------- next part -------------- A non-text attachment was
2002 Oct 11
2
[LLVMdev] Accessing a function's arguments
I am trying to generate a simple wrapper function: Function* pWrapper = m_module.getOrInsertFunction(name, FunctionType::get(Type::VoidTy, vector<const Type*>(1, PointerType::get(Type::IntTy)), false)); How do I actually get the Value* for the one argument to this function? The pWrapper->getArgumentList().size() is 0. Shouldn't the argument list contain the Value*
2013 May 29
2
[LLVMdev] CloneFunctionInto() Error
Dear All, I need your help urgently I have to copy the CFG of each function using CloneFunction or CloneFunctionInto. After I made the copy function. Print the basic blocks then get this error : While deleting: i32 % Use still stuck around after Def is destroyed: %mul2_ = mul nsw i32 %6, 3 Use still stuck around after Def is destroyed: store i32 3, i32* %x_, align 4 opt: Value.cpp:75: virtual
2011 Nov 19
2
[LLVMdev] Insert a function call in the code
Hello, everyone I am new to LLVM, now I got a problem I want to add a function call before sleep(int a, int b) code below #include <stdio.h> int sleep(int a, int b) { return a+b; } int main(int argc, char **argv) { sleep(1,2); } after use opt -load ../llvm-2.8/Release+Asserts/lib/bishe_insert.so -bishe_insert <1.bc> 2.bc I want get the code #include <stdio.h>
2008 Sep 01
3
[LLVMdev] Unresolveable fallthrough functions
Hello, > ready> ERROR: Program used external function 'putchard' which could not be > resolved! > Any idea of what could be wrong? Please make sure you're using C linkage for such functions, due to mangling the name of function being emitted is not "putchard". Something like this: extern "C" void putchard(char c) { ... } Or, just provide a mapping
2009 Oct 19
0
[LLVMdev] JIT and security
On Oct 18, 2009, at 1:46 PM, Oleg Knut wrote: > Hello, > > I'm writing JIT compiler that will run a third party code. My goal is > to build it with security layer that will allow me to prevent some > basic operation that possibly can harm JIT application host computer. > > Maybe some of you can guide me on how to do following operations: > 1) prevent system calls >
2015 Jun 02
2
[LLVMdev] struct type parament
Hi All, I generated the following code with "clang -flto" command. void test(struct StruTyName *a) { ... } Then the type of test function is "void (%struct.StruTyName.100*)" by calling function::getFunctionType API. What's the meaning of number 100? Best, Haopeng