Displaying 20 results from an estimated 5000 matches similar to: "[LLVMdev] crash in JIT when running the inliner"
2005 Apr 11
0
[LLVMdev] JIT and array pointers
On Mon, 11 Apr 2005, dummy1 at boxpl.com wrote:
>> There are many possible ways to do this, can you be a bit more specific
>> about what you're trying to do?
> Here is a basic example:
Ah, ok, I see what you're trying to do. Below is some *pseudo* code for
the basic idea:
> ============================================
> unsigned int buff[4096];
>
> int main
2007 Apr 06
1
[LLVMdev] Integrating LLVM in an existing project
Hi Chris,
> The static code generator works for many simple cases, but it is currently
> disabled. To enable it, uncomment this line in
> llvm-gcc/gcc/llvm-convert.cpp:
>
> //#define ITANIUM_STYLE_EXCEPTIONS
>
>
> Based on that, you should be able to compile simple C++ codes that throw
> and catch exceptions. The next step would be to make a .bc file, run it
2012 Sep 19
0
[LLVMdev] newbie question on getelementptr
Hi Óscar,
Thank you for your prompt reply. Unfortunately, I still need more guidance
as using the Demo page to generate C++ code didn't result in a global
variable being used.
Basically, I'm following your advice to use a LoadInst:
Value *v = new LoadInst(result, "", theBasicBlock);
Function *myfn = cast<Function>(v);
I was not sure how I could get a BasicBlock for the
2010 Mar 23
1
[LLVMdev] How to avoid memory leaks
I think you need to call "llvm::Function::deleteBody() first"
On Tue, Mar 23, 2010 at 15:49, Reid Kleckner <rnk at mit.edu> wrote:
> On Tue, Mar 23, 2010 at 7:04 AM, Gabi <bugspynet at gmail.com> wrote:
>> Hi
>> I get huge memory leaks using LLVM IRBuilder (trunk version)
>>
>> Basically I recreate a function over and over again, and pretty sure
2008 Jan 16
0
[LLVMdev] Cross-module function calls (code included)
Hello,
I'm not sure what I am trying to do is possible. I'm trying to create
two modules, and call a function in one module from another module.
First, a reassurance that I'm not trying to do something completely
off the wall would be nice as I don't see any tutorials that do this.
Second, any help getting this to work would be wonderful. Thanks,
Aaron
In my code, you'll
2008 Aug 19
0
[LLVMdev] Please help with LLVM C++ integration
Hi Kirill,
Don't forget to add X86TargetMachine.obj (add to Additional Dependencies in Linker options, if you are using MSVS) otherwise LLVM will try and use Interpreter instead of JIT.
Hope this helps,
Rob.
> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> On Behalf Of kirill havok
> Sent: Wednesday, August 20, 2008
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?
2010 Mar 23
0
[LLVMdev] How to avoid memory leaks
On Tue, Mar 23, 2010 at 7:04 AM, Gabi <bugspynet at gmail.com> wrote:
> Hi
> I get huge memory leaks using LLVM IRBuilder (trunk version)
>
> Basically I recreate a function over and over again, and pretty sure
> that my code doesn't cause the leak
> while(true)
> {
> Function *fn = module->getFunction(name);
> if (fn)
>
2008 Aug 19
0
[LLVMdev] Please help with LLVM C++ integration
kirill havok wrote:
> Hi Gordon,
> I wrote a small example, but while running I get an error("Tied to
> execute an unknown external function"), where I am wrong?
>
I think the problem is that some_test_func() is a C++ function, so its
name is being mangled during compilation.
To fix it, I think you want to add a declaration telling the compiler to
treat some_test_func()
2011 Aug 31
2
[LLVMdev] How to place call(s) to functions found in other llvm modules ???
Hello Everyone,
I am trying to create two modules in LLVM, where first module contains
the definition of a function, gcd in this example and another module
contains a call to this function. My example is based on the following
tutorial, with a few changes.
http://llvm.org/releases/2.6/docs/tutorial/JITTutorial2.html
When I execute the verifier pass on my modules, it complains that the
2010 May 11
2
[LLVMdev] How to create Global Variables using LLVM API?
I am new to LLVM API. and I am experimenting with it.
I want to create Global Variables in a module.
I am able to create local variables using IRBuilder class. I tried using
GlobalVariable class to create global variables.
but it doesn't work. my code looks like this:
Module* mod = new Module("test", getGlobalContext());
Constant* c = mod->getOrInsertFunction("main",
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
2012 Aug 22
1
[LLVMdev] Insert Self Written Function Call from a FunctionPass?
Hello all;
So my goal is to insert some (self-written) function calls in the LLVM IR.
I can achieve it with a ModulePass and using the getOrInsertFunction()
call. For a ModulePass I follow the steps-
1. Compile the code (in which call instructions are to be inserted) to
LLVM IR
2. Compile the file (which contains the *called* external function ) to
LLVM IR
3. Link them together and run the
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
On Wed, 18 Aug 2004, Valery A.Khamenya wrote:
> the example attached I have used to prove that JIT and some visible
> optimizations are really invoked.
>
> Proved OK. I got 30% speed-up in comparison to gcc 3.3.3
> on my Athlon XP 1500.
Cool! Hey Valery, before we add this to the CVS repo, can you take a look
at some of the changes I made to your HowToUseJIT example and
2010 May 11
0
[LLVMdev] How to create Global Variables using LLVM API?
subramanyam wrote:
>
> I am new to LLVM API. and I am experimenting with it.
> I want to create Global Variables in a module.
> I am able to create local variables using IRBuilder class. I tried using
> GlobalVariable class to create global variables.
> but it doesn't work. my code looks like this:
>
> Module* mod = new Module("test", getGlobalContext());
>
2009 Feb 27
0
[LLVMdev] LLVM JIT in multi-threaded environments
Hi all,
I have some questions on some strange behavior I'm seeing with LLVM JIT in a
multithreaded application. If this is the wrong forum for questions like
this, I apologize, and please redirect me.
The setup of the application is a singleton instance of a static Compiler
object, which maintains local copies of an LLVM Module, JIT ExecutionEngine,
and FunctionPassManager with registered
2010 Mar 23
3
[LLVMdev] How to avoid memory leaks
Hi
I get huge memory leaks using LLVM IRBuilder (trunk version)
Basically I recreate a function over and over again, and pretty sure
that my code doesn't cause the leak
while(true)
{
Function *fn = module->getFunction(name);
if (fn)
fn->eraseFromParent();
fn = cast<Function>(module->getOrInsertFunction(name, fnType));
fillFunction(fn); //Fill function with
2015 Nov 24
2
How to create a sprintf call in IR
Hi,
I created a global char array, char buffer[1024]. I want to call a function
to append the string information to the buffer repeatedly. For example, I
need to implement the following code, where length, a, b, c, are global
variables.
int length = 0;
length += sprintf(buffer+length, "str%d", a);
length += sprintf(buffer+length, "str%c", b);
length += sprintf(buffer+length,
2006 Sep 16
0
[LLVMdev] failed assertion in PPCJITInfo.cpp when calling native function
Hi,
I am trying to generate LLVM code that calls a "native" function in the parent
program (the program hosting the JIT). I think that I have figured out how to
do this, but I get the following assertion failure when the LLVM code is
executed:
../llvm/lib/Target/PowerPC/PPCJITInfo.cpp:206: failed assertion
`ResultPtr >= -(1 << 23) && ResultPtr < (1 << 23)
2015 Oct 27
3
Add a mapping to a C++ lambda
Apologies for the noop question in advance (just getting started with
LLVM), and I'm not entirely sure if this is the right list to post to. is
it?
I have some lambda functions as member variables that I want to have my
LLVM language make calls to. I've added a mapping to them, but this doesn't
seem to enable LLVM to resolve the functions. I asked on stackoverflow but
the suggestion