<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Aug 7, 2013, at 10:05 , Sung-Yee Guo <<a href="mailto:masoug@gmail.com">masoug@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif;"><div>Good point. But the code I'm parsing never have goto statements.</div><div><br></div><div>I'm not actually trying to perform an exhaustive search through the CFG, I'm just starting at some block and walking up through the predecessors until I hit the ENTRY block. With the depth-first iterator, it seems to me that I should first assign special numbers to each block that follows the depth-first order and then have the walker walk up the CFG and avoid predecessors whose depth-first number is less than the current block's depth-first number (seems a bit inefficient, unless I can reassign block ids which I'm guessing is not safe?). Do you have any suggestions for alternatives?</div></div></blockquote><br></div><div>Unless you actually need the depth-first numbers, that's functionally equivalent to just keeping a visited set. Again, SmallPtrSet will do you well.</div><div><br></div><div>Jordan</div><br></body></html>