diff options
author | James Molloy <jmolloy@google.com> | 2019-10-18 14:48:35 +0000 |
---|---|---|
committer | James Molloy <jmolloy@google.com> | 2019-10-18 14:48:35 +0000 |
commit | d5afdbe5a456c055df19421c8d1810d65fbfaeee (patch) | |
tree | b46b516f1b6282ac0e557761f50525ce1edd2b47 /lldb/packages/Python/lldbsuite/test/concurrent_base.py | |
parent | e44524736c4a97ae4fb37193e58647f838f6d36a (diff) | |
download | bcm5719-llvm-d5afdbe5a456c055df19421c8d1810d65fbfaeee.tar.gz bcm5719-llvm-d5afdbe5a456c055df19421c8d1810d65fbfaeee.zip |
[DFAPacketizer] Fix large compile-time regression for VLIW targets
D68992 / rL375086 refactored the packetizer and removed a bunch of logic. Unfortunately it creates an Automaton object whenever a DFAPacketizer is required. These objects have no longevity, and in particular on a debug build the population of the Automaton's transition map from the underlying table is very slow (because it is called ~10 times per MachineFunction, in the testcase I'm looking at).
This patch changes Automaton to wrap its underlying constant data in std::shared_ptr, which allows trivial copy construction. The DFAPacketizer creation function now creates a static archetypical Automaton and copies that whenever a new DFAPacketizer is required.
This takes a testcase down from ~20s to ~0.5s in debug mode.
llvm-svn: 375240
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/concurrent_base.py')
0 files changed, 0 insertions, 0 deletions