search for: sivart

Displaying 20 results from an estimated 20 matches for "sivart".

2010 Nov 23
1
[LLVMdev] how to get a void type value in llvm
Hi, sivart Thanks for pointing it out. I used it, and it works. Thank you again. BTW, for any later reference, the function prototype declaration with no arguments is not what I wrote: fcall2 = M.getOrInsertFunction("foo", IntegerType::get(M.getContext(), 32), Type::getVoidTy(M.getContext(...
2010 Aug 19
3
[LLVMdev] using external functions from llvm
The blog post I linked to implied that adding a symbol in the form lle_X_FUNCTIONNAME would allow you to call a function called FUNCTIONNAME. Is this not the case? On Thu, Aug 19, 2010 at 6:46 PM, <o.j.sivart at gmail.com> wrote: > You are adding the symbol as "lle_X_create_number_object" yet your error > message implies you have tried to lookup and use "create_number_object". Can > you provide the code for the lookup? > > On 20/08/2010, at 8:07 AM, Alec Benzer wro...
2010 May 13
0
[LLVMdev] Handling of thread_local globals by llc -march=cpp
...use clang is able to compile both c source with __thread on a global and bc containing a @variable = thread_local global ... and a function that references the thread local global variable to both assembly and machine code that has segment register offset addressing. On 13/05/2010, at 9:26 PM, o.j.sivart at gmail.com wrote: > target triple = "i386-pc-linux-gnu" > > On 13/05/2010, at 9:25 PM, Anton Korobeynikov wrote: > >>> int (*FP)() = (int (*)())FPtr; >>> int res = FP(); >>> >>> when the function executes correctly in the case of inste...
2010 May 13
3
[LLVMdev] Handling of thread_local globals by llc -march=cpp
target triple = "i386-pc-linux-gnu" On 13/05/2010, at 9:25 PM, Anton Korobeynikov wrote: >> int (*FP)() = (int (*)())FPtr; >> int res = FP(); >> >> when the function executes correctly in the case of instead having created a standard global variable. > What is the platform you're running the code on? > > -- > With best regards, Anton
2010 May 19
1
[LLVMdev] Intrinsics and dead instruction/code elimination
On 20/05/2010, at 8:16 AM, Chris Lattner wrote: > > On May 19, 2010, at 3:13 PM, o.j.sivart at gmail.com wrote: > >>> >>> Intrinsics should be optimized as well as instructions. In this specific case, these intrinsics should be marked readnone, which means that load/store optimization will ignore them. Dead code elimination will delete the intrinsic if it is dead...
2010 May 19
2
[LLVMdev] Intrinsics and dead instruction/code elimination
On 20/05/2010, at 3:01 AM, Chris Lattner wrote: > > On May 19, 2010, at 7:07 AM, o.j.sivart at gmail.com wrote: > >> Hi all, >> >> I'm interested in the impact of representing code via intrinsic functions, in contrast to via an instruction, when it comes to performing dead instruction/code elimination. As a concrete example, lets consider the simple case of the...
2010 Nov 23
0
[LLVMdev] how to get a void type value in llvm
Hi Shuying, You will find in the documentation that amongst the overloaded CallInst::Create()'s there is one that takes no function arguments: static CallInst* llvm::CallInst::Create ( Value * F, const Twine & NameStr, BasicBlock * InsertAtEnd); Regards On 23/11/2010, at 11:20 AM, Shuying Liang wrote: > Hi, I want to insert a function with a void type parameter, > for example:
2010 Nov 23
2
[LLVMdev] how to get a void type value in llvm
Hi, I want to insert a function with a void type parameter, for example: int foo(void); OI declared fcall2 = M.getOrInsertFunction("foo", IntegerType::get(M.getContext(), 32), Type::getVoidTy(M.getContext())); then the question is how to get the void type value to make the CallInst inserted sucessfully? (what should be ********) CallInst::Create(fcall2, ******,
2010 May 19
0
[LLVMdev] Intrinsics and dead instruction/code elimination
On May 19, 2010, at 3:13 PM, o.j.sivart at gmail.com wrote: >> >> Intrinsics should be optimized as well as instructions. In this specific case, these intrinsics should be marked readnone, which means that load/store optimization will ignore them. Dead code elimination will delete the intrinsic if it is dead etc. > &g...
2010 May 19
0
[LLVMdev] Intrinsics and dead instruction/code elimination
On May 19, 2010, at 7:07 AM, o.j.sivart at gmail.com wrote: > Hi all, > > I'm interested in the impact of representing code via intrinsic functions, in contrast to via an instruction, when it comes to performing dead instruction/code elimination. As a concrete example, lets consider the simple case of the llvm.*.with.overf...
2010 May 19
2
[LLVMdev] Intrinsics and dead instruction/code elimination
Hi all, I'm interested in the impact of representing code via intrinsic functions, in contrast to via an instruction, when it comes to performing dead instruction/code elimination. As a concrete example, lets consider the simple case of the llvm.*.with.overflow.* intrinsics. If I have some sequence (> 1) of llvm.*.with.overflow.* intrinsics, as in the form of: @global = global i32 0
2010 Jul 08
1
[LLVMdev] simple way to print disassembly of final code from jit?
...-mc offline produces the same code as one would also expect. echo '0x48 0xb8 0x10 0x40 0xf4 0xf7 0xff 0x7f 0x0 0x0 0xf2 0xf 0x10 0x0 0xc3' |llvm-mc -disassemble -triple=x86_64-PC-Linux movabsq $140737353367568, %rax movsd (%rax), %xmm0 ret b. On Wed, Jul 7, 2010 at 3:07 AM, <o.j.sivart at gmail.com> wrote: > Hi Bill, > > I'm coincidently planning right now on doing exactly the same things as you. I haven't yet had a chance to implement the code, but I can point you to how I currently believe you can get access to what you need. If you take a look at the code f...
2010 Aug 19
0
[LLVMdev] using external functions from llvm
You are adding the symbol as "lle_X_create_number_object" yet your error message implies you have tried to lookup and use "create_number_object". Can you provide the code for the lookup? On 20/08/2010, at 8:07 AM, Alec Benzer wrote: > Is there documentation somewhere on how to call external functions from llvm? The only guide I found was this:
2010 Aug 20
0
[LLVMdev] using external functions from llvm
...at 6:56 PM, Alec Benzer <alecbenzer at gmail.com> wrote: > The blog post I linked to implied that adding a symbol in the form > lle_X_FUNCTIONNAME would allow you to call a function called FUNCTIONNAME. > Is this not the case? > > > On Thu, Aug 19, 2010 at 6:46 PM, <o.j.sivart at gmail.com> wrote: > >> You are adding the symbol as "lle_X_create_number_object" yet your error >> message implies you have tried to lookup and use "create_number_object". Can >> you provide the code for the lookup? >> >> On 20/08/2010, at...
2010 Aug 19
2
[LLVMdev] using external functions from llvm
Is there documentation somewhere on how to call external functions from llvm? The only guide I found was this: http://www.gearleaf.com/blog/post/44, and it doesn't seem to be working for me. I have a function: llvm::GenericValue lle_X_create_number_object(llvm::FunctionType* ft, const std::vector<llvm::GenericValue>& args) { llvm_object_structure* result = new
2010 Jul 07
0
[LLVMdev] simple way to print disassembly of final code from jit?
Hi Bill, I'm coincidently planning right now on doing exactly the same things as you. I haven't yet had a chance to implement the code, but I can point you to how I currently believe you can get access to what you need. If you take a look at the code for the implementation of lvm::JIT::runJITOnFunction(Function *, MachineCodeInfo *), you'll see that if a MachineCodeInfo parameter is
2010 Jul 07
3
[LLVMdev] simple way to print disassembly of final code from jit?
Thanks Reid - I'm on Windows. I guess I just assumed I was missing something obvious in how to hook up the JIT and disassembler! Given the nice looking disassembly code I found, I thought people would be doing it all the time :-) b. On Tue, Jul 6, 2010 at 8:41 PM, Reid Kleckner <reid.kleckner at gmail.com> wrote: > If you're on a recent flavor of Linux, you may be able to just
2010 May 13
2
[LLVMdev] Handling of thread_local globals by llc -march=cpp
Thanks for the quick reply and fix. Now it just means I have to hunt further in exploring why, in my simple test program, replacing the following line of code: GlobalVariable* global = new GlobalVariable(*MyModule, IntegerType::get(getGlobalContext(), 32), false, GlobalValue::ExternalLinkage, 0, "global"); with the following line of code: GlobalVariable* global = new
2011 Feb 02
0
[LLVMdev] Target specific intrinsic documentation
Hi all, Just looking for any documentation on target specific intrinsics, initially specifically the x86 sse intrinsics. Is there anything outside the source code that provides any documentation of such things -- I couldn't find anything definitive. Cheers
2010 May 13
2
[LLVMdev] Handling of thread_local globals by llc -march=cpp
Hi all, I've been exploring thread local globals in llvm and as part of this investigation I ran llc -march=cpp over a trivial llvm bc file which uses thread local storage for a global. For some reason llc -march=cpp seems to ignore the thread_local and produce code to create a standard global. Is this expected behaviour, a known limitation, or otherwise? Thanks in advance. Details are as