HomePhabricator

[Automaton] Make Automaton thread-safe

Authored by jmolloy on Nov 5 2019, 2:53 PM.

Description

[Automaton] Make Automaton thread-safe

In an optimization to improve performance (rL375240) we added a std::shared_ptr
around the main table map. This is safe, but we also ended up making the
transcriber object a std::shared_ptr too. This has mutable state, so must be
copied when we copy the Automaton object. This is very cheap; the main optimization
was about the map M only.

Reported by Dan Palermo. No test as triggering this is rather hard from a unit test.

Details

Committed
jmolloyNov 5 2019, 2:57 PM
Parents
rG7060840bc9cc: [globalisel][docs] Add a section about debugging with the block extractor
Branches
Unknown
Tags
Unknown