Page MenuHomePhabricator

Move SuffixTree type to a common location
Needs RevisionPublic

Authored by trixirt on Aug 23 2018, 8:37 PM.



Following up on earlier IR Outliner discussion

The general approach is to reuse the MachineOutliner.
So this change addresses

  1. SuffixTree or SuffixArray.

Picking SuffixTree.
Using SuffixTree generally, requires it move to a common location

Diff Detail


Event Timeline

trixirt created this revision.Aug 23 2018, 8:37 PM
Bigcheese requested changes to this revision.Sep 7 2018, 2:16 PM
Bigcheese added a subscriber: Bigcheese.
Bigcheese added inline comments.

You shouldn't use anonymous namespaces in headers as it means each TU that includes it gets a different copy of the code. This should be namespace llvm.


This was fine in the cpp file, but shouldn't be added to the global or llvm namespace in a header. It should probably be moved into SuffixTree or SuffixTreeNode.


This function body should be moved out to its own .cpp file. The general rule is any definition of a non-template function of more than a few statements should be in a .cpp file instead of the header.

This revision now requires changes to proceed.Sep 7 2018, 2:16 PM