Questions tagged [llvm-3.0]
54 questions
0
votes
1 answer
llvm - delete a function from a file
I have a file in which the main function calls three test functions, namely, test 1, test 2 and test 3. I want to make a pass that deletes each two of the functions one by one and returns the file that's calling only one of the three test functions.…

mikasa
- 783
- 1
- 11
- 29
0
votes
1 answer
Why it is "constant expression type mismatch"
@.str = private constant [34 x i8] c"<17 x i15><%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i>\0A\00", align 1
declare i32 @printf(i8*, ...)
define i32 @main() {
%a = add <17 x i15>

matcha latte
- 185
- 1
- 12
0
votes
1 answer
about LLVM IR: No function definition in LLVM ir code
I am looking at a llvm ir file converted from a cpp file by clang. But I found there were several functions in llvm ir file only with declaration without definition. And all these functions are not the "build-in" functions like:
declare i32…

He Yucheng
- 31
- 3
0
votes
1 answer
Error when compiling llvm in FreeBSD 8.4
I am trying to build LLVM from source in FreeBSD 8.4.
Here are the steps i carried out
Downloaded the source from http://llvm.org/releases/3.8.0/llvm-3.8.0.src.tar.xz
Extracted the source into a folder.
Created a build directory and inside it ran…

sushil
- 165
- 1
- 9
0
votes
1 answer
How can I add my pass before X86 AT&T-Style Assembly Printer pass?
How can I add my pass before X86 AT&T-Style Assembly Printer pass?
I need to change MachineFunction and save changes to the asm file.
The problem is that my pass is triggered after all.
Pass debug:
0x202a430 Freeing Pass 'Execution dependency…

user2440317
- 11
0
votes
2 answers
Add a new register allocation pass llvm
I am writing a new register allocation pass on llvm. I followed the instructions here http://llvm.org/docs/WritingAnLLVMPass.html#the-machinefunctionpass-class.
The pass is not displayed in llc --help. I changed the greedy allocation algorithm to…

Kavitha Madhu
- 27
- 6
0
votes
1 answer
Array Detection in Function arg list LLVM opt pass
suppose I have the following LLVM IR
define void @foo(i32* %a, i32* %m) nounwind { ...
and I call foo by passing an array for the first arg and passing a variable's address for m.
Now, I need to analyse the arg list of foo and determine which arg is…

earlence
- 323
- 1
- 4
- 11
0
votes
2 answers
Compiling C code inside a C++ code inside a Objective-C++ code
My problem is a little complex:
Library:
I have a library written in C and C++. It compiles perfecly in XCode with Apple LLVM.
The work of this library itself is done by the C code while the C++ part is just a C++ interface because I prefer C++. In…

Wagner Patriota
- 5,494
- 26
- 49
-1
votes
1 answer
Number of load instruction in a program
How to count total number of load instruction on a simple "hello world" program through LLVM ??

Abhinash Jain
- 169
- 10