heap_4.c.078i.free-fnsummary2 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739
  1. vPortGetHeapStats (struct HeapStats_t * pxHeapStats)
  2. {
  3. size_t xMinSize;
  4. size_t xMaxSize;
  5. size_t xBlocks;
  6. struct BlockLink_t * pxBlock;
  7. unsigned int _1;
  8. struct BlockLink_t * pxEnd.26_3;
  9. unsigned int xFreeBytesRemaining.27_4;
  10. unsigned int xNumberOfSuccessfulAllocations.28_5;
  11. unsigned int xNumberOfSuccessfulFrees.29_6;
  12. unsigned int xMinimumEverFreeBytesRemaining.30_7;
  13. <bb 2> [local count: 168730857]:
  14. # DEBUG BEGIN_STMT
  15. # DEBUG BEGIN_STMT
  16. # DEBUG xBlocks => 0
  17. # DEBUG xMaxSize => 0
  18. # DEBUG xMinSize => 4294967295
  19. # DEBUG BEGIN_STMT
  20. vTaskSuspendAll ();
  21. # DEBUG BEGIN_STMT
  22. pxBlock_17 = xStart.pxNextFreeBlock;
  23. # DEBUG pxBlock => pxBlock_17
  24. # DEBUG BEGIN_STMT
  25. if (pxBlock_17 != 0B)
  26. goto <bb 5>; [70.00%]
  27. else
  28. goto <bb 4>; [30.00%]
  29. <bb 5> [local count: 118111600]:
  30. <bb 3> [local count: 1073741824]:
  31. # pxBlock_8 = PHI <pxBlock_17(5), pxBlock_20(6)>
  32. # xBlocks_9 = PHI <0(5), xBlocks_18(6)>
  33. # xMaxSize_11 = PHI <0(5), xMaxSize_2(6)>
  34. # xMinSize_13 = PHI <4294967295(5), xMinSize_19(6)>
  35. # DEBUG xMinSize => xMinSize_13
  36. # DEBUG xMaxSize => xMaxSize_11
  37. # DEBUG xBlocks => xBlocks_9
  38. # DEBUG pxBlock => pxBlock_8
  39. # DEBUG BEGIN_STMT
  40. # DEBUG BEGIN_STMT
  41. xBlocks_18 = xBlocks_9 + 1;
  42. # DEBUG xBlocks => xBlocks_18
  43. # DEBUG BEGIN_STMT
  44. _1 = pxBlock_8->xBlockSize;
  45. xMaxSize_2 = MAX_EXPR <_1, xMaxSize_11>;
  46. # DEBUG xMaxSize => xMaxSize_2
  47. # DEBUG BEGIN_STMT
  48. xMinSize_19 = MIN_EXPR <_1, xMinSize_13>;
  49. # DEBUG xMinSize => xMinSize_19
  50. # DEBUG BEGIN_STMT
  51. pxBlock_20 = pxBlock_8->pxNextFreeBlock;
  52. # DEBUG pxBlock => pxBlock_20
  53. # DEBUG BEGIN_STMT
  54. pxEnd.26_3 = pxEnd;
  55. if (pxEnd.26_3 != pxBlock_20)
  56. goto <bb 6>; [89.00%]
  57. else
  58. goto <bb 4>; [11.00%]
  59. <bb 6> [local count: 955630225]:
  60. goto <bb 3>; [100.00%]
  61. <bb 4> [local count: 168730858]:
  62. # xBlocks_10 = PHI <0(2), xBlocks_18(3)>
  63. # xMaxSize_12 = PHI <0(2), xMaxSize_2(3)>
  64. # xMinSize_14 = PHI <4294967295(2), xMinSize_19(3)>
  65. # DEBUG xMinSize => xMinSize_14
  66. # DEBUG xMaxSize => xMaxSize_12
  67. # DEBUG xBlocks => xBlocks_10
  68. # DEBUG BEGIN_STMT
  69. xTaskResumeAll ();
  70. # DEBUG BEGIN_STMT
  71. pxHeapStats_22(D)->xSizeOfLargestFreeBlockInBytes = xMaxSize_12;
  72. # DEBUG BEGIN_STMT
  73. pxHeapStats_22(D)->xSizeOfSmallestFreeBlockInBytes = xMinSize_14;
  74. # DEBUG BEGIN_STMT
  75. pxHeapStats_22(D)->xNumberOfFreeBlocks = xBlocks_10;
  76. # DEBUG BEGIN_STMT
  77. vPortEnterCritical ();
  78. # DEBUG BEGIN_STMT
  79. xFreeBytesRemaining.27_4 = xFreeBytesRemaining;
  80. pxHeapStats_22(D)->xAvailableHeapSpaceInBytes = xFreeBytesRemaining.27_4;
  81. # DEBUG BEGIN_STMT
  82. xNumberOfSuccessfulAllocations.28_5 = xNumberOfSuccessfulAllocations;
  83. pxHeapStats_22(D)->xNumberOfSuccessfulAllocations = xNumberOfSuccessfulAllocations.28_5;
  84. # DEBUG BEGIN_STMT
  85. xNumberOfSuccessfulFrees.29_6 = xNumberOfSuccessfulFrees;
  86. pxHeapStats_22(D)->xNumberOfSuccessfulFrees = xNumberOfSuccessfulFrees.29_6;
  87. # DEBUG BEGIN_STMT
  88. xMinimumEverFreeBytesRemaining.30_7 = xMinimumEverFreeBytesRemaining;
  89. pxHeapStats_22(D)->xMinimumEverFreeBytesRemaining = xMinimumEverFreeBytesRemaining.30_7;
  90. # DEBUG BEGIN_STMT
  91. vPortExitCritical ();
  92. return;
  93. }
  94. prvInsertBlockIntoFreeList (struct BlockLink_t * pxBlockToInsert)
  95. {
  96. struct BlockLink_t * pxIterator;
  97. struct A_BLOCK_LINK * _1;
  98. unsigned int _2;
  99. uint8_t * _3;
  100. unsigned int _5;
  101. unsigned int _6;
  102. unsigned int _7;
  103. uint8_t * _8;
  104. struct BlockLink_t * pxEnd.19_9;
  105. unsigned int _10;
  106. unsigned int _11;
  107. struct A_BLOCK_LINK * _12;
  108. struct A_BLOCK_LINK * _20;
  109. <bb 2> [local count: 118111600]:
  110. # DEBUG BEGIN_STMT
  111. # DEBUG BEGIN_STMT
  112. # DEBUG BEGIN_STMT
  113. # DEBUG pxIterator => &xStart
  114. <bb 3> [local count: 1073741824]:
  115. # pxIterator_14 = PHI <&xStart(2), _1(14)>
  116. # DEBUG pxIterator => pxIterator_14
  117. # DEBUG BEGIN_STMT
  118. _1 = pxIterator_14->pxNextFreeBlock;
  119. if (_1 < pxBlockToInsert_19(D))
  120. goto <bb 14>; [89.00%]
  121. else
  122. goto <bb 4>; [11.00%]
  123. <bb 14> [local count: 955630223]:
  124. goto <bb 3>; [100.00%]
  125. <bb 4> [local count: 118111601]:
  126. # _20 = PHI <_1(3)>
  127. # pxIterator_4 = PHI <pxIterator_14(3)>
  128. # DEBUG BEGIN_STMT
  129. # DEBUG puc => pxIterator_4
  130. # DEBUG BEGIN_STMT
  131. _2 = pxIterator_4->xBlockSize;
  132. _3 = pxIterator_4 + _2;
  133. if (_3 == pxBlockToInsert_19(D))
  134. goto <bb 5>; [30.00%]
  135. else
  136. goto <bb 6>; [70.00%]
  137. <bb 5> [local count: 35433480]:
  138. # DEBUG BEGIN_STMT
  139. _5 = pxBlockToInsert_19(D)->xBlockSize;
  140. _6 = _2 + _5;
  141. pxIterator_4->xBlockSize = _6;
  142. # DEBUG BEGIN_STMT
  143. # DEBUG pxBlockToInsert => pxIterator_4
  144. <bb 6> [local count: 118111601]:
  145. # pxBlockToInsert_13 = PHI <pxBlockToInsert_19(D)(4), pxIterator_4(5)>
  146. # DEBUG pxBlockToInsert => pxBlockToInsert_13
  147. # DEBUG BEGIN_STMT
  148. # DEBUG BEGIN_STMT
  149. # DEBUG puc => pxBlockToInsert_13
  150. # DEBUG BEGIN_STMT
  151. _7 = pxBlockToInsert_13->xBlockSize;
  152. _8 = pxBlockToInsert_13 + _7;
  153. if (_8 == _20)
  154. goto <bb 7>; [30.00%]
  155. else
  156. goto <bb 10>; [70.00%]
  157. <bb 7> [local count: 35433480]:
  158. # DEBUG BEGIN_STMT
  159. pxEnd.19_9 = pxEnd;
  160. if (pxEnd.19_9 != _20)
  161. goto <bb 8>; [70.00%]
  162. else
  163. goto <bb 9>; [30.00%]
  164. <bb 8> [local count: 24803436]:
  165. # DEBUG BEGIN_STMT
  166. _10 = _20->xBlockSize;
  167. _11 = _7 + _10;
  168. pxBlockToInsert_13->xBlockSize = _11;
  169. # DEBUG BEGIN_STMT
  170. _12 = _20->pxNextFreeBlock;
  171. pxBlockToInsert_13->pxNextFreeBlock = _12;
  172. goto <bb 11>; [100.00%]
  173. <bb 9> [local count: 10630044]:
  174. # DEBUG BEGIN_STMT
  175. pxBlockToInsert_13->pxNextFreeBlock = pxEnd.19_9;
  176. goto <bb 11>; [100.00%]
  177. <bb 10> [local count: 82678120]:
  178. # DEBUG BEGIN_STMT
  179. pxBlockToInsert_13->pxNextFreeBlock = _20;
  180. <bb 11> [local count: 118111601]:
  181. # DEBUG BEGIN_STMT
  182. if (pxIterator_4 != pxBlockToInsert_13)
  183. goto <bb 12>; [70.00%]
  184. else
  185. goto <bb 13>; [30.00%]
  186. <bb 12> [local count: 82678120]:
  187. # DEBUG BEGIN_STMT
  188. pxIterator_4->pxNextFreeBlock = pxBlockToInsert_13;
  189. <bb 13> [local count: 118111601]:
  190. # DEBUG BEGIN_STMT
  191. return;
  192. }
  193. prvHeapInit ()
  194. {
  195. size_t xTotalHeapSize;
  196. size_t uxAddress;
  197. uint8_t * pucAlignedHeap;
  198. unsigned int _1;
  199. unsigned int _2;
  200. struct BlockLink_t * uxAddress.14_3;
  201. unsigned int _4;
  202. <bb 2> [local count: 1073741824]:
  203. # DEBUG BEGIN_STMT
  204. # DEBUG BEGIN_STMT
  205. # DEBUG BEGIN_STMT
  206. # DEBUG BEGIN_STMT
  207. # DEBUG xTotalHeapSize => 8192
  208. # DEBUG BEGIN_STMT
  209. uxAddress_7 = (size_t) &ucHeap;
  210. # DEBUG uxAddress => uxAddress_7
  211. # DEBUG BEGIN_STMT
  212. _1 = uxAddress_7 & 7;
  213. if (_1 != 0)
  214. goto <bb 3>; [50.00%]
  215. else
  216. goto <bb 4>; [50.00%]
  217. <bb 3> [local count: 536870913]:
  218. # DEBUG BEGIN_STMT
  219. uxAddress_8 = uxAddress_7 + 7;
  220. # DEBUG uxAddress => uxAddress_8
  221. # DEBUG BEGIN_STMT
  222. uxAddress_9 = uxAddress_8 & 4294967288;
  223. # DEBUG uxAddress => uxAddress_9
  224. # DEBUG BEGIN_STMT
  225. _2 = 8192 - uxAddress_9;
  226. xTotalHeapSize_10 = _2 + uxAddress_7;
  227. # DEBUG xTotalHeapSize => xTotalHeapSize_10
  228. <bb 4> [local count: 1073741824]:
  229. # uxAddress_5 = PHI <uxAddress_7(2), uxAddress_9(3)>
  230. # xTotalHeapSize_6 = PHI <8192(2), xTotalHeapSize_10(3)>
  231. # DEBUG xTotalHeapSize => xTotalHeapSize_6
  232. # DEBUG uxAddress => uxAddress_5
  233. # DEBUG BEGIN_STMT
  234. pucAlignedHeap_11 = (uint8_t *) uxAddress_5;
  235. # DEBUG pucAlignedHeap => pucAlignedHeap_11
  236. # DEBUG BEGIN_STMT
  237. xStart.pxNextFreeBlock = pucAlignedHeap_11;
  238. # DEBUG BEGIN_STMT
  239. xStart.xBlockSize = 0;
  240. # DEBUG BEGIN_STMT
  241. uxAddress_15 = uxAddress_5 + xTotalHeapSize_6;
  242. # DEBUG uxAddress => uxAddress_15
  243. # DEBUG BEGIN_STMT
  244. uxAddress_16 = uxAddress_15 + 4294967288;
  245. # DEBUG uxAddress => uxAddress_16
  246. # DEBUG BEGIN_STMT
  247. uxAddress_17 = uxAddress_16 & 4294967288;
  248. # DEBUG uxAddress => uxAddress_17
  249. # DEBUG BEGIN_STMT
  250. uxAddress.14_3 = (struct BlockLink_t *) uxAddress_17;
  251. pxEnd = uxAddress.14_3;
  252. # DEBUG BEGIN_STMT
  253. uxAddress.14_3->xBlockSize = 0;
  254. # DEBUG BEGIN_STMT
  255. uxAddress.14_3->pxNextFreeBlock = 0B;
  256. # DEBUG BEGIN_STMT
  257. # DEBUG pxFirstFreeBlock => pucAlignedHeap_11
  258. # DEBUG BEGIN_STMT
  259. _4 = uxAddress_17 - uxAddress_5;
  260. MEM[(struct BlockLink_t *)pucAlignedHeap_11].xBlockSize = _4;
  261. # DEBUG BEGIN_STMT
  262. MEM[(struct BlockLink_t *)pucAlignedHeap_11].pxNextFreeBlock = uxAddress.14_3;
  263. # DEBUG BEGIN_STMT
  264. xMinimumEverFreeBytesRemaining = _4;
  265. # DEBUG BEGIN_STMT
  266. xFreeBytesRemaining = _4;
  267. # DEBUG BEGIN_STMT
  268. xBlockAllocatedBit = 2147483648;
  269. return;
  270. }
  271. vPortInitialiseBlocks ()
  272. {
  273. <bb 2> [local count: 1073741824]:
  274. # DEBUG BEGIN_STMT
  275. return;
  276. }
  277. xPortGetMinimumEverFreeHeapSize ()
  278. {
  279. size_t _2;
  280. <bb 2> [local count: 1073741824]:
  281. # DEBUG BEGIN_STMT
  282. _2 = xMinimumEverFreeBytesRemaining;
  283. return _2;
  284. }
  285. xPortGetFreeHeapSize ()
  286. {
  287. size_t _2;
  288. <bb 2> [local count: 1073741824]:
  289. # DEBUG BEGIN_STMT
  290. _2 = xFreeBytesRemaining;
  291. return _2;
  292. }
  293. vPortFree (void * pv)
  294. {
  295. uint32_t ulNewBASEPRI;
  296. uint32_t ulNewBASEPRI;
  297. uint8_t * puc;
  298. unsigned int _1;
  299. unsigned int xBlockAllocatedBit.21_2;
  300. unsigned int _3;
  301. struct A_BLOCK_LINK * _4;
  302. unsigned int _5;
  303. unsigned int _6;
  304. unsigned int _7;
  305. unsigned int xFreeBytesRemaining.24_8;
  306. unsigned int _9;
  307. unsigned int xNumberOfSuccessfulFrees.25_10;
  308. unsigned int _11;
  309. <bb 2> [local count: 306783]:
  310. # DEBUG BEGIN_STMT
  311. # DEBUG puc => pv_13(D)
  312. # DEBUG BEGIN_STMT
  313. # DEBUG BEGIN_STMT
  314. if (pv_13(D) != 0B)
  315. goto <bb 3>; [70.00%]
  316. else
  317. goto <bb 10>; [30.00%]
  318. <bb 3> [local count: 214748]:
  319. # DEBUG BEGIN_STMT
  320. puc_15 = pv_13(D) + 4294967288;
  321. # DEBUG puc => puc_15
  322. # DEBUG BEGIN_STMT
  323. # DEBUG pxLink => puc_15
  324. # DEBUG BEGIN_STMT
  325. _1 = MEM[(struct BlockLink_t *)pv_13(D) + 4294967288B].xBlockSize;
  326. xBlockAllocatedBit.21_2 = xBlockAllocatedBit;
  327. _3 = _1 & xBlockAllocatedBit.21_2;
  328. if (_3 == 0)
  329. goto <bb 4>; [50.00%]
  330. else
  331. goto <bb 6>; [50.00%]
  332. <bb 4> [local count: 107374]:
  333. # DEBUG BEGIN_STMT
  334. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  335. # DEBUG BEGIN_STMT
  336. # DEBUG BEGIN_STMT
  337. __asm__ __volatile__(" mov %0, %1
  338. msr basepri, %0
  339. isb
  340. dsb
  341. " : "=r" ulNewBASEPRI_22 : "i" 16 : "memory");
  342. # DEBUG ulNewBASEPRI => ulNewBASEPRI_22
  343. <bb 5> [local count: 1073741823]:
  344. # DEBUG ulNewBASEPRI => NULL
  345. # DEBUG BEGIN_STMT
  346. # DEBUG BEGIN_STMT
  347. # DEBUG BEGIN_STMT
  348. <bb 11> [local count: 1073741824]:
  349. goto <bb 5>; [100.00%]
  350. <bb 6> [local count: 107374]:
  351. # DEBUG BEGIN_STMT
  352. # DEBUG BEGIN_STMT
  353. _4 = MEM[(struct BlockLink_t *)pv_13(D) + 4294967288B].pxNextFreeBlock;
  354. if (_4 != 0B)
  355. goto <bb 7>; [82.57%]
  356. else
  357. goto <bb 9>; [17.43%]
  358. <bb 7> [local count: 88659]:
  359. # DEBUG BEGIN_STMT
  360. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  361. # DEBUG BEGIN_STMT
  362. # DEBUG BEGIN_STMT
  363. __asm__ __volatile__(" mov %0, %1
  364. msr basepri, %0
  365. isb
  366. dsb
  367. " : "=r" ulNewBASEPRI_23 : "i" 16 : "memory");
  368. # DEBUG ulNewBASEPRI => ulNewBASEPRI_23
  369. <bb 8> [local count: 886588623]:
  370. # DEBUG ulNewBASEPRI => NULL
  371. # DEBUG BEGIN_STMT
  372. # DEBUG BEGIN_STMT
  373. # DEBUG BEGIN_STMT
  374. <bb 12> [local count: 886588623]:
  375. goto <bb 8>; [100.00%]
  376. <bb 9> [local count: 18715]:
  377. # DEBUG BEGIN_STMT
  378. # DEBUG BEGIN_STMT
  379. # DEBUG BEGIN_STMT
  380. # DEBUG BEGIN_STMT
  381. _5 = ~xBlockAllocatedBit.21_2;
  382. _6 = _1 & _5;
  383. MEM[(struct BlockLink_t *)pv_13(D) + 4294967288B].xBlockSize = _6;
  384. # DEBUG BEGIN_STMT
  385. vTaskSuspendAll ();
  386. # DEBUG BEGIN_STMT
  387. _7 = MEM[(struct BlockLink_t *)pv_13(D) + 4294967288B].xBlockSize;
  388. xFreeBytesRemaining.24_8 = xFreeBytesRemaining;
  389. _9 = _7 + xFreeBytesRemaining.24_8;
  390. xFreeBytesRemaining = _9;
  391. # DEBUG BEGIN_STMT
  392. # DEBUG BEGIN_STMT
  393. prvInsertBlockIntoFreeList (puc_15);
  394. # DEBUG BEGIN_STMT
  395. xNumberOfSuccessfulFrees.25_10 = xNumberOfSuccessfulFrees;
  396. _11 = xNumberOfSuccessfulFrees.25_10 + 1;
  397. xNumberOfSuccessfulFrees = _11;
  398. # DEBUG BEGIN_STMT
  399. xTaskResumeAll ();
  400. <bb 10> [local count: 110750]:
  401. # DEBUG BEGIN_STMT
  402. return;
  403. }
  404. pvPortMalloc (size_t xWantedSize)
  405. {
  406. uint32_t ulNewBASEPRI;
  407. uint32_t ulNewBASEPRI;
  408. void * pvReturn;
  409. struct BlockLink_t * pxNewBlockLink;
  410. struct BlockLink_t * pxPreviousBlock;
  411. struct BlockLink_t * pxBlock;
  412. struct BlockLink_t * pxEnd.0_1;
  413. unsigned int xBlockAllocatedBit.1_2;
  414. unsigned int _3;
  415. unsigned int _4;
  416. unsigned int _5;
  417. unsigned int _6;
  418. unsigned int _7;
  419. unsigned int xFreeBytesRemaining.2_9;
  420. unsigned int _10;
  421. struct A_BLOCK_LINK * _11;
  422. struct BlockLink_t * pxEnd.3_12;
  423. struct A_BLOCK_LINK * _13;
  424. struct A_BLOCK_LINK * _14;
  425. unsigned int _15;
  426. unsigned int pxNewBlockLink.4_16;
  427. unsigned int _17;
  428. unsigned int xFreeBytesRemaining.5_18;
  429. unsigned int _19;
  430. unsigned int _20;
  431. unsigned int xMinimumEverFreeBytesRemaining.7_21;
  432. unsigned int xBlockAllocatedBit.9_22;
  433. unsigned int _23;
  434. unsigned int xNumberOfSuccessfulAllocations.10_24;
  435. unsigned int _25;
  436. unsigned int pvReturn.11_26;
  437. unsigned int _27;
  438. unsigned int _57;
  439. <bb 2> [local count: 231566]:
  440. # DEBUG BEGIN_STMT
  441. # DEBUG BEGIN_STMT
  442. # DEBUG pvReturn => 0B
  443. # DEBUG BEGIN_STMT
  444. vTaskSuspendAll ();
  445. # DEBUG BEGIN_STMT
  446. pxEnd.0_1 = pxEnd;
  447. if (pxEnd.0_1 == 0B)
  448. goto <bb 3>; [17.43%]
  449. else
  450. goto <bb 4>; [82.57%]
  451. <bb 3> [local count: 40362]:
  452. # DEBUG BEGIN_STMT
  453. prvHeapInit ();
  454. <bb 4> [local count: 231566]:
  455. # DEBUG BEGIN_STMT
  456. # DEBUG BEGIN_STMT
  457. xBlockAllocatedBit.1_2 = xBlockAllocatedBit;
  458. _3 = xBlockAllocatedBit.1_2 & xWantedSize_39(D);
  459. if (_3 == 0)
  460. goto <bb 5>; [83.25%]
  461. else
  462. goto <bb 22>; [16.75%]
  463. <bb 5> [local count: 192779]:
  464. # DEBUG BEGIN_STMT
  465. _4 = xWantedSize_39(D) + 4294967295;
  466. if (_4 <= 4294967286)
  467. goto <bb 6>; [71.00%]
  468. else
  469. goto <bb 22>; [29.00%]
  470. <bb 6> [local count: 136873]:
  471. # DEBUG BEGIN_STMT
  472. xWantedSize_40 = xWantedSize_39(D) + 8;
  473. # DEBUG xWantedSize => xWantedSize_40
  474. # DEBUG BEGIN_STMT
  475. _5 = xWantedSize_40 & 7;
  476. if (_5 != 0)
  477. goto <bb 7>; [50.00%]
  478. else
  479. goto <bb 8>; [50.00%]
  480. <bb 7> [local count: 68436]:
  481. # DEBUG BEGIN_STMT
  482. _6 = xWantedSize_40 & 4294967288;
  483. _7 = _6 + 8;
  484. if (_7 > xWantedSize_40)
  485. goto <bb 8>; [71.00%]
  486. else
  487. goto <bb 22>; [29.00%]
  488. <bb 8> [local count: 117026]:
  489. # xWantedSize_28 = PHI <_7(7), xWantedSize_40(6)>
  490. # DEBUG xWantedSize => xWantedSize_28
  491. # DEBUG BEGIN_STMT
  492. if (xWantedSize_28 != 0)
  493. goto <bb 9>; [71.00%]
  494. else
  495. goto <bb 22>; [29.00%]
  496. <bb 9> [local count: 83089]:
  497. xFreeBytesRemaining.2_9 = xFreeBytesRemaining;
  498. if (xFreeBytesRemaining.2_9 >= xWantedSize_28)
  499. goto <bb 10>; [71.00%]
  500. else
  501. goto <bb 22>; [29.00%]
  502. <bb 10> [local count: 58993]:
  503. # DEBUG BEGIN_STMT
  504. # DEBUG pxPreviousBlock => &xStart
  505. # DEBUG BEGIN_STMT
  506. pxBlock_41 = xStart.pxNextFreeBlock;
  507. # DEBUG pxBlock => pxBlock_41
  508. # DEBUG BEGIN_STMT
  509. <bb 11> [local count: 551465]:
  510. # pxBlock_29 = PHI <pxBlock_41(10), _11(28)>
  511. # pxPreviousBlock_30 = PHI <&xStart(10), pxBlock_29(28)>
  512. # DEBUG pxPreviousBlock => pxPreviousBlock_30
  513. # DEBUG pxBlock => pxBlock_29
  514. # DEBUG BEGIN_STMT
  515. _10 = pxBlock_29->xBlockSize;
  516. if (_10 < xWantedSize_28)
  517. goto <bb 12>; [94.50%]
  518. else
  519. goto <bb 13>; [5.50%]
  520. <bb 12> [local count: 521134]:
  521. _11 = pxBlock_29->pxNextFreeBlock;
  522. if (_11 != 0B)
  523. goto <bb 28>; [94.50%]
  524. else
  525. goto <bb 13>; [5.50%]
  526. <bb 28> [local count: 492472]:
  527. goto <bb 11>; [100.00%]
  528. <bb 13> [local count: 58993]:
  529. # _57 = PHI <_10(11), _10(12)>
  530. # pxBlock_54 = PHI <pxBlock_29(11), pxBlock_29(12)>
  531. # pxPreviousBlock_8 = PHI <pxPreviousBlock_30(11), pxPreviousBlock_30(12)>
  532. # DEBUG BEGIN_STMT
  533. pxEnd.3_12 = pxEnd;
  534. if (pxEnd.3_12 != pxBlock_54)
  535. goto <bb 14>; [85.10%]
  536. else
  537. goto <bb 22>; [14.90%]
  538. <bb 14> [local count: 50203]:
  539. # DEBUG BEGIN_STMT
  540. _13 = pxPreviousBlock_8->pxNextFreeBlock;
  541. pvReturn_42 = _13 + 8;
  542. # DEBUG pvReturn => pvReturn_42
  543. # DEBUG BEGIN_STMT
  544. _14 = pxBlock_54->pxNextFreeBlock;
  545. pxPreviousBlock_8->pxNextFreeBlock = _14;
  546. # DEBUG BEGIN_STMT
  547. _15 = _57 - xWantedSize_28;
  548. if (_15 > 16)
  549. goto <bb 15>; [50.00%]
  550. else
  551. goto <bb 19>; [50.00%]
  552. <bb 15> [local count: 25102]:
  553. # DEBUG BEGIN_STMT
  554. pxNewBlockLink_44 = pxBlock_54 + xWantedSize_28;
  555. # DEBUG pxNewBlockLink => pxNewBlockLink_44
  556. # DEBUG BEGIN_STMT
  557. pxNewBlockLink.4_16 = (unsigned int) pxNewBlockLink_44;
  558. _17 = pxNewBlockLink.4_16 & 7;
  559. if (_17 != 0)
  560. goto <bb 16>; [67.00%]
  561. else
  562. goto <bb 18>; [33.00%]
  563. <bb 16> [local count: 16818]:
  564. # DEBUG BEGIN_STMT
  565. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  566. # DEBUG BEGIN_STMT
  567. # DEBUG BEGIN_STMT
  568. __asm__ __volatile__(" mov %0, %1
  569. msr basepri, %0
  570. isb
  571. dsb
  572. " : "=r" ulNewBASEPRI_55 : "i" 16 : "memory");
  573. # DEBUG ulNewBASEPRI => ulNewBASEPRI_55
  574. <bb 17> [local count: 168180375]:
  575. # DEBUG ulNewBASEPRI => NULL
  576. # DEBUG BEGIN_STMT
  577. # DEBUG BEGIN_STMT
  578. # DEBUG BEGIN_STMT
  579. <bb 26> [local count: 168180375]:
  580. goto <bb 17>; [100.00%]
  581. <bb 18> [local count: 8283]:
  582. # DEBUG BEGIN_STMT
  583. # DEBUG BEGIN_STMT
  584. pxNewBlockLink_44->xBlockSize = _15;
  585. # DEBUG BEGIN_STMT
  586. pxBlock_54->xBlockSize = xWantedSize_28;
  587. # DEBUG BEGIN_STMT
  588. prvInsertBlockIntoFreeList (pxNewBlockLink_44);
  589. <bb 19> [local count: 33385]:
  590. # DEBUG BEGIN_STMT
  591. # DEBUG BEGIN_STMT
  592. xFreeBytesRemaining.5_18 = xFreeBytesRemaining;
  593. _19 = pxBlock_54->xBlockSize;
  594. _20 = xFreeBytesRemaining.5_18 - _19;
  595. xFreeBytesRemaining = _20;
  596. # DEBUG BEGIN_STMT
  597. xMinimumEverFreeBytesRemaining.7_21 = xMinimumEverFreeBytesRemaining;
  598. if (_20 < xMinimumEverFreeBytesRemaining.7_21)
  599. goto <bb 20>; [50.00%]
  600. else
  601. goto <bb 21>; [50.00%]
  602. <bb 20> [local count: 16693]:
  603. # DEBUG BEGIN_STMT
  604. xMinimumEverFreeBytesRemaining = _20;
  605. <bb 21> [local count: 33385]:
  606. # DEBUG BEGIN_STMT
  607. # DEBUG BEGIN_STMT
  608. xBlockAllocatedBit.9_22 = xBlockAllocatedBit;
  609. _23 = _19 | xBlockAllocatedBit.9_22;
  610. pxBlock_54->xBlockSize = _23;
  611. # DEBUG BEGIN_STMT
  612. pxBlock_54->pxNextFreeBlock = 0B;
  613. # DEBUG BEGIN_STMT
  614. xNumberOfSuccessfulAllocations.10_24 = xNumberOfSuccessfulAllocations;
  615. _25 = xNumberOfSuccessfulAllocations.10_24 + 1;
  616. xNumberOfSuccessfulAllocations = _25;
  617. <bb 22> [local count: 214748]:
  618. # pvReturn_31 = PHI <0B(4), 0B(9), 0B(8), 0B(13), pvReturn_42(21), 0B(7), 0B(5)>
  619. # DEBUG xWantedSize => NULL
  620. # DEBUG pvReturn => pvReturn_31
  621. # DEBUG BEGIN_STMT
  622. # DEBUG BEGIN_STMT
  623. # DEBUG BEGIN_STMT
  624. xTaskResumeAll ();
  625. # DEBUG BEGIN_STMT
  626. pvReturn.11_26 = (unsigned int) pvReturn_31;
  627. _27 = pvReturn.11_26 & 7;
  628. if (_27 != 0)
  629. goto <bb 23>; [50.00%]
  630. else
  631. goto <bb 25>; [50.00%]
  632. <bb 23> [local count: 107374]:
  633. # DEBUG BEGIN_STMT
  634. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  635. # DEBUG BEGIN_STMT
  636. # DEBUG BEGIN_STMT
  637. __asm__ __volatile__(" mov %0, %1
  638. msr basepri, %0
  639. isb
  640. dsb
  641. " : "=r" ulNewBASEPRI_56 : "i" 16 : "memory");
  642. # DEBUG ulNewBASEPRI => ulNewBASEPRI_56
  643. <bb 24> [local count: 1073741824]:
  644. # DEBUG ulNewBASEPRI => NULL
  645. # DEBUG BEGIN_STMT
  646. # DEBUG BEGIN_STMT
  647. # DEBUG BEGIN_STMT
  648. <bb 27> [local count: 1073741824]:
  649. goto <bb 24>; [100.00%]
  650. <bb 25> [local count: 107374]:
  651. # DEBUG BEGIN_STMT
  652. # DEBUG BEGIN_STMT
  653. return pvReturn_31;
  654. }