Displaying 2 results from an estimated 2 matches for "tp62038p62060".
2013 Oct 14
0
[LLVMdev] Generating New Functions
On 10/14/13 5:53 AM, Abhinash Jain wrote:
> How can I generate a new function at compile time and insert some instruction
> onto it, through llvm pass.
> eg.
>
> 1) %y = alloca i32, align 4
> 2) %z = alloca i32, align 4
> 3) %t = alloca i32, align 4
> 4) %2 = load i32* %y, align 4
> 5) %3 = load i32* %z, align 4
> 6) %add = add nsw i32 %2, %3
> 7) %4 = load
2013 Oct 14
2
[LLVMdev] Generating New Functions
How can I generate a new function at compile time and insert some instruction
onto it, through llvm pass.
eg.
1) %y = alloca i32, align 4
2) %z = alloca i32, align 4
3) %t = alloca i32, align 4
4) %2 = load i32* %y, align 4
5) %3 = load i32* %z, align 4
6) %add = add nsw i32 %2, %3
7) %4 = load i32* %t, align 4
8) %add1 = add nsw i32 %add, %4
9) store i32 %add1, i32* %x, align 4