SHARE
TWEET

opt

a guest Jan 17th, 2013 22 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. *** IR Dump After Remove unreachable blocks from the CFG ***
  2. define void @n2o_1C17c8e8___main___sum_2_RBdAnyd3f8RBdAnyf8i8(%Slice* noalias %d, %Slice.0* noalias %out, i64 %n) nounwind {
  3. entry:
  4.   %loop_i_cmp141 = icmp sgt i64 %n, 0
  5.   br i1 %loop_i_cmp141, label %loop_test6.preheader.lr.ph, label %loop_exit
  6.  
  7. loop_test6.preheader.lr.ph:                       ; preds = %entry
  8.   %gep16 = getelementptr inbounds %Slice.0* %out, i64 0, i32 0
  9.   %gep22 = getelementptr inbounds %Slice* %d, i64 0, i32 0
  10.   %0 = add i64 %n, -1
  11.   br label %loop_test6.preheader
  12.  
  13. loop_test6.preheader:                             ; preds = %loop_exit9, %loop_test6.preheader.lr.ph
  14.   %lsr.iv149 = phi i64 [ %lsr.iv.next150, %loop_exit9 ], [ 5, %loop_test6.preheader.lr.ph ]
  15.   %lsr.iv = phi i64 [ %lsr.iv.next, %loop_exit9 ], [ %0, %loop_test6.preheader.lr.ph ]
  16.   %storemerge142 = phi i64 [ 0, %loop_test6.preheader.lr.ph ], [ %storemerge121138, %loop_exit9 ]
  17.   %storemerge121138 = add i64 %storemerge142, 1
  18.   %loop_j_cmp139 = icmp slt i64 %storemerge121138, %n
  19.   br i1 %loop_j_cmp139, label %loop_body7.lr.ph, label %loop_exit9
  20.  
  21. loop_body7.lr.ph:                                 ; preds = %loop_test6.preheader
  22.   %v17 = load double** %gep16, align 8
  23.   %v23 = load double** %gep22, align 8
  24.   %v24 = mul i64 %storemerge142, 3
  25.   %addr27 = getelementptr double* %v23, i64 %v24
  26.   %addr52 = getelementptr double* %v17, i64 1
  27.   %v62 = add i64 %v24, 1
  28.   %addr63 = getelementptr double* %v23, i64 %v62
  29. ; (1) *****************************
  30.   %addr89 = getelementptr double* %v17, i64 2
  31.   %v99 = add i64 %v24, 2
  32.   %addr100 = getelementptr double* %v23, i64 %v99
  33.   %getitem.pre = load double* %v17, align 8
  34.   %getitem53.pre = load double* %addr52, align 8
  35.   %getitem90.pre = load double* %addr89, align 8
  36.   %scevgep = getelementptr double* %v23, i64 %lsr.iv149
  37.   br label %loop_body7
  38.  
  39. loop_body7:                                       ; preds = %loop_body7, %loop_body7.lr.ph
  40.   %lsr.iv151 = phi double* [ %scevgep152, %loop_body7 ], [ %scevgep, %loop_body7.lr.ph ]
  41.   %lsr.iv147 = phi i64 [ %lsr.iv.next148, %loop_body7 ], [ %lsr.iv, %loop_body7.lr.ph ]
  42.   %getitem90 = phi double [ %getitem90.pre, %loop_body7.lr.ph ], [ %add114, %loop_body7 ]
  43.   %getitem53 = phi double [ %getitem53.pre, %loop_body7.lr.ph ], [ %add77, %loop_body7 ]
  44.   %getitem = phi double [ %getitem.pre, %loop_body7.lr.ph ], [ %add40, %loop_body7 ]
  45.   %getitem28 = load double* %addr27, align 8
  46.   %scevgep154 = getelementptr double* %lsr.iv151, i64 -2
  47.   %getitem39 = load double* %scevgep154, align 8
  48.   %mult = fmul double %getitem28, %getitem39
  49.   %add40 = fadd double %getitem, %mult
  50.   store double %add40, double* %v17, align 8
  51.   %getitem64 = load double* %addr63, align 8
  52.   %scevgep153 = getelementptr double* %lsr.iv151, i64 -1
  53.   %getitem75 = load double* %scevgep153, align 8
  54.   %mult76 = fmul double %getitem64, %getitem75
  55.   %add77 = fadd double %getitem53, %mult76
  56.   store double %add77, double* %addr52, align 8
  57.   %getitem101 = load double* %addr100, align 8
  58.   %getitem112 = load double* %lsr.iv151, align 8
  59.   %mult113 = fmul double %getitem101, %getitem112
  60.   %add114 = fadd double %getitem90, %mult113
  61.  
  62.  ; (2) *****************************
  63.   store double %add114, double* %addr89, align 8
  64.  
  65.   %lsr.iv.next148 = add i64 %lsr.iv147, -1
  66.   %scevgep152 = getelementptr double* %lsr.iv151, i64 3
  67.   %exitcond = icmp eq i64 %lsr.iv.next148, 0
  68.   br i1 %exitcond, label %loop_exit9.loopexit, label %loop_body7
  69.  
  70. loop_exit9.loopexit:                              ; preds = %loop_body7
  71.   br label %loop_exit9
  72.  
  73. loop_exit9:                                       ; preds = %loop_exit9.loopexit, %loop_test6.preheader
  74.   %lsr.iv.next = add i64 %lsr.iv, -1
  75.   %lsr.iv.next150 = add i64 %lsr.iv149, 3
  76.   %exitcond143 = icmp eq i64 %storemerge121138, %n
  77.   br i1 %exitcond143, label %loop_exit.loopexit, label %loop_test6.preheader
  78.  
  79. loop_exit.loopexit:                               ; preds = %loop_exit9
  80.   br label %loop_exit
  81.  
  82. loop_exit:                                        ; preds = %loop_exit.loopexit, %entry
  83.   ret void
  84. }
  85.  
  86. *** IR Dump After Optimize for code generation ***
  87. define void @n2o_1C17c8e8___main___sum_2_RBdAnyd3f8RBdAnyf8i8(%Slice* noalias %d, %Slice.0* noalias %out, i64 %n) nounwind {
  88. entry:
  89.   %loop_i_cmp141 = icmp sgt i64 %n, 0
  90.   br i1 %loop_i_cmp141, label %loop_test6.preheader.lr.ph, label %loop_exit
  91.  
  92. loop_test6.preheader.lr.ph:                       ; preds = %entry
  93.   %0 = add i64 %n, -1
  94.   br label %loop_test6.preheader
  95.  
  96. loop_test6.preheader:                             ; preds = %loop_exit9, %loop_test6.preheader.lr.ph
  97.   %lsr.iv149 = phi i64 [ %lsr.iv.next150, %loop_exit9 ], [ 5, %loop_test6.preheader.lr.ph ]
  98.   %lsr.iv = phi i64 [ %lsr.iv.next, %loop_exit9 ], [ %0, %loop_test6.preheader.lr.ph ]
  99.   %storemerge142 = phi i64 [ 0, %loop_test6.preheader.lr.ph ], [ %storemerge121138, %loop_exit9 ]
  100.   %storemerge121138 = add i64 %storemerge142, 1
  101.   %loop_j_cmp139 = icmp slt i64 %storemerge121138, %n
  102.   br i1 %loop_j_cmp139, label %loop_body7.lr.ph, label %loop_exit9
  103.  
  104. loop_body7.lr.ph:                                 ; preds = %loop_test6.preheader
  105.   %1 = bitcast %Slice* %d to double**
  106.   %2 = bitcast %Slice.0* %out to double**
  107.   %v17 = load double** %2, align 8
  108.   %v23 = load double** %1, align 8
  109.   %v24 = mul i64 %storemerge142, 3
  110.   %addr52 = getelementptr double* %v17, i64 1
  111.   %addr89 = getelementptr double* %v17, i64 2
  112.   %getitem.pre = load double* %v17, align 8
  113.   %getitem53.pre = load double* %addr52, align 8
  114.   %getitem90.pre = load double* %addr89, align 8
  115.   %scevgep = getelementptr double* %v23, i64 %lsr.iv149
  116.   br label %loop_body7
  117.  
  118. loop_body7:                                       ; preds = %loop_body7, %loop_body7.lr.ph
  119.   %lsr.iv151 = phi double* [ %scevgep152, %loop_body7 ], [ %scevgep, %loop_body7.lr.ph ]
  120.   %lsr.iv147 = phi i64 [ %lsr.iv.next148, %loop_body7 ], [ %lsr.iv, %loop_body7.lr.ph ]
  121.   %getitem90 = phi double [ %getitem90.pre, %loop_body7.lr.ph ], [ %add114, %loop_body7 ]
  122.   %getitem53 = phi double [ %getitem53.pre, %loop_body7.lr.ph ], [ %add77, %loop_body7 ]
  123.   %getitem = phi double [ %getitem.pre, %loop_body7.lr.ph ], [ %add40, %loop_body7 ]
  124.   %sunkaddr = ptrtoint double* %v23 to i64
  125.   %sunkaddr157 = mul i64 %v24, 8
  126.   %sunkaddr158 = add i64 %sunkaddr, %sunkaddr157
  127.   %sunkaddr159 = inttoptr i64 %sunkaddr158 to double*
  128.   %getitem28 = load double* %sunkaddr159, align 8
  129.   %scevgep154 = getelementptr double* %lsr.iv151, i64 -2
  130.   %getitem39 = load double* %scevgep154, align 8
  131.   %mult = fmul double %getitem28, %getitem39
  132.   %add40 = fadd double %getitem, %mult
  133.   store double %add40, double* %v17, align 8
  134.   %sunkaddr160 = ptrtoint double* %v23 to i64
  135.   %sunkaddr161 = mul i64 %v24, 8
  136.   %sunkaddr162 = add i64 %sunkaddr160, %sunkaddr161
  137.   %sunkaddr163 = add i64 %sunkaddr162, 8
  138.   %sunkaddr164 = inttoptr i64 %sunkaddr163 to double*
  139.   %getitem64 = load double* %sunkaddr164, align 8
  140.   %scevgep153 = getelementptr double* %lsr.iv151, i64 -1
  141.   %getitem75 = load double* %scevgep153, align 8
  142.   %mult76 = fmul double %getitem64, %getitem75
  143.   %add77 = fadd double %getitem53, %mult76
  144.   %sunkaddr165 = ptrtoint double* %v17 to i64
  145.   %sunkaddr166 = add i64 %sunkaddr165, 8
  146.   %sunkaddr167 = inttoptr i64 %sunkaddr166 to double*
  147.   store double %add77, double* %sunkaddr167, align 8
  148.   %sunkaddr168 = ptrtoint double* %v23 to i64
  149.   %sunkaddr169 = mul i64 %v24, 8
  150.   %sunkaddr170 = add i64 %sunkaddr168, %sunkaddr169
  151.   %sunkaddr171 = add i64 %sunkaddr170, 16
  152.   %sunkaddr172 = inttoptr i64 %sunkaddr171 to double*
  153.   %getitem101 = load double* %sunkaddr172, align 8
  154.   %getitem112 = load double* %lsr.iv151, align 8
  155.   %mult113 = fmul double %getitem101, %getitem112
  156.   %add114 = fadd double %getitem90, %mult113
  157.  
  158.  ; (3) *****************************
  159.   %sunkaddr173 = ptrtoint double* %v17 to i64
  160.   %sunkaddr174 = add i64 %sunkaddr173, 16
  161.   %sunkaddr175 = inttoptr i64 %sunkaddr174 to double*
  162.   store double %add114, double* %sunkaddr175, align 8
  163.  
  164.   %lsr.iv.next148 = add i64 %lsr.iv147, -1
  165.   %scevgep152 = getelementptr double* %lsr.iv151, i64 3
  166.   %exitcond = icmp eq i64 %lsr.iv.next148, 0
  167.   br i1 %exitcond, label %loop_exit9, label %loop_body7
  168.  
  169. loop_exit9:                                       ; preds = %loop_body7, %loop_test6.preheader
  170.   %lsr.iv.next = add i64 %lsr.iv, -1
  171.   %lsr.iv.next150 = add i64 %lsr.iv149, 3
  172.   %exitcond143 = icmp eq i64 %storemerge121138, %n
  173.   br i1 %exitcond143, label %loop_exit, label %loop_test6.preheader
  174.  
  175. loop_exit:                                        ; preds = %loop_exit9, %entry
  176.   ret void
  177. }
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