Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leaf descendants #90271

Closed
wants to merge 3 commits into from
Closed

Conversation

xuanzhang816
Copy link
Contributor

In the current implementation, only leaf children of each internal node in the suffix tree are included as candidates for outlining. But all leaf descendants are outlining candidates, which we include in the new implementation.

For Clang/LLD, it shows around 3% reduction in text segment size when compared to the baseline -Oz linker binary.

Copy link

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff b6824c9d459da059e247a60c1ebd1aeb580dacc2 aefc5990acdb745d7d73c571b00424a4c5d41c96 -- llvm/include/llvm/Support/SuffixTree.h llvm/include/llvm/Support/SuffixTreeNode.h llvm/lib/CodeGen/MachineOutliner.cpp llvm/lib/Support/SuffixTree.cpp llvm/lib/Support/SuffixTreeNode.cpp llvm/unittests/Support/SuffixTreeTest.cpp
View the diff from clang-format here.
diff --git a/llvm/include/llvm/Support/SuffixTree.h b/llvm/include/llvm/Support/SuffixTree.h
index 90f8aae60a..37b7366640 100644
--- a/llvm/include/llvm/Support/SuffixTree.h
+++ b/llvm/include/llvm/Support/SuffixTree.h
@@ -205,7 +205,8 @@ public:
     }
 
     RepeatedSubstringIterator(
-        SuffixTreeInternalNode *N, const std::vector<SuffixTreeLeafNode *> &LeafNodes = {})
+        SuffixTreeInternalNode *N,
+        const std::vector<SuffixTreeLeafNode *> &LeafNodes = {})
         : N(N), LeafNodes(LeafNodes) {
       // Do we have a non-null node?
       if (!N)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant