[llvm-commits] [PATCH] Make SimplifyCFGPass preserve the dominator tree
peter_cooper at apple.com
Fri Jun 8 16:48:14 CDT 2012
On Jun 8, 2012, at 2:44 PM, Peter Cooper wrote:
> On Jun 8, 2012, at 2:29 PM, Evan Cheng wrote:
>> This seems obviously correct / better. But is it too much to hope for incremental updates of dominator info?
> Not at all. Actually that was going to be next on my TODO list: seeing what parts of SimplifyCFG can incrementally update the dominator info so that full recalculations aren't necessary. I would need to keep this full recalculate stuff in until all of SimplifyCFG is checked for dominator updates though.
Note there's a similar need for something like this in simplify lib calls. Its the next thing in the passes (after simplify cfg) that doesn't preserve the dom tree and really should.
>> On Jun 8, 2012, at 10:47 AM, Peter Cooper <peter_cooper at apple.com> wrote:
>>> Hi all
>>> 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.
>>> This pass explicitly recalculates the dom tree if simplify cfg did anything, but otherwise just leaves it preserved so we recalculate less often.
>>> 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.
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
More information about the llvm-commits