[LLVMdev] Problem with llvm-c
James Courtier-Dutton
james.dutton at gmail.com
Sun May 12 15:25:50 PDT 2013
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 it, to remove the add.
Is there any way to switch off the optimization by adding something to
the ll.c file?
I will be using the llvm-c api more fully, and I wish to make sure
that the instructions I tell it to use are in the resulting .bc and
.ll output.
I.e. I want the .bc and .ll output to be pre-optimizations.
Kind Regards
James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ll.c
Type: text/x-csrc
Size: 1404 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130512/1d5436bd/attachment.c>
More information about the llvm-dev
mailing list