about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2021-04-19 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2021-08-24 13:31:11 +0200
commit9f6f8620e188d5026f1b23d7714b4e41e2d92e30 (patch)
tree08e3e27d6d2d33a2fdf10ce16f86df44d33c0a25 /compiler/rustc_codegen_llvm/src
parentf66e825f73d2bd7f8a763b723983850f891985b0 (diff)
downloadrust-9f6f8620e188d5026f1b23d7714b4e41e2d92e30.tar.gz
rust-9f6f8620e188d5026f1b23d7714b4e41e2d92e30.zip
Improve liveness analysis for generators
Liveness analysis for generators assumes that execution always continues
normally after a yield point, not accounting for the fact that generator
could be dropped before completion.

If generators captures any variables by reference, those variables could
be used within a generator, or when the generator completes, but also
after each yield point in the case the generator is dropped.

Account for the case when generator is dropped after yielding, but
before running to the completion. This effectively considers all
variables captured by reference to be used after a yield point.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions