Displaying 5 results from an estimated 5 matches for "llvmcreatebuilderincontext".
2013 May 13
0
[LLVMdev] Problem with llvm-c
Hi James,
On 13/05/13 00:25, James Courtier-Dutton wrote:
> Hi,
>
> I have the following program (attached)
>
> I produces, using the llvm-c API, this:
> ; ModuleID = './llvm-test.bc'
>
> define i32 @test2() {
> EntryBlock:
> ret i32 3
> }
>
> But, I want it to produce this:
> ; ModuleID = './llvm-test.bc'
>
> define i32 @test2()
2013 May 12
2
[LLVMdev] Problem with llvm-c
Hi,
I have the following program (attached)
I produces, using the llvm-c API, this:
; ModuleID = './llvm-test.bc'
define i32 @test2() {
EntryBlock:
ret i32 3
}
But, I want it to produce this:
; ModuleID = './llvm-test.bc'
define i32 @test2() {
EntryBlock:
%1 = add i32 1, 2
ret i32 %1
}
I.e. With the "add" in there.
llvm appears to be doing some optimization on
2012 Apr 25
2
[LLVMdev] Crash in JIT
...LLVMSetValueName(xParam, "x");
LLVMValueRef bParam = LLVMGetParam(func, 2);
LLVMSetValueName(bParam, "b");
LLVMBasicBlockRef entryBB;
entryBB = LLVMAppendBasicBlockInContext(llvm, func, "entry");
LLVMBuilderRef builder;
builder = LLVMCreateBuilderInContext(llvm);
LLVMPositionBuilderAtEnd(builder, entryBB);
LLVMValueRef mx;
mx = LLVMBuildMul(builder, mParam, xParam, "mx");
LLVMValueRef y;
y = LLVMBuildAdd(builder, mx, bParam, "y");
LLVMValueRef retInst;
retInst = LLVMBuildRet(builder,...
2012 Apr 25
0
[LLVMdev] Crash in JIT
...c, 1);
LLVMSetValueName(xParam, "x");
LLVMValueRef bParam = LLVMGetParam(func, 2);
LLVMSetValueName(bParam, "b");
LLVMBasicBlockRef entryBB;
entryBB = LLVMAppendBasicBlockInContext(llvm, func, "entry");
LLVMBuilderRef builder;
builder = LLVMCreateBuilderInContext(llvm);
LLVMPositionBuilderAtEnd(builder, entryBB);
LLVMValueRef mx;
mx = LLVMBuildMul(builder, mParam, xParam, "mx");
LLVMValueRef y;
y = LLVMBuildAdd(builder, mx, bParam, "y");
LLVMValueRef retInst;
retInst = LLVMBuildRet(builder, y);
(vo...
2011 Jun 18
1
[LLVMdev] loop only executes once
...t the function call convention To FastCall so it can utilize tail
call
LLVMSetFunctionCallConv(Fib2,#LLVMFastCallConv)
//Get a pointer To the ArgX.i And add To function...
ArgX = LLVMGetFirstParam(Fib2) // Get the arg.
LLVMSetValueName(ArgX, "ArgX") // Give it a symbolic name.
Builder = LLVMCreateBuilderInContext(Context)
BB = LLVMAppendBasicBlockInContext(Context, Fib2, "EntryBlock")
//Entry
LLVMPositionBuilderAtEnd(Builder, BB)
//Protected a,b,c
//a=1:b=1:c=0:d=argx
A = LLVMBuildAlloca(Builder, IntType,"A")//
B = LLVMBuildAlloca(Builder, IntType,"B")//
C = LLVMBuildAlloca(Bu...