Cfg.threadProg
-
Upload
douglas-teixeira -
Category
Documents
-
view
213 -
download
0
description
Transcript of Cfg.threadProg
CFG for 'threadProg' function
entry: %0 = ptrtoint i8* %threadID to i64 %rem = srem i64 %0, 2 %tobool = icmp ne i64 %rem, 0 br i1 %tobool, label %if.then, label %if.else
T F
if.then: %mul = mul nsw i64 %0, 1000 %add = add nsw i64 %0, 1 %conv = trunc i64 %mul to i32 %conv1 = trunc i64 %add to i32 %call = call i32 @divide(i32 %conv, i32 %conv1) %conv2 = sext i32 %call to i64 %cmp = icmp slt i64 %conv2, 0 br i1 %cmp, label %if.then4, label %if.end
T F
if.else: %mul5 = mul nsw i64 %0, 2000 %add6 = add nsw i64 %0, 2 %conv7 = trunc i64 %mul5 to i32 %conv8 = trunc i64 %add6 to i32 %call9 = call i32 @divide(i32 %conv7, i32 %conv8) %conv10 = sext i32 %call9 to i64 br label %if.end11
if.then4: ret i8* null
if.end: br label %if.end11
if.end11: %RR.0 = phi i64 [ %conv2, %if.end ], [ %conv10, %if.else ] %call12 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([25 x i8]* @.str, i32 0, i32 0), i64 %0, i64 %RR.0) call void @pthread_exit(i8* null) #5 unreachable