heap_4.c.070i.icf 20 KB

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