[llvm] r338184 - [Dominators] Make applyUpdate's documentation less confusing [NFC]
Jakub Kuderski via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 27 17:54:07 PDT 2018
Author: kuhar
Date: Fri Jul 27 17:54:07 2018
New Revision: 338184
URL: http://llvm.org/viewvc/llvm-project?rev=338184&view=rev
Log:
[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
Modified:
llvm/trunk/include/llvm/Support/GenericDomTree.h
Modified: llvm/trunk/include/llvm/Support/GenericDomTree.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/GenericDomTree.h?rev=338184&r1=338183&r2=338184&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/GenericDomTree.h (original)
+++ llvm/trunk/include/llvm/Support/GenericDomTree.h Fri Jul 27 17:54:07 2018
@@ -530,11 +530,10 @@ protected:
/// CFG about its children and inverse children. This implies that deletions
/// of CFG edges must not delete the CFG nodes before calling this function.
///
- /// Batch updates should be generally faster when performing longer sequences
- /// of updates than calling insertEdge/deleteEdge manually multiple times, as
- /// it can reorder the updates and remove redundant ones internally.
- /// The batch updater is also able to detect sequences of zero and exactly one
- /// update -- it's optimized to do less work in these cases.
+ /// The applyUpdates function can reorder the updates and remove redundant
+ /// ones internally. The batch updater is also able to detect sequences of
+ /// zero and exactly one update -- it's optimized to do less work in these
+ /// cases.
///
/// Note that for postdominators it automatically takes care of applying
/// updates on reverse edges internally (so there's no need to swap the
More information about the llvm-commits
mailing list