Mei, Sun, Here is some explanation:
The "out-of-memory" issue happens because - in building cfg, our previous change allocates extra blocks for EH region exits (these could be a lot in the corner case). Memory for CFG is not freed until the later phase in preopt/mainopt. Thus we got "out-of-memory" inside the dead code elimination. Adding EH exit block is an effecient way to indentify EH regions and their levels (indentifying MP regions does the exact same thing). The argument for the patch is we don't need the extra data structure if it is not used. If control flow optimization happens in preopt, we will add this extra data structure. On the other hand, control flow optimization will remove unreachable bbs from the cfg (which is the reason why mainopt does not get "out of memory"). On Wed, Jul 6, 2011 at 10:13 PM, Ye, Mei <mei...@amd.com> wrote: > My understanding is that the work allocates too many blocks that are not > freed or recycled which causes "out of memory". > David, please clarify. > > -Mei > > -----Original Message----- > From: Sun Chan [mailto:sun.c...@gmail.com] > Sent: Wednesday, July 06, 2011 4:34 PM > To: Ye, Mei > Cc: David Coakley; open64-devel > Subject: Re: [Open64-devel] Code review request: add region exit blocks only > when needed [OPT] > > looking at the diff, I don't fully understand this "outof memory" > issue. Can you clarify? > Sun > > On Thu, Jul 7, 2011 at 5:15 AM, Ye, Mei <mei...@amd.com> wrote: >> Even if control flow optimization does not happen in preopt now, it can >> happen in the future. >> It is likely that the "out of memory" issue is a bug in the design or >> implementation of adding an EH exit block which is not exposed by the >> mainopt. >> So I don't quite agree on this fix. Let's hear from other gatekeeper's >> opinion. >> >> -Mei >> >> -----Original Message----- >> From: David Coakley [mailto:dcoak...@gmail.com] >> Sent: Wednesday, July 06, 2011 1:52 PM >> To: open64-devel >> Subject: [Open64-devel] Code review request: add region exit blocks only >> when needed [OPT] >> >> Could a gatekeeper review the attached patch to files >> osprey/be/opt/opt_main.cxx and opt_cfg.[cxx,h]? Here is the >> description: >> >> When we enhanced the control flow optimization to handle the PU with EH >> regions in the previous release, we added a region exit block for each EH >> region during the CFG construction. These extra blocks are unnecessary when >> CFG is built but no control flow optimization is performed. Indeed, control >> flow optimization only happens in mainopt. >> These unnecessary extra blocks may cause "out of memory" issue in preopt. >> Thus, this change is to add these region exit blocks only when CFG control >> flow optimization is performed (i.e. mainopt). >> >> Thanks, >> >> -David Coakley / AMD Open Source Compiler Engineering >> >> >> ------------------------------------------------------------------------------ >> All of the data generated in your IT infrastructure is seriously valuable. >> Why? It contains a definitive record of application performance, security >> threats, fraudulent activity, and more. Splunk takes this data and makes >> sense of it. IT sense. And common sense. >> http://p.sf.net/sfu/splunk-d2d-c2 >> _______________________________________________ >> Open64-devel mailing list >> Open64-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/open64-devel >> > > > ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel