Advertisement
Guest User

PowerPC LLVM IR

a guest
Mar 1st, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
LLVM 17.12 KB | None | 0 0
  1. -------------------------------OPTIMIZED DUMP nrt-------------------------------
  2. ; ModuleID = '<string>'
  3. source_filename = "<string>"
  4. target datalayout = "e-m:e-i64:64-n32:64"
  5. target triple = "powerpc64le-unknown-linux-gnu"
  6.  
  7. @.const.picklebuf.70358728208824 = internal constant { i8*, i32 } { i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.const.pickledata.70358728208824, i32 0, i32 0), i32 94 }
  8. @.const.pickledata.70358728208824 = internal constant [94 x i8] c"\80\02cexceptions\0ARuntimeError\0Aq\00U6numba jitted function aborted due to unresolved symbolq\01\85q\02\86q\03."
  9.  
  10. ; Function Attrs: norecurse nounwind
  11. define i64 @nrt_atomic_add(i64* nocapture %.1) local_unnamed_addr #0 {
  12. .3:
  13.   %.4 = atomicrmw add i64* %.1, i64 1 monotonic
  14.   %.5 = add i64 %.4, 1
  15.   ret i64 %.5
  16. }
  17.  
  18. ; Function Attrs: norecurse nounwind
  19. define i64 @nrt_atomic_sub(i64* nocapture %.1) local_unnamed_addr #0 {
  20. .3:
  21.   %.4 = atomicrmw sub i64* %.1, i64 1 monotonic
  22.   %.5 = add i64 %.4, -1
  23.   ret i64 %.5
  24. }
  25.  
  26. ; Function Attrs: norecurse nounwind
  27. define i32 @nrt_atomic_cas(i64* nocapture %.1, i64 %.2, i64 %.3, i64* nocapture %.4) local_unnamed_addr #0 {
  28. .6:
  29.   %.7 = cmpxchg i64* %.1, i64 %.2, i64 %.3 monotonic monotonic
  30.   %.8 = extractvalue { i64, i1 } %.7, 0
  31.   %.9 = extractvalue { i64, i1 } %.7, 1
  32.   store i64 %.8, i64* %.4, align 8
  33.   %.11 = zext i1 %.9 to i32
  34.   ret i32 %.11
  35. }
  36.  
  37. ; Function Attrs: norecurse nounwind readonly
  38. define i8* @NRT_MemInfo_data_fast(i8* nocapture readonly %.1) local_unnamed_addr #1 {
  39. .3:
  40.   %.5 = getelementptr i8, i8* %.1, i64 24
  41.   %0 = bitcast i8* %.5 to i8**
  42.   %.6 = load i8*, i8** %0, align 8
  43.   ret i8* %.6
  44. }
  45.  
  46. ; Function Attrs: noinline norecurse nounwind
  47. define void @NRT_incref(i8* %.1) local_unnamed_addr #2 {
  48. .3:
  49.   %.4 = icmp eq i8* %.1, null
  50.   br i1 %.4, label %.3.if, label %.3.endif, !prof !0
  51.  
  52. .3.if:                                            ; preds = %.3
  53.   ret void
  54.  
  55. .3.endif:                                         ; preds = %.3
  56.   %.7 = bitcast i8* %.1 to i64*
  57.   %.4.i = atomicrmw add i64* %.7, i64 1 monotonic
  58.   ret void
  59. }
  60.  
  61. ; Function Attrs: noinline nounwind
  62. define void @NRT_decref(i8* %.1) local_unnamed_addr #3 {
  63. .3:
  64.   %.4 = icmp eq i8* %.1, null
  65.   br i1 %.4, label %.3.if, label %.3.endif, !prof !0
  66.  
  67. .3.if:                                            ; preds = %.3.endif.if, %.3.endif, %.3
  68.   ret void
  69.  
  70. .3.endif:                                         ; preds = %.3
  71.   fence release
  72.   %.8 = bitcast i8* %.1 to i64*
  73.   %.4.i = atomicrmw sub i64* %.8, i64 1 monotonic
  74.   %.10 = icmp eq i64 %.4.i, 1
  75.   br i1 %.10, label %.3.endif.if, label %.3.if, !prof !0
  76.  
  77. .3.endif.if:                                      ; preds = %.3.endif
  78.   fence acquire
  79.   tail call void @NRT_MemInfo_call_dtor(i8* nonnull %.1)
  80.   br label %.3.if
  81. }
  82.  
  83. ; Function Attrs: nounwind
  84. declare void @NRT_MemInfo_call_dtor(i8*) local_unnamed_addr #4
  85.  
  86. ; Function Attrs: norecurse nounwind
  87. define i32 @nrt_unresolved_abort(i8** nocapture readnone %.1, { i8*, i32 }** nocapture %.2, i8* nocapture readnone %.3) local_unnamed_addr #0 {
  88. .5:
  89.   store { i8*, i32 }* @.const.picklebuf.70358728208824, { i8*, i32 }** %.2, align 8
  90.   ret i32 1
  91. }
  92.  
  93. ; Function Attrs: nounwind
  94. declare void @llvm.stackprotector(i8*, i8**) #4
  95.  
  96. attributes #0 = { norecurse nounwind }
  97. attributes #1 = { norecurse nounwind readonly }
  98. attributes #2 = { noinline norecurse nounwind }
  99. attributes #3 = { noinline nounwind }
  100. attributes #4 = { nounwind }
  101.  
  102. !0 = !{!"branch_weights", i32 1, i32 99}
  103.  
  104. ================================================================================
  105. -------------------------------OPTIMIZED DUMP foo-------------------------------
  106. ; ModuleID = 'foo'
  107. source_filename = "<string>"
  108. target datalayout = "e-m:e-i64:64-n32:64"
  109. target triple = "powerpc64le-unknown-linux-gnu"
  110.  
  111. @.const.picklebuf.70358720603488 = internal constant { i8*, i32 } { i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.const.pickledata.70358720603488, i32 0, i32 0), i32 59 }
  112. @".const.%s" = internal constant [3 x i8] c"%s\00"
  113. @".const.the print() function" = internal constant [21 x i8] c"the print() function\00"
  114. @".const.\0A" = internal constant [2 x i8] c"\0A\00"
  115. @.const.pickledata.70358720603488 = internal constant [59 x i8] c"\80\02cexceptions\0ARuntimeError\0Aq\00U\13missing Environmentq\01\85q\02\86q\03."
  116.  
  117. ; Function Attrs: nounwind
  118. define i32 @"_ZN8__main__7foo$241Ei"(i8** noalias nocapture %retptr, { i8*, i32 }** noalias nocapture %excinfo, i8* noalias nocapture readnone %env, i32 %arg.x) local_unnamed_addr #0 {
  119. entry:
  120.   %.15 = alloca i32, align 4
  121.   call void @numba_gil_ensure(i32* nonnull %.15)
  122.   %.17 = icmp eq i8* %env, null
  123.   br i1 %.17, label %B0.if, label %B0.endif.if, !prof !0
  124.  
  125. B0.if:                                            ; preds = %entry
  126.   store { i8*, i32 }* @.const.picklebuf.70358720603488, { i8*, i32 }** %excinfo, align 8
  127.   ret i32 1
  128.  
  129. B0.endif.if:                                      ; preds = %entry
  130.   %.25 = sext i32 %arg.x to i64
  131.   %.31 = call i8* @PyInt_FromLong(i64 %.25)
  132.   %.38 = icmp eq i8* %.31, null
  133.   br i1 %.38, label %B0.endif.endif.else, label %B0.endif.endif.if, !prof !0
  134.  
  135. B0.endif.endif.if:                                ; preds = %B0.endif.if
  136.   %.40 = call i8* @PyObject_Str(i8* nonnull %.31)
  137.   %.41 = call i8* @PyString_AsString(i8* %.40)
  138.   call void (i8*, ...) @PySys_WriteStdout(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @".const.%s", i64 0, i64 0), i8* %.41)
  139.   call void @Py_DecRef(i8* %.40)
  140.   call void @Py_DecRef(i8* nonnull %.31)
  141.   br label %B0.endif.endif.endif
  142.  
  143. B0.endif.endif.else:                              ; preds = %B0.endif.if
  144.   %.46 = call i8* @PyString_FromString(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @".const.the print() function", i64 0, i64 0))
  145.   call void @PyErr_WriteUnraisable(i8* %.46)
  146.   call void @Py_DecRef(i8* %.46)
  147.   br label %B0.endif.endif.endif
  148.  
  149. B0.endif.endif.endif:                             ; preds = %B0.endif.endif.else, %B0.endif.endif.if
  150.   call void (i8*, ...) @PySys_WriteStdout(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @".const.\0A", i64 0, i64 0))
  151.   call void @numba_gil_release(i32* nonnull %.15)
  152.   store i8* null, i8** %retptr, align 8
  153.   ret i32 0
  154. }
  155.  
  156. ; Function Attrs: nounwind
  157. declare void @numba_gil_ensure(i32*) local_unnamed_addr #0
  158.  
  159. ; Function Attrs: nounwind
  160. declare i8* @PyInt_FromLong(i64) local_unnamed_addr #0
  161.  
  162. ; Function Attrs: nounwind
  163. declare i8* @PyObject_Str(i8*) local_unnamed_addr #0
  164.  
  165. ; Function Attrs: nounwind
  166. declare i8* @PyString_AsString(i8*) local_unnamed_addr #0
  167.  
  168. ; Function Attrs: nounwind
  169. declare void @PySys_WriteStdout(i8*, ...) local_unnamed_addr #0
  170.  
  171. ; Function Attrs: nounwind
  172. declare void @Py_DecRef(i8*) local_unnamed_addr #0
  173.  
  174. ; Function Attrs: nounwind
  175. declare i8* @PyString_FromString(i8*) local_unnamed_addr #0
  176.  
  177. ; Function Attrs: nounwind
  178. declare void @PyErr_WriteUnraisable(i8*) local_unnamed_addr #0
  179.  
  180. ; Function Attrs: nounwind
  181. declare void @numba_gil_release(i32*) local_unnamed_addr #0
  182.  
  183. ; Function Attrs: nounwind
  184. declare void @llvm.stackprotector(i8*, i8**) #0
  185.  
  186. attributes #0 = { nounwind }
  187.  
  188. !0 = !{!"branch_weights", i32 1, i32 99}
  189.  
  190. ================================================================================
  191. [New Thread 0x3ffdaa82f1d0 (LWP 25771)]
  192. OPTIMIZED DUMP <numba.npyufunc.wrappers._GufuncWrapper object at 0x3ffdab008750>
  193. ; ModuleID = '<numba.npyufunc.wrappers._GufuncWrapper object at 0x3ffdab008750>'
  194. source_filename = "<string>"
  195. target datalayout = "e-m:e-i64:64-n32:64"
  196. target triple = "powerpc64le-unknown-linux-gnu"
  197.  
  198. @PyExc_StopIteration = external global i8
  199. @PyExc_SystemError = external global i8
  200. @".const.unknown error when calling native function" = internal constant [43 x i8] c"unknown error when calling native function\00"
  201. @.const.picklebuf.70358720603488 = internal constant { i8*, i32 } { i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.const.pickledata.70358720603488, i32 0, i32 0), i32 59 }
  202. @".const.%s" = internal constant [3 x i8] c"%s\00"
  203. @".const.the print() function" = internal constant [21 x i8] c"the print() function\00"
  204. @".const.\0A" = internal constant [2 x i8] c"\0A\00"
  205. @.const.pickledata.70358720603488 = internal constant [59 x i8] c"\80\02cexceptions\0ARuntimeError\0Aq\00U\13missing Environmentq\01\85q\02\86q\03."
  206.  
  207. ; Function Attrs: nounwind
  208. define void @"__gufunc__._ZN8__main__7foo$241Ei"(i8** nocapture readonly %args, i64* nocapture readonly %dims, i64* nocapture readonly %steps, i8* nocapture readnone %data) local_unnamed_addr #0 {
  209. entry:
  210.   %loopcount = load i64, i64* %dims, align 8
  211.   %data.1 = load i8*, i8** %args, align 8
  212.   %.6 = load i64, i64* %steps, align 8
  213.   %.14 = alloca i8*, align 8
  214.   %excinfo = alloca { i8*, i32 }*, align 8
  215.   %.28 = alloca i32, align 4
  216.   %.81 = icmp sgt i64 %loopcount, 0
  217.   br i1 %.81, label %for.body.preheader, label %.return
  218.  
  219. for.body.preheader:                               ; preds = %entry
  220.   br label %for.body
  221.  
  222. .return:                                          ; preds = %.continue, %entry, %.30
  223.   ret void
  224.  
  225. for.body:                                         ; preds = %for.body.preheader, %.continue
  226.   %lsr.iv = phi i8* [ %data.1, %for.body.preheader ], [ %1, %.continue ]
  227.   %loop.index2 = phi i64 [ %.53, %.continue ], [ 0, %for.body.preheader ]
  228.   %lsr.iv16 = bitcast i8* %lsr.iv to i32*
  229.   %.13 = load i32, i32* %lsr.iv16, align 4
  230.   store i8* null, i8** %.14, align 8
  231.   %.16 = call i32 @"_ZN8__main__7foo$241Ei"(i8** nonnull %.14, { i8*, i32 }** nonnull %excinfo, i8* inttoptr (i64 70358720481424 to i8*), i32 %.13)
  232.   %.17 = load { i8*, i32 }*, { i8*, i32 }** %excinfo, align 8
  233.   switch i32 %.16, label %for.body.if [
  234.     i32 -2, label %.continue
  235.     i32 0, label %.continue
  236.   ]
  237.  
  238. for.body.if:                                      ; preds = %for.body
  239.   %.24 = icmp sgt i32 %.16, 0
  240.   call void @numba_gil_ensure(i32* nonnull %.28)
  241.   br i1 %.24, label %for.body.if.if, label %for.body.if.endif
  242.  
  243. .30:                                              ; preds = %for.body.if.if, %for.body.if.endif, %for.body.if.if.if, %for.body.if.endif.endif.endif, %for.body.if.endif.if
  244.   call void @numba_gil_release(i32* nonnull %.28)
  245.   br label %.return
  246.  
  247. for.body.if.if:                                   ; preds = %for.body.if
  248.   call void @PyErr_Clear()
  249.   %.33 = load { i8*, i32 }, { i8*, i32 }* %.17, align 8
  250.   %.34 = extractvalue { i8*, i32 } %.33, 0
  251.   %.36 = extractvalue { i8*, i32 } %.33, 1
  252.   %.37 = call i8* @numba_unpickle(i8* %.34, i32 %.36)
  253.   %.38 = icmp eq i8* %.37, null
  254.   br i1 %.38, label %.30, label %for.body.if.if.if, !prof !0
  255.  
  256. for.body.if.endif:                                ; preds = %for.body.if
  257.   switch i32 %.16, label %for.body.if.endif.endif.endif [
  258.     i32 -3, label %for.body.if.endif.if
  259.     i32 -1, label %.30
  260.   ]
  261.  
  262. for.body.if.if.if:                                ; preds = %for.body.if.if
  263.   call void @numba_do_raise(i8* nonnull %.37)
  264.   br label %.30
  265.  
  266. for.body.if.endif.if:                             ; preds = %for.body.if.endif
  267.   call void @PyErr_SetNone(i8* nonnull @PyExc_StopIteration)
  268.   br label %.30
  269.  
  270. for.body.if.endif.endif.endif:                    ; preds = %for.body.if.endif
  271.   call void @PyErr_SetString(i8* nonnull @PyExc_SystemError, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @".const.unknown error when calling native function", i64 0, i64 0))
  272.   br label %.30
  273.  
  274. .continue:                                        ; preds = %for.body, %for.body
  275.   %0 = bitcast i8* %lsr.iv to i1*
  276.   %.53 = add nuw nsw i64 %loop.index2, 1
  277.   %scevgep = getelementptr i1, i1* %0, i64 %.6
  278.   %1 = bitcast i1* %scevgep to i8*
  279.   %.8 = icmp slt i64 %.53, %loopcount
  280.   br i1 %.8, label %for.body, label %.return
  281. }
  282.  
  283. ; Function Attrs: nounwind
  284. declare void @numba_gil_ensure(i32*) local_unnamed_addr #0
  285.  
  286. ; Function Attrs: nounwind
  287. declare void @numba_gil_release(i32*) local_unnamed_addr #0
  288.  
  289. ; Function Attrs: nounwind
  290. declare void @PyErr_Clear() local_unnamed_addr #0
  291.  
  292. ; Function Attrs: nounwind
  293. declare i8* @numba_unpickle(i8*, i32) local_unnamed_addr #0
  294.  
  295. ; Function Attrs: nounwind
  296. declare void @numba_do_raise(i8*) local_unnamed_addr #0
  297.  
  298. ; Function Attrs: nounwind
  299. declare void @PyErr_SetNone(i8*) local_unnamed_addr #0
  300.  
  301. ; Function Attrs: nounwind
  302. declare void @PyErr_SetString(i8*, i8*) local_unnamed_addr #0
  303.  
  304. ; Function Attrs: nounwind
  305. define linkonce_odr i32 @"_ZN8__main__7foo$241Ei"(i8** noalias nocapture %retptr, { i8*, i32 }** noalias nocapture %excinfo, i8* noalias nocapture readnone %env, i32 %arg.x) local_unnamed_addr #0 {
  306. entry:
  307.   %.15 = alloca i32, align 4
  308.   call void @numba_gil_ensure(i32* nonnull %.15)
  309.   %.17 = icmp eq i8* %env, null
  310.   br i1 %.17, label %B0.if, label %B0.endif.if, !prof !0
  311.  
  312. B0.if:                                            ; preds = %entry
  313.   store { i8*, i32 }* @.const.picklebuf.70358720603488, { i8*, i32 }** %excinfo, align 8
  314.   ret i32 1
  315.  
  316. B0.endif.if:                                      ; preds = %entry
  317.   %.25 = sext i32 %arg.x to i64
  318.   %.31 = call i8* @PyInt_FromLong(i64 %.25)
  319.   %.38 = icmp eq i8* %.31, null
  320.   br i1 %.38, label %B0.endif.endif.else, label %B0.endif.endif.if, !prof !0
  321.  
  322. B0.endif.endif.if:                                ; preds = %B0.endif.if
  323.   %.40 = call i8* @PyObject_Str(i8* nonnull %.31)
  324.   %.41 = call i8* @PyString_AsString(i8* %.40)
  325.   call void (i8*, ...) @PySys_WriteStdout(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @".const.%s", i64 0, i64 0), i8* %.41)
  326.   call void @Py_DecRef(i8* %.40)
  327.   call void @Py_DecRef(i8* nonnull %.31)
  328.   br label %B0.endif.endif.endif
  329.  
  330. B0.endif.endif.else:                              ; preds = %B0.endif.if
  331.   %.46 = call i8* @PyString_FromString(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @".const.the print() function", i64 0, i64 0))
  332.   call void @PyErr_WriteUnraisable(i8* %.46)
  333.   call void @Py_DecRef(i8* %.46)
  334.   br label %B0.endif.endif.endif
  335.  
  336. B0.endif.endif.endif:                             ; preds = %B0.endif.endif.else, %B0.endif.endif.if
  337.   call void (i8*, ...) @PySys_WriteStdout(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @".const.\0A", i64 0, i64 0))
  338.   call void @numba_gil_release(i32* nonnull %.15)
  339.   store i8* null, i8** %retptr, align 8
  340.   ret i32 0
  341. }
  342.  
  343. ; Function Attrs: nounwind
  344. declare i8* @PyInt_FromLong(i64) local_unnamed_addr #0
  345.  
  346. ; Function Attrs: nounwind
  347. declare i8* @PyObject_Str(i8*) local_unnamed_addr #0
  348.  
  349. ; Function Attrs: nounwind
  350. declare i8* @PyString_AsString(i8*) local_unnamed_addr #0
  351.  
  352. ; Function Attrs: nounwind
  353. declare void @PySys_WriteStdout(i8*, ...) local_unnamed_addr #0
  354.  
  355. ; Function Attrs: nounwind
  356. declare void @Py_DecRef(i8*) local_unnamed_addr #0
  357.  
  358. ; Function Attrs: nounwind
  359. declare i8* @PyString_FromString(i8*) local_unnamed_addr #0
  360.  
  361. ; Function Attrs: nounwind
  362. declare void @PyErr_WriteUnraisable(i8*) local_unnamed_addr #0
  363.  
  364. ; Function Attrs: nounwind
  365. declare void @llvm.stackprotector(i8*, i8**) #0
  366.  
  367. attributes #0 = { nounwind }
  368.  
  369. !0 = !{!"branch_weights", i32 1, i32 99}
  370.  
  371. ================================================================================
  372. ----------------------OPTIMIZED DUMP parallelufuncwrapper-----------------------
  373. ; ModuleID = 'parallelufuncwrapper'
  374. source_filename = "<string>"
  375. target datalayout = "e-m:e-i64:64-n32:64"
  376. target triple = "powerpc64le-unknown-linux-gnu"
  377.  
  378. ; Function Attrs: nounwind
  379. define void @.kernel.70358711205896(i8** nocapture readonly %.1, i64* nocapture readonly %.2, i64* %.3, i8* %.4) local_unnamed_addr #0 {
  380. .6:
  381.   %.7 = alloca i32, align 4
  382.   call void @numba_gil_ensure(i32* nonnull %.7)
  383.   %.9 = call i8* @PyEval_SaveThread()
  384.   %.10 = load i64, i64* %.2, align 8
  385.   %.12 = alloca i64, align 8
  386.   store i64 %.10, i64* %.12, align 8
  387.   %.271 = alloca [2 x i8*], align 8
  388.   %0 = bitcast i8** %.1 to i64*
  389.   %.302 = load i64, i64* %0, align 8
  390.   %1 = bitcast [2 x i8*]* %.271 to i64*
  391.   store i64 %.302, i64* %1, align 8
  392.   %.37 = getelementptr inbounds [2 x i8*], [2 x i8*]* %.271, i64 0, i64 1
  393.   %.38 = getelementptr i8*, i8** %.1, i64 1
  394.   %2 = bitcast i8** %.38 to i64*
  395.   %.393 = load i64, i64* %2, align 8
  396.   %3 = bitcast i8** %.37 to i64*
  397.   store i64 %.393, i64* %3, align 8
  398.   %.46 = bitcast [2 x i8*]* %.271 to i8*
  399.   %.47 = bitcast i64* %.12 to i8*
  400.   %.48 = bitcast i64* %.3 to i8*
  401.   call void @numba_add_task(i8* inttoptr (i64 70358711205896 to i8*), i8* nonnull %.46, i8* nonnull %.47, i8* %.48, i8* %.4)
  402.   call void @numba_ready()
  403.   call void @numba_synchronize()
  404.   call void @PyEval_RestoreThread(i8* %.9)
  405.   call void @numba_gil_release(i32* nonnull %.7)
  406.   ret void
  407. }
  408.  
  409. ; Function Attrs: nounwind
  410. declare void @numba_gil_ensure(i32*) local_unnamed_addr #0
  411.  
  412. ; Function Attrs: nounwind
  413. declare i8* @PyEval_SaveThread() local_unnamed_addr #0
  414.  
  415. ; Function Attrs: nounwind
  416. declare void @numba_add_task(i8*, i8*, i8*, i8*, i8*) local_unnamed_addr #0
  417.  
  418. ; Function Attrs: nounwind
  419. declare void @numba_ready() local_unnamed_addr #0
  420.  
  421. ; Function Attrs: nounwind
  422. declare void @numba_synchronize() local_unnamed_addr #0
  423.  
  424. ; Function Attrs: nounwind
  425. declare void @PyEval_RestoreThread(i8*) local_unnamed_addr #0
  426.  
  427. ; Function Attrs: nounwind
  428. declare void @numba_gil_release(i32*) local_unnamed_addr #0
  429.  
  430. ; Function Attrs: nounwind
  431. declare void @llvm.stackprotector(i8*, i8**) #0
  432.  
  433. attributes #0 = { nounwind }
  434.  
  435. ================================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement