similar to: [LLVMdev] Using LLVM for a dynamically typed language

Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] Using LLVM for a dynamically typed language"

2005 Apr 21
0
[LLVMdev] Using LLVM for a dynamically typed language
On Thu, 2005-21-04 at 09:31 -0400, Vyacheslav Akhmechet wrote: > At this point I cannot know the type of 'i' at compile time. At > runtime 'i' is a structure that contains a type and a function > pointer. What I can't figure out is how to cast my llvm function > pointer to an appropriate function type. I cannot know until runtime > what the type will be.
2005 Apr 21
5
[LLVMdev] Using LLVM for a dynamically typed language
Evan, The problem is that I do not know the type of a target function at compile time. If you consider my code example, I don't know the type of 'i' until runtime (in fact, I can't even know a possible range of types 'i' may assume). Thanks, - Slava. On 4/21/05, Evan Jones <ejones at uwaterloo.ca> wrote: > On Thu, 2005-21-04 at 09:31 -0400, Vyacheslav Akhmechet
2013 Dec 03
2
[LLVMdev] Newbie question: LLVM IR, printf, and varargs
Whoops... Seems I forgot the asterisk (*) after the cast. Or something. Because I did insert the cast and it didn't work. But NOW it works. Thank you for spending some time on this - and also for presenting the solution. -- Mikael 2013/12/4 Eli Bendersky <eliben at google.com> > This code: > > declare i32 @printf(i8* nocapture readonly, ...) nounwind > > define
2013 Dec 04
0
[LLVMdev] Newbie question: LLVM IR, printf, and varargs
On Tue, Dec 3, 2013 at 6:10 PM, Mikael Lyngvig <mikael at lyngvig.org> wrote: > Whoops... Seems I forgot the asterisk (*) after the cast. Or something. > Because I did insert the cast and it didn't work. But NOW it works. > Thank you for spending some time on this - and also for presenting the > solution. > It's not a "cast" for any meaning of cast in
2005 Apr 21
2
[LLVMdev] Using LLVM for a dynamically typed language
> a) Make all functions the same type. For example, make them all return > void, take a vector of parameters as the first argument, and a vector > for return values as the second argument. This is something I was considering. I guess I'll end up going with this option. > I don't see how this is a specific challenge with LLVM. It seems to me > that this is a challenge that
2012 Jun 18
4
[LLVMdev] Cast Pointer Address to Functions
I have a function address held in an uint64_t. I would like to cast the function address to a function prototype and create a call to the function in LLVM. How could I do this ? Thanks Xin
2012 Jun 19
0
[LLVMdev] Cast Pointer Address to Functions
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Xin Tong > Subject: [LLVMdev] Cast Pointer Address to Functions > I have a function address held in an uint64_t. I would like to cast > the function address to a function prototype and create a call to the > function in LLVM. How could I do this ? This is what works for us:
2009 May 21
3
[LLVMdev] Passing a pointer to a function
I recently began hacking around with my first LLVM pass. The big picture is that I would like to insert function calls for each instruction type, and pass some parameters based on the instruction type. Then I will link the output to some C file that implements those functions. Things were going well until I started trying to make function calls with a pointer as a parameter. For example, I would
2005 Apr 21
0
[LLVMdev] Using LLVM for a dynamically typed language
On Thu, 2005-21-04 at 11:34 -0400, Vyacheslav Akhmechet wrote: > I disagree. If I could push a bunch of arguments on a stack (or > specify a list of arguments, etc.) and just use a "call" instruction > with a pointer to a memory address I wouldn't run into this problem. > This is a specific challenge with LLVM because it is strictly typed. Ah! Right. You can't
2007 Apr 06
0
[LLVMdev] Integrating LLVM in an existing project
On Fri, 6 Apr 2007, Nicolas Geoffray wrote: > Like you say, it's not functional for non-calls instructions. Besides, > having to change all CalInst to InvokeInst is just too much pain in our > current vm. ok. > Actually, why is it missing? What's the difference between the code > generator and the JIT? There are two things missing: 1. Testing and working out the set
2007 Apr 06
2
[LLVMdev] Integrating LLVM in an existing project
Hi Chris, Chris Lattner wrote: >> We can not use current exception handling in llvm, see >> http://www.nondot.org/sabre/LLVMNotes/ExceptionHandlingChanges.txt. >> > > Why not? > > Like you say, it's not functional for non-calls instructions. Besides, having to change all CalInst to InvokeInst is just too much pain in our current vm. > There are two
2005 Mar 08
3
[LLVMdev] GCC assembler rejects native code generated by LLVM
Vyacheslav, I've tracked down the change and I have a fix for you to test. The attached patch should be applied to the CVS head (version 1.132) of X86AsmPrinter.cpp in llvm/lib/Target/X86. The patch just includes MINGW targets in the same set of choices that it makes for Cygwin. Could you please try the patch and let me know if it solves your problem? If it does, I'll commit the patch.
2005 Mar 08
0
[LLVMdev] GCC assembler rejects native code generated by LLVM
Reid, This patch won't work for me. I compile llvm toolset with MSVC Express (hence __MINGW32__ won't be defined for me at compile time). I only try to feed the generated assembly into gcc (pretty much gnu assembler, I suppose). I don't use mingw tools at the earlier stage. However it's obvious for me how to modify the code now (just add MSVC at that line), thanks! I'll try it
2005 Mar 08
2
[LLVMdev] GCC assembler rejects native code generated by LLVM
Ok, I just tried the patch with some modifications (added msvc target and used WIN32 instead of __MINGW32__ for preprocessor) and everything worked beautifully. Thanks for the help! On Mon, 7 Mar 2005 20:45:40 -0500, Vyacheslav Akhmechet <coffeemug at gmail.com> wrote: > Reid, > > This patch won't work for me. I compile llvm toolset with MSVC Express > (hence __MINGW32__
2005 Mar 07
7
[LLVMdev] GCC assembler rejects native code generated by LLVM
I successfully compiled CVS HEAD yesterday on my win32 machine using Visual C++ Express (2005). I also have Mingw tools installed. I wrote a simple hello world application and generated native assembly code using llvm. When I tried to feed the code into GCC, it rejected it with "junk at the end of line" error messages. Shouldn't GCC be able to assemble this code? I realize win32 port
2009 May 21
0
[LLVMdev] Passing a pointer to a function
On Wed, May 20, 2009 at 7:31 PM, Scott Ricketts <sricketts at maxentric.com> wrote: > Where load_fcall is build using a call to Module::getOrInsertFunction > as in the example here: > > http://wiki.llvm.org/HowTo:_Insert_a_function_call > > My question is, what do I pass as the argument type for P above? The > following seems to work, as long as there are no floating
2005 Mar 08
3
[LLVMdev] GCC assembler rejects native code generated by LLVM
Vyacheslav, This is the same problem that I had with Cygwin .. nearly identical. The issue was documented in PR492 if you want some background. I'm currently trying to dig up what I did to fix this in December for Cygwin and see if I can apply the same change for mingw. Reid. On Mon, 2005-03-07 at 16:39, Vyacheslav Akhmechet wrote: > Ok, I got home so I have more details. Here's the
2005 Mar 08
0
[LLVMdev] GCC assembler rejects native code generated by LLVM
Ok, I got home so I have more details. Here's the sample C program: ----------------- C program --------------- #include <stdio.h> int main() { printf("hello world\n"); return 0; } ------------- end C program ------------- This is compiled using llvm online demo into the following llvm code (target removed): ----------------- LLVM code -------------- deplibs
2015 Jan 19
2
[LLVMdev] [INCOMPLETE] [GC] Support wrapping vararg functions in statepoint
I actually need this feature quite badly in my untyped language compiler: since I support first-class functions, I've made the types of all functions a standard vararg (so I can box them). The implementation crashes when I try to read out the value of gc.result. Hints as to what might be wrong? Signed-off-by: Ramkumar Ramachandra <artagnon at gmail.com> ---
2005 Mar 07
0
[LLVMdev] GCC assembler rejects native code generated by LLVM
On Mon, 7 Mar 2005, Vyacheslav Akhmechet wrote: > I successfully compiled CVS HEAD yesterday on my win32 machine using > Visual C++ Express (2005). I also have Mingw tools installed. I wrote > a simple hello world application and generated native assembly code > using llvm. When I tried to feed the code into GCC, it rejected it > with "junk at the end of line" error