Author: laijx
Date: 2011-02-10 23:42:12 -0500 (Thu, 10 Feb 2011)
New Revision: 3474
Modified:
trunk/osprey/be/opt/opt_cfg_trans.cxx
Log:
Fix bug #701.
Avoid building successor graph edges between the fake entry and its
unreachable successors.
CR by Mei Ye.
Modified: trunk/osprey/be/opt/opt_cfg_trans.cxx
===================================================================
--- trunk/osprey/be/opt/opt_cfg_trans.cxx 2011-02-11 02:51:11 UTC (rev
3473)
+++ trunk/osprey/be/opt/opt_cfg_trans.cxx 2011-02-11 04:42:12 UTC (rev
3474)
@@ -147,6 +147,7 @@
build_successor_graph(CFG *cfg, successor_graph& g, Insert_iterator entry)
{
bool containing_eh = false;
+ BB_NODE * fake_bb = cfg->Fake_entry_bb();
for (BB_NODE *bb = cfg->First_bb();
bb != NULL;
@@ -170,6 +171,10 @@
int count = 0;
FOR_ALL_ELEM(succ, bb_succ_iter, Init(bb->Succ())) {
++count;
+ // avoid building edges between the fake entry and its unreachable
successors.
+ if ((bb == fake_bb) && (succ->Kind() == BB_GOTO))
+ continue;
+
if (succ == bb->Next())
fall_thru = succ;
else
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Open64-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open64-devel