1. You are basically using trace and is_true to be your comment and for people to understand your logic. It is good to use lots of asserts and traces, but don't forget that it obscures the program flow. so it is a fine line to decide what is the right course of action. E..g the first portion, I would simply check that res and opnd are what you expect first, then check that if they are non-null, return. My assertion will be after the check. This way, the code is very obvious and assertion + trace is still there. Also, the 3 portions of code are almost the same, have you considered a function or template with function object?
2. Is_statement_adjacent implementation is funny, although the do-whiles should traverse only once, the code could potentially loop. Is there a better way to implement this? The implementation assumes a lot about inherent property of the cfg 3. I assume the verifiiers will be called inside Is_True (is this clarified in the declaration to warn people?). The actual code (e.g. Finalize() is not enclosed in Is_True. Otherwise, the code looks good. Sun On Thu, Feb 3, 2011 at 12:14 AM, Jian-Xin Lai <laij...@gmail.com> wrote: > Hi Sun, > > Could you please review the code for WHIRL CFG verfier and 1 bug fix for > WHIRL SSA in mainopt emitter? Thank you very much. > The WHIRL CFG verifier shares the same traversal code with the WHIRL CFG > builder to verify the CFG. > The bug fix for WHIRL SSA in MainOPT emitter is to remove duplicated > phi/chi/mu node of the same symbol attached on the same whirl node. This > case happens when two WOPT stmbol entries are mapping to one symbol in WHIRL > SSA. > > The patch is attached. Thank you very much. > > -- > Regards, > Lai Jian-Xin > ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel