[LLVMdev] Invalidating an analysis pass

Chris Lattner sabre at nondot.org
Mon May 16 13:43:26 PDT 2005


On Mon, 16 May 2005, Eric Zimmerman wrote:
> How can I rerun an analysis pass in the middle of a function pass?  In
> particular, my dominator set needs to be recomputed.
>
> It looks like I can manually edit the dominator set with
> getAnalysisToUpdate.  If I could rerun the dominator set pass to get
> this info automatically, it would save me some time.

There isn't a good way to do this.  However, it should be straight-forward 
to refactor the code so that it exposes a 'recompute' method, and just 
have runOnFunction call that.

Note that DominatorSet builds its information from ImmediateDominators, so 
you'd have to recompute i-d before d-s.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.cs.uiuc.edu/




More information about the llvm-dev mailing list