[LLVMdev] Internalize pass
Talin
viridia at gmail.com
Wed Sep 30 00:06:14 PDT 2009
I'm playing around with different combinations of LTO passes, and I've run
into a strange problem:
I have a 'main' function that looks like this:
define i32
@"main(tart.core.Array[tart.core.String])->int"(%"tart.core.Array[tart.core.String]"*
%args) {
entry:
call void @llvm.dbg.func.start(metadata !0)
call void @llvm.dbg.stoppoint(i32 2, i32 19, metadata !1)
%integerLimitsTest = call { } @integerLimitsTest() ; <{ }> [#uses=0]
call void @llvm.dbg.stoppoint(i32 3, i32 21, metadata !1)
%integerToStringTest = call { } @integerToStringTest() ; <{ }> [#uses=0]
call void @llvm.dbg.stoppoint(i32 4, i32 9, metadata !1)
call void @llvm.dbg.region.end(metadata !0)
ret i32 0
}
However, when I add an internalize pass before the other LTO passes, the
'main' function turns into this:
define i32 @main(i32, i8** nocapture) nounwind readnone {
entry:
tail call void @llvm.dbg.func.start(metadata !0)
tail call void @llvm.dbg.stoppoint(i32 3, i32 21, metadata !1)
unreachable
}
The thing is, there's nothing particularly special or interesting about the
functions being called from main().
Any clues?
--
-- Talin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090930/4cebbf5a/attachment.html>
More information about the llvm-dev
mailing list