Opened 11 years ago

Closed 11 years ago

Last modified 8 years ago

#914 closed task (fixed)

Improve detection of unnecessary SOURCE imports

Reported by: simonmar Owned by: simonmar
Priority: normal Milestone:
Component: Compiler Version: 6.5
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

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

Change History (5)

comment:1 Changed 11 years ago by simonmar

Description: modified (diff)

comment:2 Changed 11 years ago by simonmar

Resolution: fixed
Status: newclosed

Done, test is programs/hs-boot.

Thu Sep 28 16:17:05 BST 2006  Simon Marlow <>
  * Fix #906, and do #914 while I'm in here (it wasn't too hard)

comment:3 Changed 9 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:4 Changed 9 years ago by simonmar

Operating System: UnknownUnknown/Multiple

comment:5 Changed 8 years ago by simonmar

difficulty: Moderate (1 day)Moderate (less than a day)
Note: See TracTickets for help on using tickets.