RedundantAssignmentIssue is extremely slow when the control flow graph is complex
This is probably easiest to explain by showing the test I wrote:
https://github.com/corngood/NRefactory/commit/c35584b934fb198a219321b2b54b4f492dd7bd9f
This test will take an extremely long time to complete, and scales non-linearly with the number of if statements. When walking a complex part of the call-graph which doesn't contain any references to the variable, it ends up doing an exhaustive search in RedundantAssignmentIssue.GatherVisitor.ProcessNode.
My initial thought was to just flag variables without any non-assignment references, but A slight variation on the test:
https://github.com/corngood/NRefactory/commit/bf5fe2aa2776e2d1f745c1e44b647d5c1d6509ca
shows the same behaviour can occur even when a reference exists.