zhanhaoming 4 days ago
parent 7ff7fd07e5
commit 31d78f33fd

File diff suppressed because one or more lines are too long

@ -1,5 +1,2 @@
./test_todo/testdata2022/final_performance/layernorm1.sy
./test_todo/testdata2022/final_performance/layernorm2.sy
./test_todo/testdata2022/final_performance/layernorm3.sy
./test_todo/testdata2022/performance/floyd-2.sy
./test_todo/testdata2022/performance/stencil0.sy

Binary file not shown.

@ -1,373 +0,0 @@
@a = global [1000000 x float] zeroinitializer
declare i32 @getint()
declare float @getfloat()
declare i32 @getarray(i32* %arg.a)
declare i32 @getfarray(float* %arg.a)
declare i32 @getch()
declare void @putint(i32 %arg.x)
declare void @putfloat(float %arg.x)
declare void @putarray(i32 %arg.n, i32* %arg.a)
declare void @putfarray(i32 %arg.n, float* %arg.a)
declare void @putch(i32 %arg.x)
declare void @starttime()
declare void @stoptime()
define float @myAbs(float %arg.x) {
entry:
%t0 = alloca float
store float %arg.x, float* %t0
%t1 = load float, float* %t0
%t2 = fcmp olt float %t1, 0x0000000000000000
%t3 = zext i1 %t2 to i32
%t4 = icmp ne i32 %t3, 0
br i1 %t4, label %if.then.1, label %if.end.2
if.then.1:
%t5 = load float, float* %t0
%t6 = fsub float 0x0000000000000000, %t5
store float %t6, float* %t0
br label %if.end.2
if.end.2:
%t7 = load float, float* %t0
ret float %t7
}
define float @sqrt(float %arg.x) {
entry:
%t9 = alloca float
%t10 = alloca float
%t12 = alloca float
%t8 = alloca float
store float %arg.x, float* %t8
store float 0x0000000000000000, float* %t9
%t11 = load float, float* %t8
store float %t11, float* %t10
%t13 = load float, float* %t9
%t14 = load float, float* %t10
%t15 = fadd float %t13, %t14
%t16 = fdiv float %t15, 0x4000000000000000
store float %t16, float* %t12
br label %while.cond.3
while.cond.3:
%t17 = load float, float* %t12
%t18 = load float, float* %t12
%t19 = fmul float %t17, %t18
%t20 = load float, float* %t8
%t21 = fsub float %t19, %t20
%t22 = call float @myAbs(float %t21)
%t23 = fcmp ogt float %t22, 0x3F50624DE0000000
%t24 = zext i1 %t23 to i32
%t25 = icmp ne i32 %t24, 0
br i1 %t25, label %while.body.4, label %while.end.5
while.body.4:
%t26 = load float, float* %t12
%t27 = load float, float* %t12
%t28 = fmul float %t26, %t27
%t29 = load float, float* %t8
%t30 = fcmp ogt float %t28, %t29
%t31 = zext i1 %t30 to i32
%t32 = icmp ne i32 %t31, 0
br i1 %t32, label %if.then.6, label %if.else.7
while.end.5:
%t43 = load float, float* %t12
ret float %t43
if.then.6:
%t33 = load float, float* %t12
store float %t33, float* %t10
%t34 = load float, float* %t12
%t35 = load float, float* %t9
%t36 = fadd float %t34, %t35
%t37 = fdiv float %t36, 0x4000000000000000
store float %t37, float* %t12
br label %if.end.8
if.else.7:
%t38 = load float, float* %t12
store float %t38, float* %t9
%t39 = load float, float* %t12
%t40 = load float, float* %t10
%t41 = fadd float %t39, %t40
%t42 = fdiv float %t41, 0x4000000000000000
store float %t42, float* %t12
br label %if.end.8
if.end.8:
br label %while.cond.3
}
define i32 @main() {
entry:
%t44 = alloca i32
%t45 = alloca i32
%t46 = alloca i32
%t47 = alloca i32
%t48 = alloca float
%t69 = alloca float, i32 1000
%t102 = alloca float, i32 1000
store i32 0, i32* %t44
store i32 0, i32* %t45
store i32 0, i32* %t46
store i32 0, i32* %t47
store float 0x0000000000000000, float* %t48
store i32 0, i32* %t45
br label %while.cond.9
while.cond.9:
%t49 = load i32, i32* %t45
%t50 = icmp slt i32 %t49, 1000
%t51 = zext i1 %t50 to i32
%t52 = icmp ne i32 %t51, 0
br i1 %t52, label %while.body.10, label %while.end.11
while.body.10:
%t53 = load i32, i32* %t45
%t54 = mul i32 %t53, 1000
%t55 = getelementptr inbounds [1000000 x float], [1000000 x float]* @a, i32 0, i32 %t54
%t56 = call i32 @getfarray(float* %t55)
store i32 %t56, i32* %t44
%t57 = load i32, i32* %t44
%t58 = icmp ne i32 %t57, 1000
%t59 = zext i1 %t58 to i32
%t60 = icmp ne i32 %t59, 0
br i1 %t60, label %if.then.12, label %if.end.13
while.end.11:
call void @starttime()
store i32 0, i32* %t47
br label %while.cond.14
if.then.12:
%t61 = load i32, i32* %t44
ret i32 %t61
if.end.13:
%t62 = load i32, i32* %t45
%t63 = add i32 %t62, 1
store i32 %t63, i32* %t45
br label %while.cond.9
while.cond.14:
%t65 = load i32, i32* %t47
%t66 = icmp slt i32 %t65, 100
%t67 = zext i1 %t66 to i32
%t68 = icmp ne i32 %t67, 0
br i1 %t68, label %while.body.15, label %while.end.16
while.body.15:
store i32 0, i32* %t45
br label %while.cond.17
while.end.16:
store i32 0, i32* %t45
br label %while.cond.35
while.cond.17:
%t70 = load i32, i32* %t45
%t71 = icmp slt i32 %t70, 1000
%t72 = zext i1 %t71 to i32
%t73 = icmp ne i32 %t72, 0
br i1 %t73, label %while.body.18, label %while.end.19
while.body.18:
store i32 0, i32* %t46
%t74 = load i32, i32* %t45
%t75 = getelementptr inbounds float, float* %t69, i32 %t74
store float 0x0000000000000000, float* %t75
br label %while.cond.20
while.end.19:
store i32 0, i32* %t45
br label %while.cond.23
while.cond.20:
%t76 = load i32, i32* %t46
%t77 = icmp slt i32 %t76, 1000
%t78 = zext i1 %t77 to i32
%t79 = icmp ne i32 %t78, 0
br i1 %t79, label %while.body.21, label %while.end.22
while.body.21:
%t80 = load i32, i32* %t45
%t81 = getelementptr inbounds float, float* %t69, i32 %t80
%t82 = load i32, i32* %t45
%t83 = getelementptr inbounds float, float* %t69, i32 %t82
%t84 = load float, float* %t83
%t85 = load i32, i32* %t45
%t86 = load i32, i32* %t46
%t87 = mul i32 %t85, 1000
%t88 = add i32 %t87, %t86
%t89 = getelementptr inbounds [1000000 x float], [1000000 x float]* @a, i32 0, i32 %t88
%t90 = load float, float* %t89
%t91 = fadd float %t84, %t90
store float %t91, float* %t81
%t92 = load i32, i32* %t46
%t93 = add i32 %t92, 1
store i32 %t93, i32* %t46
br label %while.cond.20
while.end.22:
%t94 = load i32, i32* %t45
%t95 = getelementptr inbounds float, float* %t69, i32 %t94
%t96 = load i32, i32* %t45
%t97 = getelementptr inbounds float, float* %t69, i32 %t96
%t98 = load float, float* %t97
%t99 = fdiv float %t98, 0x408F400000000000
store float %t99, float* %t95
%t100 = load i32, i32* %t45
%t101 = add i32 %t100, 1
store i32 %t101, i32* %t45
br label %while.cond.17
while.cond.23:
%t103 = load i32, i32* %t45
%t104 = icmp slt i32 %t103, 1000
%t105 = zext i1 %t104 to i32
%t106 = icmp ne i32 %t105, 0
br i1 %t106, label %while.body.24, label %while.end.25
while.body.24:
store i32 0, i32* %t46
%t107 = load i32, i32* %t45
%t108 = getelementptr inbounds float, float* %t102, i32 %t107
store float 0x0000000000000000, float* %t108
br label %while.cond.26
while.end.25:
store i32 0, i32* %t45
br label %while.cond.29
while.cond.26:
%t109 = load i32, i32* %t46
%t110 = icmp slt i32 %t109, 1000
%t111 = zext i1 %t110 to i32
%t112 = icmp ne i32 %t111, 0
br i1 %t112, label %while.body.27, label %while.end.28
while.body.27:
%t113 = load i32, i32* %t45
%t114 = getelementptr inbounds float, float* %t102, i32 %t113
%t115 = load i32, i32* %t45
%t116 = getelementptr inbounds float, float* %t102, i32 %t115
%t117 = load float, float* %t116
%t118 = load i32, i32* %t45
%t119 = load i32, i32* %t46
%t120 = mul i32 %t118, 1000
%t121 = add i32 %t120, %t119
%t122 = getelementptr inbounds [1000000 x float], [1000000 x float]* @a, i32 0, i32 %t121
%t123 = load float, float* %t122
%t124 = load i32, i32* %t45
%t125 = getelementptr inbounds float, float* %t69, i32 %t124
%t126 = load float, float* %t125
%t127 = fsub float %t123, %t126
%t128 = load i32, i32* %t45
%t129 = load i32, i32* %t46
%t130 = mul i32 %t128, 1000
%t131 = add i32 %t130, %t129
%t132 = getelementptr inbounds [1000000 x float], [1000000 x float]* @a, i32 0, i32 %t131
%t133 = load float, float* %t132
%t134 = load i32, i32* %t45
%t135 = getelementptr inbounds float, float* %t69, i32 %t134
%t136 = load float, float* %t135
%t137 = fsub float %t133, %t136
%t138 = fmul float %t127, %t137
%t139 = fadd float %t117, %t138
store float %t139, float* %t114
%t140 = load i32, i32* %t46
%t141 = add i32 %t140, 1
store i32 %t141, i32* %t46
br label %while.cond.26
while.end.28:
%t142 = load i32, i32* %t45
%t143 = getelementptr inbounds float, float* %t102, i32 %t142
%t144 = load i32, i32* %t45
%t145 = getelementptr inbounds float, float* %t102, i32 %t144
%t146 = load float, float* %t145
%t147 = fdiv float %t146, 0x408F400000000000
store float %t147, float* %t143
%t148 = load i32, i32* %t45
%t149 = getelementptr inbounds float, float* %t102, i32 %t148
%t150 = load i32, i32* %t45
%t151 = getelementptr inbounds float, float* %t102, i32 %t150
%t152 = load float, float* %t151
%t153 = fadd float %t152, 0x3F847AE140000000
%t154 = call float @sqrt(float %t153)
store float %t154, float* %t149
%t155 = load i32, i32* %t45
%t156 = add i32 %t155, 1
store i32 %t156, i32* %t45
br label %while.cond.23
while.cond.29:
%t157 = load i32, i32* %t45
%t158 = icmp slt i32 %t157, 1000
%t159 = zext i1 %t158 to i32
%t160 = icmp ne i32 %t159, 0
br i1 %t160, label %while.body.30, label %while.end.31
while.body.30:
store i32 0, i32* %t46
br label %while.cond.32
while.end.31:
%t196 = load i32, i32* %t47
%t197 = add i32 %t196, 1
store i32 %t197, i32* %t47
br label %while.cond.14
while.cond.32:
%t161 = load i32, i32* %t46
%t162 = icmp slt i32 %t161, 1000
%t163 = zext i1 %t162 to i32
%t164 = icmp ne i32 %t163, 0
br i1 %t164, label %while.body.33, label %while.end.34
while.body.33:
%t165 = load i32, i32* %t45
%t166 = load i32, i32* %t46
%t167 = mul i32 %t165, 1000
%t168 = add i32 %t167, %t166
%t169 = getelementptr inbounds [1000000 x float], [1000000 x float]* @a, i32 0, i32 %t168
%t170 = load i32, i32* %t45
%t171 = load i32, i32* %t46
%t172 = mul i32 %t170, 1000
%t173 = add i32 %t172, %t171
%t174 = getelementptr inbounds [1000000 x float], [1000000 x float]* @a, i32 0, i32 %t173
%t175 = load float, float* %t174
%t176 = load i32, i32* %t45
%t177 = getelementptr inbounds float, float* %t69, i32 %t176
%t178 = load float, float* %t177
%t179 = fsub float %t175, %t178
%t180 = load i32, i32* %t45
%t181 = getelementptr inbounds float, float* %t102, i32 %t180
%t182 = load float, float* %t181
%t183 = fdiv float %t179, %t182
store float %t183, float* %t169
%t184 = load float, float* %t48
%t185 = load i32, i32* %t45
%t186 = load i32, i32* %t46
%t187 = mul i32 %t185, 1000
%t188 = add i32 %t187, %t186
%t189 = getelementptr inbounds [1000000 x float], [1000000 x float]* @a, i32 0, i32 %t188
%t190 = load float, float* %t189
%t191 = fadd float %t184, %t190
store float %t191, float* %t48
%t192 = load i32, i32* %t46
%t193 = add i32 %t192, 1
store i32 %t193, i32* %t46
br label %while.cond.32
while.end.34:
%t194 = load i32, i32* %t45
%t195 = add i32 %t194, 1
store i32 %t195, i32* %t45
br label %while.cond.29
while.cond.35:
%t198 = load i32, i32* %t45
%t199 = icmp slt i32 %t198, 1000
%t200 = zext i1 %t199 to i32
%t201 = icmp ne i32 %t200, 0
br i1 %t201, label %while.body.36, label %while.end.37
while.body.36:
store i32 0, i32* %t46
br label %while.cond.38
while.end.37:
call void @stoptime()
%t219 = load float, float* %t48
call void @putfloat(float %t219)
ret i32 0
while.cond.38:
%t202 = load i32, i32* %t46
%t203 = icmp slt i32 %t202, 1000
%t204 = zext i1 %t203 to i32
%t205 = icmp ne i32 %t204, 0
br i1 %t205, label %while.body.39, label %while.end.40
while.body.39:
%t206 = load float, float* %t48
%t207 = load i32, i32* %t45
%t208 = load i32, i32* %t46
%t209 = mul i32 %t207, 1000
%t210 = add i32 %t209, %t208
%t211 = getelementptr inbounds [1000000 x float], [1000000 x float]* @a, i32 0, i32 %t210
%t212 = load float, float* %t211
%t213 = fadd float %t206, %t212
store float %t213, float* %t48
%t214 = load i32, i32* %t46
%t215 = add i32 %t214, 1
store i32 %t215, i32* %t46
br label %while.cond.38
while.end.40:
%t216 = load i32, i32* %t45
%t217 = add i32 %t216, 1
store i32 %t217, i32* %t45
br label %while.cond.35
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save