I'm playing around with different combinations of LTO passes, and I've run into a strange problem:<div><br></div><div>I have a 'main' function that looks like this:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
define i32 @"main(tart.core.Array[tart.core.String])->int"(%"tart.core.Array[tart.core.String]"* %args) {<br>entry:<br> call void @llvm.dbg.func.start(metadata !0)<br> call void @llvm.dbg.stoppoint(i32 2, i32 19, metadata !1)<br>
%integerLimitsTest = call { } @integerLimitsTest() ; <{ }> [#uses=0]<br> call void @llvm.dbg.stoppoint(i32 3, i32 21, metadata !1)<br> %integerToStringTest = call { } @integerToStringTest() ; <{ }> [#uses=0]<br>
call void @llvm.dbg.stoppoint(i32 4, i32 9, metadata !1)<br> call void @llvm.dbg.region.end(metadata !0)<br> ret i32 0<br>}</blockquote><div><div><br></div><div>However, when I add an internalize pass before the other LTO passes, the 'main' function turns into this:</div>
<div><br></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">define i32 @main(i32, i8** nocapture) nounwind readnone {<br>entry:<br> tail call void @llvm.dbg.func.start(metadata !0)<br>
tail call void @llvm.dbg.stoppoint(i32 3, i32 21, metadata !1)<br> unreachable<br>}</blockquote><div><div><div><br></div><div>The thing is, there's nothing particularly special or interesting about the functions being called from main().</div>
<div><br></div><div>Any clues?</div></div><br>-- <br>-- Talin<br>
</div>