Hello Ruifen
I am not convinced that a label statement is needed here.
It is likely that somewhere downstream after some sort of transformations a
different bug misses a mapping between a label and a BB which then triggers the
assertion.
-Mei
________________________________
From: ruifen Shen [mailto:shenr...@gmail.com]
Sent: Friday, August 27, 2010 2:36 AM
To: open64-devel
Subject: [Open64-devel] One bug in add_one_if_stmt, Can gatekeeper review this
patch? Thx very much
hi, all.
We found One bug in add_one_if_stmt (opt_cfg.cxx). Can gatekeeper give a
reivew? Thanks very much.
When create the else_bb, it just create label_map without label_stmt.
Then in the later phase. if there is check_label for BB(such as dce,
reconstruction-cfg), the label_stmt will be added.
Othere wise, the label will be missed at cg phase. Assertion will be reported
like followed.
### Assertion failure at line 5392 of
/home/test/regression/open64-SL/osprey/be/cg/whirl2ops.cxx:
### Compiler Error in file a.c during Code_Expansion phase:
### RID == NULL, label 2050 doesn't have a matching target
I would like to fix the bug as followed.
Index: opt_cfg.cxx
===================================================================
--- opt_cfg.cxx (revision 3323)
+++ opt_cfg.cxx (working copy)
@@ -2298,8 +2298,7 @@
CFG::Add_one_if_stmt( WN *wn, END_BLOCK *ends_bb )
{
// create, but do not connect, the "else" block
- BB_NODE *else_bb = Create_bb();
- Append_label_map(Alloc_label(), else_bb);
+ BB_NODE *else_bb = Create_labelled_bb();
// create if bb
WN *end_cond = WN_CreateFalsebr(else_bb->Labnam(), WN_if_test(wn));
--
Best Regards.
Shen Ruifen
tel: 010-51266989-226
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel