<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jun 8, 2012, at 3:00 PM, Chandler Carruth wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote">On Fri, Jun 8, 2012 at 10:47 AM, Peter Cooper <span dir="ltr"><<a href="mailto:peter_cooper@apple.com" target="_blank">peter_cooper@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all<br>
<br>
Attached is a pass to make the SimplifyCFGPass preserve the dominator tree.  Currently we see lots of recalculations of the dom tree right after simplify cfg runs, regardless of whether simplify cfg actually did anything.<br>

<br>
This pass explicitly recalculates the dom tree if simplify cfg did anything, but otherwise just leaves it preserved so we recalculate less often.<br>
<br>
Also, i'm open to suggestions for a better way to do this.  Ideally the pass manager could track this but not all passes return true from their run functions when they actually make a change.</blockquote><div><br></div>
<div>Can we just go fix these passes and then teach the pass manager to preserve analyses across passes that claim they didn't change anything? There aren't *that* many optimization passes.</div></div></blockquote>Yeah, that would be possible.  Like you say, there aren't that many passes.  As I just replied to John, passes like simplify lib calls need fixed but its trivial to see how its return value would need to be fixed.</div><div><br></div><div>Thanks,</div><div>Pete</div><div><blockquote type="cite"><div class="gmail_quote"><div><br></div><div>
Anyways, I'm also interested in incrementally updating domtree, just wanted to see if we could get the heavy hammer part in a more general way. </div></div>
</blockquote></div><br></body></html>