13 questions
1
vote
1
answer
194
views
Adding a new LLVM target to llvmlite
Is it possible to add a new target to llvmlite (python library)?
For a new hardware (e.g. ASIC), I need to have a new and custom LLVM target.
This is not very clear from the documentation.
If it is ...
0
votes
0
answers
81
views
How can I include library functions from assembly files in my compiler using llvmpy?
I have to include some functions, that I have implemented in 8086 assembly, in my compilers project for a C-like programming language. That is, I have 6 .asm files. I have used so far llvmpy (a no ...
0
votes
1
answer
996
views
Cannot install llvmpy "can't open file 'llvmpy/build.py'"
I have some trouble installing llvmpy on ubuntu 14.04, i downloaded llvmpy from llvmpy.org and installed llvm 3.4 via apt-get, when I try to install it using
python setup.py install
I get this error:
...
1
vote
1
answer
803
views
Playing with llvm-py
I was trying to get llvm-py to install on my OSX 10.9 and I got the following error when trying to install it.
% python setup.py build
Error: could not invoke ['llvm-config', '--version']
Try setting ...
1
vote
1
answer
1k
views
Why does LLVM throw an "arguments of incompatible type" error when creating an array?
I am using LLVM and the llvmpy library.
My goal is to create something similar to the follow C code:
int a[] = {1, 2};
int b[] = {1, 2, 3};
int c[] = {1};
int* ptrs[] = {a, b, c};
The following is ...
1
vote
1
answer
881
views
How do I hold an array of pointers in LLVM?
For some background, I am implementing a compiler using the llvmpy library which is a wrapper around the LLVM IR generation.
I have created a character type which represents one or more UTF-8 code ...
0
votes
1
answer
2k
views
How do I pass an array pointer to a function in LLVM / llvmpy?
I am using llvmpy to (attempt to) generate IR code. However, I am stuck using printf and an array of int8.
The following is an excerpt of what is giving me issues:
# Defining the print function.
# --...
1
vote
1
answer
376
views
How do I write output from within Python's LLVM bindings?
I am using Python's LLVM bindings to generate code for a custom language.
Now I want to run programs and check if their output works correctly - but I am unable to figure out exactly how to output ...
0
votes
1
answer
214
views
How do I store a value in LLVM?
I am using LLVM's Python bindings - and, so far, I've been able to generate Constant values using LLVM. However, I am confused as to how to store them within an address.
This is probably a very basic ...
6
votes
2
answers
1k
views
Call Python code from LLVM JIT
I write a language lexer/parser/compiler in python, that should run in the LLVM JIT-VM (using llvm-py) later. The first two steps are quite straightforward for now, but (even if I didn't start the ...
1
vote
1
answer
128
views
Is possible to load a function from *any|some* llvm generated code in iOS (not made by clang)?
If I build a function with LLVM, like
int sum(int a, int b)
{
return a + b;
}
using something like http://www.llvmpy.org/llvmpy-doc/dev/doc/firstexample.html, is possible to use that function ...
1
vote
1
answer
343
views
How can I 'transform' Class object in python to llvm?
I am willing to use llvm to optimize my python code. I read some tutorials but I have not figured out how to, let's say, export class object from the python code to llvm. I learnt how to create a ...
5
votes
2
answers
3k
views
Building and running llvm-py on Mac OS X
I was trying to build llvm-py on Mac OS X.
This is what I tried to do, I needed to download 11vm-2.7, and the README file has this comment: Make sure '--enable-pic' is passed to LLVM's 'configure'
...