[dataflow] Disallow implicit copy of Environment, use fork() instead
Environments are heavyweight, and copies are observably different from the original: they introduce new SAT variables, which degrade performance & debugging. Copies should only be done deliberately, where justified. Empirically there are several places in the framework where we perform dubious copies, sometimes entirely accidentally. (see e.g. D153491). Making these explicit makes this mistake harder. This patch forces copies to go through fork(), the copy-constructor is private. This requires changes to existing callsites: some are correct and call fork(), some are incorrect and are fixed, others are difficult and I left a FIXME. Differential Revision: https://reviews.llvm.org/D153674
Loading
Please sign in to comment