[llvm] [MachineOutliner] Leaf Descendants (PR #90275)

Ellis Hoag via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 7 16:02:30 PDT 2024


================
@@ -105,6 +114,68 @@ void SuffixTree::setSuffixIndices() {
   }
 }
 
+void SuffixTree::setLeafNodes() {
+  // A stack that keeps track of nodes to visit for post-order DFS traversal.
+  std::stack<SuffixTreeNode *> ToVisit;
----------------
ellishg wrote:

Are their any advantages to using `std::stack` rather than `SmallVector`? You can use `SmallVector::pop_back_val()` and `SmallVector::push_back()`.

https://github.com/llvm/llvm-project/pull/90275


More information about the llvm-commits mailing list