search for: llvmconstadd

Displaying 2 results from an estimated 2 matches for "llvmconstadd".

2013 May 13
0
[LLVMdev] Problem with llvm-c
...t 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 it, to remove the add. if you used LLVMConstAdd to create the add, then don't, use LLVMBuildAdd instead. If you were using LLVMBuildAdd, then use a builder than doesn't do automatic constant folding. Ciao, Duncan. > Is there any way to switch off the optimization by adding something to > the ll.c file? > I will be using the l...
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