Skip to content

Commit 81db59b

Browse files
committed
[Dominators] Make applyUpdate's documentation less confusing [NFC]
Summary: It was pointed out by @chandlerc that it's not clear whether both applyUpdates and insert/deleteEdge can be used to perform multiple updates. IMO, the confusing part was that the comment above applyUpdates made a comparison of expected update time between calling it and calling insert/deleteEdge multiple times. It's generally not possible to safely call insert/deleteEdge multiple times, which documentation for each of the 3 functions warns about, so the whole comparison makes very little sense. On top of that, the comment is already lengthy, so I think it's best to just get rid of this comparison. Reviewers: chandlerc, asbirlea, NutshellySima, grosser Reviewed By: chandlerc Subscribers: llvm-commits, chandlerc Differential Revision: https://reviews.llvm.org/D49944 llvm-svn: 338184
1 parent 32fa871 commit 81db59b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

llvm/include/llvm/Support/GenericDomTree.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -530,11 +530,10 @@ class DominatorTreeBase {
530530
/// CFG about its children and inverse children. This implies that deletions
531531
/// of CFG edges must not delete the CFG nodes before calling this function.
532532
///
533-
/// Batch updates should be generally faster when performing longer sequences
534-
/// of updates than calling insertEdge/deleteEdge manually multiple times, as
535-
/// it can reorder the updates and remove redundant ones internally.
536-
/// The batch updater is also able to detect sequences of zero and exactly one
537-
/// update -- it's optimized to do less work in these cases.
533+
/// The applyUpdates function can reorder the updates and remove redundant
534+
/// ones internally. The batch updater is also able to detect sequences of
535+
/// zero and exactly one update -- it's optimized to do less work in these
536+
/// cases.
538537
///
539538
/// Note that for postdominators it automatically takes care of applying
540539
/// updates on reverse edges internally (so there's no need to swap the

0 commit comments

Comments
 (0)