This PR reverts a lot of the changes done in #8308. We practically encountered situations such as: ``` fun y (z) := let x := inst mkInst x z f y ``` Where the instance puller turns it into: ``` let x := inst fun y (z) := mkInst x z f y ``` The current heuristic now discovers `x` being in scope at the call site of `f` and being used under a binder in `y` and thus blocks pulling in `x` to the specialization, abstracting over an instance. According to @zwarich this was done at the time either due to observed stack overflows or pulling in computation into loops. With the current configuration for abstraction in specialization it seems rather unlikely that we pull in a non trivial computation into a loop with this. We also practically didn't observe stack overflows in our tests or benchmarks. Cameron speculates that the issues he observed might've been fixed otherwise by now. Crucial note: Deciding not to abstract over ground terms *might* cause us to pull in computationally intensive ground terms into a loop. We could decide to weaken this to just instance terms though of course even computing instances might end up being non-trivial. |
||
|---|---|---|
| .. | ||
| bench | ||
| bench-radar | ||
| compiler | ||
| elabissues | ||
| ir | ||
| lake | ||
| lean | ||
| pkg | ||
| playground | ||
| plugin | ||
| simpperf | ||
| .gitignore | ||
| common.sh | ||
| lakefile.toml | ||
| lean-toolchain | ||