This is an archive of the discontinued LLVM Phabricator instance.

[Dominators] Use Semi-NCA instead of SLT to calculate dominators
ClosedPublic

Authored by kuhar on Jun 15 2017, 4:11 PM.

Details

Summary

This patch makes GenericDomTreeConstruction use the Semi-NCA algorithm instead of Simple Lengauer-Tarjan.

As described in RFC: Dynamic dominators, Semi-NCA offers slightly better performance than SLT. What's more important, it can be extended to perform incremental updates on already constructed dominator trees.

The patch passes check-all, llvm test suite and is able to boostrap clang. I also wasn't able to observe any compilation time regressions.

Diff Detail

Repository
rL LLVM

Event Timeline

kuhar created this revision.Jun 15 2017, 4:11 PM
kuhar added inline comments.Jun 16 2017, 3:12 PM
include/llvm/Support/GenericDomTreeConstruction.h
143 ↗(On Diff #102739)

This should be moved to the header.

kuhar updated this revision to Diff 102920.Jun 16 2017, 6:02 PM

Move algorithm attribution to the header.

kuhar marked an inline comment as done.Jun 16 2017, 6:03 PM
dberlin accepted this revision.Jun 26 2017, 6:51 PM

Given we haven't found anything fuzzing wise, i think it's fine to land this, but let's watch out for performance regressions and be ready to revert if we need to.

include/llvm/Support/GenericDomTreeConstruction.h
209 ↗(On Diff #102920)

Typo: should be WIDomCandidate

This revision is now accepted and ready to land.Jun 26 2017, 6:51 PM
This revision was automatically updated to reflect the committed changes.