diff options
author | Thomas Young <wenzhang5800@gmail.com> | 2022-08-23 16:34:35 +0100 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2022-12-13 14:00:06 +0100 |
commit | 520b52b24e73d2ec48fd6f492266df42c218bdf2 (patch) | |
tree | ae9e6163fb2b700a41e8f1d07c3b95837350b354 /gcc/rust/backend/rust-compile-extern.h | |
parent | ca246e573fb3f53fba5794f72b9245382eb46180 (diff) | |
download | gcc-520b52b24e73d2ec48fd6f492266df42c218bdf2.zip gcc-520b52b24e73d2ec48fd6f492266df42c218bdf2.tar.gz gcc-520b52b24e73d2ec48fd6f492266df42c218bdf2.tar.bz2 |
gccrs: Add dead code scan on HIR
In order to find dead code we use a depth first search and keep liveness
variables, after type resolution. In this case, if a function is unused
and it calls another function the 2nd function is now unused since the
caller is not used etc. The algorithm is a depth first search.
gcc/rust/
* checks/lints/rust-lint-marklive-base.h: New.
* checks/lints/rust-lint-marklive.cc: New.
* checks/lints/rust-lint-marklive.h: New.
* checks/lints/rust-lint-scan-deadcode.h: New.
Diffstat (limited to 'gcc/rust/backend/rust-compile-extern.h')
0 files changed, 0 insertions, 0 deletions