Estimated hours taken: 12
Branches: main
Switch from using set(prog_var), which is represented using set_ordlist,
to set_of_progvar, which is represented using tree_bitset, for most sets
of variables in the compiler, including the nonlocals sets in goal_infos.
This diff yields about a 5% speedup when compiling the training_cars_full.m
stress test, but also about a 1% slowdown on tools/speedtest. Both of these
are with the current default state in which tree_bitset is compiled with
a whole bunch of sanity checks. If these are disabled, we get roughly a 1%
speedup on tools/speedtest. I intend to disable those sanity checks after
a shakedown period of a week or two in which the updated version of the
compiler is installed on our platforms.
compiler/hlds_goal.m:
Replace almost all occurrences of set(prog_var) with set_of_progvar.
The main exceptions are the types supporting rbmm.
compiler/set_of_var.m:
Add some more predicates and functions that previous existed on sets
but not yet on set_of_vars.
compiler/*.m:
Conform to the change in hlds_goal.m, and make similar changes
in set representations.
library/bag.m:
Add a predicate and function for creating a bag from a sorted list.
We already had them for creating a bag from a set, but a set_of_progvar
shouldn't have to be converted to a set.
library/robdd.m:
Fix deviations from our programming style.