Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] cpp program crashes"
2006 Sep 16
1
[LLVMdev] cpp program linking error
Hi,
i have compile and built the llvm-gcc4 and llvm 1.8a in my machine, but
there is some problem about llvm-gcc4. It can not compile a
cpp code like this:
#include <iostream>
using std::cout;
using std::endl;
int main()
{
cout << "Hello" << endl;
}
$llvm-g++ hello.cc -o hello
/developer/zsth/llvm-gcc/install/bin/../lib/gcc/i686-pc-linux-gnu/4.0.1/../../..
2012 Nov 16
0
[LLVMdev] how to use lllvm interpreter api ?
Hi everyone,
I build the interpreter with the following codes
* llvm::Module* mod = new llvm::Module("",llvm::getGlobalContext());
EngineBuilder builder(mod);
builder.setEngineKind(EngineKind::Interpreter);
builder.setOptLevel(CodeGenOpt::Default);
EE = builder.create();*
then I make 2 functions, their ir look like :
@1 = private unnamed_addr
2010 Nov 02
1
[LLVMdev] Forcing the Interpreter segfaults
Hi everyone !
I am very new to LLVM and intent to use it in a research project.
I have a problem with the interpreter: I have a simple compiler that
generates LLVM bitcode, JIT it and execute it, and it works very well.
Now I would like to execute it using the interpreter. And I get a segfault.
Here is the code :
// This code JIT the function and executes it
llvm::InitializeNativeTarget();
2010 Nov 02
2
[LLVMdev] Forcing the Interpreter segfaults
Helps to send to list:
On Tue, Nov 2, 2010 at 1:00 PM, OvermindDL1 <overminddl1 at gmail.com> wrote:
> On Tue, Nov 2, 2010 at 12:51 PM, Salomon Brys <salomon.brys at gmail.com> wrote:
>> Hi everyone !
>> I am very new to LLVM and intent to use it in a research project.
>> I have a problem with the interpreter: I have a simple compiler that
>> generates LLVM
2010 Nov 02
0
[LLVMdev] Forcing the Interpreter segfaults
In my case, I am working on a posix regular expression library that uses
LLVM to execute a regular expression.
Each regular expression is a very small sets of code and is faster to
interpret than to JIT then execute.
I wanted to JIT only when the regular expression is executed more than 20
times.
The benchmarks I have run show that my library is amzingly fast to execute a
regular expression
2006 Sep 14
1
[LLVMdev] Hello World crashes!
Hi,
Sorry for the newbie question. I downloaded llvm 1.8a and llvm-gcc3.4, tried
out the
simple "Hello, World" program but got the following error. My system is
RedHat 9
$ ./hello
lli: /home//llvm/lib/Target/X86/X86CodeEmitter.cpp:208:
unsigned char ModRMByte(unsigned int, unsigned int, unsigned int):
Assertion `Mod < 4 && RegOpcode < 8 && RM < 8 &&
2004 Aug 10
1
[LLVMdev] API on JIT, code snippets
Valery,
Your JIT sample program has been added to projects/HowToUseJIT.
I have defaulted the license to the standard UIUC license. Let me know if
that's not okay and I'll fix it.
If you continue to work on this (providing a command line option to use either
interpreter or JIT would be nice), please provide patches against these files
and I'll commit them for you.
Here's the
2008 Nov 15
1
[LLVMdev] How to use EE->runFunction for a function with StructRet set?
Hi,
I'm using LLVM 2.4 (but llvm-gcc 2.2) on Ubuntu 8.10 (Intrepid Ibex) for
a small part-time project combining Witty (http://www.webtoolkit.eu) and
the ExecutionEngine in LLVM. (This is my second week with any of these
so I still lack a lot of basic knowledge.)
Sometimes I want to call a function returing a struct (in this case
std::string), thus hasStructRetAttr() is true for the Function
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)
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
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()
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
Valery,
That's pretty cute actually. Do you want this "brilliant" :) example in the cvs
repository? I'd be happy to put it in.
Reid.
Valery A.Khamenya wrote:
> Hi LLVMers,
>
> 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
>
2013 Nov 08
0
[LLVMdev] UNREACHABLE executed at MCJIT.cpp:322!
Something must be wrong with the Function Type. Try to debug into
runFunction to see which if condition fails.
Just a guess, if this is on 64 bit system the first argument type may be
int64 but needs to be int32.
Yaron
2013/11/8 edA-qa mort-ora-y <eda-qa at disemia.com>
> That makes it more mysterious then since I am indeed only calling a main
> function. Perhaps I have to invoke
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
On second thought, the makefiles don't (easily) allow this do they? You can
only build one program per directory. Were you suggesting that you wanted me to
move the entire directories under a "small examples" directory?
Reid.
Chris Lattner wrote:
> On Tue, 17 Aug 2004, Reid Spencer wrote:
>
>
>>That's pretty cute actually. Do you want this
2004 Aug 18
1
[LLVMdev] JIT API example (fibonacci)
On Tue, 17 Aug 2004, Reid Spencer wrote:
> On second thought, the makefiles don't (easily) allow this do they? You can
> only build one program per directory. Were you suggesting that you wanted me to
> move the entire directories under a "small examples" directory?
You're right. The simples way to do this would be to have:
projects/
SmallExamples/
2013 Nov 08
1
[LLVMdev] UNREACHABLE executed at MCJIT.cpp:322!
It was the return type which was i64. I changed it also to my
abi_int_size and it works now. I have to take care of a few other type
translations, but it looks like MCJIT is working now.
Thank you.
On 08/11/13 18:12, Yaron Keren wrote:
> Something must be wrong with the Function Type. Try to debug into
> runFunction to see which if condition fails.
> Just a guess, if this is on 64
2013 Nov 08
2
[LLVMdev] UNREACHABLE executed at MCJIT.cpp:322!
That makes it more mysterious then since I am indeed only calling a main
function. Perhaps I have to invoke it a different way. Here's my call I
have now:
auto main = linker->getModule()->getFunction( "main" );
std::vector<llvm::GenericValue> args(2);
args[0].IntVal = llvm::APInt( platform::abi_int_size, 0 );
args[1].PointerVal = nullptr;
llvm::GenericValue gv =
2011 Oct 13
1
[LLVMdev] problems running JIT code on Mac 32-bit
Hello,
I am trying to run this test program via JIT on my Mac (10.7.1) where I have
compiled the latest LLVM code for 32-bit and it is not working properly.
Running the same code against LLVM 2.9 works fine. I also tried recompiling
my same checkout of LLVM as 64-bit and re-compiled my test program and that
works fine, for some reason the 32-bit version is yielding unexpected
behavior. I believe
2008 Aug 19
7
[LLVMdev] Please help with LLVM C++ integration
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?
Thanks in advance.
Kirill.
int some_test_func( int ){
std::cout << "!!!!" << std::endl;
return 8848;
}
int _tmain(int argc, _TCHAR* argv[]){
Module *M = new Module("test");
ExistingModuleProvider* MP = new
2004 Aug 17
5
[LLVMdev] JIT API example (fibonacci)
On Tue, 17 Aug 2004, Reid Spencer wrote:
> That's pretty cute actually. Do you want this "brilliant" :) example in the cvs
> repository? I'd be happy to put it in.
Here's an idea: how about we take the ModuleMaker, Valery's previous
example, and this one and put them all in one "small examples" project?
-Chris
> Valery A.Khamenya wrote:
>
>