Skip to content

Driver: Refactor parUpsweep, remove old upsweep

Driver: Fix some parUpsweep bugs, remove the old single threaded upsweep

  • Fixes the following issues with parallel make

    1. Compilation of backpack indefinite package with -j (bkp14, etc)

      The compilation of InstantiationNode now waits for its deps to compile, and the nodes depending on InstantiationNode also wait.

    2. StaticPtr does not work (properly) with --make -j in ghci (#19937 (closed))

      Added the SPT table update code (from older upsweep)

  • Removes the use of global HscEnv MVar

  • Removes the old single threaded upsweep

    This was done to avoid maintaining two different drivers. And this also ensures that more of the parUpsweep code gets tested in the testsuite.

    We still have a single threaded upsweep, but the driver is mostly identical for both single and multi-threaded. Now The logic for computation of dependencies is same in both

  • Refactor the code

    • move graph creation APIs in separate module And the logic present earlier in parUpsweep to specifically handle the ext_loop_deps is now part of graph creation.

    • parUpsweep / upsweep now no longer do any additional dependency analysis They work on the input they have been provided

    • remove BuildModule data type

  • Adds a bunch of tests for multiple inter-connected module loops

  • Adds a note explaining typecheckLoop in a more detail

Edited by Divam Narula

Merge request reports