Improve detection of unnecessary SOURCE imports
|Reported by:||simonmar||Owned by:||simonmar|
|Type of failure:||Difficulty:||Moderate (less than a day)|
|Test Case:||Blocked By:|
Description (last modified by simonmar)
Currently unnecessary SOURCE imports are detected by the renamer, but that is a slightly unsatisfactory solution because it is unpredictable whether we will have compiled the real module before we get to the unnecessary SOURCE import or not - it depends on the topological sort performed by the downsweep (or make).
An improvement would be to look at the results of the strongly connected component analysis performed on the graph with SOURCE imports included, and report any SOURCE import edges between components as unnecessary, because replacing one of these with a non-SOURCE import cannot introduce a cycle.
Related to #906