issue #114 Prepare for implementing fast C calls; the Lua typecode is extended to 16 bits to allow more type variants to be added. The intention is that for light C functions, we can encode return type / parameter types to enable calling some C functions directly without having to go through the Lua api.
parent
5c17bca34e
commit
4676f220a4
@ -1,73 +1,121 @@
|
||||
; ModuleID = 'inline_getstr.c'
|
||||
source_filename = "inline_getstr.c"
|
||||
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "i686-pc-windows-msvc"
|
||||
target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-pc-windows-msvc"
|
||||
|
||||
%struct.TValue = type { %union.Value, i32 }
|
||||
%union.Value = type { i64 }
|
||||
%struct.TValue = type { %union.Value, i16 }
|
||||
%union.Value = type { %struct.GCObject* }
|
||||
%struct.GCObject = type { %struct.GCObject*, i8, i8 }
|
||||
%struct.Table = type { %struct.GCObject*, i8, i8, i8, i8, i32, %struct.TValue*, %struct.Node*, %struct.Node*, %struct.Table*, %struct.GCObject*, %struct.RaviArray, i32 }
|
||||
%struct.Node = type { %struct.TValue, %union.TKey }
|
||||
%union.TKey = type { %struct.anon.1 }
|
||||
%struct.anon.1 = type { %union.Value, i32, i32 }
|
||||
%struct.GCObject = type { %struct.GCObject*, i8, i8 }
|
||||
%struct.RaviArray = type { i8*, i32, i32, i32 }
|
||||
%struct.anon.1 = type { %union.Value, i16, i32 }
|
||||
%struct.RaviArray = type { i8*, i32, i32, i8, i8 }
|
||||
%struct.TString = type { %struct.GCObject*, i8, i8, i8, i8, i32, %union.anon.2 }
|
||||
%union.anon.2 = type { i64 }
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define %struct.TValue* @ravi_getstr(%struct.Table* %t, %struct.TString* %key) local_unnamed_addr #0 {
|
||||
entry:
|
||||
%hash = getelementptr inbounds %struct.TString, %struct.TString* %key, i32 0, i32 5
|
||||
%0 = load i32, i32* %hash, align 8, !tbaa !1
|
||||
%hmask = getelementptr inbounds %struct.Table, %struct.Table* %t, i32 0, i32 12
|
||||
%1 = load i32, i32* %hmask, align 4, !tbaa !7
|
||||
%and = and i32 %1, %0
|
||||
%node = getelementptr inbounds %struct.Table, %struct.Table* %t, i32 0, i32 7
|
||||
%2 = load %struct.Node*, %struct.Node** %node, align 4, !tbaa !10
|
||||
%3 = getelementptr inbounds %struct.Node, %struct.Node* %2, i32 %and, i32 1, i32 0, i32 1
|
||||
%4 = load i32, i32* %3, align 8, !tbaa !11
|
||||
%cmp = icmp eq i32 %4, 68
|
||||
br i1 %cmp, label %land.lhs.true, label %if.end
|
||||
define %struct.TValue* @ravi_getstr(%struct.Table* %t, %struct.TString* %key) #0 {
|
||||
%retval = alloca %struct.TValue*, align 8
|
||||
%key.addr = alloca %struct.TString*, align 8
|
||||
%t.addr = alloca %struct.Table*, align 8
|
||||
%n = alloca %struct.Node*, align 8
|
||||
%k = alloca %struct.TValue*, align 8
|
||||
%cleanup.dest.slot = alloca i32
|
||||
store %struct.TString* %key, %struct.TString** %key.addr, align 8, !tbaa !2
|
||||
store %struct.Table* %t, %struct.Table** %t.addr, align 8, !tbaa !2
|
||||
%1 = bitcast %struct.Node** %n to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %1) #3
|
||||
%2 = load %struct.Table*, %struct.Table** %t.addr, align 8, !tbaa !2
|
||||
%node = getelementptr inbounds %struct.Table, %struct.Table* %2, i32 0, i32 7
|
||||
%3 = load %struct.Node*, %struct.Node** %node, align 8, !tbaa !6
|
||||
%4 = load %struct.TString*, %struct.TString** %key.addr, align 8, !tbaa !2
|
||||
%hash = getelementptr inbounds %struct.TString, %struct.TString* %4, i32 0, i32 5
|
||||
%5 = load i32, i32* %hash, align 4, !tbaa !10
|
||||
%6 = load %struct.Table*, %struct.Table** %t.addr, align 8, !tbaa !2
|
||||
%hmask = getelementptr inbounds %struct.Table, %struct.Table* %6, i32 0, i32 12
|
||||
%7 = load i32, i32* %hmask, align 8, !tbaa !12
|
||||
%and = and i32 %5, %7
|
||||
%idxprom = zext i32 %and to i64
|
||||
%arrayidx = getelementptr inbounds %struct.Node, %struct.Node* %3, i64 %idxprom
|
||||
store %struct.Node* %arrayidx, %struct.Node** %n, align 8, !tbaa !2
|
||||
%8 = bitcast %struct.TValue** %k to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %8) #3
|
||||
%9 = load %struct.Node*, %struct.Node** %n, align 8, !tbaa !2
|
||||
%i_key = getelementptr inbounds %struct.Node, %struct.Node* %9, i32 0, i32 1
|
||||
%tvk = bitcast %union.TKey* %i_key to %struct.TValue*
|
||||
store %struct.TValue* %tvk, %struct.TValue** %k, align 8, !tbaa !2
|
||||
%10 = load %struct.TValue*, %struct.TValue** %k, align 8, !tbaa !2
|
||||
%tt_ = getelementptr inbounds %struct.TValue, %struct.TValue* %10, i32 0, i32 1
|
||||
%11 = load i16, i16* %tt_, align 8, !tbaa !13
|
||||
%conv = zext i16 %11 to i32
|
||||
%cmp = icmp eq i32 %conv, 32772
|
||||
br i1 %cmp, label %12, label %19
|
||||
|
||||
land.lhs.true: ; preds = %entry
|
||||
%value_ = getelementptr inbounds %struct.Node, %struct.Node* %2, i32 %and, i32 1, i32 0, i32 0
|
||||
%5 = bitcast %union.Value* %value_ to %struct.TString**
|
||||
%6 = load %struct.TString*, %struct.TString** %5, align 8, !tbaa !13
|
||||
%cmp1 = icmp eq %struct.TString* %6, %key
|
||||
br i1 %cmp1, label %if.then, label %if.end
|
||||
; <label>:12: ; preds = %0
|
||||
%13 = load %struct.TValue*, %struct.TValue** %k, align 8, !tbaa !2
|
||||
%value_ = getelementptr inbounds %struct.TValue, %struct.TValue* %13, i32 0, i32 0
|
||||
%gc = bitcast %union.Value* %value_ to %struct.GCObject**
|
||||
%14 = load %struct.GCObject*, %struct.GCObject** %gc, align 8, !tbaa !16
|
||||
%15 = bitcast %struct.GCObject* %14 to %struct.TString*
|
||||
%16 = load %struct.TString*, %struct.TString** %key.addr, align 8, !tbaa !2
|
||||
%cmp2 = icmp eq %struct.TString* %15, %16
|
||||
br i1 %cmp2, label %17, label %19
|
||||
|
||||
if.then: ; preds = %land.lhs.true
|
||||
%i_val = getelementptr inbounds %struct.Node, %struct.Node* %2, i32 %and, i32 0
|
||||
br label %cleanup
|
||||
; <label>:17: ; preds = %12
|
||||
%18 = load %struct.Node*, %struct.Node** %n, align 8, !tbaa !2
|
||||
%i_val = getelementptr inbounds %struct.Node, %struct.Node* %18, i32 0, i32 0
|
||||
store %struct.TValue* %i_val, %struct.TValue** %retval, align 8
|
||||
store i32 1, i32* %cleanup.dest.slot, align 4
|
||||
br label %22
|
||||
|
||||
if.end: ; preds = %land.lhs.true, %entry
|
||||
%call = tail call %struct.TValue* @luaH_getstr(%struct.Table* nonnull %t, %struct.TString* nonnull %key) #2
|
||||
br label %cleanup
|
||||
; <label>:19: ; preds = %12, %0
|
||||
%20 = load %struct.TString*, %struct.TString** %key.addr, align 8, !tbaa !2
|
||||
%21 = load %struct.Table*, %struct.Table** %t.addr, align 8, !tbaa !2
|
||||
%call = call %struct.TValue* @luaH_getstr(%struct.Table* %21, %struct.TString* %20)
|
||||
store %struct.TValue* %call, %struct.TValue** %retval, align 8
|
||||
store i32 1, i32* %cleanup.dest.slot, align 4
|
||||
br label %22
|
||||
|
||||
cleanup: ; preds = %if.end, %if.then
|
||||
%retval.0 = phi %struct.TValue* [ %i_val, %if.then ], [ %call, %if.end ]
|
||||
ret %struct.TValue* %retval.0
|
||||
; <label>:22: ; preds = %19, %17
|
||||
%23 = bitcast %struct.TValue** %k to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %23) #3
|
||||
%24 = bitcast %struct.Node** %n to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %24) #3
|
||||
%25 = load %struct.TValue*, %struct.TValue** %retval, align 8
|
||||
ret %struct.TValue* %25
|
||||
}
|
||||
|
||||
declare %struct.TValue* @luaH_getstr(%struct.Table*, %struct.TString*) local_unnamed_addr #1
|
||||
; Function Attrs: argmemonly nounwind
|
||||
declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
|
||||
|
||||
declare %struct.TValue* @luaH_getstr(%struct.Table*, %struct.TString*) #2
|
||||
|
||||
; Function Attrs: argmemonly nounwind
|
||||
declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
|
||||
|
||||
attributes #0 = { nounwind "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-features"="+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #1 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-features"="+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #2 = { nounwind }
|
||||
attributes #0 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-features"="+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #1 = { argmemonly nounwind }
|
||||
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-features"="+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #3 = { nounwind }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!llvm.module.flags = !{!0}
|
||||
!llvm.ident = !{!1}
|
||||
|
||||
!0 = !{!"clang version 3.9.0 (trunk)"}
|
||||
!1 = !{!2, !6, i64 8}
|
||||
!2 = !{!"TString", !3, i64 0, !4, i64 4, !4, i64 5, !4, i64 6, !4, i64 7, !6, i64 8, !4, i64 16}
|
||||
!0 = !{i32 1, !"wchar_size", i32 2}
|
||||
!1 = !{!"clang version 6.0.0 (tags/RELEASE_600/final)"}
|
||||
!2 = !{!3, !3, i64 0}
|
||||
!3 = !{!"any pointer", !4, i64 0}
|
||||
!4 = !{!"omnipotent char", !5, i64 0}
|
||||
!5 = !{!"Simple C/C++ TBAA"}
|
||||
!6 = !{!"int", !4, i64 0}
|
||||
!7 = !{!8, !6, i64 48}
|
||||
!8 = !{!"Table", !3, i64 0, !4, i64 4, !4, i64 5, !4, i64 6, !4, i64 7, !6, i64 8, !3, i64 12, !3, i64 16, !3, i64 20, !3, i64 24, !3, i64 28, !9, i64 32, !6, i64 48}
|
||||
!9 = !{!"RaviArray", !3, i64 0, !4, i64 4, !6, i64 8, !6, i64 12}
|
||||
!10 = !{!8, !3, i64 16}
|
||||
!11 = !{!12, !6, i64 8}
|
||||
!12 = !{!"TValue", !4, i64 0, !6, i64 8}
|
||||
!13 = !{!3, !3, i64 0}
|
||||
!6 = !{!7, !3, i64 24}
|
||||
!7 = !{!"Table", !3, i64 0, !4, i64 8, !4, i64 9, !4, i64 10, !4, i64 11, !8, i64 12, !3, i64 16, !3, i64 24, !3, i64 32, !3, i64 40, !3, i64 48, !9, i64 56, !8, i64 80}
|
||||
!8 = !{!"int", !4, i64 0}
|
||||
!9 = !{!"RaviArray", !3, i64 0, !8, i64 8, !8, i64 12, !4, i64 16, !4, i64 17}
|
||||
!10 = !{!11, !8, i64 12}
|
||||
!11 = !{!"TString", !3, i64 0, !4, i64 8, !4, i64 9, !4, i64 10, !4, i64 11, !8, i64 12, !4, i64 16}
|
||||
!12 = !{!7, !8, i64 80}
|
||||
!13 = !{!14, !15, i64 8}
|
||||
!14 = !{!"TValue", !4, i64 0, !15, i64 8}
|
||||
!15 = !{!"short", !4, i64 0}
|
||||
!16 = !{!4, !4, i64 0}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,79 +1,132 @@
|
||||
; ModuleID = 'lua_op_call.c'
|
||||
target datalayout = "e-m:w-p:32:32-i64:64-f80:32-n8:16:32-S32"
|
||||
target triple = "i686-pc-windows-gnu"
|
||||
source_filename = "lua_op_call.c"
|
||||
target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-pc-windows-msvc"
|
||||
|
||||
%struct.lua_State = type { %struct.GCObject*, i8, i8, i8, %struct.TValue*, %struct.global_State*, %struct.CallInfoLua*, i32*, %struct.TValue*, %struct.TValue*, %struct.UpVal*, %struct.GCObject*, %struct.lua_State*, %struct.lua_longjmp*, %struct.CallInfo, void (%struct.lua_State*, %struct.lua_Debug*)*, i64, i32, i32, i32, i16, i16, i8, i8 }
|
||||
%struct.lua_State = type { %struct.GCObject*, i8, i8, i8, %struct.TValue*, %struct.global_State*, %struct.CallInfoLua*, i32*, %struct.TValue*, %struct.TValue*, %struct.UpVal*, %struct.GCObject*, %struct.lua_State*, %struct.lua_longjmp*, %struct.CallInfo, void (%struct.lua_State*, %struct.lua_Debug*)*, i64, i32, i32, i32, i16, i16, i8, i8, i16, i8 }
|
||||
%struct.global_State = type opaque
|
||||
%struct.CallInfoLua = type { %struct.TValue*, %struct.TValue*, %struct.CallInfo*, %struct.CallInfo*, %struct.CallInfoL, i64, i16, i8, i8 }
|
||||
%struct.CallInfoLua = type { %struct.TValue*, %struct.TValue*, %struct.CallInfo*, %struct.CallInfo*, %struct.CallInfoL, i64, i16, i16, i16, i8, i8 }
|
||||
%struct.CallInfoL = type { %struct.TValue*, i32*, i64 }
|
||||
%struct.UpVal = type { %struct.TValue*, i64, %union.anon.0 }
|
||||
%union.anon.0 = type { %struct.TValue }
|
||||
%struct.TValue = type { %union.Value, i32 }
|
||||
%union.Value = type { i64 }
|
||||
%union.anon.0 = type { %struct.anon }
|
||||
%struct.anon = type { %struct.UpVal*, i32 }
|
||||
%struct.GCObject = type { %struct.GCObject*, i8, i8 }
|
||||
%struct.lua_longjmp = type opaque
|
||||
%struct.CallInfo = type { %struct.TValue*, %struct.TValue*, %struct.CallInfo*, %struct.CallInfo*, %union.anon, i64, i16, i8, i8 }
|
||||
%union.anon = type { %struct.CallInfoC }
|
||||
%struct.CallInfoC = type { i32 (%struct.lua_State*, i32, i64)*, i64, i64 }
|
||||
%struct.CallInfo = type { %struct.TValue*, %struct.TValue*, %struct.CallInfo*, %struct.CallInfo*, %union.anon, i64, i16, i16, i16, i8, i8 }
|
||||
%union.anon = type { %struct.CallInfoL }
|
||||
%struct.lua_Debug = type opaque
|
||||
%struct.TValue = type { %union.Value, i16 }
|
||||
%union.Value = type { %struct.GCObject* }
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @luaV_op_call(%struct.lua_State* %L, %struct.CallInfo* nocapture readonly %ci, %struct.TValue* %ra, i32 %b, i32 %c) #0 {
|
||||
entry:
|
||||
%sub = add nsw i32 %c, -1
|
||||
%cmp = icmp eq i32 %b, 0
|
||||
br i1 %cmp, label %if.end, label %if.then
|
||||
|
||||
if.then: ; preds = %entry
|
||||
%add.ptr = getelementptr inbounds %struct.TValue* %ra, i32 %b
|
||||
%top = getelementptr inbounds %struct.lua_State* %L, i32 0, i32 4
|
||||
store %struct.TValue* %add.ptr, %struct.TValue** %top, align 4, !tbaa !1
|
||||
br label %if.end
|
||||
|
||||
if.end: ; preds = %entry, %if.then
|
||||
%call = tail call i32 @luaD_precall(%struct.lua_State* %L, %struct.TValue* %ra, i32 %sub, i32 1) #2
|
||||
%tobool = icmp eq i32 %call, 0
|
||||
br i1 %tobool, label %if.else, label %if.then1
|
||||
|
||||
if.then1: ; preds = %if.end
|
||||
%cmp2 = icmp eq i32 %call, 1
|
||||
%cmp3 = icmp sgt i32 %c, 0
|
||||
%or.cond = and i1 %cmp3, %cmp2
|
||||
br i1 %or.cond, label %if.then4, label %if.end8
|
||||
|
||||
if.then4: ; preds = %if.then1
|
||||
%top5 = getelementptr inbounds %struct.CallInfo* %ci, i32 0, i32 1
|
||||
%0 = load %struct.TValue** %top5, align 4, !tbaa !10
|
||||
%top6 = getelementptr inbounds %struct.lua_State* %L, i32 0, i32 4
|
||||
store %struct.TValue* %0, %struct.TValue** %top6, align 4, !tbaa !1
|
||||
br label %if.end8
|
||||
|
||||
if.else: ; preds = %if.end
|
||||
tail call void @luaV_execute(%struct.lua_State* %L) #2
|
||||
br label %if.end8
|
||||
|
||||
if.end8: ; preds = %if.then1, %if.then4, %if.else
|
||||
define void @luaV_op_call(%struct.lua_State* %L, %struct.CallInfo* %ci, %struct.TValue* %ra, i32 %b, i32 %c) #0 {
|
||||
%c.addr = alloca i32, align 4
|
||||
%b.addr = alloca i32, align 4
|
||||
%ra.addr = alloca %struct.TValue*, align 8
|
||||
%ci.addr = alloca %struct.CallInfo*, align 8
|
||||
%L.addr = alloca %struct.lua_State*, align 8
|
||||
%nresults = alloca i32, align 4
|
||||
%c_or_compiled = alloca i32, align 4
|
||||
store i32 %c, i32* %c.addr, align 4, !tbaa !2
|
||||
store i32 %b, i32* %b.addr, align 4, !tbaa !2
|
||||
store %struct.TValue* %ra, %struct.TValue** %ra.addr, align 8, !tbaa !6
|
||||
store %struct.CallInfo* %ci, %struct.CallInfo** %ci.addr, align 8, !tbaa !6
|
||||
store %struct.lua_State* %L, %struct.lua_State** %L.addr, align 8, !tbaa !6
|
||||
%1 = bitcast i32* %nresults to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 4, i8* %1) #3
|
||||
%2 = load i32, i32* %c.addr, align 4, !tbaa !2
|
||||
%sub = sub nsw i32 %2, 1
|
||||
store i32 %sub, i32* %nresults, align 4, !tbaa !2
|
||||
%3 = load i32, i32* %b.addr, align 4, !tbaa !2
|
||||
%cmp = icmp ne i32 %3, 0
|
||||
br i1 %cmp, label %4, label %8
|
||||
|
||||
; <label>:4: ; preds = %0
|
||||
%5 = load %struct.TValue*, %struct.TValue** %ra.addr, align 8, !tbaa !6
|
||||
%6 = load i32, i32* %b.addr, align 4, !tbaa !2
|
||||
%idx.ext = sext i32 %6 to i64
|
||||
%add.ptr = getelementptr inbounds %struct.TValue, %struct.TValue* %5, i64 %idx.ext
|
||||
%7 = load %struct.lua_State*, %struct.lua_State** %L.addr, align 8, !tbaa !6
|
||||
%top = getelementptr inbounds %struct.lua_State, %struct.lua_State* %7, i32 0, i32 4
|
||||
store %struct.TValue* %add.ptr, %struct.TValue** %top, align 8, !tbaa !8
|
||||
br label %8
|
||||
|
||||
; <label>:8: ; preds = %4, %0
|
||||
%9 = bitcast i32* %c_or_compiled to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 4, i8* %9) #3
|
||||
%10 = load i32, i32* %nresults, align 4, !tbaa !2
|
||||
%11 = load %struct.TValue*, %struct.TValue** %ra.addr, align 8, !tbaa !6
|
||||
%12 = load %struct.lua_State*, %struct.lua_State** %L.addr, align 8, !tbaa !6
|
||||
%call = call i32 @luaD_precall(%struct.lua_State* %12, %struct.TValue* %11, i32 %10, i32 1)
|
||||
store i32 %call, i32* %c_or_compiled, align 4, !tbaa !2
|
||||
%13 = load i32, i32* %c_or_compiled, align 4, !tbaa !2
|
||||
%tobool = icmp ne i32 %13, 0
|
||||
br i1 %tobool, label %14, label %23
|
||||
|
||||
; <label>:14: ; preds = %8
|
||||
%15 = load i32, i32* %c_or_compiled, align 4, !tbaa !2
|
||||
%cmp1 = icmp eq i32 %15, 1
|
||||
br i1 %cmp1, label %16, label %22
|
||||
|
||||
; <label>:16: ; preds = %14
|
||||
%17 = load i32, i32* %nresults, align 4, !tbaa !2
|
||||
%cmp2 = icmp sge i32 %17, 0
|
||||
br i1 %cmp2, label %18, label %22
|
||||
|
||||
; <label>:18: ; preds = %16
|
||||
%19 = load %struct.CallInfo*, %struct.CallInfo** %ci.addr, align 8, !tbaa !6
|
||||
%top3 = getelementptr inbounds %struct.CallInfo, %struct.CallInfo* %19, i32 0, i32 1
|
||||
%20 = load %struct.TValue*, %struct.TValue** %top3, align 8, !tbaa !13
|
||||
%21 = load %struct.lua_State*, %struct.lua_State** %L.addr, align 8, !tbaa !6
|
||||
%top4 = getelementptr inbounds %struct.lua_State, %struct.lua_State* %21, i32 0, i32 4
|
||||
store %struct.TValue* %20, %struct.TValue** %top4, align 8, !tbaa !8
|
||||
br label %22
|
||||
|
||||
; <label>:22: ; preds = %18, %16, %14
|
||||
br label %25
|
||||
|
||||
; <label>:23: ; preds = %8
|
||||
%24 = load %struct.lua_State*, %struct.lua_State** %L.addr, align 8, !tbaa !6
|
||||
call void @luaV_execute(%struct.lua_State* %24)
|
||||
br label %25
|
||||
|
||||
; <label>:25: ; preds = %23, %22
|
||||
%26 = bitcast i32* %c_or_compiled to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 4, i8* %26) #3
|
||||
%27 = bitcast i32* %nresults to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 4, i8* %27) #3
|
||||
ret void
|
||||
}
|
||||
|
||||
declare i32 @luaD_precall(%struct.lua_State*, %struct.TValue*, i32, i32) #1
|
||||
; Function Attrs: argmemonly nounwind
|
||||
declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
|
||||
|
||||
declare i32 @luaD_precall(%struct.lua_State*, %struct.TValue*, i32, i32) #2
|
||||
|
||||
declare void @luaV_execute(%struct.lua_State*) #2
|
||||
|
||||
declare void @luaV_execute(%struct.lua_State*) #1
|
||||
; Function Attrs: argmemonly nounwind
|
||||
declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
|
||||
|
||||
attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #2 = { nounwind }
|
||||
attributes #0 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-features"="+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #1 = { argmemonly nounwind }
|
||||
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-features"="+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #3 = { nounwind }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!llvm.module.flags = !{!0}
|
||||
!llvm.ident = !{!1}
|
||||
|
||||
!0 = metadata !{metadata !"clang version 3.6.0 (trunk)"}
|
||||
!1 = metadata !{metadata !2, metadata !3, i64 8}
|
||||
!2 = metadata !{metadata !"lua_State", metadata !3, i64 0, metadata !4, i64 4, metadata !4, i64 5, metadata !4, i64 6, metadata !3, i64 8, metadata !3, i64 12, metadata !3, i64 16, metadata !3, i64 20, metadata !3, i64 24, metadata !3, i64 28, metadata !3, i64 32, metadata !3, i64 36, metadata !3, i64 40, metadata !3, i64 44, metadata !6, i64 48, metadata !3, i64 104, metadata !7, i64 112, metadata !9, i64 120, metadata !9, i64 124, metadata !9, i64 128, metadata !8, i64 132, metadata !8, i64 134, metadata !4, i64 136, metadata !4, i64 137}
|
||||
!3 = metadata !{metadata !"any pointer", metadata !4, i64 0}
|
||||
!4 = metadata !{metadata !"omnipotent char", metadata !5, i64 0}
|
||||
!5 = metadata !{metadata !"Simple C/C++ TBAA"}
|
||||
!6 = metadata !{metadata !"CallInfo", metadata !3, i64 0, metadata !3, i64 4, metadata !3, i64 8, metadata !3, i64 12, metadata !4, i64 16, metadata !7, i64 40, metadata !8, i64 48, metadata !4, i64 50, metadata !4, i64 51}
|
||||
!7 = metadata !{metadata !"long long", metadata !4, i64 0}
|
||||
!8 = metadata !{metadata !"short", metadata !4, i64 0}
|
||||
!9 = metadata !{metadata !"int", metadata !4, i64 0}
|
||||
!10 = metadata !{metadata !6, metadata !3, i64 4}
|
||||
!0 = !{i32 1, !"wchar_size", i32 2}
|
||||
!1 = !{!"clang version 6.0.0 (tags/RELEASE_600/final)"}
|
||||
!2 = !{!3, !3, i64 0}
|
||||
!3 = !{!"int", !4, i64 0}
|
||||
!4 = !{!"omnipotent char", !5, i64 0}
|
||||
!5 = !{!"Simple C/C++ TBAA"}
|
||||
!6 = !{!7, !7, i64 0}
|
||||
!7 = !{!"any pointer", !4, i64 0}
|
||||
!8 = !{!9, !7, i64 16}
|
||||
!9 = !{!"lua_State", !7, i64 0, !4, i64 8, !4, i64 9, !4, i64 10, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !10, i64 96, !7, i64 168, !11, i64 176, !3, i64 184, !3, i64 188, !3, i64 192, !12, i64 196, !12, i64 198, !4, i64 200, !4, i64 201, !12, i64 202, !4, i64 204}
|
||||
!10 = !{!"CallInfo", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !4, i64 32, !11, i64 56, !12, i64 64, !12, i64 66, !12, i64 68, !4, i64 70, !4, i64 71}
|
||||
!11 = !{!"long long", !4, i64 0}
|
||||
!12 = !{!"short", !4, i64 0}
|
||||
!13 = !{!10, !7, i64 8}
|
||||
|
@ -1,142 +1,399 @@
|
||||
; ModuleID = 'lua_op_forloop.c'
|
||||
target datalayout = "e-m:w-p:32:32-i64:64-f80:32-n8:16:32-S32"
|
||||
target triple = "i686-pc-windows-gnu"
|
||||
source_filename = "lua_op_forloop.c"
|
||||
target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-pc-windows-msvc"
|
||||
|
||||
%struct.GCObject = type { %struct.GCObject*, i8, i8 }
|
||||
%struct.lua_State = type { %struct.GCObject*, i8, i8, i8, %struct.TValue*, %struct.global_State*, %struct.CallInfoLua*, i32*, %struct.TValue*, %struct.TValue*, %struct.UpVal*, %struct.GCObject*, %struct.lua_State*, %struct.lua_longjmp*, %struct.CallInfo, void (%struct.lua_State*, %struct.lua_Debug*)*, i64, i32, i32, i32, i16, i16, i8, i8 }
|
||||
%struct.lua_State = type { %struct.GCObject*, i8, i8, i8, %struct.TValue*, %struct.global_State*, %struct.CallInfoLua*, i32*, %struct.TValue*, %struct.TValue*, %struct.UpVal*, %struct.GCObject*, %struct.lua_State*, %struct.lua_longjmp*, %struct.CallInfo, void (%struct.lua_State*, %struct.lua_Debug*)*, i64, i32, i32, i32, i16, i16, i8, i8, i16, i8 }
|
||||
%struct.global_State = type opaque
|
||||
%struct.CallInfoLua = type { %struct.TValue*, %struct.TValue*, %struct.CallInfo*, %struct.CallInfo*, %struct.CallInfoL, i64, i16, i8, i8 }
|
||||
%struct.CallInfoLua = type { %struct.TValue*, %struct.TValue*, %struct.CallInfo*, %struct.CallInfo*, %struct.CallInfoL, i64, i16, i16, i16, i8, i8 }
|
||||
%struct.CallInfoL = type { %struct.TValue*, i32*, i64 }
|
||||
%struct.TValue = type { %union.Value, i32 }
|
||||
%union.Value = type { i64 }
|
||||
%struct.TValue = type { %union.Value, i16 }
|
||||
%union.Value = type { %struct.GCObject* }
|
||||
%struct.UpVal = type { %struct.TValue*, i64, %union.anon.0 }
|
||||
%union.anon.0 = type { %struct.TValue }
|
||||
%union.anon.0 = type { %struct.anon }
|
||||
%struct.anon = type { %struct.UpVal*, i32 }
|
||||
%struct.lua_longjmp = type opaque
|
||||
%struct.CallInfo = type { %struct.TValue*, %struct.TValue*, %struct.CallInfo*, %struct.CallInfo*, %union.anon, i64, i16, i8, i8 }
|
||||
%union.anon = type { %struct.CallInfoC }
|
||||
%struct.CallInfoC = type { i32 (%struct.lua_State*, i32, i64)*, i64, i64 }
|
||||
%struct.CallInfo = type { %struct.TValue*, %struct.TValue*, %struct.CallInfo*, %struct.CallInfo*, %union.anon, i64, i16, i16, i16, i8, i8 }
|
||||
%union.anon = type { %struct.CallInfoL }
|
||||
%struct.lua_Debug = type opaque
|
||||
%struct.LClosure = type { %struct.GCObject*, i8, i8, i8, %struct.GCObject*, %struct.Proto*, [1 x %struct.UpVal*] }
|
||||
%struct.Proto = type { %struct.GCObject*, i8, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, %struct.TValue*, i32*, %struct.Proto**, i32*, %struct.LocVar*, %struct.Upvaldesc*, %struct.LClosure*, %struct.TString*, %struct.GCObject*, %struct.RaviJITProto }
|
||||
%struct.LocVar = type { %struct.TString*, %struct.TString*, i32, i32, i8 }
|
||||
%struct.Upvaldesc = type { %struct.TString*, %struct.TString*, i8, i8, i8 }
|
||||
%struct.TString = type { %struct.GCObject*, i8, i8, i8, i8, i32, %union.anon.1 }
|
||||
%union.anon.1 = type { i64 }
|
||||
%struct.RaviJITProto = type { i8, i8, i16, i8*, i32 (%struct.lua_State*)* }
|
||||
|
||||
@.str = private unnamed_addr constant [12 x i8] c"value = %d\0A\00", align 1
|
||||
@.str1 = private unnamed_addr constant [6 x i8] c"dummy\00", align 1
|
||||
$"\01??_C@_0M@KDKGEOFG@value?5?$DN?5?$CFd?6?$AA@" = comdat any
|
||||
|
||||
$"\01??_C@_05JLNEMJLN@dummy?$AA@" = comdat any
|
||||
|
||||
@"\01??_C@_0M@KDKGEOFG@value?5?$DN?5?$CFd?6?$AA@" = linkonce_odr unnamed_addr constant [12 x i8] c"value = %d\0A\00", comdat, align 1
|
||||
@"\01??_C@_05JLNEMJLN@dummy?$AA@" = linkonce_odr unnamed_addr constant [6 x i8] c"dummy\00", comdat, align 1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @testfunc(%struct.GCObject* nocapture readonly %obj) #0 {
|
||||
entry:
|
||||
%tt = getelementptr inbounds %struct.GCObject* %obj, i32 0, i32 1
|
||||
%0 = load i8* %tt, align 1, !tbaa !1
|
||||
%conv = zext i8 %0 to i32
|
||||
%call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([12 x i8]* @.str, i32 0, i32 0), i32 %conv) #1
|
||||
define void @testfunc(%struct.GCObject* %obj) #0 {
|
||||
%obj.addr = alloca %struct.GCObject*, align 8
|
||||
store %struct.GCObject* %obj, %struct.GCObject** %obj.addr, align 8, !tbaa !2
|
||||
%1 = load %struct.GCObject*, %struct.GCObject** %obj.addr, align 8, !tbaa !2
|
||||
%tt = getelementptr inbounds %struct.GCObject, %struct.GCObject* %1, i32 0, i32 1
|
||||
%2 = load i8, i8* %tt, align 8, !tbaa !6
|
||||
%conv = zext i8 %2 to i32
|
||||
%call = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @"\01??_C@_0M@KDKGEOFG@value?5?$DN?5?$CFd?6?$AA@", i32 0, i32 0), i32 %conv)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare i32 @printf(i8* nocapture readonly, ...) #0
|
||||
declare i32 @printf(i8*, ...) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @test1(%struct.lua_State* nocapture readonly %L) #0 {
|
||||
entry:
|
||||
%ci1 = getelementptr inbounds %struct.lua_State* %L, i32 0, i32 6
|
||||
%0 = load %struct.CallInfoLua** %ci1, align 4, !tbaa !6
|
||||
%base2 = getelementptr inbounds %struct.CallInfoLua* %0, i32 0, i32 4, i32 0
|
||||
%1 = load %struct.TValue** %base2, align 4, !tbaa !12
|
||||
%add.ptr = getelementptr inbounds %struct.TValue* %1, i32 1
|
||||
%tt_ = getelementptr inbounds %struct.TValue* %1, i32 1, i32 1
|
||||
%value_5 = getelementptr inbounds %struct.TValue* %1, i32 3, i32 0
|
||||
%i = getelementptr inbounds %union.Value* %value_5, i32 0, i32 0
|
||||
%i7 = getelementptr inbounds %struct.TValue* %add.ptr, i32 0, i32 0, i32 0
|
||||
%i12 = getelementptr inbounds %struct.TValue* %1, i32 2, i32 0, i32 0
|
||||
%i23 = getelementptr inbounds %struct.TValue* %1, i32 4, i32 0, i32 0
|
||||
%tt_24 = getelementptr inbounds %struct.TValue* %1, i32 4, i32 1
|
||||
%n = bitcast %union.Value* %value_5 to double*
|
||||
%n31 = bitcast %struct.TValue* %add.ptr to double*
|
||||
%value_36 = getelementptr inbounds %struct.TValue* %1, i32 2, i32 0
|
||||
%n37 = bitcast %union.Value* %value_36 to double*
|
||||
%add.ptr48 = getelementptr inbounds %struct.TValue* %1, i32 4
|
||||
%n50 = bitcast %struct.TValue* %add.ptr48 to double*
|
||||
br label %label_loopbody
|
||||
|
||||
label_loopbody: ; preds = %label_loopbody.backedge, %entry
|
||||
%call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @.str1, i32 0, i32 0)) #1
|
||||
%2 = load i32* %tt_, align 4, !tbaa !15
|
||||
%cmp = icmp eq i32 %2, 19
|
||||
br i1 %cmp, label %if.then, label %if.else
|
||||
|
||||
if.then: ; preds = %label_loopbody
|
||||
%3 = load i64* %i, align 8, !tbaa !17
|
||||
%4 = load i64* %i7, align 8, !tbaa !17
|
||||
%add8 = add nsw i64 %4, %3
|
||||
%5 = load i64* %i12, align 8, !tbaa !17
|
||||
%cmp13 = icmp sgt i64 %3, 0
|
||||
br i1 %cmp13, label %cond.true, label %cond.false
|
||||
|
||||
cond.true: ; preds = %if.then
|
||||
%cmp14 = icmp sgt i64 %add8, %5
|
||||
br i1 %cmp14, label %if.end53, label %if.then16
|
||||
|
||||
cond.false: ; preds = %if.then
|
||||
%cmp15 = icmp sgt i64 %5, %add8
|
||||
br i1 %cmp15, label %if.end53, label %if.then16
|
||||
|
||||
if.then16: ; preds = %cond.true, %cond.false
|
||||
store i64 %add8, i64* %i7, align 8, !tbaa !17
|
||||
store i32 19, i32* %tt_, align 4, !tbaa !15
|
||||
store i64 %add8, i64* %i23, align 8, !tbaa !17
|
||||
br label %label_loopbody.backedge
|
||||
|
||||
label_loopbody.backedge: ; preds = %if.then16, %if.then43
|
||||
%storemerge = phi i32 [ 3, %if.then43 ], [ 19, %if.then16 ]
|
||||
store i32 %storemerge, i32* %tt_24, align 4, !tbaa !15
|
||||
br label %label_loopbody
|
||||
|
||||
if.else: ; preds = %label_loopbody
|
||||
%6 = load double* %n, align 8, !tbaa !18
|
||||
%7 = load double* %n31, align 8, !tbaa !18
|
||||
%add32 = fadd double %6, %7
|
||||
%8 = load double* %n37, align 8, !tbaa !18
|
||||
%cmp38 = fcmp ogt double %6, 0.000000e+00
|
||||
br i1 %cmp38, label %cond.true39, label %cond.false41
|
||||
|
||||
cond.true39: ; preds = %if.else
|
||||
%cmp40 = fcmp ugt double %add32, %8
|
||||
br i1 %cmp40, label %if.end53, label %if.then43
|
||||
|
||||
cond.false41: ; preds = %if.else
|
||||
%cmp42 = fcmp ugt double %8, %add32
|
||||
br i1 %cmp42, label %if.end53, label %if.then43
|
||||
|
||||
if.then43: ; preds = %cond.true39, %cond.false41
|
||||
store double %add32, double* %n31, align 8, !tbaa !18
|
||||
store i32 3, i32* %tt_, align 4, !tbaa !15
|
||||
store double %add32, double* %n50, align 8, !tbaa !18
|
||||
br label %label_loopbody.backedge
|
||||
|
||||
if.end53: ; preds = %cond.true, %cond.false, %cond.true39, %cond.false41
|
||||
define void @test1(%struct.lua_State* %L) #0 {
|
||||
%L.addr = alloca %struct.lua_State*, align 8
|
||||
%ci = alloca %struct.CallInfoLua*, align 8
|
||||
%cl = alloca %struct.LClosure*, align 8
|
||||
%k = alloca %struct.TValue*, align 8
|
||||
%base = alloca %struct.TValue*, align 8
|
||||
%cil = alloca %struct.CallInfoL*, align 8
|
||||
%ra = alloca %struct.TValue*, align 8
|
||||
%rb = alloca %struct.TValue*, align 8
|
||||
%rc = alloca %struct.TValue*, align 8
|
||||
%rd = alloca %struct.TValue*, align 8
|
||||
%A = alloca i32, align 4
|
||||
%step = alloca i64, align 8
|
||||
%idx = alloca i64, align 8
|
||||
%limit = alloca i64, align 8
|
||||
%cleanup.dest.slot = alloca i32
|
||||
%step34 = alloca double, align 8
|
||||
%idx36 = alloca double, align 8
|
||||
%limit43 = alloca double, align 8
|
||||
store %struct.lua_State* %L, %struct.lua_State** %L.addr, align 8, !tbaa !2
|
||||
%1 = bitcast %struct.CallInfoLua** %ci to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %1) #3
|
||||
%2 = bitcast %struct.LClosure** %cl to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %2) #3
|
||||
%3 = bitcast %struct.TValue** %k to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %3) #3
|
||||
%4 = bitcast %struct.TValue** %base to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %4) #3
|
||||
%5 = bitcast %struct.CallInfoL** %cil to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %5) #3
|
||||
%6 = bitcast %struct.TValue** %ra to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %6) #3
|
||||
%7 = bitcast %struct.TValue** %rb to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %7) #3
|
||||
%8 = bitcast %struct.TValue** %rc to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %8) #3
|
||||
%9 = bitcast %struct.TValue** %rd to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %9) #3
|
||||
%10 = bitcast i32* %A to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 4, i8* %10) #3
|
||||
%11 = load %struct.lua_State*, %struct.lua_State** %L.addr, align 8, !tbaa !2
|
||||
%ci1 = getelementptr inbounds %struct.lua_State, %struct.lua_State* %11, i32 0, i32 6
|
||||
%12 = load %struct.CallInfoLua*, %struct.CallInfoLua** %ci1, align 8, !tbaa !8
|
||||
store %struct.CallInfoLua* %12, %struct.CallInfoLua** %ci, align 8, !tbaa !2
|
||||
%13 = load %struct.CallInfoLua*, %struct.CallInfoLua** %ci, align 8, !tbaa !2
|
||||
%l = getelementptr inbounds %struct.CallInfoLua, %struct.CallInfoLua* %13, i32 0, i32 4
|
||||
%base2 = getelementptr inbounds %struct.CallInfoL, %struct.CallInfoL* %l, i32 0, i32 0
|
||||
%14 = load %struct.TValue*, %struct.TValue** %base2, align 8, !tbaa !14
|
||||
store %struct.TValue* %14, %struct.TValue** %base, align 8, !tbaa !2
|
||||
%15 = load %struct.CallInfoLua*, %struct.CallInfoLua** %ci, align 8, !tbaa !2
|
||||
%func = getelementptr inbounds %struct.CallInfoLua, %struct.CallInfoLua* %15, i32 0, i32 0
|
||||
%16 = load %struct.TValue*, %struct.TValue** %func, align 8, !tbaa !17
|
||||
%value_ = getelementptr inbounds %struct.TValue, %struct.TValue* %16, i32 0, i32 0
|
||||
%gc = bitcast %union.Value* %value_ to %struct.GCObject**
|
||||
%17 = load %struct.GCObject*, %struct.GCObject** %gc, align 8, !tbaa !18
|
||||
%18 = bitcast %struct.GCObject* %17 to %struct.LClosure*
|
||||
store %struct.LClosure* %18, %struct.LClosure** %cl, align 8, !tbaa !2
|
||||
%19 = load %struct.LClosure*, %struct.LClosure** %cl, align 8, !tbaa !2
|
||||
%p = getelementptr inbounds %struct.LClosure, %struct.LClosure* %19, i32 0, i32 5
|
||||
%20 = load %struct.Proto*, %struct.Proto** %p, align 8, !tbaa !19
|
||||
%k3 = getelementptr inbounds %struct.Proto, %struct.Proto* %20, i32 0, i32 14
|
||||
%21 = load %struct.TValue*, %struct.TValue** %k3, align 8, !tbaa !21
|
||||
store %struct.TValue* %21, %struct.TValue** %k, align 8, !tbaa !2
|
||||
br label %22
|
||||
|
||||
; <label>:22: ; preds = %97, %60, %0
|
||||
%call = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @"\01??_C@_05JLNEMJLN@dummy?$AA@", i32 0, i32 0))
|
||||
br label %23
|
||||
|
||||
; <label>:23: ; preds = %22
|
||||
store i32 1, i32* %A, align 4, !tbaa !24
|
||||
%24 = load %struct.TValue*, %struct.TValue** %base, align 8, !tbaa !2
|
||||
%25 = load i32, i32* %A, align 4, !tbaa !24
|
||||
%idx.ext = sext i32 %25 to i64
|
||||
%add.ptr = getelementptr inbounds %struct.TValue, %struct.TValue* %24, i64 %idx.ext
|
||||
store %struct.TValue* %add.ptr, %struct.TValue** %ra, align 8, !tbaa !2
|
||||
%26 = load %struct.TValue*, %struct.TValue** %ra, align 8, !tbaa !2
|
||||
%tt_ = getelementptr inbounds %struct.TValue, %struct.TValue* %26, i32 0, i32 1
|
||||
%27 = load i16, i16* %tt_, align 8, !tbaa !25
|
||||
%conv = zext i16 %27 to i32
|
||||
%cmp = icmp eq i32 %conv, 19
|
||||
br i1 %cmp, label %28, label %65
|
||||
|
||||
; <label>:28: ; preds = %23
|
||||
%29 = load %struct.TValue*, %struct.TValue** %base, align 8, !tbaa !2
|
||||
%30 = load i32, i32* %A, align 4, !tbaa !24
|
||||
%add = add nsw i32 %30, 2
|
||||
%idx.ext5 = sext i32 %add to i64
|
||||
%add.ptr6 = getelementptr inbounds %struct.TValue, %struct.TValue* %29, i64 %idx.ext5
|
||||
store %struct.TValue* %add.ptr6, %struct.TValue** %rb, align 8, !tbaa !2
|
||||
%31 = bitcast i64* %step to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %31) #3
|
||||
%32 = load %struct.TValue*, %struct.TValue** %rb, align 8, !tbaa !2
|
||||
%value_7 = getelementptr inbounds %struct.TValue, %struct.TValue* %32, i32 0, i32 0
|
||||
%i = bitcast %union.Value* %value_7 to i64*
|
||||
%33 = load i64, i64* %i, align 8, !tbaa !18
|
||||
store i64 %33, i64* %step, align 8, !tbaa !27
|
||||
%34 = bitcast i64* %idx to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %34) #3
|
||||
%35 = load %struct.TValue*, %struct.TValue** %ra, align 8, !tbaa !2
|
||||
%value_8 = getelementptr inbounds %struct.TValue, %struct.TValue* %35, i32 0, i32 0
|
||||
%i9 = bitcast %union.Value* %value_8 to i64*
|
||||
%36 = load i64, i64* %i9, align 8, !tbaa !18
|
||||
%37 = load i64, i64* %step, align 8, !tbaa !27
|
||||
%add10 = add nsw i64 %36, %37
|
||||
store i64 %add10, i64* %idx, align 8, !tbaa !27
|
||||
%38 = load %struct.TValue*, %struct.TValue** %base, align 8, !tbaa !2
|
||||
%39 = load i32, i32* %A, align 4, !tbaa !24
|
||||
%add11 = add nsw i32 %39, 1
|
||||
%idx.ext12 = sext i32 %add11 to i64
|
||||
%add.ptr13 = getelementptr inbounds %struct.TValue, %struct.TValue* %38, i64 %idx.ext12
|
||||
store %struct.TValue* %add.ptr13, %struct.TValue** %rc, align 8, !tbaa !2
|
||||
%40 = bitcast i64* %limit to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %40) #3
|
||||
%41 = load %struct.TValue*, %struct.TValue** %rc, align 8, !tbaa !2
|
||||
%value_14 = getelementptr inbounds %struct.TValue, %struct.TValue* %41, i32 0, i32 0
|
||||
%i15 = bitcast %union.Value* %value_14 to i64*
|
||||
%42 = load i64, i64* %i15, align 8, !tbaa !18
|
||||
store i64 %42, i64* %limit, align 8, !tbaa !27
|
||||
%43 = load i64, i64* %step, align 8, !tbaa !27
|
||||
%cmp16 = icmp slt i64 0, %43
|
||||
br i1 %cmp16, label %44, label %47
|
||||
|
||||
; <label>:44: ; preds = %28
|
||||
%45 = load i64, i64* %idx, align 8, !tbaa !27
|
||||
%46 = load i64, i64* %limit, align 8, !tbaa !27
|
||||
%cmp18 = icmp sle i64 %45, %46
|
||||
br i1 %cmp18, label %50, label %59
|
||||
|
||||
; <label>:47: ; preds = %28
|
||||
%48 = load i64, i64* %limit, align 8, !tbaa !27
|
||||
%49 = load i64, i64* %idx, align 8, !tbaa !27
|
||||
%cmp20 = icmp sle i64 %48, %49
|
||||
br i1 %cmp20, label %50, label %59
|
||||
|
||||
; <label>:50: ; preds = %47, %44
|
||||
%51 = load i64, i64* %idx, align 8, !tbaa !27
|
||||
%52 = load %struct.TValue*, %struct.TValue** %ra, align 8, !tbaa !2
|
||||
%value_22 = getelementptr inbounds %struct.TValue, %struct.TValue* %52, i32 0, i32 0
|
||||
%i23 = bitcast %union.Value* %value_22 to i64*
|
||||
store i64 %51, i64* %i23, align 8, !tbaa !18
|
||||
%53 = load %struct.TValue*, %struct.TValue** %ra, align 8, !tbaa !2
|
||||
%tt_24 = getelementptr inbounds %struct.TValue, %struct.TValue* %53, i32 0, i32 1
|
||||
store i16 19, i16* %tt_24, align 8, !tbaa !25
|
||||
%54 = load %struct.TValue*, %struct.TValue** %base, align 8, !tbaa !2
|
||||
%55 = load i32, i32* %A, align 4, !tbaa !24
|
||||
%add25 = add nsw i32 %55, 3
|
||||
%idx.ext26 = sext i32 %add25 to i64
|
||||
%add.ptr27 = getelementptr inbounds %struct.TValue, %struct.TValue* %54, i64 %idx.ext26
|
||||
store %struct.TValue* %add.ptr27, %struct.TValue** %rd, align 8, !tbaa !2
|
||||
%56 = load i64, i64* %idx, align 8, !tbaa !27
|
||||
%57 = load %struct.TValue*, %struct.TValue** %rd, align 8, !tbaa !2
|
||||
%value_28 = getelementptr inbounds %struct.TValue, %struct.TValue* %57, i32 0, i32 0
|
||||
%i29 = bitcast %union.Value* %value_28 to i64*
|
||||
store i64 %56, i64* %i29, align 8, !tbaa !18
|
||||
%58 = load %struct.TValue*, %struct.TValue** %rd, align 8, !tbaa !2
|
||||
%tt_30 = getelementptr inbounds %struct.TValue, %struct.TValue* %58, i32 0, i32 1
|
||||
store i16 19, i16* %tt_30, align 8, !tbaa !25
|
||||
store i32 2, i32* %cleanup.dest.slot, align 4
|
||||
br label %60
|
||||
|
||||
; <label>:59: ; preds = %47, %44
|
||||
store i32 0, i32* %cleanup.dest.slot, align 4
|
||||
br label %60
|
||||
|
||||
; <label>:60: ; preds = %59, %50
|
||||
%61 = bitcast i64* %limit to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %61) #3
|
||||
%62 = bitcast i64* %idx to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %62) #3
|
||||
%63 = bitcast i64* %step to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %63) #3
|
||||
%cleanup.dest = load i32, i32* %cleanup.dest.slot, align 4
|
||||
switch i32 %cleanup.dest, label %113 [
|
||||
i32 0, label %64
|
||||
i32 2, label %22
|
||||
]
|
||||
|
||||
; <label>:64: ; preds = %60
|
||||
br label %102
|
||||
|
||||
; <label>:65: ; preds = %23
|
||||
%66 = load %struct.TValue*, %struct.TValue** %base, align 8, !tbaa !2
|
||||
%67 = load i32, i32* %A, align 4, !tbaa !24
|
||||
%add31 = add nsw i32 %67, 2
|
||||
%idx.ext32 = sext i32 %add31 to i64
|
||||
%add.ptr33 = getelementptr inbounds %struct.TValue, %struct.TValue* %66, i64 %idx.ext32
|
||||
store %struct.TValue* %add.ptr33, %struct.TValue** %rb, align 8, !tbaa !2
|
||||
%68 = bitcast double* %step34 to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %68) #3
|
||||
%69 = load %struct.TValue*, %struct.TValue** %rb, align 8, !tbaa !2
|
||||
%value_35 = getelementptr inbounds %struct.TValue, %struct.TValue* %69, i32 0, i32 0
|
||||
%n = bitcast %union.Value* %value_35 to double*
|
||||
%70 = load double, double* %n, align 8, !tbaa !18
|
||||
store double %70, double* %step34, align 8, !tbaa !28
|
||||
%71 = bitcast double* %idx36 to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %71) #3
|
||||
%72 = load %struct.TValue*, %struct.TValue** %ra, align 8, !tbaa !2
|
||||
%value_37 = getelementptr inbounds %struct.TValue, %struct.TValue* %72, i32 0, i32 0
|
||||
%n38 = bitcast %union.Value* %value_37 to double*
|
||||
%73 = load double, double* %n38, align 8, !tbaa !18
|
||||
%74 = load double, double* %step34, align 8, !tbaa !28
|
||||
%add39 = fadd double %73, %74
|
||||
store double %add39, double* %idx36, align 8, !tbaa !28
|
||||
%75 = load %struct.TValue*, %struct.TValue** %base, align 8, !tbaa !2
|
||||
%76 = load i32, i32* %A, align 4, !tbaa !24
|
||||
%add40 = add nsw i32 %76, 1
|
||||
%idx.ext41 = sext i32 %add40 to i64
|
||||
%add.ptr42 = getelementptr inbounds %struct.TValue, %struct.TValue* %75, i64 %idx.ext41
|
||||
store %struct.TValue* %add.ptr42, %struct.TValue** %rc, align 8, !tbaa !2
|
||||
%77 = bitcast double* %limit43 to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %77) #3
|
||||
%78 = load %struct.TValue*, %struct.TValue** %rc, align 8, !tbaa !2
|
||||
%value_44 = getelementptr inbounds %struct.TValue, %struct.TValue* %78, i32 0, i32 0
|
||||
%n45 = bitcast %union.Value* %value_44 to double*
|
||||
%79 = load double, double* %n45, align 8, !tbaa !18
|
||||
store double %79, double* %limit43, align 8, !tbaa !28
|
||||
%80 = load double, double* %step34, align 8, !tbaa !28
|
||||
%cmp46 = fcmp olt double 0.000000e+00, %80
|
||||
br i1 %cmp46, label %81, label %84
|
||||
|
||||
; <label>:81: ; preds = %65
|
||||
%82 = load double, double* %idx36, align 8, !tbaa !28
|
||||
%83 = load double, double* %limit43, align 8, !tbaa !28
|
||||
%cmp48 = fcmp ole double %82, %83
|
||||
br i1 %cmp48, label %87, label %96
|
||||
|
||||
; <label>:84: ; preds = %65
|
||||
%85 = load double, double* %limit43, align 8, !tbaa !28
|
||||
%86 = load double, double* %idx36, align 8, !tbaa !28
|
||||
%cmp50 = fcmp ole double %85, %86
|
||||
br i1 %cmp50, label %87, label %96
|
||||
|
||||
; <label>:87: ; preds = %84, %81
|
||||
%88 = load double, double* %idx36, align 8, !tbaa !28
|
||||
%89 = load %struct.TValue*, %struct.TValue** %ra, align 8, !tbaa !2
|
||||
%value_52 = getelementptr inbounds %struct.TValue, %struct.TValue* %89, i32 0, i32 0
|
||||
%n53 = bitcast %union.Value* %value_52 to double*
|
||||
store double %88, double* %n53, align 8, !tbaa !18
|
||||
%90 = load %struct.TValue*, %struct.TValue** %ra, align 8, !tbaa !2
|
||||
%tt_54 = getelementptr inbounds %struct.TValue, %struct.TValue* %90, i32 0, i32 1
|
||||
store i16 3, i16* %tt_54, align 8, !tbaa !25
|
||||
%91 = load %struct.TValue*, %struct.TValue** %base, align 8, !tbaa !2
|
||||
%92 = load i32, i32* %A, align 4, !tbaa !24
|
||||
%add55 = add nsw i32 %92, 3
|
||||
%idx.ext56 = sext i32 %add55 to i64
|
||||
%add.ptr57 = getelementptr inbounds %struct.TValue, %struct.TValue* %91, i64 %idx.ext56
|
||||
store %struct.TValue* %add.ptr57, %struct.TValue** %rd, align 8, !tbaa !2
|
||||
%93 = load double, double* %idx36, align 8, !tbaa !28
|
||||
%94 = load %struct.TValue*, %struct.TValue** %rd, align 8, !tbaa !2
|
||||
%value_58 = getelementptr inbounds %struct.TValue, %struct.TValue* %94, i32 0, i32 0
|
||||
%n59 = bitcast %union.Value* %value_58 to double*
|
||||
store double %93, double* %n59, align 8, !tbaa !18
|
||||
%95 = load %struct.TValue*, %struct.TValue** %rd, align 8, !tbaa !2
|
||||
%tt_60 = getelementptr inbounds %struct.TValue, %struct.TValue* %95, i32 0, i32 1
|
||||
store i16 3, i16* %tt_60, align 8, !tbaa !25
|
||||
store i32 2, i32* %cleanup.dest.slot, align 4
|
||||
br label %97
|
||||
|
||||
; <label>:96: ; preds = %84, %81
|
||||
store i32 0, i32* %cleanup.dest.slot, align 4
|
||||
br label %97
|
||||
|
||||
; <label>:97: ; preds = %96, %87
|
||||
%98 = bitcast double* %limit43 to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %98) #3
|
||||
%99 = bitcast double* %idx36 to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %99) #3
|
||||
%100 = bitcast double* %step34 to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %100) #3
|
||||
%cleanup.dest61 = load i32, i32* %cleanup.dest.slot, align 4
|
||||
switch i32 %cleanup.dest61, label %113 [
|
||||
i32 0, label %101
|
||||
i32 2, label %22
|
||||
]
|
||||
|
||||
; <label>:101: ; preds = %97
|
||||
br label %102
|
||||
|
||||
; <label>:102: ; preds = %101, %64
|
||||
%103 = bitcast i32* %A to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 4, i8* %103) #3
|
||||
%104 = bitcast %struct.TValue** %rd to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %104) #3
|
||||
%105 = bitcast %struct.TValue** %rc to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %105) #3
|
||||
%106 = bitcast %struct.TValue** %rb to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %106) #3
|
||||
%107 = bitcast %struct.TValue** %ra to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %107) #3
|
||||
%108 = bitcast %struct.CallInfoL** %cil to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %108) #3
|
||||
%109 = bitcast %struct.TValue** %base to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %109) #3
|
||||
%110 = bitcast %struct.TValue** %k to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %110) #3
|
||||
%111 = bitcast %struct.LClosure** %cl to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %111) #3
|
||||
%112 = bitcast %struct.CallInfoLua** %ci to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %112) #3
|
||||
ret void
|
||||
|
||||
; <label>:113: ; preds = %97, %60
|
||||
unreachable
|
||||
}
|
||||
|
||||
attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #1 = { nounwind }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
|
||||
!0 = metadata !{metadata !"clang version 3.6.0 (trunk)"}
|
||||
!1 = metadata !{metadata !2, metadata !4, i64 4}
|
||||
!2 = metadata !{metadata !"GCObject", metadata !3, i64 0, metadata !4, i64 4, metadata !4, i64 5}
|
||||
!3 = metadata !{metadata !"any pointer", metadata !4, i64 0}
|
||||
!4 = metadata !{metadata !"omnipotent char", metadata !5, i64 0}
|
||||
!5 = metadata !{metadata !"Simple C/C++ TBAA"}
|
||||
!6 = metadata !{metadata !7, metadata !3, i64 16}
|
||||
!7 = metadata !{metadata !"lua_State", metadata !3, i64 0, metadata !4, i64 4, metadata !4, i64 5, metadata !4, i64 6, metadata !3, i64 8, metadata !3, i64 12, metadata !3, i64 16, metadata !3, i64 20, metadata !3, i64 24, metadata !3, i64 28, metadata !3, i64 32, metadata !3, i64 36, metadata !3, i64 40, metadata !3, i64 44, metadata !8, i64 48, metadata !3, i64 104, metadata !9, i64 112, metadata !11, i64 120, metadata !11, i64 124, metadata !11, i64 128, metadata !10, i64 132, metadata !10, i64 134, metadata !4, i64 136, metadata !4, i64 137}
|
||||
!8 = metadata !{metadata !"CallInfo", metadata !3, i64 0, metadata !3, i64 4, metadata !3, i64 8, metadata !3, i64 12, metadata !4, i64 16, metadata !9, i64 40, metadata !10, i64 48, metadata !4, i64 50, metadata !4, i64 51}
|
||||
!9 = metadata !{metadata !"long long", metadata !4, i64 0}
|
||||
!10 = metadata !{metadata !"short", metadata !4, i64 0}
|
||||
!11 = metadata !{metadata !"int", metadata !4, i64 0}
|
||||
!12 = metadata !{metadata !13, metadata !3, i64 16}
|
||||
!13 = metadata !{metadata !"CallInfoLua", metadata !3, i64 0, metadata !3, i64 4, metadata !3, i64 8, metadata !3, i64 12, metadata !14, i64 16, metadata !9, i64 32, metadata !10, i64 40, metadata !4, i64 42, metadata !4, i64 43}
|
||||
!14 = metadata !{metadata !"CallInfoL", metadata !3, i64 0, metadata !3, i64 4, metadata !9, i64 8}
|
||||
!15 = metadata !{metadata !16, metadata !11, i64 8}
|
||||
!16 = metadata !{metadata !"TValue", metadata !4, i64 0, metadata !11, i64 8}
|
||||
!17 = metadata !{metadata !9, metadata !9, i64 0}
|
||||
!18 = metadata !{metadata !19, metadata !19, i64 0}
|
||||
!19 = metadata !{metadata !"double", metadata !4, i64 0}
|
||||
; Function Attrs: argmemonly nounwind
|
||||
declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #2
|
||||
|
||||
; Function Attrs: argmemonly nounwind
|
||||
declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #2
|
||||
|
||||
attributes #0 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-features"="+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-features"="+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #2 = { argmemonly nounwind }
|
||||
attributes #3 = { nounwind }
|
||||
|
||||
!llvm.module.flags = !{!0}
|
||||
!llvm.ident = !{!1}
|
||||
|
||||
!0 = !{i32 1, !"wchar_size", i32 2}
|
||||
!1 = !{!"clang version 6.0.0 (tags/RELEASE_600/final)"}
|
||||
!2 = !{!3, !3, i64 0}
|
||||
!3 = !{!"any pointer", !4, i64 0}
|
||||
!4 = !{!"omnipotent char", !5, i64 0}
|
||||
!5 = !{!"Simple C/C++ TBAA"}
|
||||
!6 = !{!7, !4, i64 8}
|
||||
!7 = !{!"GCObject", !3, i64 0, !4, i64 8, !4, i64 9}
|
||||
!8 = !{!9, !3, i64 32}
|
||||
!9 = !{!"lua_State", !3, i64 0, !4, i64 8, !4, i64 9, !4, i64 10, !3, i64 16, !3, i64 24, !3, i64 32, !3, i64 40, !3, i64 48, !3, i64 56, !3, i64 64, !3, i64 72, !3, i64 80, !3, i64 88, !10, i64 96, !3, i64 168, !11, i64 176, !13, i64 184, !13, i64 188, !13, i64 192, !12, i64 196, !12, i64 198, !4, i64 200, !4, i64 201, !12, i64 202, !4, i64 204}
|
||||
!10 = !{!"CallInfo", !3, i64 0, !3, i64 8, !3, i64 16, !3, i64 24, !4, i64 32, !11, i64 56, !12, i64 64, !12, i64 66, !12, i64 68, !4, i64 70, !4, i64 71}
|
||||
!11 = !{!"long long", !4, i64 0}
|
||||
!12 = !{!"short", !4, i64 0}
|
||||
!13 = !{!"int", !4, i64 0}
|
||||
!14 = !{!15, !3, i64 32}
|
||||
!15 = !{!"CallInfoLua", !3, i64 0, !3, i64 8, !3, i64 16, !3, i64 24, !16, i64 32, !11, i64 56, !12, i64 64, !12, i64 66, !12, i64 68, !4, i64 70, !4, i64 71}
|
||||
!16 = !{!"CallInfoL", !3, i64 0, !3, i64 8, !11, i64 16}
|
||||
!17 = !{!15, !3, i64 0}
|
||||
!18 = !{!4, !4, i64 0}
|
||||
!19 = !{!20, !3, i64 24}
|
||||
!20 = !{!"LClosure", !3, i64 0, !4, i64 8, !4, i64 9, !4, i64 10, !3, i64 16, !3, i64 24, !4, i64 32}
|
||||
!21 = !{!22, !3, i64 48}
|
||||
!22 = !{!"Proto", !3, i64 0, !4, i64 8, !4, i64 9, !4, i64 10, !4, i64 11, !4, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !3, i64 48, !3, i64 56, !3, i64 64, !3, i64 72, !3, i64 80, !3, i64 88, !3, i64 96, !3, i64 104, !3, i64 112, !23, i64 120}
|
||||
!23 = !{!"RaviJITProto", !4, i64 0, !4, i64 1, !12, i64 2, !3, i64 8, !3, i64 16}
|
||||
!24 = !{!13, !13, i64 0}
|
||||
!25 = !{!26, !12, i64 8}
|
||||
!26 = !{!"TValue", !4, i64 0, !12, i64 8}
|
||||
!27 = !{!11, !11, i64 0}
|
||||
!28 = !{!29, !29, i64 0}
|
||||
!29 = !{!"double", !4, i64 0}
|
||||
|
@ -1,204 +1,458 @@
|
||||
; ModuleID = 'lua_op_forprep.c'
|
||||
target datalayout = "e-m:w-p:32:32-i64:64-f80:32-n8:16:32-S32"
|
||||
target triple = "i686-pc-windows-gnu"
|
||||
source_filename = "lua_op_forprep.c"
|
||||
target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-pc-windows-msvc"
|
||||
|
||||
%struct.GCObject = type { %struct.GCObject*, i8, i8 }
|
||||
%struct.lua_State = type { %struct.GCObject*, i8, i8, i8, %struct.TValue*, %struct.global_State*, %struct.CallInfoLua*, i32*, %struct.TValue*, %struct.TValue*, %struct.UpVal*, %struct.GCObject*, %struct.lua_State*, %struct.lua_longjmp*, %struct.CallInfo, void (%struct.lua_State*, %struct.lua_Debug*)*, i64, i32, i32, i32, i16, i16, i8, i8 }
|
||||
%struct.lua_State = type { %struct.GCObject*, i8, i8, i8, %struct.TValue*, %struct.global_State*, %struct.CallInfoLua*, i32*, %struct.TValue*, %struct.TValue*, %struct.UpVal*, %struct.GCObject*, %struct.lua_State*, %struct.lua_longjmp*, %struct.CallInfo, void (%struct.lua_State*, %struct.lua_Debug*)*, i64, i32, i32, i32, i16, i16, i8, i8, i16, i8 }
|
||||
%struct.global_State = type opaque
|
||||
%struct.CallInfoLua = type { %struct.TValue*, %struct.TValue*, %struct.CallInfo*, %struct.CallInfo*, %struct.CallInfoL, i64, i16, i8, i8 }
|
||||
%struct.CallInfoLua = type { %struct.TValue*, %struct.TValue*, %struct.CallInfo*, %struct.CallInfo*, %struct.CallInfoL, i64, i16, i16, i16, i8, i8 }
|
||||
%struct.CallInfoL = type { %struct.TValue*, i32*, i64 }
|
||||
%struct.TValue = type { %union.Value, i32 }
|
||||
%union.Value = type { i64 }
|
||||
%struct.TValue = type { %union.Value, i16 }
|
||||
%union.Value = type { %struct.GCObject* }
|
||||
%struct.UpVal = type { %struct.TValue*, i64, %union.anon.0 }
|
||||
%union.anon.0 = type { %struct.TValue }
|
||||
%union.anon.0 = type { %struct.anon }
|
||||
%struct.anon = type { %struct.UpVal*, i32 }
|
||||
%struct.lua_longjmp = type opaque
|
||||
%struct.CallInfo = type { %struct.TValue*, %struct.TValue*, %struct.CallInfo*, %struct.CallInfo*, %union.anon, i64, i16, i8, i8 }
|
||||
%union.anon = type { %struct.CallInfoC }
|
||||
%struct.CallInfoC = type { i32 (%struct.lua_State*, i32, i64)*, i64, i64 }
|
||||
%struct.CallInfo = type { %struct.TValue*, %struct.TValue*, %struct.CallInfo*, %struct.CallInfo*, %union.anon, i64, i16, i16, i16, i8, i8 }
|
||||
%union.anon = type { %struct.CallInfoL }
|
||||
%struct.lua_Debug = type opaque
|
||||
%struct.LClosure = type { %struct.GCObject*, i8, i8, i8, %struct.GCObject*, %struct.Proto*, [1 x %struct.UpVal*] }
|
||||
%struct.Proto = type { %struct.GCObject*, i8, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, %struct.TValue*, i32*, %struct.Proto**, i32*, %struct.LocVar*, %struct.Upvaldesc*, %struct.LClosure*, %struct.TString*, %struct.GCObject*, %struct.RaviJITProto }
|
||||
%struct.LocVar = type { %struct.TString*, %struct.TString*, i32, i32, i8 }
|
||||
%struct.Upvaldesc = type { %struct.TString*, %struct.TString*, i8, i8, i8 }
|
||||
%struct.TString = type { %struct.GCObject*, i8, i8, i8, i8, i32, %union.anon.1 }
|
||||
%union.anon.1 = type { i64 }
|
||||
%struct.RaviJITProto = type { i8, i8, i16, i8*, i32 (%struct.lua_State*)* }
|
||||
|
||||
@.str = private unnamed_addr constant [12 x i8] c"value = %d\0A\00", align 1
|
||||
@.str1 = private unnamed_addr constant [29 x i8] c"'for' limit must be a number\00", align 1
|
||||
@.str2 = private unnamed_addr constant [28 x i8] c"'for' step must be a number\00", align 1
|
||||
@.str3 = private unnamed_addr constant [37 x i8] c"'for' initial value must be a number\00", align 1
|
||||
$"\01??_C@_0M@KDKGEOFG@value?5?$DN?5?$CFd?6?$AA@" = comdat any
|
||||
|
||||
$"\01??_C@_0BN@GHPMJMPH@?8for?8?5limit?5must?5be?5a?5number?$AA@" = comdat any
|
||||
|
||||
$"\01??_C@_0BM@EGCFKNIJ@?8for?8?5step?5must?5be?5a?5number?$AA@" = comdat any
|
||||
|
||||
$"\01??_C@_0CF@JJFDEONC@?8for?8?5initial?5value?5must?5be?5a?5nu@" = comdat any
|
||||
|
||||
@"\01??_C@_0M@KDKGEOFG@value?5?$DN?5?$CFd?6?$AA@" = linkonce_odr unnamed_addr constant [12 x i8] c"value = %d\0A\00", comdat, align 1
|
||||
@"\01??_C@_0BN@GHPMJMPH@?8for?8?5limit?5must?5be?5a?5number?$AA@" = linkonce_odr unnamed_addr constant [29 x i8] c"'for' limit must be a number\00", comdat, align 1
|
||||
@"\01??_C@_0BM@EGCFKNIJ@?8for?8?5step?5must?5be?5a?5number?$AA@" = linkonce_odr unnamed_addr constant [28 x i8] c"'for' step must be a number\00", comdat, align 1
|
||||
@"\01??_C@_0CF@JJFDEONC@?8for?8?5initial?5value?5must?5be?5a?5nu@" = linkonce_odr unnamed_addr constant [37 x i8] c"'for' initial value must be a number\00", comdat, align 1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @testfunc(%struct.GCObject* nocapture readonly %obj) #0 {
|
||||
entry:
|
||||
%tt = getelementptr inbounds %struct.GCObject* %obj, i32 0, i32 1
|
||||
%0 = load i8* %tt, align 1, !tbaa !1
|
||||
%conv = zext i8 %0 to i32
|
||||
%call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([12 x i8]* @.str, i32 0, i32 0), i32 %conv) #2
|
||||
define void @testfunc(%struct.GCObject* %obj) #0 {
|
||||
%obj.addr = alloca %struct.GCObject*, align 8
|
||||
store %struct.GCObject* %obj, %struct.GCObject** %obj.addr, align 8, !tbaa !2
|
||||
%1 = load %struct.GCObject*, %struct.GCObject** %obj.addr, align 8, !tbaa !2
|
||||
%tt = getelementptr inbounds %struct.GCObject, %struct.GCObject* %1, i32 0, i32 1
|
||||
%2 = load i8, i8* %tt, align 8, !tbaa !6
|
||||
%conv = zext i8 %2 to i32
|
||||
%call = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @"\01??_C@_0M@KDKGEOFG@value?5?$DN?5?$CFd?6?$AA@", i32 0, i32 0), i32 %conv)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare i32 @printf(i8* nocapture readonly, ...) #0
|
||||
declare i32 @printf(i8*, ...) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @test1(%struct.lua_State* %L) #0 {
|
||||
entry:
|
||||
%L.addr = alloca %struct.lua_State*, align 8
|
||||
%ci = alloca %struct.CallInfoLua*, align 8
|
||||
%cl = alloca %struct.LClosure*, align 8
|
||||
%k = alloca %struct.TValue*, align 8
|
||||
%base = alloca %struct.TValue*, align 8
|
||||
%cil = alloca %struct.CallInfoL*, align 8
|
||||
%b = alloca i32, align 4
|
||||
%A = alloca i32, align 4
|
||||
%A1 = alloca i32, align 4
|
||||
%A2 = alloca i32, align 4
|
||||
%init = alloca %struct.TValue*, align 8
|
||||
%plimit = alloca %struct.TValue*, align 8
|
||||
%pstep = alloca %struct.TValue*, align 8
|
||||
%ilimit = alloca i64, align 8
|
||||
%stopnow = alloca i32, align 4
|
||||
%init_is_integer = alloca i32, align 4
|
||||
%pstep_is_integer = alloca i32, align 4
|
||||
%fl = alloca i32, align 4
|
||||
%initv = alloca i64, align 8
|
||||
%ninit = alloca double, align 8
|
||||
%nlimit = alloca double, align 8
|
||||
%nstep = alloca double, align 8
|
||||
%ci1 = getelementptr inbounds %struct.lua_State* %L, i32 0, i32 6
|
||||
%0 = load %struct.CallInfoLua** %ci1, align 4, !tbaa !6
|
||||
%base2 = getelementptr inbounds %struct.CallInfoLua* %0, i32 0, i32 4, i32 0
|
||||
%1 = load %struct.TValue** %base2, align 4, !tbaa !12
|
||||
%add.ptr = getelementptr inbounds %struct.TValue* %1, i32 1
|
||||
%add.ptr5 = getelementptr inbounds %struct.TValue* %1, i32 2
|
||||
%add.ptr6 = getelementptr inbounds %struct.TValue* %1, i32 3
|
||||
%tt_ = getelementptr inbounds %struct.TValue* %1, i32 1, i32 1
|
||||
%2 = load i32* %tt_, align 4, !tbaa !15
|
||||
%cmp = icmp eq i32 %2, 19
|
||||
%tt_7 = getelementptr inbounds %struct.TValue* %1, i32 3, i32 1
|
||||
%3 = load i32* %tt_7, align 4, !tbaa !15
|
||||
%cmp8 = icmp eq i32 %3, 19
|
||||
%i = getelementptr inbounds %struct.TValue* %add.ptr6, i32 0, i32 0, i32 0
|
||||
%4 = load i64* %i, align 8, !tbaa !17
|
||||
%call = call i32 @forlimit(%struct.TValue* %add.ptr5, i64* %ilimit, i64 %4, i32* %stopnow) #2
|
||||
%or.cond = and i1 %cmp, %cmp8
|
||||
%tobool13 = icmp ne i32 %call, 0
|
||||
%or.cond73 = and i1 %or.cond, %tobool13
|
||||
br i1 %or.cond73, label %if.then, label %if.else
|
||||
|
||||
if.then: ; preds = %entry
|
||||
%5 = load i32* %stopnow, align 4, !tbaa !18
|
||||
%tobool14 = icmp eq i32 %5, 0
|
||||
%i16 = getelementptr inbounds %struct.TValue* %add.ptr, i32 0, i32 0, i32 0
|
||||
br i1 %tobool14, label %cond.false, label %cond.end
|
||||
|
||||
cond.false: ; preds = %if.then
|
||||
%6 = load i64* %i16, align 8, !tbaa !17
|
||||
br label %cond.end
|
||||
|
||||
cond.end: ; preds = %if.then, %cond.false
|
||||
%cond = phi i64 [ %6, %cond.false ], [ 0, %if.then ]
|
||||
%7 = load i64* %ilimit, align 8, !tbaa !17
|
||||
%i18 = getelementptr inbounds %struct.TValue* %add.ptr5, i32 0, i32 0, i32 0
|
||||
store i64 %7, i64* %i18, align 8, !tbaa !17
|
||||
%tt_19 = getelementptr inbounds %struct.TValue* %1, i32 2, i32 1
|
||||
store i32 19, i32* %tt_19, align 4, !tbaa !15
|
||||
%8 = load i64* %i, align 8, !tbaa !17
|
||||
%sub = sub nsw i64 %cond, %8
|
||||
store i64 %sub, i64* %i16, align 8, !tbaa !17
|
||||
br label %label_forloop
|
||||
|
||||
if.else: ; preds = %entry
|
||||
%tt_25 = getelementptr inbounds %struct.TValue* %1, i32 2, i32 1
|
||||
%9 = load i32* %tt_25, align 4, !tbaa !15
|
||||
%cmp26 = icmp eq i32 %9, 3
|
||||
br i1 %cmp26, label %if.then28, label %if.else30
|
||||
|
||||
if.then28: ; preds = %if.else
|
||||
%n = bitcast %struct.TValue* %add.ptr5 to double*
|
||||
%10 = load double* %n, align 8, !tbaa !19
|
||||
store double %10, double* %nlimit, align 8, !tbaa !19
|
||||
br label %if.end35
|
||||
|
||||
if.else30: ; preds = %if.else
|
||||
%call31 = call i32 @luaV_tonumber_(%struct.TValue* %add.ptr5, double* %nlimit) #2
|
||||
%phitmp = icmp eq i32 %call31, 0
|
||||
br i1 %phitmp, label %if.then33, label %if.end35
|
||||
|
||||
if.then33: ; preds = %if.else30
|
||||
%call34 = call i32 bitcast (i32 (...)* @luaG_runerror to i32 (%struct.lua_State*, i8*)*)(%struct.lua_State* %L, i8* getelementptr inbounds ([29 x i8]* @.str1, i32 0, i32 0)) #2
|
||||
br label %if.end35
|
||||
|
||||
if.end35: ; preds = %if.else30, %if.then28, %if.then33
|
||||
%11 = load double* %nlimit, align 8, !tbaa !19
|
||||
%n37 = bitcast %struct.TValue* %add.ptr5 to double*
|
||||
store double %11, double* %n37, align 8, !tbaa !19
|
||||
store i32 3, i32* %tt_25, align 4, !tbaa !15
|
||||
%12 = load i32* %tt_7, align 4, !tbaa !15
|
||||
%cmp40 = icmp eq i32 %12, 3
|
||||
br i1 %cmp40, label %if.then42, label %if.else45
|
||||
|
||||
if.then42: ; preds = %if.end35
|
||||
%n44 = bitcast %struct.TValue* %add.ptr6 to double*
|
||||
%13 = load double* %n44, align 8, !tbaa !19
|
||||
store double %13, double* %nstep, align 8, !tbaa !19
|
||||
br label %if.end51
|
||||
|
||||
if.else45: ; preds = %if.end35
|
||||
%call46 = call i32 @luaV_tonumber_(%struct.TValue* %add.ptr6, double* %nstep) #2
|
||||
%phitmp104 = icmp eq i32 %call46, 0
|
||||
br i1 %phitmp104, label %if.then49, label %if.end51
|
||||
|
||||
if.then49: ; preds = %if.else45
|
||||
%call50 = call i32 bitcast (i32 (...)* @luaG_runerror to i32 (%struct.lua_State*, i8*)*)(%struct.lua_State* %L, i8* getelementptr inbounds ([28 x i8]* @.str2, i32 0, i32 0)) #2
|
||||
br label %if.end51
|
||||
|
||||
if.end51: ; preds = %if.else45, %if.then42, %if.then49
|
||||
%14 = load double* %nstep, align 8, !tbaa !19
|
||||
%n53 = bitcast %struct.TValue* %add.ptr6 to double*
|
||||
store double %14, double* %n53, align 8, !tbaa !19
|
||||
store i32 3, i32* %tt_7, align 4, !tbaa !15
|
||||
%15 = load i32* %tt_, align 4, !tbaa !15
|
||||
%cmp56 = icmp eq i32 %15, 3
|
||||
br i1 %cmp56, label %if.then58, label %if.else61
|
||||
|
||||
if.then58: ; preds = %if.end51
|
||||
%n60 = bitcast %struct.TValue* %add.ptr to double*
|
||||
%16 = load double* %n60, align 8, !tbaa !19
|
||||
store double %16, double* %ninit, align 8, !tbaa !19
|
||||
br label %if.end67
|
||||
|
||||
if.else61: ; preds = %if.end51
|
||||
%call62 = call i32 @luaV_tonumber_(%struct.TValue* %add.ptr, double* %ninit) #2
|
||||
%phitmp105 = icmp eq i32 %call62, 0
|
||||
br i1 %phitmp105, label %if.then65, label %if.end67
|
||||
|
||||
if.then65: ; preds = %if.else61
|
||||
%call66 = call i32 bitcast (i32 (...)* @luaG_runerror to i32 (%struct.lua_State*, i8*)*)(%struct.lua_State* %L, i8* getelementptr inbounds ([37 x i8]* @.str3, i32 0, i32 0)) #2
|
||||
br label %if.end67
|
||||
|
||||
if.end67: ; preds = %if.else61, %if.then58, %if.then65
|
||||
%17 = load double* %ninit, align 8, !tbaa !19
|
||||
%18 = load double* %nstep, align 8, !tbaa !19
|
||||
%sub68 = fsub double %17, %18
|
||||
%n70 = bitcast %struct.TValue* %add.ptr to double*
|
||||
store double %sub68, double* %n70, align 8, !tbaa !19
|
||||
br label %label_forloop
|
||||
|
||||
label_forloop: ; preds = %cond.end, %if.end67
|
||||
%storemerge = phi i32 [ 3, %if.end67 ], [ 19, %cond.end ]
|
||||
store i32 %storemerge, i32* %tt_, align 4, !tbaa !15
|
||||
%plimit_is_float = alloca i32, align 4
|
||||
%pstep_is_float = alloca i32, align 4
|
||||
%init_is_float = alloca i32, align 4
|
||||
store %struct.lua_State* %L, %struct.lua_State** %L.addr, align 8, !tbaa !2
|
||||
%1 = bitcast %struct.CallInfoLua** %ci to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %1) #3
|
||||
%2 = bitcast %struct.LClosure** %cl to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %2) #3
|
||||
%3 = bitcast %struct.TValue** %k to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %3) #3
|
||||
%4 = bitcast %struct.TValue** %base to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %4) #3
|
||||
%5 = bitcast %struct.CallInfoL** %cil to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %5) #3
|
||||
%6 = bitcast i32* %b to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 4, i8* %6) #3
|
||||
%7 = load %struct.lua_State*, %struct.lua_State** %L.addr, align 8, !tbaa !2
|
||||
%ci1 = getelementptr inbounds %struct.lua_State, %struct.lua_State* %7, i32 0, i32 6
|
||||
%8 = load %struct.CallInfoLua*, %struct.CallInfoLua** %ci1, align 8, !tbaa !8
|
||||
store %struct.CallInfoLua* %8, %struct.CallInfoLua** %ci, align 8, !tbaa !2
|
||||
%9 = load %struct.CallInfoLua*, %struct.CallInfoLua** %ci, align 8, !tbaa !2
|
||||
%l = getelementptr inbounds %struct.CallInfoLua, %struct.CallInfoLua* %9, i32 0, i32 4
|
||||
%base2 = getelementptr inbounds %struct.CallInfoL, %struct.CallInfoL* %l, i32 0, i32 0
|
||||
%10 = load %struct.TValue*, %struct.TValue** %base2, align 8, !tbaa !14
|
||||
store %struct.TValue* %10, %struct.TValue** %base, align 8, !tbaa !2
|
||||
%11 = load %struct.CallInfoLua*, %struct.CallInfoLua** %ci, align 8, !tbaa !2
|
||||
%func = getelementptr inbounds %struct.CallInfoLua, %struct.CallInfoLua* %11, i32 0, i32 0
|
||||
%12 = load %struct.TValue*, %struct.TValue** %func, align 8, !tbaa !17
|
||||
%value_ = getelementptr inbounds %struct.TValue, %struct.TValue* %12, i32 0, i32 0
|
||||
%gc = bitcast %union.Value* %value_ to %struct.GCObject**
|
||||
%13 = load %struct.GCObject*, %struct.GCObject** %gc, align 8, !tbaa !18
|
||||
%14 = bitcast %struct.GCObject* %13 to %struct.LClosure*
|
||||
store %struct.LClosure* %14, %struct.LClosure** %cl, align 8, !tbaa !2
|
||||
%15 = load %struct.LClosure*, %struct.LClosure** %cl, align 8, !tbaa !2
|
||||
%p = getelementptr inbounds %struct.LClosure, %struct.LClosure* %15, i32 0, i32 5
|
||||
%16 = load %struct.Proto*, %struct.Proto** %p, align 8, !tbaa !19
|
||||
%k3 = getelementptr inbounds %struct.Proto, %struct.Proto* %16, i32 0, i32 14
|
||||
%17 = load %struct.TValue*, %struct.TValue** %k3, align 8, !tbaa !21
|
||||
store %struct.TValue* %17, %struct.TValue** %k, align 8, !tbaa !2
|
||||
%18 = bitcast i32* %A to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 4, i8* %18) #3
|
||||
%19 = bitcast i32* %A1 to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 4, i8* %19) #3
|
||||
%20 = bitcast i32* %A2 to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 4, i8* %20) #3
|
||||
br label %21
|
||||
|
||||
; <label>:21: ; preds = %0
|
||||
store i32 1, i32* %A, align 4, !tbaa !24
|
||||
%22 = load i32, i32* %A, align 4, !tbaa !24
|
||||
%add = add nsw i32 %22, 1
|
||||
store i32 %add, i32* %A1, align 4, !tbaa !24
|
||||
%23 = load i32, i32* %A, align 4, !tbaa !24
|
||||
%add4 = add nsw i32 %23, 2
|
||||
store i32 %add4, i32* %A2, align 4, !tbaa !24
|
||||
%24 = load %struct.TValue*, %struct.TValue** %base, align 8, !tbaa !2
|
||||
%25 = load i32, i32* %A, align 4, !tbaa !24
|
||||
%idx.ext = sext i32 %25 to i64
|
||||
%add.ptr = getelementptr inbounds %struct.TValue, %struct.TValue* %24, i64 %idx.ext
|
||||
store %struct.TValue* %add.ptr, %struct.TValue** %init, align 8, !tbaa !2
|
||||
%26 = load %struct.TValue*, %struct.TValue** %base, align 8, !tbaa !2
|
||||
%27 = load i32, i32* %A1, align 4, !tbaa !24
|
||||
%idx.ext5 = sext i32 %27 to i64
|
||||
%add.ptr6 = getelementptr inbounds %struct.TValue, %struct.TValue* %26, i64 %idx.ext5
|
||||
store %struct.TValue* %add.ptr6, %struct.TValue** %plimit, align 8, !tbaa !2
|
||||
%28 = load %struct.TValue*, %struct.TValue** %base, align 8, !tbaa !2
|
||||
%29 = load i32, i32* %A2, align 4, !tbaa !24
|
||||
%idx.ext7 = sext i32 %29 to i64
|
||||
%add.ptr8 = getelementptr inbounds %struct.TValue, %struct.TValue* %28, i64 %idx.ext7
|
||||
store %struct.TValue* %add.ptr8, %struct.TValue** %pstep, align 8, !tbaa !2
|
||||
%30 = load %struct.TValue*, %struct.TValue** %init, align 8, !tbaa !2
|
||||
%tt_ = getelementptr inbounds %struct.TValue, %struct.TValue* %30, i32 0, i32 1
|
||||
%31 = load i16, i16* %tt_, align 8, !tbaa !25
|
||||
%conv = zext i16 %31 to i32
|
||||
%cmp = icmp eq i32 %conv, 19
|
||||
%conv9 = zext i1 %cmp to i32
|
||||
store i32 %conv9, i32* %init_is_integer, align 4, !tbaa !24
|
||||
%32 = load %struct.TValue*, %struct.TValue** %pstep, align 8, !tbaa !2
|
||||
%tt_10 = getelementptr inbounds %struct.TValue, %struct.TValue* %32, i32 0, i32 1
|
||||
%33 = load i16, i16* %tt_10, align 8, !tbaa !25
|
||||
%conv11 = zext i16 %33 to i32
|
||||
%cmp12 = icmp eq i32 %conv11, 19
|
||||
%conv13 = zext i1 %cmp12 to i32
|
||||
store i32 %conv13, i32* %pstep_is_integer, align 4, !tbaa !24
|
||||
%34 = load %struct.TValue*, %struct.TValue** %pstep, align 8, !tbaa !2
|
||||
%value_14 = getelementptr inbounds %struct.TValue, %struct.TValue* %34, i32 0, i32 0
|
||||
%i = bitcast %union.Value* %value_14 to i64*
|
||||
%35 = load i64, i64* %i, align 8, !tbaa !18
|
||||
%36 = load %struct.TValue*, %struct.TValue** %plimit, align 8, !tbaa !2
|
||||
%call = call i32 @forlimit(%struct.TValue* %36, i64* %ilimit, i64 %35, i32* %stopnow)
|
||||
store i32 %call, i32* %fl, align 4, !tbaa !24
|
||||
%37 = load i32, i32* %init_is_integer, align 4, !tbaa !24
|
||||
%tobool = icmp ne i32 %37, 0
|
||||
br i1 %tobool, label %38, label %59
|
||||
|
||||
; <label>:38: ; preds = %21
|
||||
%39 = load i32, i32* %pstep_is_integer, align 4, !tbaa !24
|
||||
%tobool15 = icmp ne i32 %39, 0
|
||||
br i1 %tobool15, label %40, label %59
|
||||
|
||||
; <label>:40: ; preds = %38
|
||||
%41 = load i32, i32* %fl, align 4, !tbaa !24
|
||||
%tobool16 = icmp ne i32 %41, 0
|
||||
br i1 %tobool16, label %42, label %59
|
||||
|
||||
; <label>:42: ; preds = %40
|
||||
%43 = bitcast i64* %initv to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %43) #3
|
||||
%44 = load i32, i32* %stopnow, align 4, !tbaa !24
|
||||
%tobool17 = icmp ne i32 %44, 0
|
||||
br i1 %tobool17, label %45, label %46
|
||||
|
||||
; <label>:45: ; preds = %42
|
||||
br label %49
|
||||
|
||||
; <label>:46: ; preds = %42
|
||||
%47 = load %struct.TValue*, %struct.TValue** %init, align 8, !tbaa !2
|
||||
%value_18 = getelementptr inbounds %struct.TValue, %struct.TValue* %47, i32 0, i32 0
|
||||
%i19 = bitcast %union.Value* %value_18 to i64*
|
||||
%48 = load i64, i64* %i19, align 8, !tbaa !18
|
||||
br label %49
|
||||
|
||||
; <label>:49: ; preds = %46, %45
|
||||
%cond = phi i64 [ 0, %45 ], [ %48, %46 ]
|
||||
store i64 %cond, i64* %initv, align 8, !tbaa !27
|
||||
%50 = load i64, i64* %ilimit, align 8, !tbaa !27
|
||||
%51 = load %struct.TValue*, %struct.TValue** %plimit, align 8, !tbaa !2
|
||||
%value_20 = getelementptr inbounds %struct.TValue, %struct.TValue* %51, i32 0, i32 0
|
||||
%i21 = bitcast %union.Value* %value_20 to i64*
|
||||
store i64 %50, i64* %i21, align 8, !tbaa !18
|
||||
%52 = load %struct.TValue*, %struct.TValue** %plimit, align 8, !tbaa !2
|
||||
%tt_22 = getelementptr inbounds %struct.TValue, %struct.TValue* %52, i32 0, i32 1
|
||||
store i16 19, i16* %tt_22, align 8, !tbaa !25
|
||||
%53 = load i64, i64* %initv, align 8, !tbaa !27
|
||||
%54 = load %struct.TValue*, %struct.TValue** %pstep, align 8, !tbaa !2
|
||||
%value_23 = getelementptr inbounds %struct.TValue, %struct.TValue* %54, i32 0, i32 0
|
||||
%i24 = bitcast %union.Value* %value_23 to i64*
|
||||
%55 = load i64, i64* %i24, align 8, !tbaa !18
|
||||
%sub = sub nsw i64 %53, %55
|
||||
%56 = load %struct.TValue*, %struct.TValue** %init, align 8, !tbaa !2
|
||||
%value_25 = getelementptr inbounds %struct.TValue, %struct.TValue* %56, i32 0, i32 0
|
||||
%i26 = bitcast %union.Value* %value_25 to i64*
|
||||
store i64 %sub, i64* %i26, align 8, !tbaa !18
|
||||
%57 = load %struct.TValue*, %struct.TValue** %init, align 8, !tbaa !2
|
||||
%tt_27 = getelementptr inbounds %struct.TValue, %struct.TValue* %57, i32 0, i32 1
|
||||
store i16 19, i16* %tt_27, align 8, !tbaa !25
|
||||
%58 = bitcast i64* %initv to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %58) #3
|
||||
br label %118
|
||||
|
||||
; <label>:59: ; preds = %40, %38, %21
|
||||
%60 = bitcast double* %ninit to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %60) #3
|
||||
%61 = bitcast double* %nlimit to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %61) #3
|
||||
%62 = bitcast double* %nstep to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %62) #3
|
||||
%63 = bitcast i32* %plimit_is_float to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 4, i8* %63) #3
|
||||
store i32 0, i32* %plimit_is_float, align 4, !tbaa !24
|
||||
%64 = load %struct.TValue*, %struct.TValue** %plimit, align 8, !tbaa !2
|
||||
%tt_28 = getelementptr inbounds %struct.TValue, %struct.TValue* %64, i32 0, i32 1
|
||||
%65 = load i16, i16* %tt_28, align 8, !tbaa !25
|
||||
%conv29 = zext i16 %65 to i32
|
||||
%cmp30 = icmp eq i32 %conv29, 3
|
||||
br i1 %cmp30, label %66, label %69
|
||||
|
||||
; <label>:66: ; preds = %59
|
||||
store i32 1, i32* %plimit_is_float, align 4, !tbaa !24
|
||||
%67 = load %struct.TValue*, %struct.TValue** %plimit, align 8, !tbaa !2
|
||||
%value_32 = getelementptr inbounds %struct.TValue, %struct.TValue* %67, i32 0, i32 0
|
||||
%n = bitcast %union.Value* %value_32 to double*
|
||||
%68 = load double, double* %n, align 8, !tbaa !18
|
||||
store double %68, double* %nlimit, align 8, !tbaa !28
|
||||
br label %71
|
||||
|
||||
; <label>:69: ; preds = %59
|
||||
%70 = load %struct.TValue*, %struct.TValue** %plimit, align 8, !tbaa !2
|
||||
%call33 = call i32 @luaV_tonumber_(%struct.TValue* %70, double* %nlimit)
|
||||
store i32 %call33, i32* %plimit_is_float, align 4, !tbaa !24
|
||||
br label %71
|
||||
|
||||
; <label>:71: ; preds = %69, %66
|
||||
%72 = load i32, i32* %plimit_is_float, align 4, !tbaa !24
|
||||
%tobool34 = icmp ne i32 %72, 0
|
||||
br i1 %tobool34, label %75, label %73
|
||||
|
||||
; <label>:73: ; preds = %71
|
||||
%74 = load %struct.lua_State*, %struct.lua_State** %L.addr, align 8, !tbaa !2
|
||||
%call35 = call i32 bitcast (i32 (...)* @luaG_runerror to i32 (%struct.lua_State*, i8*)*)(%struct.lua_State* %74, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @"\01??_C@_0BN@GHPMJMPH@?8for?8?5limit?5must?5be?5a?5number?$AA@", i32 0, i32 0))
|
||||
br label %75
|
||||
|
||||
; <label>:75: ; preds = %73, %71
|
||||
%76 = load double, double* %nlimit, align 8, !tbaa !28
|
||||
%77 = load %struct.TValue*, %struct.TValue** %plimit, align 8, !tbaa !2
|
||||
%value_36 = getelementptr inbounds %struct.TValue, %struct.TValue* %77, i32 0, i32 0
|
||||
%n37 = bitcast %union.Value* %value_36 to double*
|
||||
store double %76, double* %n37, align 8, !tbaa !18
|
||||
%78 = load %struct.TValue*, %struct.TValue** %plimit, align 8, !tbaa !2
|
||||
%tt_38 = getelementptr inbounds %struct.TValue, %struct.TValue* %78, i32 0, i32 1
|
||||
store i16 3, i16* %tt_38, align 8, !tbaa !25
|
||||
%79 = bitcast i32* %pstep_is_float to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 4, i8* %79) #3
|
||||
store i32 0, i32* %pstep_is_float, align 4, !tbaa !24
|
||||
%80 = load %struct.TValue*, %struct.TValue** %pstep, align 8, !tbaa !2
|
||||
%tt_39 = getelementptr inbounds %struct.TValue, %struct.TValue* %80, i32 0, i32 1
|
||||
%81 = load i16, i16* %tt_39, align 8, !tbaa !25
|
||||
%conv40 = zext i16 %81 to i32
|
||||
%cmp41 = icmp eq i32 %conv40, 3
|
||||
br i1 %cmp41, label %82, label %85
|
||||
|
||||
; <label>:82: ; preds = %75
|
||||
store i32 1, i32* %pstep_is_float, align 4, !tbaa !24
|
||||
%83 = load %struct.TValue*, %struct.TValue** %pstep, align 8, !tbaa !2
|
||||
%value_43 = getelementptr inbounds %struct.TValue, %struct.TValue* %83, i32 0, i32 0
|
||||
%n44 = bitcast %union.Value* %value_43 to double*
|
||||
%84 = load double, double* %n44, align 8, !tbaa !18
|
||||
store double %84, double* %nstep, align 8, !tbaa !28
|
||||
br label %87
|
||||
|
||||
; <label>:85: ; preds = %75
|
||||
%86 = load %struct.TValue*, %struct.TValue** %pstep, align 8, !tbaa !2
|
||||
%call45 = call i32 @luaV_tonumber_(%struct.TValue* %86, double* %nstep)
|
||||
store i32 %call45, i32* %pstep_is_float, align 4, !tbaa !24
|
||||
br label %87
|
||||
|
||||
; <label>:87: ; preds = %85, %82
|
||||
%88 = load i32, i32* %pstep_is_float, align 4, !tbaa !24
|
||||
%tobool46 = icmp ne i32 %88, 0
|
||||
br i1 %tobool46, label %91, label %89
|
||||
|
||||
; <label>:89: ; preds = %87
|
||||
%90 = load %struct.lua_State*, %struct.lua_State** %L.addr, align 8, !tbaa !2
|
||||
%call47 = call i32 bitcast (i32 (...)* @luaG_runerror to i32 (%struct.lua_State*, i8*)*)(%struct.lua_State* %90, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @"\01??_C@_0BM@EGCFKNIJ@?8for?8?5step?5must?5be?5a?5number?$AA@", i32 0, i32 0))
|
||||
br label %91
|
||||
|
||||
; <label>:91: ; preds = %89, %87
|
||||
%92 = load double, double* %nstep, align 8, !tbaa !28
|
||||
%93 = load %struct.TValue*, %struct.TValue** %pstep, align 8, !tbaa !2
|
||||
%value_48 = getelementptr inbounds %struct.TValue, %struct.TValue* %93, i32 0, i32 0
|
||||
%n49 = bitcast %union.Value* %value_48 to double*
|
||||
store double %92, double* %n49, align 8, !tbaa !18
|
||||
%94 = load %struct.TValue*, %struct.TValue** %pstep, align 8, !tbaa !2
|
||||
%tt_50 = getelementptr inbounds %struct.TValue, %struct.TValue* %94, i32 0, i32 1
|
||||
store i16 3, i16* %tt_50, align 8, !tbaa !25
|
||||
%95 = bitcast i32* %init_is_float to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 4, i8* %95) #3
|
||||
store i32 0, i32* %init_is_float, align 4, !tbaa !24
|
||||
%96 = load %struct.TValue*, %struct.TValue** %init, align 8, !tbaa !2
|
||||
%tt_51 = getelementptr inbounds %struct.TValue, %struct.TValue* %96, i32 0, i32 1
|
||||
%97 = load i16, i16* %tt_51, align 8, !tbaa !25
|
||||
%conv52 = zext i16 %97 to i32
|
||||
%cmp53 = icmp eq i32 %conv52, 3
|
||||
br i1 %cmp53, label %98, label %101
|
||||
|
||||
; <label>:98: ; preds = %91
|
||||
store i32 1, i32* %init_is_float, align 4, !tbaa !24
|
||||
%99 = load %struct.TValue*, %struct.TValue** %init, align 8, !tbaa !2
|
||||
%value_55 = getelementptr inbounds %struct.TValue, %struct.TValue* %99, i32 0, i32 0
|
||||
%n56 = bitcast %union.Value* %value_55 to double*
|
||||
%100 = load double, double* %n56, align 8, !tbaa !18
|
||||
store double %100, double* %ninit, align 8, !tbaa !28
|
||||
br label %103
|
||||
|
||||
; <label>:101: ; preds = %91
|
||||
%102 = load %struct.TValue*, %struct.TValue** %init, align 8, !tbaa !2
|
||||
%call57 = call i32 @luaV_tonumber_(%struct.TValue* %102, double* %ninit)
|
||||
store i32 %call57, i32* %init_is_float, align 4, !tbaa !24
|
||||
br label %103
|
||||
|
||||
; <label>:103: ; preds = %101, %98
|
||||
%104 = load i32, i32* %init_is_float, align 4, !tbaa !24
|
||||
%tobool58 = icmp ne i32 %104, 0
|
||||
br i1 %tobool58, label %107, label %105
|
||||
|
||||
; <label>:105: ; preds = %103
|
||||
%106 = load %struct.lua_State*, %struct.lua_State** %L.addr, align 8, !tbaa !2
|
||||
%call59 = call i32 bitcast (i32 (...)* @luaG_runerror to i32 (%struct.lua_State*, i8*)*)(%struct.lua_State* %106, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @"\01??_C@_0CF@JJFDEONC@?8for?8?5initial?5value?5must?5be?5a?5nu@", i32 0, i32 0))
|
||||
br label %107
|
||||
|
||||
; <label>:107: ; preds = %105, %103
|
||||
%108 = load double, double* %ninit, align 8, !tbaa !28
|
||||
%109 = load double, double* %nstep, align 8, !tbaa !28
|
||||
%sub60 = fsub double %108, %109
|
||||
%110 = load %struct.TValue*, %struct.TValue** %init, align 8, !tbaa !2
|
||||
%value_61 = getelementptr inbounds %struct.TValue, %struct.TValue* %110, i32 0, i32 0
|
||||
%n62 = bitcast %union.Value* %value_61 to double*
|
||||
store double %sub60, double* %n62, align 8, !tbaa !18
|
||||
%111 = load %struct.TValue*, %struct.TValue** %init, align 8, !tbaa !2
|
||||
%tt_63 = getelementptr inbounds %struct.TValue, %struct.TValue* %111, i32 0, i32 1
|
||||
store i16 3, i16* %tt_63, align 8, !tbaa !25
|
||||
%112 = bitcast i32* %init_is_float to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 4, i8* %112) #3
|
||||
%113 = bitcast i32* %pstep_is_float to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 4, i8* %113) #3
|
||||
%114 = bitcast i32* %plimit_is_float to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 4, i8* %114) #3
|
||||
%115 = bitcast double* %nstep to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %115) #3
|
||||
%116 = bitcast double* %nlimit to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %116) #3
|
||||
%117 = bitcast double* %ninit to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %117) #3
|
||||
br label %118
|
||||
|
||||
; <label>:118: ; preds = %107, %49
|
||||
br label %119
|
||||
|
||||
; <label>:119: ; preds = %118
|
||||
%120 = bitcast i32* %A2 to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 4, i8* %120) #3
|
||||
%121 = bitcast i32* %A1 to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 4, i8* %121) #3
|
||||
%122 = bitcast i32* %A to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 4, i8* %122) #3
|
||||
%123 = bitcast i32* %b to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 4, i8* %123) #3
|
||||
%124 = bitcast %struct.CallInfoL** %cil to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %124) #3
|
||||
%125 = bitcast %struct.TValue** %base to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %125) #3
|
||||
%126 = bitcast %struct.TValue** %k to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %126) #3
|
||||
%127 = bitcast %struct.LClosure** %cl to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %127) #3
|
||||
%128 = bitcast %struct.CallInfoLua** %ci to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %128) #3
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: argmemonly nounwind
|
||||
declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #2
|
||||
|
||||
declare i32 @forlimit(%struct.TValue*, i64*, i64, i32*) #1
|
||||
|
||||
; Function Attrs: argmemonly nounwind
|
||||
declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #2
|
||||
|
||||
declare i32 @luaV_tonumber_(%struct.TValue*, double*) #1
|
||||
|
||||
declare i32 @luaG_runerror(...) #1
|
||||
|
||||
attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #2 = { nounwind }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
|
||||
!0 = metadata !{metadata !"clang version 3.6.0 (trunk)"}
|
||||
!1 = metadata !{metadata !2, metadata !4, i64 4}
|
||||
!2 = metadata !{metadata !"GCObject", metadata !3, i64 0, metadata !4, i64 4, metadata !4, i64 5}
|
||||
!3 = metadata !{metadata !"any pointer", metadata !4, i64 0}
|
||||
!4 = metadata !{metadata !"omnipotent char", metadata !5, i64 0}
|
||||
!5 = metadata !{metadata !"Simple C/C++ TBAA"}
|
||||
!6 = metadata !{metadata !7, metadata !3, i64 16}
|
||||
!7 = metadata !{metadata !"lua_State", metadata !3, i64 0, metadata !4, i64 4, metadata !4, i64 5, metadata !4, i64 6, metadata !3, i64 8, metadata !3, i64 12, metadata !3, i64 16, metadata !3, i64 20, metadata !3, i64 24, metadata !3, i64 28, metadata !3, i64 32, metadata !3, i64 36, metadata !3, i64 40, metadata !3, i64 44, metadata !8, i64 48, metadata !3, i64 104, metadata !9, i64 112, metadata !11, i64 120, metadata !11, i64 124, metadata !11, i64 128, metadata !10, i64 132, metadata !10, i64 134, metadata !4, i64 136, metadata !4, i64 137}
|
||||
!8 = metadata !{metadata !"CallInfo", metadata !3, i64 0, metadata !3, i64 4, metadata !3, i64 8, metadata !3, i64 12, metadata !4, i64 16, metadata !9, i64 40, metadata !10, i64 48, metadata !4, i64 50, metadata !4, i64 51}
|
||||
!9 = metadata !{metadata !"long long", metadata !4, i64 0}
|
||||
!10 = metadata !{metadata !"short", metadata !4, i64 0}
|
||||
!11 = metadata !{metadata !"int", metadata !4, i64 0}
|
||||
!12 = metadata !{metadata !13, metadata !3, i64 16}
|
||||
!13 = metadata !{metadata !"CallInfoLua", metadata !3, i64 0, metadata !3, i64 4, metadata !3, i64 8, metadata !3, i64 12, metadata !14, i64 16, metadata !9, i64 32, metadata !10, i64 40, metadata !4, i64 42, metadata !4, i64 43}
|
||||
!14 = metadata !{metadata !"CallInfoL", metadata !3, i64 0, metadata !3, i64 4, metadata !9, i64 8}
|
||||
!15 = metadata !{metadata !16, metadata !11, i64 8}
|
||||
!16 = metadata !{metadata !"TValue", metadata !4, i64 0, metadata !11, i64 8}
|
||||
!17 = metadata !{metadata !9, metadata !9, i64 0}
|
||||
!18 = metadata !{metadata !11, metadata !11, i64 0}
|
||||
!19 = metadata !{metadata !20, metadata !20, i64 0}
|
||||
!20 = metadata !{metadata !"double", metadata !4, i64 0}
|
||||
attributes #0 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-features"="+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-features"="+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #2 = { argmemonly nounwind }
|
||||
attributes #3 = { nounwind }
|
||||
|
||||
!llvm.module.flags = !{!0}
|
||||
!llvm.ident = !{!1}
|
||||
|
||||
!0 = !{i32 1, !"wchar_size", i32 2}
|
||||
!1 = !{!"clang version 6.0.0 (tags/RELEASE_600/final)"}
|
||||
!2 = !{!3, !3, i64 0}
|
||||
!3 = !{!"any pointer", !4, i64 0}
|
||||
!4 = !{!"omnipotent char", !5, i64 0}
|
||||
!5 = !{!"Simple C/C++ TBAA"}
|
||||
!6 = !{!7, !4, i64 8}
|
||||
!7 = !{!"GCObject", !3, i64 0, !4, i64 8, !4, i64 9}
|
||||
!8 = !{!9, !3, i64 32}
|
||||
!9 = !{!"lua_State", !3, i64 0, !4, i64 8, !4, i64 9, !4, i64 10, !3, i64 16, !3, i64 24, !3, i64 32, !3, i64 40, !3, i64 48, !3, i64 56, !3, i64 64, !3, i64 72, !3, i64 80, !3, i64 88, !10, i64 96, !3, i64 168, !11, i64 176, !13, i64 184, !13, i64 188, !13, i64 192, !12, i64 196, !12, i64 198, !4, i64 200, !4, i64 201, !12, i64 202, !4, i64 204}
|
||||
!10 = !{!"CallInfo", !3, i64 0, !3, i64 8, !3, i64 16, !3, i64 24, !4, i64 32, !11, i64 56, !12, i64 64, !12, i64 66, !12, i64 68, !4, i64 70, !4, i64 71}
|
||||
!11 = !{!"long long", !4, i64 0}
|
||||
!12 = !{!"short", !4, i64 0}
|
||||
!13 = !{!"int", !4, i64 0}
|
||||
!14 = !{!15, !3, i64 32}
|
||||
!15 = !{!"CallInfoLua", !3, i64 0, !3, i64 8, !3, i64 16, !3, i64 24, !16, i64 32, !11, i64 56, !12, i64 64, !12, i64 66, !12, i64 68, !4, i64 70, !4, i64 71}
|
||||
!16 = !{!"CallInfoL", !3, i64 0, !3, i64 8, !11, i64 16}
|
||||
!17 = !{!15, !3, i64 0}
|
||||
!18 = !{!4, !4, i64 0}
|
||||
!19 = !{!20, !3, i64 24}
|
||||
!20 = !{!"LClosure", !3, i64 0, !4, i64 8, !4, i64 9, !4, i64 10, !3, i64 16, !3, i64 24, !4, i64 32}
|
||||
!21 = !{!22, !3, i64 48}
|
||||
!22 = !{!"Proto", !3, i64 0, !4, i64 8, !4, i64 9, !4, i64 10, !4, i64 11, !4, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !3, i64 48, !3, i64 56, !3, i64 64, !3, i64 72, !3, i64 80, !3, i64 88, !3, i64 96, !3, i64 104, !3, i64 112, !23, i64 120}
|
||||
!23 = !{!"RaviJITProto", !4, i64 0, !4, i64 1, !12, i64 2, !3, i64 8, !3, i64 16}
|
||||
!24 = !{!13, !13, i64 0}
|
||||
!25 = !{!26, !12, i64 8}
|
||||
!26 = !{!"TValue", !4, i64 0, !12, i64 8}
|
||||
!27 = !{!11, !11, i64 0}
|
||||
!28 = !{!29, !29, i64 0}
|
||||
!29 = !{!"double", !4, i64 0}
|
||||
|
@ -1,145 +1,150 @@
|
||||
; ModuleID = 'lua_savedpc.c'
|
||||
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-S32"
|
||||
target triple = "i686-pc-windows-gnu"
|
||||
source_filename = "lua_savedpc.c"
|
||||
target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-pc-windows-msvc"
|
||||
|
||||
%struct.lua_State = type { %struct.GCObject*, i8, i8, i8, %struct.TValue*, %struct.global_State*, %struct.CallInfoLua*, i32*, %struct.TValue*, %struct.TValue*, %struct.UpVal*, %struct.GCObject*, %struct.lua_State*, %struct.lua_longjmp*, %struct.CallInfo, void (%struct.lua_State*, %struct.lua_Debug*)*, i64, i32, i32, i32, i16, i16, i8, i8 }
|
||||
%struct.lua_State = type { %struct.GCObject*, i8, i8, i8, %struct.TValue*, %struct.global_State*, %struct.CallInfoLua*, i32*, %struct.TValue*, %struct.TValue*, %struct.UpVal*, %struct.GCObject*, %struct.lua_State*, %struct.lua_longjmp*, %struct.CallInfo, void (%struct.lua_State*, %struct.lua_Debug*)*, i64, i32, i32, i32, i16, i16, i8, i8, i16, i8 }
|
||||
%struct.global_State = type opaque
|
||||
%struct.CallInfoLua = type { %struct.TValue*, %struct.TValue*, %struct.CallInfo*, %struct.CallInfo*, %struct.CallInfoL, i64, i16, i8, i8 }
|
||||
%struct.CallInfoLua = type { %struct.TValue*, %struct.TValue*, %struct.CallInfo*, %struct.CallInfo*, %struct.CallInfoL, i64, i16, i16, i16, i8, i8 }
|
||||
%struct.CallInfoL = type { %struct.TValue*, i32*, i64 }
|
||||
%struct.TValue = type { %union.Value, i32 }
|
||||
%union.Value = type { i64 }
|
||||
%struct.TValue = type { %union.Value, i16 }
|
||||
%union.Value = type { %struct.GCObject* }
|
||||
%struct.UpVal = type { %struct.TValue*, i64, %union.anon.0 }
|
||||
%union.anon.0 = type { %struct.TValue }
|
||||
%union.anon.0 = type { %struct.anon }
|
||||
%struct.anon = type { %struct.UpVal*, i32 }
|
||||
%struct.GCObject = type { %struct.GCObject*, i8, i8 }
|
||||
%struct.lua_longjmp = type opaque
|
||||
%struct.CallInfo = type { %struct.TValue*, %struct.TValue*, %struct.CallInfo*, %struct.CallInfo*, %union.anon, i64, i16, i8, i8 }
|
||||
%union.anon = type { %struct.CallInfoC }
|
||||
%struct.CallInfoC = type { i32 (%struct.lua_State*, i32, i64)*, i64, i64 }
|
||||
%struct.CallInfo = type { %struct.TValue*, %struct.TValue*, %struct.CallInfo*, %struct.CallInfo*, %union.anon, i64, i16, i16, i16, i8, i8 }
|
||||
%union.anon = type { %struct.CallInfoL }
|
||||
%struct.lua_Debug = type opaque
|
||||
%struct.LClosure = type { %struct.GCObject*, i8, i8, i8, %struct.GCObject*, %struct.Proto*, [1 x %struct.UpVal*] }
|
||||
%struct.Proto = type { %struct.GCObject*, i8, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, %struct.TValue*, i32*, %struct.Proto**, i32*, %struct.LocVar*, %struct.Upvaldesc*, %struct.LClosure*, %struct.TString*, %struct.GCObject*, %struct.RaviJITProto }
|
||||
%struct.LocVar = type { %struct.TString*, i32, i32, i32 }
|
||||
%struct.Upvaldesc = type { %struct.TString*, i32, i8, i8 }
|
||||
%struct.LocVar = type { %struct.TString*, %struct.TString*, i32, i32, i8 }
|
||||
%struct.Upvaldesc = type { %struct.TString*, %struct.TString*, i8, i8, i8 }
|
||||
%struct.TString = type { %struct.GCObject*, i8, i8, i8, i8, i32, %union.anon.1 }
|
||||
%union.anon.1 = type { i64 }
|
||||
%struct.RaviJITProto = type { i8, i8*, i32 (%struct.lua_State*)* }
|
||||
%struct.RaviJITProto = type { i8, i8, i16, i8*, i32 (%struct.lua_State*)* }
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @test1(%struct.lua_State* %L, i32 %b) #0 {
|
||||
entry:
|
||||
%L.addr = alloca %struct.lua_State*, align 4
|
||||
%b.addr = alloca i32, align 4
|
||||
%ci = alloca %struct.CallInfoLua*, align 4
|
||||
%cl = alloca %struct.LClosure*, align 4
|
||||
%p = alloca %struct.Proto*, align 4
|
||||
store %struct.lua_State* %L, %struct.lua_State** %L.addr, align 4, !tbaa !1
|
||||
store i32 %b, i32* %b.addr, align 4, !tbaa !5
|
||||
%0 = bitcast %struct.CallInfoLua** %ci to i8*
|
||||
call void @llvm.lifetime.start(i64 4, i8* %0) #1
|
||||
%1 = bitcast %struct.LClosure** %cl to i8*
|
||||
call void @llvm.lifetime.start(i64 4, i8* %1) #1
|
||||
%2 = bitcast %struct.Proto** %p to i8*
|
||||
call void @llvm.lifetime.start(i64 4, i8* %2) #1
|
||||
%3 = load %struct.lua_State*, %struct.lua_State** %L.addr, align 4, !tbaa !1
|
||||
%ci1 = getelementptr inbounds %struct.lua_State, %struct.lua_State* %3, i32 0, i32 6
|
||||
%4 = load %struct.CallInfoLua*, %struct.CallInfoLua** %ci1, align 4, !tbaa !7
|
||||
store %struct.CallInfoLua* %4, %struct.CallInfoLua** %ci, align 4, !tbaa !1
|
||||
%5 = load %struct.CallInfoLua*, %struct.CallInfoLua** %ci, align 4, !tbaa !1
|
||||
%func = getelementptr inbounds %struct.CallInfoLua, %struct.CallInfoLua* %5, i32 0, i32 0
|
||||
%6 = load %struct.TValue*, %struct.TValue** %func, align 4, !tbaa !12
|
||||
%value_ = getelementptr inbounds %struct.TValue, %struct.TValue* %6, i32 0, i32 0
|
||||
%L.addr = alloca %struct.lua_State*, align 8
|
||||
%ci = alloca %struct.CallInfoLua*, align 8
|
||||
%cl = alloca %struct.LClosure*, align 8
|
||||
%p = alloca %struct.Proto*, align 8
|
||||
store i32 %b, i32* %b.addr, align 4, !tbaa !2
|
||||
store %struct.lua_State* %L, %struct.lua_State** %L.addr, align 8, !tbaa !6
|
||||
%1 = bitcast %struct.CallInfoLua** %ci to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %1) #3
|
||||
%2 = bitcast %struct.LClosure** %cl to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %2) #3
|
||||
%3 = bitcast %struct.Proto** %p to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %3) #3
|
||||
%4 = load %struct.lua_State*, %struct.lua_State** %L.addr, align 8, !tbaa !6
|
||||
%ci1 = getelementptr inbounds %struct.lua_State, %struct.lua_State* %4, i32 0, i32 6
|
||||
%5 = load %struct.CallInfoLua*, %struct.CallInfoLua** %ci1, align 8, !tbaa !8
|
||||
store %struct.CallInfoLua* %5, %struct.CallInfoLua** %ci, align 8, !tbaa !6
|
||||
%6 = load %struct.CallInfoLua*, %struct.CallInfoLua** %ci, align 8, !tbaa !6
|
||||
%func = getelementptr inbounds %struct.CallInfoLua, %struct.CallInfoLua* %6, i32 0, i32 0
|
||||
%7 = load %struct.TValue*, %struct.TValue** %func, align 8, !tbaa !13
|
||||
%value_ = getelementptr inbounds %struct.TValue, %struct.TValue* %7, i32 0, i32 0
|
||||
%gc = bitcast %union.Value* %value_ to %struct.GCObject**
|
||||
%7 = load %struct.GCObject*, %struct.GCObject** %gc, align 4, !tbaa !1
|
||||
%8 = bitcast %struct.GCObject* %7 to %struct.LClosure*
|
||||
store %struct.LClosure* %8, %struct.LClosure** %cl, align 4, !tbaa !1
|
||||
%9 = load %struct.LClosure*, %struct.LClosure** %cl, align 4, !tbaa !1
|
||||
%p2 = getelementptr inbounds %struct.LClosure, %struct.LClosure* %9, i32 0, i32 5
|
||||
%10 = load %struct.Proto*, %struct.Proto** %p2, align 4, !tbaa !15
|
||||
store %struct.Proto* %10, %struct.Proto** %p, align 4, !tbaa !1
|
||||
%11 = load i32, i32* %b.addr, align 4, !tbaa !5
|
||||
%12 = load %struct.Proto*, %struct.Proto** %p, align 4, !tbaa !1
|
||||
%8 = load %struct.GCObject*, %struct.GCObject** %gc, align 8, !tbaa !16
|
||||
%9 = bitcast %struct.GCObject* %8 to %struct.LClosure*
|
||||
store %struct.LClosure* %9, %struct.LClosure** %cl, align 8, !tbaa !6
|
||||
%10 = load %struct.LClosure*, %struct.LClosure** %cl, align 8, !tbaa !6
|
||||
%p2 = getelementptr inbounds %struct.LClosure, %struct.LClosure* %10, i32 0, i32 5
|
||||
%11 = load %struct.Proto*, %struct.Proto** %p2, align 8, !tbaa !17
|
||||
store %struct.Proto* %11, %struct.Proto** %p, align 8, !tbaa !6
|
||||
%12 = load %struct.Proto*, %struct.Proto** %p, align 8, !tbaa !6
|
||||
%code = getelementptr inbounds %struct.Proto, %struct.Proto* %12, i32 0, i32 15
|
||||
%13 = load i32*, i32** %code, align 4, !tbaa !17
|
||||
%arrayidx = getelementptr inbounds i32, i32* %13, i32 %11
|
||||
%14 = load %struct.CallInfoLua*, %struct.CallInfoLua** %ci, align 4, !tbaa !1
|
||||
%l = getelementptr inbounds %struct.CallInfoLua, %struct.CallInfoLua* %14, i32 0, i32 4
|
||||
%13 = load i32*, i32** %code, align 8, !tbaa !19
|
||||
%14 = load i32, i32* %b.addr, align 4, !tbaa !2
|
||||
%idxprom = sext i32 %14 to i64
|
||||
%arrayidx = getelementptr inbounds i32, i32* %13, i64 %idxprom
|
||||
%15 = load %struct.CallInfoLua*, %struct.CallInfoLua** %ci, align 8, !tbaa !6
|
||||
%l = getelementptr inbounds %struct.CallInfoLua, %struct.CallInfoLua* %15, i32 0, i32 4
|
||||
%savedpc = getelementptr inbounds %struct.CallInfoL, %struct.CallInfoL* %l, i32 0, i32 1
|
||||
store i32* %arrayidx, i32** %savedpc, align 4, !tbaa !20
|
||||
%15 = load %struct.lua_State*, %struct.lua_State** %L.addr, align 4, !tbaa !1
|
||||
%hookmask = getelementptr inbounds %struct.lua_State, %struct.lua_State* %15, i32 0, i32 22
|
||||
%16 = load i8, i8* %hookmask, align 1, !tbaa !21
|
||||
%conv = zext i8 %16 to i32
|
||||
store i32* %arrayidx, i32** %savedpc, align 8, !tbaa !22
|
||||
%16 = load %struct.lua_State*, %struct.lua_State** %L.addr, align 8, !tbaa !6
|
||||
%hookmask = getelementptr inbounds %struct.lua_State, %struct.lua_State* %16, i32 0, i32 22
|
||||
%17 = load i8, i8* %hookmask, align 8, !tbaa !23
|
||||
%conv = zext i8 %17 to i32
|
||||
%and = and i32 %conv, 12
|
||||
%tobool = icmp ne i32 %and, 0
|
||||
br i1 %tobool, label %land.lhs.true, label %if.end
|
||||
br i1 %tobool, label %18, label %26
|
||||
|
||||
land.lhs.true: ; preds = %entry
|
||||
%17 = load %struct.lua_State*, %struct.lua_State** %L.addr, align 4, !tbaa !1
|
||||
%hookcount = getelementptr inbounds %struct.lua_State, %struct.lua_State* %17, i32 0, i32 19
|
||||
%18 = load i32, i32* %hookcount, align 4, !tbaa !22
|
||||
%dec = add nsw i32 %18, -1
|
||||
store i32 %dec, i32* %hookcount, align 4, !tbaa !22
|
||||
; <label>:18: ; preds = %0
|
||||
%19 = load %struct.lua_State*, %struct.lua_State** %L.addr, align 8, !tbaa !6
|
||||
%hookcount = getelementptr inbounds %struct.lua_State, %struct.lua_State* %19, i32 0, i32 19
|
||||
%20 = load i32, i32* %hookcount, align 8, !tbaa !24
|
||||
%dec = add nsw i32 %20, -1
|
||||
store i32 %dec, i32* %hookcount, align 8, !tbaa !24
|
||||
%cmp = icmp eq i32 %dec, 0
|
||||
br i1 %cmp, label %if.then, label %lor.lhs.false
|
||||
br i1 %cmp, label %24, label %21
|
||||
|
||||
lor.lhs.false: ; preds = %land.lhs.true
|
||||
%19 = load %struct.lua_State*, %struct.lua_State** %L.addr, align 4, !tbaa !1
|
||||
%hookmask4 = getelementptr inbounds %struct.lua_State, %struct.lua_State* %19, i32 0, i32 22
|
||||
%20 = load i8, i8* %hookmask4, align 1, !tbaa !21
|
||||
%conv5 = zext i8 %20 to i32
|
||||
; <label>:21: ; preds = %18
|
||||
%22 = load %struct.lua_State*, %struct.lua_State** %L.addr, align 8, !tbaa !6
|
||||
%hookmask4 = getelementptr inbounds %struct.lua_State, %struct.lua_State* %22, i32 0, i32 22
|
||||
%23 = load i8, i8* %hookmask4, align 8, !tbaa !23
|
||||
%conv5 = zext i8 %23 to i32
|
||||
%and6 = and i32 %conv5, 4
|
||||
%tobool7 = icmp ne i32 %and6, 0
|
||||
br i1 %tobool7, label %if.then, label %if.end
|
||||
br i1 %tobool7, label %24, label %26
|
||||
|
||||
if.then: ; preds = %lor.lhs.false, %land.lhs.true
|
||||
%21 = load %struct.lua_State*, %struct.lua_State** %L.addr, align 4, !tbaa !1
|
||||
call void @luaG_traceexec(%struct.lua_State* %21)
|
||||
br label %if.end
|
||||
; <label>:24: ; preds = %21, %18
|
||||
%25 = load %struct.lua_State*, %struct.lua_State** %L.addr, align 8, !tbaa !6
|
||||
call void @luaG_traceexec(%struct.lua_State* %25)
|
||||
br label %26
|
||||
|
||||
if.end: ; preds = %if.then, %lor.lhs.false, %entry
|
||||
%22 = bitcast %struct.Proto** %p to i8*
|
||||
call void @llvm.lifetime.end(i64 4, i8* %22) #1
|
||||
%23 = bitcast %struct.LClosure** %cl to i8*
|
||||
call void @llvm.lifetime.end(i64 4, i8* %23) #1
|
||||
%24 = bitcast %struct.CallInfoLua** %ci to i8*
|
||||
call void @llvm.lifetime.end(i64 4, i8* %24) #1
|
||||
; <label>:26: ; preds = %24, %21, %0
|
||||
%27 = bitcast %struct.Proto** %p to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %27) #3
|
||||
%28 = bitcast %struct.LClosure** %cl to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %28) #3
|
||||
%29 = bitcast %struct.CallInfoLua** %ci to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %29) #3
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @llvm.lifetime.start(i64, i8* nocapture) #1
|
||||
; Function Attrs: argmemonly nounwind
|
||||
declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
|
||||
|
||||
declare void @luaG_traceexec(%struct.lua_State*) #2
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @llvm.lifetime.end(i64, i8* nocapture) #1
|
||||
; Function Attrs: argmemonly nounwind
|
||||
declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
|
||||
|
||||
attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #1 = { nounwind }
|
||||
attributes #2 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #0 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-features"="+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #1 = { argmemonly nounwind }
|
||||
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-features"="+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #3 = { nounwind }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!llvm.module.flags = !{!0}
|
||||
!llvm.ident = !{!1}
|
||||
|
||||
!0 = !{!"clang version 3.7.0 (trunk)"}
|
||||
!1 = !{!2, !2, i64 0}
|
||||
!2 = !{!"any pointer", !3, i64 0}
|
||||
!3 = !{!"omnipotent char", !4, i64 0}
|
||||
!4 = !{!"Simple C/C++ TBAA"}
|
||||
!5 = !{!6, !6, i64 0}
|
||||
!6 = !{!"int", !3, i64 0}
|
||||
!7 = !{!8, !2, i64 16}
|
||||
!8 = !{!"lua_State", !2, i64 0, !3, i64 4, !3, i64 5, !3, i64 6, !2, i64 8, !2, i64 12, !2, i64 16, !2, i64 20, !2, i64 24, !2, i64 28, !2, i64 32, !2, i64 36, !2, i64 40, !2, i64 44, !9, i64 48, !2, i64 104, !10, i64 112, !6, i64 120, !6, i64 124, !6, i64 128, !11, i64 132, !11, i64 134, !3, i64 136, !3, i64 137}
|
||||
!9 = !{!"CallInfo", !2, i64 0, !2, i64 4, !2, i64 8, !2, i64 12, !3, i64 16, !10, i64 40, !11, i64 48, !3, i64 50, !3, i64 51}
|
||||
!10 = !{!"long long", !3, i64 0}
|
||||
!11 = !{!"short", !3, i64 0}
|
||||
!12 = !{!13, !2, i64 0}
|
||||
!13 = !{!"CallInfoLua", !2, i64 0, !2, i64 4, !2, i64 8, !2, i64 12, !14, i64 16, !10, i64 32, !11, i64 40, !3, i64 42, !3, i64 43}
|
||||
!14 = !{!"CallInfoL", !2, i64 0, !2, i64 4, !10, i64 8}
|
||||
!15 = !{!16, !2, i64 12}
|
||||
!16 = !{!"LClosure", !2, i64 0, !3, i64 4, !3, i64 5, !3, i64 6, !2, i64 8, !2, i64 12, !3, i64 16}
|
||||
!17 = !{!18, !2, i64 48}
|
||||
!18 = !{!"Proto", !2, i64 0, !3, i64 4, !3, i64 5, !3, i64 6, !3, i64 7, !3, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !2, i64 44, !2, i64 48, !2, i64 52, !2, i64 56, !2, i64 60, !2, i64 64, !2, i64 68, !2, i64 72, !2, i64 76, !19, i64 80}
|
||||
!19 = !{!"RaviJITProto", !3, i64 0, !2, i64 4, !2, i64 8}
|
||||
!20 = !{!13, !2, i64 20}
|
||||
!21 = !{!8, !3, i64 136}
|
||||
!22 = !{!8, !6, i64 128}
|
||||
!0 = !{i32 1, !"wchar_size", i32 2}
|
||||
!1 = !{!"clang version 6.0.0 (tags/RELEASE_600/final)"}
|
||||
!2 = !{!3, !3, i64 0}
|
||||
!3 = !{!"int", !4, i64 0}
|
||||
!4 = !{!"omnipotent char", !5, i64 0}
|
||||
!5 = !{!"Simple C/C++ TBAA"}
|
||||
!6 = !{!7, !7, i64 0}
|
||||
!7 = !{!"any pointer", !4, i64 0}
|
||||
!8 = !{!9, !7, i64 32}
|
||||
!9 = !{!"lua_State", !7, i64 0, !4, i64 8, !4, i64 9, !4, i64 10, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !10, i64 96, !7, i64 168, !11, i64 176, !3, i64 184, !3, i64 188, !3, i64 192, !12, i64 196, !12, i64 198, !4, i64 200, !4, i64 201, !12, i64 202, !4, i64 204}
|
||||
!10 = !{!"CallInfo", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !4, i64 32, !11, i64 56, !12, i64 64, !12, i64 66, !12, i64 68, !4, i64 70, !4, i64 71}
|
||||
!11 = !{!"long long", !4, i64 0}
|
||||
!12 = !{!"short", !4, i64 0}
|
||||
!13 = !{!14, !7, i64 0}
|
||||
!14 = !{!"CallInfoLua", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !15, i64 32, !11, i64 56, !12, i64 64, !12, i64 66, !12, i64 68, !4, i64 70, !4, i64 71}
|
||||
!15 = !{!"CallInfoL", !7, i64 0, !7, i64 8, !11, i64 16}
|
||||
!16 = !{!4, !4, i64 0}
|
||||
!17 = !{!18, !7, i64 24}
|
||||
!18 = !{!"LClosure", !7, i64 0, !4, i64 8, !4, i64 9, !4, i64 10, !7, i64 16, !7, i64 24, !4, i64 32}
|
||||
!19 = !{!20, !7, i64 56}
|
||||
!20 = !{!"Proto", !7, i64 0, !4, i64 8, !4, i64 9, !4, i64 10, !4, i64 11, !4, i64 12, !3, i64 16, !3, i64 20, !3, i64 24, !3, i64 28, !3, i64 32, !3, i64 36, !3, i64 40, !3, i64 44, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !21, i64 120}
|
||||
!21 = !{!"RaviJITProto", !4, i64 0, !4, i64 1, !12, i64 2, !7, i64 8, !7, i64 16}
|
||||
!22 = !{!14, !7, i64 40}
|
||||
!23 = !{!9, !4, i64 200}
|
||||
!24 = !{!9, !3, i64 192}
|
||||
|
@ -1,83 +1,158 @@
|
||||
; ModuleID = 'lua_upval.c'
|
||||
target datalayout = "e-m:w-p:32:32-i64:64-f80:32-n8:16:32-S32"
|
||||
target triple = "i686-pc-windows-gnu"
|
||||
source_filename = "lua_upval.c"
|
||||
target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-pc-windows-msvc"
|
||||
|
||||
%struct.lua_State = type { %struct.GCObject*, i8, i8, i8, %struct.TValue*, %struct.global_State*, %struct.CallInfoLua*, i32*, %struct.TValue*, %struct.TValue*, %struct.UpVal*, %struct.GCObject*, %struct.lua_State*, %struct.lua_longjmp*, %struct.CallInfo, void (%struct.lua_State*, %struct.lua_Debug*)*, i64, i32, i32, i32, i16, i16, i8, i8 }
|
||||
%struct.lua_State = type { %struct.GCObject*, i8, i8, i8, %struct.TValue*, %struct.global_State*, %struct.CallInfoLua*, i32*, %struct.TValue*, %struct.TValue*, %struct.UpVal*, %struct.GCObject*, %struct.lua_State*, %struct.lua_longjmp*, %struct.CallInfo, void (%struct.lua_State*, %struct.lua_Debug*)*, i64, i32, i32, i32, i16, i16, i8, i8, i16, i8 }
|
||||
%struct.global_State = type opaque
|
||||
%struct.CallInfoLua = type { %struct.TValue*, %struct.TValue*, %struct.CallInfo*, %struct.CallInfo*, %struct.CallInfoL, i64, i16, i8, i8 }
|
||||
%struct.CallInfoLua = type { %struct.TValue*, %struct.TValue*, %struct.CallInfo*, %struct.CallInfo*, %struct.CallInfoL, i64, i16, i16, i16, i8, i8 }
|
||||
%struct.CallInfoL = type { %struct.TValue*, i32*, i64 }
|
||||
%struct.UpVal = type { %struct.TValue*, i64, %union.anon.0 }
|
||||
%union.anon.0 = type { %struct.TValue }
|
||||
%struct.TValue = type { %union.Value, i32 }
|
||||
%union.Value = type { i64 }
|
||||
%union.anon.0 = type { %struct.anon }
|
||||
%struct.anon = type { %struct.UpVal*, i32 }
|
||||
%struct.GCObject = type { %struct.GCObject*, i8, i8 }
|
||||
%struct.lua_longjmp = type opaque
|
||||
%struct.CallInfo = type { %struct.TValue*, %struct.TValue*, %struct.CallInfo*, %struct.CallInfo*, %union.anon, i64, i16, i8, i8 }
|
||||
%union.anon = type { %struct.CallInfoC }
|
||||
%struct.CallInfoC = type { i32 (%struct.lua_State*, i32, i64)*, i64, i64 }
|
||||
%struct.CallInfo = type { %struct.TValue*, %struct.TValue*, %struct.CallInfo*, %struct.CallInfo*, %union.anon, i64, i16, i16, i16, i8, i8 }
|
||||
%union.anon = type { %struct.CallInfoL }
|
||||
%struct.lua_Debug = type opaque
|
||||
%struct.LClosure = type { %struct.GCObject*, i8, i8, i8, %struct.GCObject*, %struct.Proto*, [1 x %struct.UpVal*] }
|
||||
%struct.Proto = type { %struct.GCObject*, i8, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, %struct.TValue*, i32*, %struct.Proto**, i32*, %struct.LocVar*, %struct.Upvaldesc*, %struct.LClosure*, %struct.TString*, %struct.GCObject*, %struct.RaviJITProto }
|
||||
%struct.LocVar = type { %struct.TString*, i32, i32, i32 }
|
||||
%struct.Upvaldesc = type { %struct.TString*, i32, i8, i8 }
|
||||
%struct.TString = type { %struct.GCObject*, i8, i8, i8, i32, i64, %struct.TString* }
|
||||
%struct.RaviJITProto = type { i8, i8*, i32 (%struct.lua_State*)* }
|
||||
%struct.LocVar = type { %struct.TString*, %struct.TString*, i32, i32, i8 }
|
||||
%struct.Upvaldesc = type { %struct.TString*, %struct.TString*, i8, i8, i8 }
|
||||
%struct.TString = type { %struct.GCObject*, i8, i8, i8, i8, i32, %union.anon.1 }
|
||||
%union.anon.1 = type { i64 }
|
||||
%struct.RaviJITProto = type { i8, i8, i16, i8*, i32 (%struct.lua_State*)* }
|
||||
%struct.TValue = type { %union.Value, i16 }
|
||||
%union.Value = type { %struct.GCObject* }
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @luaV_op_call(%struct.lua_State* %L, %struct.LClosure* nocapture readonly %cl, %struct.TValue* nocapture readonly %ra, i32 %b, i32 %c) #0 {
|
||||
entry:
|
||||
%arrayidx = getelementptr inbounds %struct.LClosure* %cl, i32 0, i32 6, i32 %b
|
||||
%0 = load %struct.UpVal** %arrayidx, align 4, !tbaa !1
|
||||
%tt_ = getelementptr inbounds %struct.TValue* %ra, i32 0, i32 1
|
||||
%1 = load i32* %tt_, align 4, !tbaa !5
|
||||
%v = getelementptr inbounds %struct.UpVal* %0, i32 0, i32 0
|
||||
%2 = load %struct.TValue** %v, align 4, !tbaa !8
|
||||
%tt_1 = getelementptr inbounds %struct.TValue* %2, i32 0, i32 1
|
||||
store i32 %1, i32* %tt_1, align 4, !tbaa !5
|
||||
%n = bitcast %struct.TValue* %ra to double*
|
||||
%3 = load double* %n, align 8, !tbaa !11
|
||||
%4 = bitcast %struct.UpVal* %0 to double**
|
||||
%5 = load double** %4, align 4, !tbaa !8
|
||||
store double %3, double* %5, align 8, !tbaa !11
|
||||
%6 = load %struct.TValue** %v, align 4, !tbaa !8
|
||||
%tt_6 = getelementptr inbounds %struct.TValue* %6, i32 0, i32 1
|
||||
%7 = load i32* %tt_6, align 4, !tbaa !5
|
||||
%and = and i32 %7, 64
|
||||
%value = getelementptr inbounds %struct.UpVal* %0, i32 0, i32 2, i32 0
|
||||
%tt_7 = getelementptr inbounds %struct.UpVal* %0, i32 0, i32 2, i32 0, i32 1
|
||||
store i32 1, i32* %tt_7, align 4, !tbaa !5
|
||||
%8 = load %struct.TValue** %v, align 4, !tbaa !8
|
||||
%cmp = icmp ne %struct.TValue* %8, %value
|
||||
%tobool = icmp eq i32 %and, 0
|
||||
%or.cond = or i1 %tobool, %cmp
|
||||
br i1 %or.cond, label %if.end, label %if.then
|
||||
define void @luaV_op_call(%struct.lua_State* %L, %struct.LClosure* %cl, %struct.TValue* %ra, i32 %b, i32 %c) #0 {
|
||||
%c.addr = alloca i32, align 4
|
||||
%b.addr = alloca i32, align 4
|
||||
%ra.addr = alloca %struct.TValue*, align 8
|
||||
%cl.addr = alloca %struct.LClosure*, align 8
|
||||
%L.addr = alloca %struct.lua_State*, align 8
|
||||
%uv = alloca %struct.UpVal*, align 8
|
||||
%b1 = alloca i32, align 4
|
||||
%value8 = alloca %struct.TValue*, align 8
|
||||
%b2 = alloca i32, align 4
|
||||
store i32 %c, i32* %c.addr, align 4, !tbaa !2
|
||||
store i32 %b, i32* %b.addr, align 4, !tbaa !2
|
||||
store %struct.TValue* %ra, %struct.TValue** %ra.addr, align 8, !tbaa !6
|
||||
store %struct.LClosure* %cl, %struct.LClosure** %cl.addr, align 8, !tbaa !6
|
||||
store %struct.lua_State* %L, %struct.lua_State** %L.addr, align 8, !tbaa !6
|
||||
%1 = bitcast %struct.UpVal** %uv to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %1) #3
|
||||
%2 = load %struct.LClosure*, %struct.LClosure** %cl.addr, align 8, !tbaa !6
|
||||
%upvals = getelementptr inbounds %struct.LClosure, %struct.LClosure* %2, i32 0, i32 6
|
||||
%3 = load i32, i32* %b.addr, align 4, !tbaa !2
|
||||
%idxprom = sext i32 %3 to i64
|
||||
%arrayidx = getelementptr inbounds [1 x %struct.UpVal*], [1 x %struct.UpVal*]* %upvals, i64 0, i64 %idxprom
|
||||
%4 = load %struct.UpVal*, %struct.UpVal** %arrayidx, align 8, !tbaa !6
|
||||
store %struct.UpVal* %4, %struct.UpVal** %uv, align 8, !tbaa !6
|
||||
%5 = load %struct.TValue*, %struct.TValue** %ra.addr, align 8, !tbaa !6
|
||||
%tt_ = getelementptr inbounds %struct.TValue, %struct.TValue* %5, i32 0, i32 1
|
||||
%6 = load i16, i16* %tt_, align 8, !tbaa !8
|
||||
%7 = load %struct.UpVal*, %struct.UpVal** %uv, align 8, !tbaa !6
|
||||
%v = getelementptr inbounds %struct.UpVal, %struct.UpVal* %7, i32 0, i32 0
|
||||
%8 = load %struct.TValue*, %struct.TValue** %v, align 8, !tbaa !11
|
||||
%tt_1 = getelementptr inbounds %struct.TValue, %struct.TValue* %8, i32 0, i32 1
|
||||
store i16 %6, i16* %tt_1, align 8, !tbaa !8
|
||||
%9 = load %struct.TValue*, %struct.TValue** %ra.addr, align 8, !tbaa !6
|
||||
%value_ = getelementptr inbounds %struct.TValue, %struct.TValue* %9, i32 0, i32 0
|
||||
%n = bitcast %union.Value* %value_ to double*
|
||||
%10 = load double, double* %n, align 8, !tbaa !14
|
||||
%11 = load %struct.UpVal*, %struct.UpVal** %uv, align 8, !tbaa !6
|
||||
%v2 = getelementptr inbounds %struct.UpVal, %struct.UpVal* %11, i32 0, i32 0
|
||||
%12 = load %struct.TValue*, %struct.TValue** %v2, align 8, !tbaa !11
|
||||
%value_3 = getelementptr inbounds %struct.TValue, %struct.TValue* %12, i32 0, i32 0
|
||||
%n4 = bitcast %union.Value* %value_3 to double*
|
||||
store double %10, double* %n4, align 8, !tbaa !14
|
||||
%13 = bitcast i32* %b1 to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 4, i8* %13) #3
|
||||
%14 = load %struct.UpVal*, %struct.UpVal** %uv, align 8, !tbaa !6
|
||||
%v5 = getelementptr inbounds %struct.UpVal, %struct.UpVal* %14, i32 0, i32 0
|
||||
%15 = load %struct.TValue*, %struct.TValue** %v5, align 8, !tbaa !11
|
||||
%tt_6 = getelementptr inbounds %struct.TValue, %struct.TValue* %15, i32 0, i32 1
|
||||
%16 = load i16, i16* %tt_6, align 8, !tbaa !8
|
||||
%conv = zext i16 %16 to i32
|
||||
%and = and i32 %conv, 32768
|
||||
store i32 %and, i32* %b1, align 4, !tbaa !2
|
||||
%17 = load %struct.UpVal*, %struct.UpVal** %uv, align 8, !tbaa !6
|
||||
%u = getelementptr inbounds %struct.UpVal, %struct.UpVal* %17, i32 0, i32 2
|
||||
%value = bitcast %union.anon.0* %u to %struct.TValue*
|
||||
%tt_7 = getelementptr inbounds %struct.TValue, %struct.TValue* %value, i32 0, i32 1
|
||||
store i16 1, i16* %tt_7, align 8, !tbaa !14
|
||||
%18 = bitcast %struct.TValue** %value8 to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 8, i8* %18) #3
|
||||
%19 = load %struct.UpVal*, %struct.UpVal** %uv, align 8, !tbaa !6
|
||||
%u9 = getelementptr inbounds %struct.UpVal, %struct.UpVal* %19, i32 0, i32 2
|
||||
%value10 = bitcast %union.anon.0* %u9 to %struct.TValue*
|
||||
store %struct.TValue* %value10, %struct.TValue** %value8, align 8, !tbaa !6
|
||||
%20 = bitcast i32* %b2 to i8*
|
||||
call void @llvm.lifetime.start.p0i8(i64 4, i8* %20) #3
|
||||
%21 = load %struct.UpVal*, %struct.UpVal** %uv, align 8, !tbaa !6
|
||||
%v11 = getelementptr inbounds %struct.UpVal, %struct.UpVal* %21, i32 0, i32 0
|
||||
%22 = load %struct.TValue*, %struct.TValue** %v11, align 8, !tbaa !11
|
||||
%23 = load %struct.TValue*, %struct.TValue** %value8, align 8, !tbaa !6
|
||||
%cmp = icmp ne %struct.TValue* %22, %23
|
||||
%conv12 = zext i1 %cmp to i32
|
||||
store i32 %conv12, i32* %b2, align 4, !tbaa !2
|
||||
%24 = load i32, i32* %b1, align 4, !tbaa !2
|
||||
%tobool = icmp ne i32 %24, 0
|
||||
br i1 %tobool, label %25, label %30
|
||||
|
||||
if.then: ; preds = %entry
|
||||
tail call void @luaC_upvalbarrier_(%struct.lua_State* %L, %struct.UpVal* %0) #2
|
||||
br label %if.end
|
||||
; <label>:25: ; preds = %0
|
||||
%26 = load i32, i32* %b2, align 4, !tbaa !2
|
||||
%tobool13 = icmp ne i32 %26, 0
|
||||
br i1 %tobool13, label %30, label %27
|
||||
|
||||
if.end: ; preds = %entry, %if.then
|
||||
; <label>:27: ; preds = %25
|
||||
%28 = load %struct.UpVal*, %struct.UpVal** %uv, align 8, !tbaa !6
|
||||
%29 = load %struct.lua_State*, %struct.lua_State** %L.addr, align 8, !tbaa !6
|
||||
call void @luaC_upvalbarrier_(%struct.lua_State* %29, %struct.UpVal* %28)
|
||||
br label %30
|
||||
|
||||
; <label>:30: ; preds = %27, %25, %0
|
||||
%31 = bitcast i32* %b2 to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 4, i8* %31) #3
|
||||
%32 = bitcast %struct.TValue** %value8 to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %32) #3
|
||||
%33 = bitcast i32* %b1 to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 4, i8* %33) #3
|
||||
%34 = bitcast %struct.UpVal** %uv to i8*
|
||||
call void @llvm.lifetime.end.p0i8(i64 8, i8* %34) #3
|
||||
ret void
|
||||
}
|
||||
|
||||
declare void @luaC_upvalbarrier_(%struct.lua_State*, %struct.UpVal*) #1
|
||||
; Function Attrs: argmemonly nounwind
|
||||
declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
|
||||
|
||||
declare void @luaC_upvalbarrier_(%struct.lua_State*, %struct.UpVal*) #2
|
||||
|
||||
; Function Attrs: argmemonly nounwind
|
||||
declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
|
||||
|
||||
attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #2 = { nounwind }
|
||||
attributes #0 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-features"="+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #1 = { argmemonly nounwind }
|
||||
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-features"="+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #3 = { nounwind }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!llvm.module.flags = !{!0}
|
||||
!llvm.ident = !{!1}
|
||||
|
||||
!0 = metadata !{metadata !"clang version 3.6.0 (trunk)"}
|
||||
!1 = metadata !{metadata !2, metadata !2, i64 0}
|
||||
!2 = metadata !{metadata !"any pointer", metadata !3, i64 0}
|
||||
!3 = metadata !{metadata !"omnipotent char", metadata !4, i64 0}
|
||||
!4 = metadata !{metadata !"Simple C/C++ TBAA"}
|
||||
!5 = metadata !{metadata !6, metadata !7, i64 8}
|
||||
!6 = metadata !{metadata !"TValue", metadata !3, i64 0, metadata !7, i64 8}
|
||||
!7 = metadata !{metadata !"int", metadata !3, i64 0}
|
||||
!8 = metadata !{metadata !9, metadata !2, i64 0}
|
||||
!9 = metadata !{metadata !"UpVal", metadata !2, i64 0, metadata !10, i64 8, metadata !3, i64 16}
|
||||
!10 = metadata !{metadata !"long long", metadata !3, i64 0}
|
||||
!11 = metadata !{metadata !12, metadata !12, i64 0}
|
||||
!12 = metadata !{metadata !"double", metadata !3, i64 0}
|
||||
!0 = !{i32 1, !"wchar_size", i32 2}
|
||||
!1 = !{!"clang version 6.0.0 (tags/RELEASE_600/final)"}
|
||||
!2 = !{!3, !3, i64 0}
|
||||
!3 = !{!"int", !4, i64 0}
|
||||
!4 = !{!"omnipotent char", !5, i64 0}
|
||||
!5 = !{!"Simple C/C++ TBAA"}
|
||||
!6 = !{!7, !7, i64 0}
|
||||
!7 = !{!"any pointer", !4, i64 0}
|
||||
!8 = !{!9, !10, i64 8}
|
||||
!9 = !{!"TValue", !4, i64 0, !10, i64 8}
|
||||
!10 = !{!"short", !4, i64 0}
|
||||
!11 = !{!12, !7, i64 0}
|
||||
!12 = !{!"UpVal", !7, i64 0, !13, i64 8, !4, i64 16}
|
||||
!13 = !{!"long long", !4, i64 0}
|
||||
!14 = !{!4, !4, i64 0}
|
||||
|
@ -1,5 +1,5 @@
|
||||
setlocal
|
||||
set PATH=%PATH%;"c:\Program Files (x86)\LLVM\bin"
|
||||
set PATH=%PATH%;"c:\Software\clang6\bin"
|
||||
|
||||
rem clang -cc1 -O1 -disable-llvm-optzns -S -emit-llvm %1
|
||||
clang -cc1 -O2 -S -emit-llvm %1
|
||||
clang -cc1 -O1 -disable-llvm-optzns -S -emit-llvm %1
|
||||
rem clang -cc1 -O2 -S -emit-llvm %1
|
@ -1,37 +1,53 @@
|
||||
; ModuleID = 'tab.c'
|
||||
source_filename = "tab.c"
|
||||
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "i686-pc-windows-msvc"
|
||||
target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-pc-windows-msvc"
|
||||
|
||||
%struct.TValue = type { %union.Value, i32 }
|
||||
%union.Value = type { i64 }
|
||||
%struct.TValue = type { %union.Value, i16 }
|
||||
%union.Value = type { %struct.GCObject* }
|
||||
%struct.GCObject = type { %struct.GCObject*, i8, i8 }
|
||||
%union.GCUnion = type { %struct.lua_State }
|
||||
%struct.lua_State = type { %struct.GCObject*, i8, i8, i8, %struct.TValue*, %struct.global_State*, %struct.CallInfoLua*, i32*, %struct.TValue*, %struct.TValue*, %struct.UpVal*, %struct.GCObject*, %struct.lua_State*, %struct.lua_longjmp*, %struct.CallInfo, void (%struct.lua_State*, %struct.lua_Debug*)*, i64, i32, i32, i32, i16, i16, i8, i8, i16, i8 }
|
||||
%struct.global_State = type opaque
|
||||
%struct.CallInfoLua = type { %struct.TValue*, %struct.TValue*, %struct.CallInfo*, %struct.CallInfo*, %struct.CallInfoL, i64, i16, i16, i16, i8, i8 }
|
||||
%struct.CallInfoL = type { %struct.TValue*, i32*, i64 }
|
||||
%struct.UpVal = type { %struct.TValue*, i64, %union.anon.0 }
|
||||
%union.anon.0 = type { %struct.anon }
|
||||
%struct.anon = type { %struct.UpVal*, i32 }
|
||||
%struct.lua_longjmp = type opaque
|
||||
%struct.CallInfo = type { %struct.TValue*, %struct.TValue*, %struct.CallInfo*, %struct.CallInfo*, %union.anon, i64, i16, i16, i16, i8, i8 }
|
||||
%union.anon = type { %struct.CallInfoL }
|
||||
%struct.lua_Debug = type opaque
|
||||
%struct.Table = type { %struct.GCObject*, i8, i8, i8, i8, i32, %struct.TValue*, %struct.Node*, %struct.Node*, %struct.Table*, %struct.GCObject*, %struct.RaviArray, i32 }
|
||||
%struct.Node = type { %struct.TValue, %union.TKey }
|
||||
%union.TKey = type { %struct.anon.2 }
|
||||
%struct.anon.2 = type { %union.Value, i32, i32 }
|
||||
%struct.GCObject = type { %struct.GCObject*, i8, i8 }
|
||||
%struct.RaviArray = type { i8*, i32, i32, i32 }
|
||||
%struct.anon.2 = type { %union.Value, i16, i32 }
|
||||
%struct.RaviArray = type { i8*, i32, i32, i8, i8 }
|
||||
|
||||
; Function Attrs: norecurse nounwind readonly
|
||||
define i32 @tablevalue(%struct.TValue* nocapture readonly %v) local_unnamed_addr #0 {
|
||||
entry:
|
||||
%0 = bitcast %struct.TValue* %v to %struct.Table**
|
||||
%1 = load %struct.Table*, %struct.Table** %0, align 8, !tbaa !1
|
||||
%sizearray = getelementptr inbounds %struct.Table, %struct.Table* %1, i32 0, i32 5
|
||||
%2 = load i32, i32* %sizearray, align 8, !tbaa !5
|
||||
ret i32 %2
|
||||
; Function Attrs: nounwind
|
||||
define i32 @tablevalue(%struct.TValue* %v) #0 {
|
||||
%v.addr = alloca %struct.TValue*, align 8
|
||||
store %struct.TValue* %v, %struct.TValue** %v.addr, align 8, !tbaa !2
|
||||
%1 = load %struct.TValue*, %struct.TValue** %v.addr, align 8, !tbaa !2
|
||||
%value_ = getelementptr inbounds %struct.TValue, %struct.TValue* %1, i32 0, i32 0
|
||||
%gc = bitcast %union.Value* %value_ to %struct.GCObject**
|
||||
%2 = load %struct.GCObject*, %struct.GCObject** %gc, align 8, !tbaa !6
|
||||
%3 = bitcast %struct.GCObject* %2 to %union.GCUnion*
|
||||
%h = bitcast %union.GCUnion* %3 to %struct.Table*
|
||||
%sizearray = getelementptr inbounds %struct.Table, %struct.Table* %h, i32 0, i32 5
|
||||
%4 = load i32, i32* %sizearray, align 4, !tbaa !6
|
||||
ret i32 %4
|
||||
}
|
||||
|
||||
attributes #0 = { norecurse nounwind readonly "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-features"="+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #0 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-features"="+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!llvm.module.flags = !{!0}
|
||||
!llvm.ident = !{!1}
|
||||
|
||||
!0 = !{!"clang version 3.9.0 (trunk)"}
|
||||
!1 = !{!2, !2, i64 0}
|
||||
!2 = !{!"any pointer", !3, i64 0}
|
||||
!3 = !{!"omnipotent char", !4, i64 0}
|
||||
!4 = !{!"Simple C/C++ TBAA"}
|
||||
!5 = !{!6, !7, i64 8}
|
||||
!6 = !{!"Table", !2, i64 0, !3, i64 4, !3, i64 5, !3, i64 6, !3, i64 7, !7, i64 8, !2, i64 12, !2, i64 16, !2, i64 20, !2, i64 24, !2, i64 28, !8, i64 32, !7, i64 48}
|
||||
!7 = !{!"int", !3, i64 0}
|
||||
!8 = !{!"RaviArray", !2, i64 0, !3, i64 4, !7, i64 8, !7, i64 12}
|
||||
!0 = !{i32 1, !"wchar_size", i32 2}
|
||||
!1 = !{!"clang version 6.0.0 (tags/RELEASE_600/final)"}
|
||||
!2 = !{!3, !3, i64 0}
|
||||
!3 = !{!"any pointer", !4, i64 0}
|
||||
!4 = !{!"omnipotent char", !5, i64 0}
|
||||
!5 = !{!"Simple C/C++ TBAA"}
|
||||
!6 = !{!4, !4, i64 0}
|
||||
|
Loading…
Reference in new issue