[llvm-commits] [LLVMdev] DominanceFrontier for MachineBB

Chris Lattner clattner at apple.com
Tue Jul 27 11:22:41 PDT 2010

>> What does RegionInfo use DomFrontier for?  I had hoped that we would eventually eliminate it.  It's currently only being used for a couple things (like mem2reg) and is extremely expensive to compute (besides the implementation being terrible, it's an inherently N^2 data structure).
> It is currently used to check if two BasicBlocks form a region. The two
> calls to DominanceFrontier are in RegionInfo::isRegion(). I do not know
> of an easy way to remove the usage of this analysis, however I have to
> admit that I did not spend too much time on trying this.
> I know the complexity is N^2, however my tests showed that at least for
> the spec 2006 and polyhedron fortran benchmarks dominance frontier was
> pretty fast to calculate. Actually it was faster than all other analysis:
> http://tobias.osaft.eu/regioninfo/sum_runtime.png (relative timings)
> I did not spend a lot of time to optimize this. Do you know of any non
> artificial test case (or even an artificial one), where dominance
> frontier calculation is slowing down compilation? In case there is a
> chance to improve performance of regioninfo or dominance frontier
> calculation I would love to do this.

Independently of speed, we still want to remove it. :)  It would be great if you could find a solution that doesn't depend on domfrontier.


More information about the llvm-commits mailing list