Thread safety analysis very slow in long functions because of LocalVariableMap #42656
Labels
bugzilla
Issues migrated from bugzilla
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
Extended Description
The LocalVariableMap data structure keeps a set of life values for every program point, which can be prohibitively expensive for very long functions. Since the entire state is copied over for every modification, the complexity is O(n²) in the worst case. Of course long functions are not good programming style, but they occur.
Currently the map is only used to find out if branch expressions are related to the result of a try-acquire function call. That doesn't require tracking all values in the program though.
The text was updated successfully, but these errors were encountered: