[llvm-commits] [PATCH 0/3] Fix dominates() method for post dominator tree
Tobias Grosser
grosser at fim.uni-passau.de
Wed Jan 6 15:27:16 PST 2010
Hi,
the dominates() method of the post dominator tree returned wrong results as
soon as it used DFS numbers to improve lookup performance, because for some
nodes the DFS numbers where not calculated at all.
Fix this and remove a workaround that disabled DFS number calculation for post
dominator trees. The workaround was broken as after a certain amount of calls to
dominates(), DFS numbers where recalculated and used. After this
dominates() returned wrong results.
I did not add a test case, as the DFS number calculation cannot be triggered
externally.
No test case regressions with llvm "make check" on:
FreeBSD tobilaptop 8.0-STABLE FreeBSD 8.0-STABLE #0 r200765=2289986: Mon Dec 28
21:12:33 CET 2009 root at tobilaptop:/usr/obj/usr/src/sys/MYKERNEL i386
I also run the pass to trigger the bug on the polyhedron benchmark and the bzip2
sources. After the patch everything worked.
OK to commit the first two patches?
(The last one is too expensive because of the assert. It is just included for
reference.)
Tobias Grosser (3):
Fix DFS number calculation for postdominators
Remove workaround in PostDominators
Patch to trigger post dominator bug
include/llvm/Analysis/DominatorInternals.h | 11 +----
include/llvm/Analysis/Dominators.h | 64 +++++++++++++--------------
lib/Analysis/PostDominators.cpp | 27 ++++++++++++
3 files changed, 60 insertions(+), 42 deletions(-)
More information about the llvm-commits
mailing list