heap_4.c.072i.cp 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938
  1. IPA constant propagation start:
  2. Determining dynamic type for call: prvInsertBlockIntoFreeList (puc_15);
  3. Starting walk at: prvInsertBlockIntoFreeList (puc_15);
  4. instance pointer: puc_15 Outer instance pointer: puc_15 offset: 0 (bits) vtbl reference:
  5. Function call may change dynamic type:vTaskSuspendAll ();
  6. Determining dynamic type for call: prvInsertBlockIntoFreeList (pxNewBlockLink_44);
  7. Starting walk at: prvInsertBlockIntoFreeList (pxNewBlockLink_44);
  8. instance pointer: pxNewBlockLink_44 Outer instance pointer: pxNewBlockLink_44 offset: 0 (bits) vtbl reference:
  9. Function call may change dynamic type:vTaskSuspendAll ();
  10. Function call may change dynamic type:prvHeapInit ();
  11. IPA structures before propagation:
  12. Jump functions:
  13. Jump functions of caller vPortExitCritical/24:
  14. Jump functions of caller vPortEnterCritical/23:
  15. Jump functions of caller xTaskResumeAll/22:
  16. Jump functions of caller vTaskSuspendAll/21:
  17. Jump functions of caller vPortGetHeapStats/20:
  18. Jump functions of caller prvInsertBlockIntoFreeList/19:
  19. Jump functions of caller prvHeapInit/18:
  20. Jump functions of caller vPortInitialiseBlocks/17:
  21. Jump functions of caller xPortGetMinimumEverFreeHeapSize/16:
  22. Jump functions of caller xPortGetFreeHeapSize/15:
  23. Jump functions of caller vPortFree/14:
  24. callsite vPortFree/14 -> prvInsertBlockIntoFreeList/19 :
  25. param 0: PASS THROUGH: 0, op pointer_plus_expr 4294967288
  26. value: 0x0, mask: 0xffffffff
  27. VR ~[0, 0]
  28. Jump functions of caller pvPortMalloc/13:
  29. callsite pvPortMalloc/13 -> prvInsertBlockIntoFreeList/19 :
  30. param 0: UNKNOWN
  31. value: 0x0, mask: 0xffffffff
  32. VR ~[0, 0]
  33. callsite pvPortMalloc/13 -> prvHeapInit/18 :
  34. Propagating constants:
  35. Not considering vPortGetHeapStats for cloning; -fipa-cp-clone disabled.
  36. Not considering vPortInitialiseBlocks for cloning; -fipa-cp-clone disabled.
  37. Not considering xPortGetMinimumEverFreeHeapSize for cloning; -fipa-cp-clone disabled.
  38. Not considering xPortGetFreeHeapSize for cloning; -fipa-cp-clone disabled.
  39. Not considering vPortFree for cloning; -fipa-cp-clone disabled.
  40. Not considering pvPortMalloc for cloning; -fipa-cp-clone disabled.
  41. overall_size: 203, max_new_size: 11001
  42. IPA lattices after all propagation:
  43. Lattices:
  44. Node: vPortGetHeapStats/20:
  45. param [0]: BOTTOM
  46. ctxs: BOTTOM
  47. Bits unusable (BOTTOM)
  48. VARYING
  49. AGGS BOTTOM
  50. Node: prvInsertBlockIntoFreeList/19:
  51. param [0]: VARIABLE
  52. ctxs: VARIABLE
  53. Bits unusable (BOTTOM)
  54. struct BlockLink_t * ~[0B, 0B]
  55. AGGS VARIABLE
  56. Node: prvHeapInit/18:
  57. Node: vPortInitialiseBlocks/17:
  58. Node: xPortGetMinimumEverFreeHeapSize/16:
  59. Node: xPortGetFreeHeapSize/15:
  60. Node: vPortFree/14:
  61. param [0]: BOTTOM
  62. ctxs: BOTTOM
  63. Bits unusable (BOTTOM)
  64. VARYING
  65. AGGS BOTTOM
  66. Node: pvPortMalloc/13:
  67. param [0]: BOTTOM
  68. ctxs: BOTTOM
  69. Bits unusable (BOTTOM)
  70. VARYING
  71. AGGS BOTTOM
  72. IPA decision stage:
  73. IPA constant propagation end
  74. Reclaiming functions:
  75. Reclaiming variables:
  76. Clearing address taken flags:
  77. Symbol table:
  78. vPortExitCritical/24 (vPortExitCritical) @06a51e00
  79. Type: function
  80. Visibility: external public
  81. References:
  82. Referring:
  83. Availability: not_available
  84. Function flags: optimize_size
  85. Called by: vPortGetHeapStats/20 (168730858 (estimated locally),1.00 per call)
  86. Calls:
  87. vPortEnterCritical/23 (vPortEnterCritical) @06a51c40
  88. Type: function
  89. Visibility: external public
  90. References:
  91. Referring:
  92. Availability: not_available
  93. Function flags: optimize_size
  94. Called by: vPortGetHeapStats/20 (168730858 (estimated locally),1.00 per call)
  95. Calls:
  96. xTaskResumeAll/22 (xTaskResumeAll) @06a512a0
  97. Type: function
  98. Visibility: external public
  99. References:
  100. Referring:
  101. Availability: not_available
  102. Function flags: optimize_size
  103. Called by: vPortGetHeapStats/20 (168730858 (estimated locally),1.00 per call) vPortFree/14 (18715 (estimated locally),0.06 per call) pvPortMalloc/13 (214748 (estimated locally),0.93 per call)
  104. Calls:
  105. vTaskSuspendAll/21 (vTaskSuspendAll) @06a510e0
  106. Type: function
  107. Visibility: external public
  108. References:
  109. Referring:
  110. Availability: not_available
  111. Function flags: optimize_size
  112. Called by: vPortGetHeapStats/20 (168730857 (estimated locally),1.00 per call) vPortFree/14 (18715 (estimated locally),0.06 per call) pvPortMalloc/13 (231566 (estimated locally),1.00 per call)
  113. Calls:
  114. vPortGetHeapStats/20 (vPortGetHeapStats) @06aa50e0
  115. Type: function definition analyzed
  116. Visibility: externally_visible public
  117. References: xStart/6 (read)pxEnd/7 (read)xFreeBytesRemaining/8 (read)xNumberOfSuccessfulAllocations/10 (read)xNumberOfSuccessfulFrees/11 (read)xMinimumEverFreeBytesRemaining/9 (read)
  118. Referring:
  119. Availability: available
  120. Function flags: count:168730857 (estimated locally) body optimize_size
  121. Called by:
  122. Calls: vPortExitCritical/24 (168730858 (estimated locally),1.00 per call) vPortEnterCritical/23 (168730858 (estimated locally),1.00 per call) xTaskResumeAll/22 (168730858 (estimated locally),1.00 per call) vTaskSuspendAll/21 (168730857 (estimated locally),1.00 per call)
  123. prvInsertBlockIntoFreeList/19 (prvInsertBlockIntoFreeList) @06aa5d20
  124. Type: function definition analyzed
  125. Visibility: prevailing_def_ironly
  126. References: xStart/6 (addr)pxEnd/7 (read)
  127. Referring:
  128. Availability: local
  129. Function flags: count:118111600 (estimated locally) body local optimize_size
  130. Called by: vPortFree/14 (18715 (estimated locally),0.06 per call) pvPortMalloc/13 (8283 (estimated locally),0.04 per call)
  131. Calls:
  132. prvHeapInit/18 (prvHeapInit) @06aa5a80
  133. Type: function definition analyzed
  134. Visibility: prevailing_def_ironly
  135. References: ucHeap/4 (addr)xStart/6 (write)xStart/6 (write)pxEnd/7 (write)xMinimumEverFreeBytesRemaining/9 (write)xFreeBytesRemaining/8 (write)xBlockAllocatedBit/12 (write)
  136. Referring:
  137. Availability: local
  138. Function flags: count:1073741824 (estimated locally) body local optimize_size
  139. Called by: pvPortMalloc/13 (40362 (estimated locally),0.17 per call)
  140. Calls:
  141. vPortInitialiseBlocks/17 (vPortInitialiseBlocks) @06aa57e0
  142. Type: function definition analyzed
  143. Visibility: externally_visible public
  144. References:
  145. Referring:
  146. Availability: available
  147. Function flags: count:1073741824 (estimated locally) body optimize_size
  148. Called by:
  149. Calls:
  150. xPortGetMinimumEverFreeHeapSize/16 (xPortGetMinimumEverFreeHeapSize) @06aa5540
  151. Type: function definition analyzed
  152. Visibility: externally_visible public
  153. References: xMinimumEverFreeBytesRemaining/9 (read)
  154. Referring:
  155. Availability: available
  156. Function flags: count:1073741824 (estimated locally) body optimize_size
  157. Called by:
  158. Calls:
  159. xPortGetFreeHeapSize/15 (xPortGetFreeHeapSize) @06aa52a0
  160. Type: function definition analyzed
  161. Visibility: externally_visible public
  162. References: xFreeBytesRemaining/8 (read)
  163. Referring:
  164. Availability: available
  165. Function flags: count:1073741824 (estimated locally) body optimize_size
  166. Called by:
  167. Calls:
  168. vPortFree/14 (vPortFree) @06aa5000
  169. Type: function definition analyzed
  170. Visibility: externally_visible public
  171. References: xBlockAllocatedBit/12 (read)xFreeBytesRemaining/8 (read)xFreeBytesRemaining/8 (write)xNumberOfSuccessfulFrees/11 (read)xNumberOfSuccessfulFrees/11 (write)
  172. Referring:
  173. Availability: available
  174. Function flags: count:306783 (estimated locally) body optimize_size
  175. Called by:
  176. Calls: xTaskResumeAll/22 (18715 (estimated locally),0.06 per call) prvInsertBlockIntoFreeList/19 (18715 (estimated locally),0.06 per call) vTaskSuspendAll/21 (18715 (estimated locally),0.06 per call)
  177. pvPortMalloc/13 (pvPortMalloc) @06a9dee0
  178. Type: function definition analyzed
  179. Visibility: externally_visible public
  180. References: pxEnd/7 (read)xBlockAllocatedBit/12 (read)xFreeBytesRemaining/8 (read)xStart/6 (read)xStart/6 (addr)pxEnd/7 (read)xFreeBytesRemaining/8 (read)xFreeBytesRemaining/8 (write)xMinimumEverFreeBytesRemaining/9 (read)xMinimumEverFreeBytesRemaining/9 (write)xBlockAllocatedBit/12 (read)xNumberOfSuccessfulAllocations/10 (read)xNumberOfSuccessfulAllocations/10 (write)
  181. Referring:
  182. Availability: available
  183. Function flags: count:231566 (estimated locally) body optimize_size
  184. Called by:
  185. Calls: xTaskResumeAll/22 (214748 (estimated locally),0.93 per call) prvInsertBlockIntoFreeList/19 (8283 (estimated locally),0.04 per call) prvHeapInit/18 (40362 (estimated locally),0.17 per call) vTaskSuspendAll/21 (231566 (estimated locally),1.00 per call)
  186. xBlockAllocatedBit/12 (xBlockAllocatedBit) @06a9a678
  187. Type: variable definition analyzed
  188. Visibility: prevailing_def_ironly
  189. References:
  190. Referring: pvPortMalloc/13 (read)pvPortMalloc/13 (read)prvHeapInit/18 (write)vPortFree/14 (read)
  191. Availability: available
  192. Varpool flags: initialized
  193. xNumberOfSuccessfulFrees/11 (xNumberOfSuccessfulFrees) @06a9a5e8
  194. Type: variable definition analyzed
  195. Visibility: prevailing_def_ironly
  196. References:
  197. Referring: vPortFree/14 (write)vPortFree/14 (read)vPortGetHeapStats/20 (read)
  198. Availability: available
  199. Varpool flags: initialized
  200. xNumberOfSuccessfulAllocations/10 (xNumberOfSuccessfulAllocations) @06a9a5a0
  201. Type: variable definition analyzed
  202. Visibility: prevailing_def_ironly
  203. References:
  204. Referring: pvPortMalloc/13 (write)pvPortMalloc/13 (read)vPortGetHeapStats/20 (read)
  205. Availability: available
  206. Varpool flags: initialized
  207. xMinimumEverFreeBytesRemaining/9 (xMinimumEverFreeBytesRemaining) @06a9a558
  208. Type: variable definition analyzed
  209. Visibility: prevailing_def_ironly
  210. References:
  211. Referring: prvHeapInit/18 (write)xPortGetMinimumEverFreeHeapSize/16 (read)pvPortMalloc/13 (write)pvPortMalloc/13 (read)vPortGetHeapStats/20 (read)
  212. Availability: available
  213. Varpool flags: initialized
  214. xFreeBytesRemaining/8 (xFreeBytesRemaining) @06a9a510
  215. Type: variable definition analyzed
  216. Visibility: prevailing_def_ironly
  217. References:
  218. Referring: vPortFree/14 (write)pvPortMalloc/13 (read)prvHeapInit/18 (write)pvPortMalloc/13 (write)xPortGetFreeHeapSize/15 (read)pvPortMalloc/13 (read)vPortFree/14 (read)vPortGetHeapStats/20 (read)
  219. Availability: available
  220. Varpool flags: initialized
  221. pxEnd/7 (pxEnd) @06a9a480
  222. Type: variable definition analyzed
  223. Visibility: prevailing_def_ironly
  224. References:
  225. Referring: pvPortMalloc/13 (read)prvHeapInit/18 (write)prvInsertBlockIntoFreeList/19 (read)pvPortMalloc/13 (read)vPortGetHeapStats/20 (read)
  226. Availability: available
  227. Varpool flags: initialized
  228. xStart/6 (xStart) @06a9a3f0
  229. Type: variable definition analyzed
  230. Visibility: prevailing_def_ironly
  231. References:
  232. Referring: prvHeapInit/18 (write)prvHeapInit/18 (write)pvPortMalloc/13 (addr)prvInsertBlockIntoFreeList/19 (addr)pvPortMalloc/13 (read)vPortGetHeapStats/20 (read)
  233. Availability: available
  234. Varpool flags:
  235. ucHeap/4 (ucHeap) @06a9a120
  236. Type: variable definition analyzed
  237. Visibility: prevailing_def_ironly
  238. References:
  239. Referring: prvHeapInit/18 (addr)
  240. Availability: available
  241. Varpool flags:
  242. ;; Function prvInsertBlockIntoFreeList (prvInsertBlockIntoFreeList, funcdef_no=10, decl_uid=6217, cgraph_uid=11, symbol_order=19)
  243. Modification phase of node prvInsertBlockIntoFreeList/19
  244. Setting nonnull for 0
  245. prvInsertBlockIntoFreeList (struct BlockLink_t * pxBlockToInsert)
  246. {
  247. struct BlockLink_t * pxIterator;
  248. struct A_BLOCK_LINK * _1;
  249. unsigned int _2;
  250. uint8_t * _3;
  251. unsigned int _5;
  252. unsigned int _6;
  253. unsigned int _7;
  254. uint8_t * _8;
  255. struct BlockLink_t * pxEnd.19_9;
  256. unsigned int _10;
  257. unsigned int _11;
  258. struct A_BLOCK_LINK * _12;
  259. struct A_BLOCK_LINK * _20;
  260. <bb 2> [local count: 118111600]:
  261. # DEBUG BEGIN_STMT
  262. # DEBUG BEGIN_STMT
  263. # DEBUG BEGIN_STMT
  264. # DEBUG pxIterator => &xStart
  265. <bb 3> [local count: 1073741824]:
  266. # pxIterator_14 = PHI <&xStart(2), _1(14)>
  267. # DEBUG pxIterator => pxIterator_14
  268. # DEBUG BEGIN_STMT
  269. _1 = pxIterator_14->pxNextFreeBlock;
  270. if (_1 < pxBlockToInsert_19(D))
  271. goto <bb 14>; [89.00%]
  272. else
  273. goto <bb 4>; [11.00%]
  274. <bb 14> [local count: 955630223]:
  275. goto <bb 3>; [100.00%]
  276. <bb 4> [local count: 118111601]:
  277. # _20 = PHI <_1(3)>
  278. # pxIterator_4 = PHI <pxIterator_14(3)>
  279. # DEBUG BEGIN_STMT
  280. # DEBUG puc => pxIterator_4
  281. # DEBUG BEGIN_STMT
  282. _2 = pxIterator_4->xBlockSize;
  283. _3 = pxIterator_4 + _2;
  284. if (_3 == pxBlockToInsert_19(D))
  285. goto <bb 5>; [30.00%]
  286. else
  287. goto <bb 6>; [70.00%]
  288. <bb 5> [local count: 35433480]:
  289. # DEBUG BEGIN_STMT
  290. _5 = pxBlockToInsert_19(D)->xBlockSize;
  291. _6 = _2 + _5;
  292. pxIterator_4->xBlockSize = _6;
  293. # DEBUG BEGIN_STMT
  294. # DEBUG pxBlockToInsert => pxIterator_4
  295. <bb 6> [local count: 118111601]:
  296. # pxBlockToInsert_13 = PHI <pxBlockToInsert_19(D)(4), pxIterator_4(5)>
  297. # DEBUG pxBlockToInsert => pxBlockToInsert_13
  298. # DEBUG BEGIN_STMT
  299. # DEBUG BEGIN_STMT
  300. # DEBUG puc => pxBlockToInsert_13
  301. # DEBUG BEGIN_STMT
  302. _7 = pxBlockToInsert_13->xBlockSize;
  303. _8 = pxBlockToInsert_13 + _7;
  304. if (_8 == _20)
  305. goto <bb 7>; [30.00%]
  306. else
  307. goto <bb 10>; [70.00%]
  308. <bb 7> [local count: 35433480]:
  309. # DEBUG BEGIN_STMT
  310. pxEnd.19_9 = pxEnd;
  311. if (pxEnd.19_9 != _20)
  312. goto <bb 8>; [70.00%]
  313. else
  314. goto <bb 9>; [30.00%]
  315. <bb 8> [local count: 24803436]:
  316. # DEBUG BEGIN_STMT
  317. _10 = _20->xBlockSize;
  318. _11 = _7 + _10;
  319. pxBlockToInsert_13->xBlockSize = _11;
  320. # DEBUG BEGIN_STMT
  321. _12 = _20->pxNextFreeBlock;
  322. pxBlockToInsert_13->pxNextFreeBlock = _12;
  323. goto <bb 11>; [100.00%]
  324. <bb 9> [local count: 10630044]:
  325. # DEBUG BEGIN_STMT
  326. pxBlockToInsert_13->pxNextFreeBlock = pxEnd.19_9;
  327. goto <bb 11>; [100.00%]
  328. <bb 10> [local count: 82678120]:
  329. # DEBUG BEGIN_STMT
  330. pxBlockToInsert_13->pxNextFreeBlock = _20;
  331. <bb 11> [local count: 118111601]:
  332. # DEBUG BEGIN_STMT
  333. if (pxIterator_4 != pxBlockToInsert_13)
  334. goto <bb 12>; [70.00%]
  335. else
  336. goto <bb 13>; [30.00%]
  337. <bb 12> [local count: 82678120]:
  338. # DEBUG BEGIN_STMT
  339. pxIterator_4->pxNextFreeBlock = pxBlockToInsert_13;
  340. <bb 13> [local count: 118111601]:
  341. # DEBUG BEGIN_STMT
  342. return;
  343. }
  344. ;; Function pvPortMalloc (pvPortMalloc, funcdef_no=4, decl_uid=5892, cgraph_uid=5, symbol_order=13)
  345. Modification phase of node pvPortMalloc/13
  346. pvPortMalloc (size_t xWantedSize)
  347. {
  348. uint32_t ulNewBASEPRI;
  349. uint32_t ulNewBASEPRI;
  350. void * pvReturn;
  351. struct BlockLink_t * pxNewBlockLink;
  352. struct BlockLink_t * pxPreviousBlock;
  353. struct BlockLink_t * pxBlock;
  354. struct BlockLink_t * pxEnd.0_1;
  355. unsigned int xBlockAllocatedBit.1_2;
  356. unsigned int _3;
  357. unsigned int _4;
  358. unsigned int _5;
  359. unsigned int _6;
  360. unsigned int _7;
  361. unsigned int xFreeBytesRemaining.2_9;
  362. unsigned int _10;
  363. struct A_BLOCK_LINK * _11;
  364. struct BlockLink_t * pxEnd.3_12;
  365. struct A_BLOCK_LINK * _13;
  366. struct A_BLOCK_LINK * _14;
  367. unsigned int _15;
  368. unsigned int pxNewBlockLink.4_16;
  369. unsigned int _17;
  370. unsigned int xFreeBytesRemaining.5_18;
  371. unsigned int _19;
  372. unsigned int _20;
  373. unsigned int xMinimumEverFreeBytesRemaining.7_21;
  374. unsigned int xBlockAllocatedBit.9_22;
  375. unsigned int _23;
  376. unsigned int xNumberOfSuccessfulAllocations.10_24;
  377. unsigned int _25;
  378. unsigned int pvReturn.11_26;
  379. unsigned int _27;
  380. unsigned int _57;
  381. <bb 2> [local count: 231566]:
  382. # DEBUG BEGIN_STMT
  383. # DEBUG BEGIN_STMT
  384. # DEBUG pvReturn => 0B
  385. # DEBUG BEGIN_STMT
  386. vTaskSuspendAll ();
  387. # DEBUG BEGIN_STMT
  388. pxEnd.0_1 = pxEnd;
  389. if (pxEnd.0_1 == 0B)
  390. goto <bb 3>; [17.43%]
  391. else
  392. goto <bb 4>; [82.57%]
  393. <bb 3> [local count: 40362]:
  394. # DEBUG BEGIN_STMT
  395. prvHeapInit ();
  396. <bb 4> [local count: 231566]:
  397. # DEBUG BEGIN_STMT
  398. # DEBUG BEGIN_STMT
  399. xBlockAllocatedBit.1_2 = xBlockAllocatedBit;
  400. _3 = xBlockAllocatedBit.1_2 & xWantedSize_39(D);
  401. if (_3 == 0)
  402. goto <bb 5>; [83.25%]
  403. else
  404. goto <bb 22>; [16.75%]
  405. <bb 5> [local count: 192779]:
  406. # DEBUG BEGIN_STMT
  407. _4 = xWantedSize_39(D) + 4294967295;
  408. if (_4 <= 4294967286)
  409. goto <bb 6>; [71.00%]
  410. else
  411. goto <bb 22>; [29.00%]
  412. <bb 6> [local count: 136873]:
  413. # DEBUG BEGIN_STMT
  414. xWantedSize_40 = xWantedSize_39(D) + 8;
  415. # DEBUG xWantedSize => xWantedSize_40
  416. # DEBUG BEGIN_STMT
  417. _5 = xWantedSize_40 & 7;
  418. if (_5 != 0)
  419. goto <bb 7>; [50.00%]
  420. else
  421. goto <bb 8>; [50.00%]
  422. <bb 7> [local count: 68436]:
  423. # DEBUG BEGIN_STMT
  424. _6 = xWantedSize_40 & 4294967288;
  425. _7 = _6 + 8;
  426. if (_7 > xWantedSize_40)
  427. goto <bb 8>; [71.00%]
  428. else
  429. goto <bb 22>; [29.00%]
  430. <bb 8> [local count: 117026]:
  431. # xWantedSize_28 = PHI <_7(7), xWantedSize_40(6)>
  432. # DEBUG xWantedSize => xWantedSize_28
  433. # DEBUG BEGIN_STMT
  434. if (xWantedSize_28 != 0)
  435. goto <bb 9>; [71.00%]
  436. else
  437. goto <bb 22>; [29.00%]
  438. <bb 9> [local count: 83089]:
  439. xFreeBytesRemaining.2_9 = xFreeBytesRemaining;
  440. if (xFreeBytesRemaining.2_9 >= xWantedSize_28)
  441. goto <bb 10>; [71.00%]
  442. else
  443. goto <bb 22>; [29.00%]
  444. <bb 10> [local count: 58993]:
  445. # DEBUG BEGIN_STMT
  446. # DEBUG pxPreviousBlock => &xStart
  447. # DEBUG BEGIN_STMT
  448. pxBlock_41 = xStart.pxNextFreeBlock;
  449. # DEBUG pxBlock => pxBlock_41
  450. # DEBUG BEGIN_STMT
  451. <bb 11> [local count: 551465]:
  452. # pxBlock_29 = PHI <pxBlock_41(10), _11(28)>
  453. # pxPreviousBlock_30 = PHI <&xStart(10), pxBlock_29(28)>
  454. # DEBUG pxPreviousBlock => pxPreviousBlock_30
  455. # DEBUG pxBlock => pxBlock_29
  456. # DEBUG BEGIN_STMT
  457. _10 = pxBlock_29->xBlockSize;
  458. if (_10 < xWantedSize_28)
  459. goto <bb 12>; [94.50%]
  460. else
  461. goto <bb 13>; [5.50%]
  462. <bb 12> [local count: 521134]:
  463. _11 = pxBlock_29->pxNextFreeBlock;
  464. if (_11 != 0B)
  465. goto <bb 28>; [94.50%]
  466. else
  467. goto <bb 13>; [5.50%]
  468. <bb 28> [local count: 492472]:
  469. goto <bb 11>; [100.00%]
  470. <bb 13> [local count: 58993]:
  471. # _57 = PHI <_10(11), _10(12)>
  472. # pxBlock_54 = PHI <pxBlock_29(11), pxBlock_29(12)>
  473. # pxPreviousBlock_8 = PHI <pxPreviousBlock_30(11), pxPreviousBlock_30(12)>
  474. # DEBUG BEGIN_STMT
  475. pxEnd.3_12 = pxEnd;
  476. if (pxEnd.3_12 != pxBlock_54)
  477. goto <bb 14>; [85.10%]
  478. else
  479. goto <bb 22>; [14.90%]
  480. <bb 14> [local count: 50203]:
  481. # DEBUG BEGIN_STMT
  482. _13 = pxPreviousBlock_8->pxNextFreeBlock;
  483. pvReturn_42 = _13 + 8;
  484. # DEBUG pvReturn => pvReturn_42
  485. # DEBUG BEGIN_STMT
  486. _14 = pxBlock_54->pxNextFreeBlock;
  487. pxPreviousBlock_8->pxNextFreeBlock = _14;
  488. # DEBUG BEGIN_STMT
  489. _15 = _57 - xWantedSize_28;
  490. if (_15 > 16)
  491. goto <bb 15>; [50.00%]
  492. else
  493. goto <bb 19>; [50.00%]
  494. <bb 15> [local count: 25102]:
  495. # DEBUG BEGIN_STMT
  496. pxNewBlockLink_44 = pxBlock_54 + xWantedSize_28;
  497. # DEBUG pxNewBlockLink => pxNewBlockLink_44
  498. # DEBUG BEGIN_STMT
  499. pxNewBlockLink.4_16 = (unsigned int) pxNewBlockLink_44;
  500. _17 = pxNewBlockLink.4_16 & 7;
  501. if (_17 != 0)
  502. goto <bb 16>; [67.00%]
  503. else
  504. goto <bb 18>; [33.00%]
  505. <bb 16> [local count: 16818]:
  506. # DEBUG BEGIN_STMT
  507. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  508. # DEBUG BEGIN_STMT
  509. # DEBUG BEGIN_STMT
  510. __asm__ __volatile__(" mov %0, %1
  511. msr basepri, %0
  512. isb
  513. dsb
  514. " : "=r" ulNewBASEPRI_55 : "i" 16 : "memory");
  515. # DEBUG ulNewBASEPRI => ulNewBASEPRI_55
  516. <bb 17> [local count: 168180375]:
  517. # DEBUG ulNewBASEPRI => NULL
  518. # DEBUG BEGIN_STMT
  519. # DEBUG BEGIN_STMT
  520. # DEBUG BEGIN_STMT
  521. <bb 26> [local count: 168180375]:
  522. goto <bb 17>; [100.00%]
  523. <bb 18> [local count: 8283]:
  524. # DEBUG BEGIN_STMT
  525. # DEBUG BEGIN_STMT
  526. pxNewBlockLink_44->xBlockSize = _15;
  527. # DEBUG BEGIN_STMT
  528. pxBlock_54->xBlockSize = xWantedSize_28;
  529. # DEBUG BEGIN_STMT
  530. prvInsertBlockIntoFreeList (pxNewBlockLink_44);
  531. <bb 19> [local count: 33385]:
  532. # DEBUG BEGIN_STMT
  533. # DEBUG BEGIN_STMT
  534. xFreeBytesRemaining.5_18 = xFreeBytesRemaining;
  535. _19 = pxBlock_54->xBlockSize;
  536. _20 = xFreeBytesRemaining.5_18 - _19;
  537. xFreeBytesRemaining = _20;
  538. # DEBUG BEGIN_STMT
  539. xMinimumEverFreeBytesRemaining.7_21 = xMinimumEverFreeBytesRemaining;
  540. if (_20 < xMinimumEverFreeBytesRemaining.7_21)
  541. goto <bb 20>; [50.00%]
  542. else
  543. goto <bb 21>; [50.00%]
  544. <bb 20> [local count: 16693]:
  545. # DEBUG BEGIN_STMT
  546. xMinimumEverFreeBytesRemaining = _20;
  547. <bb 21> [local count: 33385]:
  548. # DEBUG BEGIN_STMT
  549. # DEBUG BEGIN_STMT
  550. xBlockAllocatedBit.9_22 = xBlockAllocatedBit;
  551. _23 = _19 | xBlockAllocatedBit.9_22;
  552. pxBlock_54->xBlockSize = _23;
  553. # DEBUG BEGIN_STMT
  554. pxBlock_54->pxNextFreeBlock = 0B;
  555. # DEBUG BEGIN_STMT
  556. xNumberOfSuccessfulAllocations.10_24 = xNumberOfSuccessfulAllocations;
  557. _25 = xNumberOfSuccessfulAllocations.10_24 + 1;
  558. xNumberOfSuccessfulAllocations = _25;
  559. <bb 22> [local count: 214748]:
  560. # pvReturn_31 = PHI <0B(4), 0B(9), 0B(8), 0B(13), pvReturn_42(21), 0B(7), 0B(5)>
  561. # DEBUG xWantedSize => NULL
  562. # DEBUG pvReturn => pvReturn_31
  563. # DEBUG BEGIN_STMT
  564. # DEBUG BEGIN_STMT
  565. # DEBUG BEGIN_STMT
  566. xTaskResumeAll ();
  567. # DEBUG BEGIN_STMT
  568. pvReturn.11_26 = (unsigned int) pvReturn_31;
  569. _27 = pvReturn.11_26 & 7;
  570. if (_27 != 0)
  571. goto <bb 23>; [50.00%]
  572. else
  573. goto <bb 25>; [50.00%]
  574. <bb 23> [local count: 107374]:
  575. # DEBUG BEGIN_STMT
  576. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  577. # DEBUG BEGIN_STMT
  578. # DEBUG BEGIN_STMT
  579. __asm__ __volatile__(" mov %0, %1
  580. msr basepri, %0
  581. isb
  582. dsb
  583. " : "=r" ulNewBASEPRI_56 : "i" 16 : "memory");
  584. # DEBUG ulNewBASEPRI => ulNewBASEPRI_56
  585. <bb 24> [local count: 1073741824]:
  586. # DEBUG ulNewBASEPRI => NULL
  587. # DEBUG BEGIN_STMT
  588. # DEBUG BEGIN_STMT
  589. # DEBUG BEGIN_STMT
  590. <bb 27> [local count: 1073741824]:
  591. goto <bb 24>; [100.00%]
  592. <bb 25> [local count: 107374]:
  593. # DEBUG BEGIN_STMT
  594. # DEBUG BEGIN_STMT
  595. return pvReturn_31;
  596. }
  597. ;; Function vPortFree (vPortFree, funcdef_no=5, decl_uid=5894, cgraph_uid=6, symbol_order=14)
  598. Modification phase of node vPortFree/14
  599. vPortFree (void * pv)
  600. {
  601. uint32_t ulNewBASEPRI;
  602. uint32_t ulNewBASEPRI;
  603. uint8_t * puc;
  604. unsigned int _1;
  605. unsigned int xBlockAllocatedBit.21_2;
  606. unsigned int _3;
  607. struct A_BLOCK_LINK * _4;
  608. unsigned int _5;
  609. unsigned int _6;
  610. unsigned int _7;
  611. unsigned int xFreeBytesRemaining.24_8;
  612. unsigned int _9;
  613. unsigned int xNumberOfSuccessfulFrees.25_10;
  614. unsigned int _11;
  615. <bb 2> [local count: 306783]:
  616. # DEBUG BEGIN_STMT
  617. # DEBUG puc => pv_13(D)
  618. # DEBUG BEGIN_STMT
  619. # DEBUG BEGIN_STMT
  620. if (pv_13(D) != 0B)
  621. goto <bb 3>; [70.00%]
  622. else
  623. goto <bb 10>; [30.00%]
  624. <bb 3> [local count: 214748]:
  625. # DEBUG BEGIN_STMT
  626. puc_15 = pv_13(D) + 4294967288;
  627. # DEBUG puc => puc_15
  628. # DEBUG BEGIN_STMT
  629. # DEBUG pxLink => puc_15
  630. # DEBUG BEGIN_STMT
  631. _1 = MEM[(struct BlockLink_t *)pv_13(D) + 4294967288B].xBlockSize;
  632. xBlockAllocatedBit.21_2 = xBlockAllocatedBit;
  633. _3 = _1 & xBlockAllocatedBit.21_2;
  634. if (_3 == 0)
  635. goto <bb 4>; [50.00%]
  636. else
  637. goto <bb 6>; [50.00%]
  638. <bb 4> [local count: 107374]:
  639. # DEBUG BEGIN_STMT
  640. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  641. # DEBUG BEGIN_STMT
  642. # DEBUG BEGIN_STMT
  643. __asm__ __volatile__(" mov %0, %1
  644. msr basepri, %0
  645. isb
  646. dsb
  647. " : "=r" ulNewBASEPRI_22 : "i" 16 : "memory");
  648. # DEBUG ulNewBASEPRI => ulNewBASEPRI_22
  649. <bb 5> [local count: 1073741823]:
  650. # DEBUG ulNewBASEPRI => NULL
  651. # DEBUG BEGIN_STMT
  652. # DEBUG BEGIN_STMT
  653. # DEBUG BEGIN_STMT
  654. <bb 11> [local count: 1073741824]:
  655. goto <bb 5>; [100.00%]
  656. <bb 6> [local count: 107374]:
  657. # DEBUG BEGIN_STMT
  658. # DEBUG BEGIN_STMT
  659. _4 = MEM[(struct BlockLink_t *)pv_13(D) + 4294967288B].pxNextFreeBlock;
  660. if (_4 != 0B)
  661. goto <bb 7>; [82.57%]
  662. else
  663. goto <bb 9>; [17.43%]
  664. <bb 7> [local count: 88659]:
  665. # DEBUG BEGIN_STMT
  666. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  667. # DEBUG BEGIN_STMT
  668. # DEBUG BEGIN_STMT
  669. __asm__ __volatile__(" mov %0, %1
  670. msr basepri, %0
  671. isb
  672. dsb
  673. " : "=r" ulNewBASEPRI_23 : "i" 16 : "memory");
  674. # DEBUG ulNewBASEPRI => ulNewBASEPRI_23
  675. <bb 8> [local count: 886588623]:
  676. # DEBUG ulNewBASEPRI => NULL
  677. # DEBUG BEGIN_STMT
  678. # DEBUG BEGIN_STMT
  679. # DEBUG BEGIN_STMT
  680. <bb 12> [local count: 886588623]:
  681. goto <bb 8>; [100.00%]
  682. <bb 9> [local count: 18715]:
  683. # DEBUG BEGIN_STMT
  684. # DEBUG BEGIN_STMT
  685. # DEBUG BEGIN_STMT
  686. # DEBUG BEGIN_STMT
  687. _5 = ~xBlockAllocatedBit.21_2;
  688. _6 = _1 & _5;
  689. MEM[(struct BlockLink_t *)pv_13(D) + 4294967288B].xBlockSize = _6;
  690. # DEBUG BEGIN_STMT
  691. vTaskSuspendAll ();
  692. # DEBUG BEGIN_STMT
  693. _7 = MEM[(struct BlockLink_t *)pv_13(D) + 4294967288B].xBlockSize;
  694. xFreeBytesRemaining.24_8 = xFreeBytesRemaining;
  695. _9 = _7 + xFreeBytesRemaining.24_8;
  696. xFreeBytesRemaining = _9;
  697. # DEBUG BEGIN_STMT
  698. # DEBUG BEGIN_STMT
  699. prvInsertBlockIntoFreeList (puc_15);
  700. # DEBUG BEGIN_STMT
  701. xNumberOfSuccessfulFrees.25_10 = xNumberOfSuccessfulFrees;
  702. _11 = xNumberOfSuccessfulFrees.25_10 + 1;
  703. xNumberOfSuccessfulFrees = _11;
  704. # DEBUG BEGIN_STMT
  705. xTaskResumeAll ();
  706. <bb 10> [local count: 110750]:
  707. # DEBUG BEGIN_STMT
  708. return;
  709. }
  710. ;; Function xPortGetFreeHeapSize (xPortGetFreeHeapSize, funcdef_no=6, decl_uid=5898, cgraph_uid=7, symbol_order=15)
  711. Modification phase of node xPortGetFreeHeapSize/15
  712. xPortGetFreeHeapSize ()
  713. {
  714. size_t _2;
  715. <bb 2> [local count: 1073741824]:
  716. # DEBUG BEGIN_STMT
  717. _2 = xFreeBytesRemaining;
  718. return _2;
  719. }
  720. ;; Function xPortGetMinimumEverFreeHeapSize (xPortGetMinimumEverFreeHeapSize, funcdef_no=7, decl_uid=5900, cgraph_uid=8, symbol_order=16)
  721. Modification phase of node xPortGetMinimumEverFreeHeapSize/16
  722. xPortGetMinimumEverFreeHeapSize ()
  723. {
  724. size_t _2;
  725. <bb 2> [local count: 1073741824]:
  726. # DEBUG BEGIN_STMT
  727. _2 = xMinimumEverFreeBytesRemaining;
  728. return _2;
  729. }
  730. ;; Function vPortInitialiseBlocks (vPortInitialiseBlocks, funcdef_no=8, decl_uid=5896, cgraph_uid=9, symbol_order=17)
  731. Modification phase of node vPortInitialiseBlocks/17
  732. vPortInitialiseBlocks ()
  733. {
  734. <bb 2> [local count: 1073741824]:
  735. # DEBUG BEGIN_STMT
  736. return;
  737. }
  738. ;; Function vPortGetHeapStats (vPortGetHeapStats, funcdef_no=11, decl_uid=5890, cgraph_uid=12, symbol_order=20)
  739. Modification phase of node vPortGetHeapStats/20
  740. vPortGetHeapStats (struct HeapStats_t * pxHeapStats)
  741. {
  742. size_t xMinSize;
  743. size_t xMaxSize;
  744. size_t xBlocks;
  745. struct BlockLink_t * pxBlock;
  746. unsigned int _1;
  747. struct BlockLink_t * pxEnd.26_3;
  748. unsigned int xFreeBytesRemaining.27_4;
  749. unsigned int xNumberOfSuccessfulAllocations.28_5;
  750. unsigned int xNumberOfSuccessfulFrees.29_6;
  751. unsigned int xMinimumEverFreeBytesRemaining.30_7;
  752. <bb 2> [local count: 168730857]:
  753. # DEBUG BEGIN_STMT
  754. # DEBUG BEGIN_STMT
  755. # DEBUG xBlocks => 0
  756. # DEBUG xMaxSize => 0
  757. # DEBUG xMinSize => 4294967295
  758. # DEBUG BEGIN_STMT
  759. vTaskSuspendAll ();
  760. # DEBUG BEGIN_STMT
  761. pxBlock_17 = xStart.pxNextFreeBlock;
  762. # DEBUG pxBlock => pxBlock_17
  763. # DEBUG BEGIN_STMT
  764. if (pxBlock_17 != 0B)
  765. goto <bb 5>; [70.00%]
  766. else
  767. goto <bb 4>; [30.00%]
  768. <bb 5> [local count: 118111600]:
  769. <bb 3> [local count: 1073741824]:
  770. # pxBlock_8 = PHI <pxBlock_17(5), pxBlock_20(6)>
  771. # xBlocks_9 = PHI <0(5), xBlocks_18(6)>
  772. # xMaxSize_11 = PHI <0(5), xMaxSize_2(6)>
  773. # xMinSize_13 = PHI <4294967295(5), xMinSize_19(6)>
  774. # DEBUG xMinSize => xMinSize_13
  775. # DEBUG xMaxSize => xMaxSize_11
  776. # DEBUG xBlocks => xBlocks_9
  777. # DEBUG pxBlock => pxBlock_8
  778. # DEBUG BEGIN_STMT
  779. # DEBUG BEGIN_STMT
  780. xBlocks_18 = xBlocks_9 + 1;
  781. # DEBUG xBlocks => xBlocks_18
  782. # DEBUG BEGIN_STMT
  783. _1 = pxBlock_8->xBlockSize;
  784. xMaxSize_2 = MAX_EXPR <_1, xMaxSize_11>;
  785. # DEBUG xMaxSize => xMaxSize_2
  786. # DEBUG BEGIN_STMT
  787. xMinSize_19 = MIN_EXPR <_1, xMinSize_13>;
  788. # DEBUG xMinSize => xMinSize_19
  789. # DEBUG BEGIN_STMT
  790. pxBlock_20 = pxBlock_8->pxNextFreeBlock;
  791. # DEBUG pxBlock => pxBlock_20
  792. # DEBUG BEGIN_STMT
  793. pxEnd.26_3 = pxEnd;
  794. if (pxEnd.26_3 != pxBlock_20)
  795. goto <bb 6>; [89.00%]
  796. else
  797. goto <bb 4>; [11.00%]
  798. <bb 6> [local count: 955630225]:
  799. goto <bb 3>; [100.00%]
  800. <bb 4> [local count: 168730858]:
  801. # xBlocks_10 = PHI <0(2), xBlocks_18(3)>
  802. # xMaxSize_12 = PHI <0(2), xMaxSize_2(3)>
  803. # xMinSize_14 = PHI <4294967295(2), xMinSize_19(3)>
  804. # DEBUG xMinSize => xMinSize_14
  805. # DEBUG xMaxSize => xMaxSize_12
  806. # DEBUG xBlocks => xBlocks_10
  807. # DEBUG BEGIN_STMT
  808. xTaskResumeAll ();
  809. # DEBUG BEGIN_STMT
  810. pxHeapStats_22(D)->xSizeOfLargestFreeBlockInBytes = xMaxSize_12;
  811. # DEBUG BEGIN_STMT
  812. pxHeapStats_22(D)->xSizeOfSmallestFreeBlockInBytes = xMinSize_14;
  813. # DEBUG BEGIN_STMT
  814. pxHeapStats_22(D)->xNumberOfFreeBlocks = xBlocks_10;
  815. # DEBUG BEGIN_STMT
  816. vPortEnterCritical ();
  817. # DEBUG BEGIN_STMT
  818. xFreeBytesRemaining.27_4 = xFreeBytesRemaining;
  819. pxHeapStats_22(D)->xAvailableHeapSpaceInBytes = xFreeBytesRemaining.27_4;
  820. # DEBUG BEGIN_STMT
  821. xNumberOfSuccessfulAllocations.28_5 = xNumberOfSuccessfulAllocations;
  822. pxHeapStats_22(D)->xNumberOfSuccessfulAllocations = xNumberOfSuccessfulAllocations.28_5;
  823. # DEBUG BEGIN_STMT
  824. xNumberOfSuccessfulFrees.29_6 = xNumberOfSuccessfulFrees;
  825. pxHeapStats_22(D)->xNumberOfSuccessfulFrees = xNumberOfSuccessfulFrees.29_6;
  826. # DEBUG BEGIN_STMT
  827. xMinimumEverFreeBytesRemaining.30_7 = xMinimumEverFreeBytesRemaining;
  828. pxHeapStats_22(D)->xMinimumEverFreeBytesRemaining = xMinimumEverFreeBytesRemaining.30_7;
  829. # DEBUG BEGIN_STMT
  830. vPortExitCritical ();
  831. return;
  832. }