SHARE
TWEET

Untitled

a guest Jul 7th, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; ModuleID = 'lu.rbc'
  2. source_filename = "llvm-link"
  3. target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
  4. target triple = "x86_64-apple-macosx10.14.0"
  5.  
  6. %struct.__sFILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 }
  7. %struct.__sFILEX = type opaque
  8. %struct.__sbuf = type { i8*, i32 }
  9.  
  10. @__stderrp = external global %struct.__sFILE*, align 8
  11. @.str = private unnamed_addr constant [23 x i8] c"==BEGIN DUMP_ARRAYS==\0A\00", align 1
  12. @.str.1 = private unnamed_addr constant [15 x i8] c"begin dump: %s\00", align 1
  13. @.str.2 = private unnamed_addr constant [2 x i8] c"A\00", align 1
  14. @.str.3 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
  15. @.str.4 = private unnamed_addr constant [8 x i8] c"%0.2lf \00", align 1
  16. @.str.5 = private unnamed_addr constant [17 x i8] c"\0Aend   dump: %s\0A\00", align 1
  17. @.str.6 = private unnamed_addr constant [23 x i8] c"==END   DUMP_ARRAYS==\0A\00", align 1
  18. @polybench_program_total_flops = global double 0.000000e+00, align 8
  19. @polybench_t_start = common global double 0.000000e+00, align 8
  20. @polybench_t_end = common global double 0.000000e+00, align 8
  21. @polybench_c_start = common global i64 0, align 8
  22. @polybench_c_end = common global i64 0, align 8
  23. @__func__.polybench_flush_cache = private unnamed_addr constant [22 x i8] c"polybench_flush_cache\00", align 1
  24. @.str.7 = private unnamed_addr constant [12 x i8] c"polybench.c\00", align 1
  25. @.str.1.8 = private unnamed_addr constant [12 x i8] c"tmp <= 10.0\00", align 1
  26. @.str.2.9 = private unnamed_addr constant [7 x i8] c"%0.6f\0A\00", align 1
  27. @polybench_inter_array_padding_sz = internal global i64 0, align 8
  28. @.str.3.12 = private unnamed_addr constant [51 x i8] c"[PolyBench] posix_memalign: cannot allocate memory\00", align 1
  29.  
  30. ; Function Attrs: noinline nounwind ssp uwtable
  31. define i32 @main(i32 %argc, i8** %argv) #0 {
  32. entry:
  33.   %call = call i8* @polybench_alloc_data(i64 4000000, i32 8)
  34.   %arraydecay = bitcast i8* %call to [2000 x double]*
  35.   call void @init_array(i32 2000, [2000 x double]* %arraydecay)
  36.   call void @kernel_lu(i32 2000, [2000 x double]* %arraydecay)
  37.   call void @print_array(i32 2000, [2000 x double]* %arraydecay)
  38.   call void @free(i8* %call)
  39.   ret i32 0
  40. }
  41.  
  42. ; Function Attrs: noinline nounwind ssp uwtable
  43. define internal void @init_array(i32 %n, [2000 x double]* %A) #0 {
  44. entry:
  45.   %tmp = add i32 %n, -1
  46.   %tmp34 = sext i32 %n to i64
  47.   br label %for.cond
  48.  
  49. for.cond:                                         ; preds = %for.inc23, %entry
  50.   %indvars.iv32 = phi i64 [ %indvars.iv.next33, %for.inc23 ], [ 1, %entry ]
  51.   %indvars.iv26 = phi i64 [ %indvars.iv.next27, %for.inc23 ], [ 0, %entry ]
  52.   %cmp = icmp slt i64 %indvars.iv26, %tmp34
  53.   br i1 %cmp, label %for.body, label %for.end25
  54.  
  55. for.body:                                         ; preds = %for.cond
  56.   br label %for.cond1
  57.  
  58. for.cond1:                                        ; preds = %for.inc, %for.body
  59.   %indvars.iv19 = phi i64 [ %indvars.iv.next20, %for.inc ], [ 0, %for.body ]
  60.   %exitcond25 = icmp eq i64 %indvars.iv19, %indvars.iv32
  61.   br i1 %exitcond25, label %for.end, label %for.body3
  62.  
  63. for.body3:                                        ; preds = %for.cond1
  64.   %tmp35 = sub nsw i64 0, %indvars.iv19
  65.   %tmp36 = trunc i64 %tmp35 to i32
  66.   %rem = srem i32 %tmp36, %n
  67.   %conv = sitofp i32 %rem to double
  68.   %conv4 = sitofp i32 %n to double
  69.   %div = fdiv double %conv, %conv4
  70.   %add = fadd double %div, 1.000000e+00
  71.   %arrayidx6 = getelementptr inbounds [2000 x double], [2000 x double]* %A, i64 %indvars.iv26, i64 %indvars.iv19
  72.   store double %add, double* %arrayidx6, align 8
  73.   br label %for.inc
  74.  
  75. for.inc:                                          ; preds = %for.body3
  76.   %indvars.iv.next20 = add nuw nsw i64 %indvars.iv19, 1
  77.   br label %for.cond1
  78.  
  79. for.end:                                          ; preds = %for.cond1
  80.   br label %for.cond8
  81.  
  82. for.cond8:                                        ; preds = %for.inc16, %for.end
  83.   %indvars.iv28 = phi i64 [ %indvars.iv.next29, %for.inc16 ], [ %indvars.iv26, %for.end ]
  84.   %indvars.iv.next29 = add nuw nsw i64 %indvars.iv28, 1
  85.   %wide.trip.count30 = zext i32 %tmp to i64
  86.   %exitcond31 = icmp ne i64 %indvars.iv28, %wide.trip.count30
  87.   br i1 %exitcond31, label %for.body11, label %for.end18
  88.  
  89. for.body11:                                       ; preds = %for.cond8
  90.   %arrayidx15 = getelementptr inbounds [2000 x double], [2000 x double]* %A, i64 %indvars.iv26, i64 %indvars.iv.next29
  91.   store double 0.000000e+00, double* %arrayidx15, align 8
  92.   br label %for.inc16
  93.  
  94. for.inc16:                                        ; preds = %for.body11
  95.   br label %for.cond8
  96.  
  97. for.end18:                                        ; preds = %for.cond8
  98.   %arrayidx22 = getelementptr inbounds [2000 x double], [2000 x double]* %A, i64 %indvars.iv26, i64 %indvars.iv26
  99.   store double 1.000000e+00, double* %arrayidx22, align 8
  100.   br label %for.inc23
  101.  
  102. for.inc23:                                        ; preds = %for.end18
  103.   %indvars.iv.next27 = add nuw nsw i64 %indvars.iv26, 1
  104.   %indvars.iv.next33 = add nuw nsw i64 %indvars.iv32, 1
  105.   br label %for.cond
  106.  
  107. for.end25:                                        ; preds = %for.cond
  108.   %call = call i8* @polybench_alloc_data(i64 4000000, i32 8)
  109.   %tmp37 = bitcast i8* %call to [2000 x [2000 x double]]*
  110.   %tmp38 = sext i32 %n to i64
  111.   br label %for.cond26
  112.  
  113. for.cond26:                                       ; preds = %for.inc41, %for.end25
  114.   %indvars.iv17 = phi i64 [ %indvars.iv.next18, %for.inc41 ], [ 0, %for.end25 ]
  115.   %cmp27 = icmp slt i64 %indvars.iv17, %tmp38
  116.   br i1 %cmp27, label %for.body29, label %for.end43
  117.  
  118. for.body29:                                       ; preds = %for.cond26
  119.   br label %for.cond30
  120.  
  121. for.cond30:                                       ; preds = %for.inc38, %for.body29
  122.   %indvars.iv13 = phi i64 [ %indvars.iv.next14, %for.inc38 ], [ 0, %for.body29 ]
  123.   %wide.trip.count15 = zext i32 %n to i64
  124.   %exitcond16 = icmp ne i64 %indvars.iv13, %wide.trip.count15
  125.   br i1 %exitcond16, label %for.body33, label %for.end40
  126.  
  127. for.body33:                                       ; preds = %for.cond30
  128.   %arrayidx37 = getelementptr inbounds [2000 x [2000 x double]], [2000 x [2000 x double]]* %tmp37, i64 0, i64 %indvars.iv17, i64 %indvars.iv13
  129.   store double 0.000000e+00, double* %arrayidx37, align 8
  130.   br label %for.inc38
  131.  
  132. for.inc38:                                        ; preds = %for.body33
  133.   %indvars.iv.next14 = add nuw nsw i64 %indvars.iv13, 1
  134.   br label %for.cond30
  135.  
  136. for.end40:                                        ; preds = %for.cond30
  137.   br label %for.inc41
  138.  
  139. for.inc41:                                        ; preds = %for.end40
  140.   %indvars.iv.next18 = add nuw nsw i64 %indvars.iv17, 1
  141.   br label %for.cond26
  142.  
  143. for.end43:                                        ; preds = %for.cond26
  144.   %tmp39 = sext i32 %n to i64
  145.   br label %for.cond44
  146.  
  147. for.cond44:                                       ; preds = %for.inc75, %for.end43
  148.   %indvars.iv11 = phi i64 [ %indvars.iv.next12, %for.inc75 ], [ 0, %for.end43 ]
  149.   %cmp45 = icmp slt i64 %indvars.iv11, %tmp39
  150.   br i1 %cmp45, label %for.body47, label %for.end77
  151.  
  152. for.body47:                                       ; preds = %for.cond44
  153.   br label %for.cond48
  154.  
  155. for.cond48:                                       ; preds = %for.inc72, %for.body47
  156.   %indvars.iv7 = phi i64 [ %indvars.iv.next8, %for.inc72 ], [ 0, %for.body47 ]
  157.   %wide.trip.count9 = zext i32 %n to i64
  158.   %exitcond10 = icmp ne i64 %indvars.iv7, %wide.trip.count9
  159.   br i1 %exitcond10, label %for.body51, label %for.end74
  160.  
  161. for.body51:                                       ; preds = %for.cond48
  162.   br label %for.cond52
  163.  
  164. for.cond52:                                       ; preds = %for.inc69, %for.body51
  165.   %indvars.iv3 = phi i64 [ %indvars.iv.next4, %for.inc69 ], [ 0, %for.body51 ]
  166.   %wide.trip.count5 = zext i32 %n to i64
  167.   %exitcond6 = icmp ne i64 %indvars.iv3, %wide.trip.count5
  168.   br i1 %exitcond6, label %for.body55, label %for.end71
  169.  
  170. for.body55:                                       ; preds = %for.cond52
  171.   %arrayidx59 = getelementptr inbounds [2000 x double], [2000 x double]* %A, i64 %indvars.iv7, i64 %indvars.iv11
  172.   %tmp40 = load double, double* %arrayidx59, align 8
  173.   %arrayidx63 = getelementptr inbounds [2000 x double], [2000 x double]* %A, i64 %indvars.iv3, i64 %indvars.iv11
  174.   %tmp41 = load double, double* %arrayidx63, align 8
  175.   %mul = fmul double %tmp40, %tmp41
  176.   %arrayidx67 = getelementptr inbounds [2000 x [2000 x double]], [2000 x [2000 x double]]* %tmp37, i64 0, i64 %indvars.iv7, i64 %indvars.iv3
  177.   %tmp42 = load double, double* %arrayidx67, align 8
  178.   %add68 = fadd double %tmp42, %mul
  179.   store double %add68, double* %arrayidx67, align 8
  180.   br label %for.inc69
  181.  
  182. for.inc69:                                        ; preds = %for.body55
  183.   %indvars.iv.next4 = add nuw nsw i64 %indvars.iv3, 1
  184.   br label %for.cond52
  185.  
  186. for.end71:                                        ; preds = %for.cond52
  187.   br label %for.inc72
  188.  
  189. for.inc72:                                        ; preds = %for.end71
  190.   %indvars.iv.next8 = add nuw nsw i64 %indvars.iv7, 1
  191.   br label %for.cond48
  192.  
  193. for.end74:                                        ; preds = %for.cond48
  194.   br label %for.inc75
  195.  
  196. for.inc75:                                        ; preds = %for.end74
  197.   %indvars.iv.next12 = add nuw nsw i64 %indvars.iv11, 1
  198.   br label %for.cond44
  199.  
  200. for.end77:                                        ; preds = %for.cond44
  201.   %tmp43 = sext i32 %n to i64
  202.   br label %for.cond78
  203.  
  204. for.cond78:                                       ; preds = %for.inc97, %for.end77
  205.   %indvars.iv1 = phi i64 [ %indvars.iv.next2, %for.inc97 ], [ 0, %for.end77 ]
  206.   %cmp79 = icmp slt i64 %indvars.iv1, %tmp43
  207.   br i1 %cmp79, label %for.body81, label %for.end99
  208.  
  209. for.body81:                                       ; preds = %for.cond78
  210.   br label %for.cond82
  211.  
  212. for.cond82:                                       ; preds = %for.inc94, %for.body81
  213.   %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc94 ], [ 0, %for.body81 ]
  214.   %wide.trip.count = zext i32 %n to i64
  215.   %exitcond = icmp ne i64 %indvars.iv, %wide.trip.count
  216.   br i1 %exitcond, label %for.body85, label %for.end96
  217.  
  218. for.body85:                                       ; preds = %for.cond82
  219.   %arrayidx89 = getelementptr inbounds [2000 x [2000 x double]], [2000 x [2000 x double]]* %tmp37, i64 0, i64 %indvars.iv1, i64 %indvars.iv
  220.   %tmp44 = bitcast double* %arrayidx89 to i64*
  221.   %tmp45 = load i64, i64* %tmp44, align 8
  222.   %arrayidx93 = getelementptr inbounds [2000 x double], [2000 x double]* %A, i64 %indvars.iv1, i64 %indvars.iv
  223.   %tmp46 = bitcast double* %arrayidx93 to i64*
  224.   store i64 %tmp45, i64* %tmp46, align 8
  225.   br label %for.inc94
  226.  
  227. for.inc94:                                        ; preds = %for.body85
  228.   %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  229.   br label %for.cond82
  230.  
  231. for.end96:                                        ; preds = %for.cond82
  232.   br label %for.inc97
  233.  
  234. for.inc97:                                        ; preds = %for.end96
  235.   %indvars.iv.next2 = add nuw nsw i64 %indvars.iv1, 1
  236.   br label %for.cond78
  237.  
  238. for.end99:                                        ; preds = %for.cond78
  239.   call void @free(i8* %call)
  240.   ret void
  241. }
  242.  
  243. ; Function Attrs: noinline nounwind ssp uwtable
  244. define internal void @kernel_lu(i32 %n, [2000 x double]* %A) #0 {
  245. entry:
  246.   %tmp = sext i32 %n to i64
  247.   br label %for.cond
  248.  
  249. for.cond:                                         ; preds = %for.inc54, %entry
  250.   %indvars.iv8 = phi i64 [ %indvars.iv.next9, %for.inc54 ], [ 0, %entry ]
  251.   %cmp = icmp slt i64 %indvars.iv8, %tmp
  252.   br i1 %cmp, label %for.body, label %for.end56
  253.  
  254. for.body:                                         ; preds = %for.cond
  255.   br label %for.cond1
  256.  
  257. for.cond1:                                        ; preds = %for.inc25, %for.body
  258.   %indvars.iv1 = phi i64 [ %indvars.iv.next2, %for.inc25 ], [ 0, %for.body ]
  259.   %exitcond4 = icmp ne i64 %indvars.iv1, %indvars.iv8
  260.   br i1 %exitcond4, label %for.body3, label %for.end27
  261.  
  262. for.body3:                                        ; preds = %for.cond1
  263.   br label %for.cond4
  264.  
  265. for.cond4:                                        ; preds = %for.inc, %for.body3
  266.   %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %for.body3 ]
  267.   %exitcond = icmp ne i64 %indvars.iv, %indvars.iv1
  268.   br i1 %exitcond, label %for.body6, label %for.end
  269.  
  270. for.body6:                                        ; preds = %for.cond4
  271.   %arrayidx8 = getelementptr inbounds [2000 x double], [2000 x double]* %A, i64 %indvars.iv8, i64 %indvars.iv
  272.   %tmp14 = load double, double* %arrayidx8, align 8
  273.   %arrayidx12 = getelementptr inbounds [2000 x double], [2000 x double]* %A, i64 %indvars.iv, i64 %indvars.iv1
  274.   %tmp15 = load double, double* %arrayidx12, align 8
  275.   %mul = fmul double %tmp14, %tmp15
  276.   %arrayidx16 = getelementptr inbounds [2000 x double], [2000 x double]* %A, i64 %indvars.iv8, i64 %indvars.iv1
  277.   %tmp16 = load double, double* %arrayidx16, align 8
  278.   %sub = fsub double %tmp16, %mul
  279.   store double %sub, double* %arrayidx16, align 8
  280.   br label %for.inc
  281.  
  282. for.inc:                                          ; preds = %for.body6
  283.   %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  284.   br label %for.cond4
  285.  
  286. for.end:                                          ; preds = %for.cond4
  287.   %arrayidx20 = getelementptr inbounds [2000 x double], [2000 x double]* %A, i64 %indvars.iv1, i64 %indvars.iv1
  288.   %tmp17 = load double, double* %arrayidx20, align 8
  289.   %arrayidx24 = getelementptr inbounds [2000 x double], [2000 x double]* %A, i64 %indvars.iv8, i64 %indvars.iv1
  290.   %tmp18 = load double, double* %arrayidx24, align 8
  291.   %div = fdiv double %tmp18, %tmp17
  292.   store double %div, double* %arrayidx24, align 8
  293.   br label %for.inc25
  294.  
  295. for.inc25:                                        ; preds = %for.end
  296.   %indvars.iv.next2 = add nuw nsw i64 %indvars.iv1, 1
  297.   br label %for.cond1
  298.  
  299. for.end27:                                        ; preds = %for.cond1
  300.   br label %for.cond28
  301.  
  302. for.cond28:                                       ; preds = %for.inc51, %for.end27
  303.   %indvars.iv10 = phi i64 [ %indvars.iv.next11, %for.inc51 ], [ %indvars.iv8, %for.end27 ]
  304.   %wide.trip.count12 = zext i32 %n to i64
  305.   %exitcond13 = icmp ne i64 %indvars.iv10, %wide.trip.count12
  306.   br i1 %exitcond13, label %for.body30, label %for.end53
  307.  
  308. for.body30:                                       ; preds = %for.cond28
  309.   br label %for.cond31
  310.  
  311. for.cond31:                                       ; preds = %for.inc48, %for.body30
  312.   %indvars.iv5 = phi i64 [ %indvars.iv.next6, %for.inc48 ], [ 0, %for.body30 ]
  313.   %exitcond7 = icmp ne i64 %indvars.iv5, %indvars.iv8
  314.   br i1 %exitcond7, label %for.body33, label %for.end50
  315.  
  316. for.body33:                                       ; preds = %for.cond31
  317.   %arrayidx37 = getelementptr inbounds [2000 x double], [2000 x double]* %A, i64 %indvars.iv8, i64 %indvars.iv5
  318.   %tmp19 = load double, double* %arrayidx37, align 8
  319.   %arrayidx41 = getelementptr inbounds [2000 x double], [2000 x double]* %A, i64 %indvars.iv5, i64 %indvars.iv10
  320.   %tmp20 = load double, double* %arrayidx41, align 8
  321.   %mul42 = fmul double %tmp19, %tmp20
  322.   %arrayidx46 = getelementptr inbounds [2000 x double], [2000 x double]* %A, i64 %indvars.iv8, i64 %indvars.iv10
  323.   %tmp21 = load double, double* %arrayidx46, align 8
  324.   %sub47 = fsub double %tmp21, %mul42
  325.   store double %sub47, double* %arrayidx46, align 8
  326.   br label %for.inc48
  327.  
  328. for.inc48:                                        ; preds = %for.body33
  329.   %indvars.iv.next6 = add nuw nsw i64 %indvars.iv5, 1
  330.   br label %for.cond31
  331.  
  332. for.end50:                                        ; preds = %for.cond31
  333.   br label %for.inc51
  334.  
  335. for.inc51:                                        ; preds = %for.end50
  336.   %indvars.iv.next11 = add nuw nsw i64 %indvars.iv10, 1
  337.   br label %for.cond28
  338.  
  339. for.end53:                                        ; preds = %for.cond28
  340.   br label %for.inc54
  341.  
  342. for.inc54:                                        ; preds = %for.end53
  343.   %indvars.iv.next9 = add nuw nsw i64 %indvars.iv8, 1
  344.   br label %for.cond
  345.  
  346. for.end56:                                        ; preds = %for.cond
  347.   ret void
  348. }
  349.  
  350. ; Function Attrs: noinline nounwind ssp uwtable
  351. define internal void @print_array(i32 %n, [2000 x double]* %A) #0 {
  352. entry:
  353.   %tmp = load %struct.__sFILE*, %struct.__sFILE** @__stderrp, align 8
  354.   %tmp3 = call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i64 22, i64 1, %struct.__sFILE* %tmp)
  355.   %tmp4 = load %struct.__sFILE*, %struct.__sFILE** @__stderrp, align 8
  356.   %call1 = call i32 (%struct.__sFILE*, i8*, ...) @fprintf(%struct.__sFILE* %tmp4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)) #5
  357.   %tmp5 = sext i32 %n to i64
  358.   br label %for.cond
  359.  
  360. for.cond:                                         ; preds = %for.inc10, %entry
  361.   %indvars.iv1 = phi i64 [ %indvars.iv.next2, %for.inc10 ], [ 0, %entry ]
  362.   %cmp = icmp slt i64 %indvars.iv1, %tmp5
  363.   br i1 %cmp, label %for.body, label %for.end12
  364.  
  365. for.body:                                         ; preds = %for.cond
  366.   br label %for.cond2
  367.  
  368. for.cond2:                                        ; preds = %for.inc, %for.body
  369.   %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %for.body ]
  370.   %wide.trip.count = zext i32 %n to i64
  371.   %exitcond = icmp ne i64 %indvars.iv, %wide.trip.count
  372.   br i1 %exitcond, label %for.body4, label %for.end
  373.  
  374. for.body4:                                        ; preds = %for.cond2
  375.   %tmp6 = trunc i64 %indvars.iv1 to i32
  376.   %mul = mul nsw i32 %tmp6, %n
  377.   %tmp7 = trunc i64 %indvars.iv to i32
  378.   %add = add nsw i32 %mul, %tmp7
  379.   %rem = srem i32 %add, 20
  380.   %cmp5 = icmp eq i32 %rem, 0
  381.   br i1 %cmp5, label %if.then, label %if.end
  382.  
  383. if.then:                                          ; preds = %for.body4
  384.   %tmp8 = load %struct.__sFILE*, %struct.__sFILE** @__stderrp, align 8
  385.   %fputc = call i32 @fputc(i32 10, %struct.__sFILE* %tmp8)
  386.   br label %if.end
  387.  
  388. if.end:                                           ; preds = %if.then, %for.body4
  389.   %tmp9 = load %struct.__sFILE*, %struct.__sFILE** @__stderrp, align 8
  390.   %arrayidx8 = getelementptr inbounds [2000 x double], [2000 x double]* %A, i64 %indvars.iv1, i64 %indvars.iv
  391.   %tmp10 = load double, double* %arrayidx8, align 8
  392.   %call9 = call i32 (%struct.__sFILE*, i8*, ...) @fprintf(%struct.__sFILE* %tmp9, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), double %tmp10) #5
  393.   br label %for.inc
  394.  
  395. for.inc:                                          ; preds = %if.end
  396.   %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  397.   br label %for.cond2
  398.  
  399. for.end:                                          ; preds = %for.cond2
  400.   br label %for.inc10
  401.  
  402. for.inc10:                                        ; preds = %for.end
  403.   %indvars.iv.next2 = add nuw nsw i64 %indvars.iv1, 1
  404.   br label %for.cond
  405.  
  406. for.end12:                                        ; preds = %for.cond
  407.   %tmp11 = load %struct.__sFILE*, %struct.__sFILE** @__stderrp, align 8
  408.   %call13 = call i32 (%struct.__sFILE*, i8*, ...) @fprintf(%struct.__sFILE* %tmp11, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)) #5
  409.   %tmp12 = load %struct.__sFILE*, %struct.__sFILE** @__stderrp, align 8
  410.   %tmp13 = call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i64 22, i64 1, %struct.__sFILE* %tmp12)
  411.   ret void
  412. }
  413.  
  414. declare void @free(i8*) #1
  415.  
  416. declare i32 @fprintf(%struct.__sFILE*, i8*, ...) #1
  417.  
  418. ; Function Attrs: noinline nounwind ssp uwtable
  419. define void @polybench_flush_cache() #0 {
  420. entry:
  421.   %call = call i8* @calloc(i64 4194560, i64 8) #6
  422.   %tmp = bitcast i8* %call to double*
  423.   br label %for.cond
  424.  
  425. for.cond:                                         ; preds = %for.inc, %entry
  426.   %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]
  427.   %tmp.0 = phi double [ 0.000000e+00, %entry ], [ %add, %for.inc ]
  428.   %exitcond = icmp ne i64 %indvars.iv, 4194560
  429.   br i1 %exitcond, label %for.body, label %for.end
  430.  
  431. for.body:                                         ; preds = %for.cond
  432.   br label %for.inc
  433.  
  434. for.inc:                                          ; preds = %for.body
  435.   %arrayidx = getelementptr inbounds double, double* %tmp, i64 %indvars.iv
  436.   %tmp1 = load double, double* %arrayidx, align 8
  437.   %add = fadd double %tmp.0, %tmp1
  438.   %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  439.   br label %for.cond
  440.  
  441. for.end:                                          ; preds = %for.cond
  442.   %tmp.0.lcssa = phi double [ %tmp.0, %for.cond ]
  443.   %cmp2 = fcmp ugt double %tmp.0.lcssa, 1.000000e+01
  444.   br i1 %cmp2, label %cond.true, label %cond.false
  445.  
  446. cond.true:                                        ; preds = %for.end
  447.   call void @__assert_rtn(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @__func__.polybench_flush_cache, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32 123, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1.8, i64 0, i64 0)) #7
  448.   unreachable
  449.  
  450. bb:                                               ; No predecessors!
  451.   br label %cond.end
  452.  
  453. cond.false:                                       ; preds = %for.end
  454.   br label %cond.end
  455.  
  456. cond.end:                                         ; preds = %cond.false, %bb
  457.   call void @free(i8* %call)
  458.   ret void
  459. }
  460.  
  461. ; Function Attrs: allocsize(0,1)
  462. declare i8* @calloc(i64, i64) #2
  463.  
  464. ; Function Attrs: noreturn
  465. declare void @__assert_rtn(i8*, i8*, i32, i8*) #3
  466.  
  467. ; Function Attrs: noinline nounwind ssp uwtable
  468. entry:
  469.   call void @polybench_flush_cache()
  470.   ret void
  471. }
  472.  
  473. ; Function Attrs: noinline nounwind ssp uwtable
  474. define void @polybench_timer_start() #0 {
  475. entry:
  476.   %call = call double @rtclock()
  477.   store double %call, double* @polybench_t_start, align 8
  478.   ret void
  479. }
  480.  
  481. ; Function Attrs: noinline nounwind ssp uwtable
  482. define internal double @rtclock() #0 {
  483. entry:
  484.   ret double 0.000000e+00
  485. }
  486.  
  487. ; Function Attrs: noinline nounwind ssp uwtable
  488. define void @polybench_timer_stop() #0 {
  489. entry:
  490.   %call = call double @rtclock()
  491.   store double %call, double* @polybench_t_end, align 8
  492.   ret void
  493. }
  494.  
  495. ; Function Attrs: noinline nounwind ssp uwtable
  496. define void @polybench_timer_print() #0 {
  497. entry:
  498.   %tmp = load double, double* @polybench_t_end, align 8
  499.   %tmp1 = load double, double* @polybench_t_start, align 8
  500.   %sub = fsub double %tmp, %tmp1
  501.   %call = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2.9, i64 0, i64 0), double %sub) #5
  502.   ret void
  503. }
  504.  
  505. declare i32 @printf(i8*, ...) #1
  506.  
  507. ; Function Attrs: noinline nounwind ssp uwtable
  508. define void @polybench_free_data(i8* %ptr) #0 {
  509. entry:
  510.   call void @free(i8* %ptr)
  511.   ret void
  512. }
  513.  
  514. ; Function Attrs: noinline nounwind ssp uwtable
  515. define i8* @polybench_alloc_data(i64 %n, i32 %elt_size) #0 {
  516. entry:
  517.   %conv = sext i32 %elt_size to i64
  518.   %mul = mul i64 %conv, %n
  519.   %call = call i8* @xmalloc(i64 %mul)
  520.   ret i8* %call
  521. }
  522.  
  523. ; Function Attrs: noinline nounwind ssp uwtable
  524. define internal i8* @xmalloc(i64 %alloc_sz) #0 {
  525. entry:
  526.   %ret = alloca i8*, align 8
  527.   store i8* null, i8** %ret, align 8
  528.   %tmp = load i64, i64* @polybench_inter_array_padding_sz, align 8
  529.   %add1 = add i64 %tmp, %alloc_sz
  530.   %call = call i32 @posix_memalign(i8** nonnull %ret, i64 4096, i64 %add1) #5
  531.   %tmp1 = load i8*, i8** %ret, align 8
  532.   %tobool = icmp eq i8* %tmp1, null
  533.   br i1 %tobool, label %if.then, label %lor.lhs.false
  534.  
  535. lor.lhs.false:                                    ; preds = %entry
  536.   %tobool2 = icmp eq i32 %call, 0
  537.   br i1 %tobool2, label %if.end, label %if.then
  538.  
  539. if.then:                                          ; preds = %lor.lhs.false, %entry
  540.   %tmp2 = load %struct.__sFILE*, %struct.__sFILE** @__stderrp, align 8
  541.   %tmp3 = call i64 @fwrite(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3.12, i64 0, i64 0), i64 50, i64 1, %struct.__sFILE* %tmp2)
  542.   call void @exit(i32 1) #7
  543.   unreachable
  544.  
  545. if.end:                                           ; preds = %lor.lhs.false
  546.   ret i8* %tmp1
  547. }
  548.  
  549. declare i32 @posix_memalign(i8**, i64, i64) #1
  550.  
  551. ; Function Attrs: noreturn
  552. declare void @exit(i32) #4
  553.  
  554. ; Function Attrs: nounwind
  555. declare i64 @fwrite(i8* nocapture, i64, i64, %struct.__sFILE* nocapture) #5
  556.  
  557. ; Function Attrs: nounwind
  558. declare i32 @fputc(i32, %struct.__sFILE* nocapture) #5
  559.  
  560. attributes #0 = { noinline nounwind ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "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-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
  561. attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "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" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
  562. attributes #2 = { allocsize(0,1) "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "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" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
  563. attributes #3 = { noreturn "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="true" "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" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
  564. attributes #4 = { noreturn "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "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" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
  565. attributes #5 = { nounwind }
  566. attributes #6 = { nounwind allocsize(0,1) }
  567. attributes #7 = { noreturn nounwind }
  568.  
  569. !llvm.ident = !{!0, !0}
  570. !llvm.module.flags = !{!1, !2}
  571.  
  572. !0 = !{!"clang version 6.0.1 (tags/RELEASE_601/final 342957)"}
  573. !1 = !{i32 1, !"wchar_size", i32 4}
  574. !2 = !{i32 7, !"PIC Level", i32 2}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top