diff options
author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2017-04-19 15:12:44 +0000 |
---|---|---|
committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2017-04-19 15:12:44 +0000 |
commit | 0de74f315d4d50951a0112c7e564ccd040b94c50 (patch) | |
tree | 642dcd4be36b240089cd58b877e7a1ba8230bd53 /llvm/lib/Target/Hexagon/RDFGraph.h | |
parent | 7c69a3b49006b64500bc6d588180f6e7435336b3 (diff) | |
download | bcm5719-llvm-0de74f315d4d50951a0112c7e564ccd040b94c50.tar.gz bcm5719-llvm-0de74f315d4d50951a0112c7e564ccd040b94c50.zip |
[RDF] Switch NodeList to SmallVector from std::vector
The list has a single element 75+% of the time, reservation of 4 elements
is sufficient in 95% of cases.
llvm-svn: 300705
Diffstat (limited to 'llvm/lib/Target/Hexagon/RDFGraph.h')
-rw-r--r-- | llvm/lib/Target/Hexagon/RDFGraph.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/Hexagon/RDFGraph.h b/llvm/lib/Target/Hexagon/RDFGraph.h index d5faca4cd6f..52f390356b2 100644 --- a/llvm/lib/Target/Hexagon/RDFGraph.h +++ b/llvm/lib/Target/Hexagon/RDFGraph.h @@ -508,7 +508,8 @@ namespace rdf { static_assert(sizeof(NodeBase) <= NodeAllocator::NodeMemSize, "NodeBase must be at most NodeAllocator::NodeMemSize bytes"); - typedef std::vector<NodeAddr<NodeBase*>> NodeList; +// typedef std::vector<NodeAddr<NodeBase*>> NodeList; + typedef SmallVector<NodeAddr<NodeBase*>,4> NodeList; typedef std::set<NodeId> NodeSet; struct RefNode : public NodeBase { |