llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.34k stars 12.13k forks source link

SAFECode should have a redundant check elimination pass #13463

Closed llvmbot closed 4 months ago

llvmbot commented 12 years ago
Bugzilla Link 13091
Version unspecified
OS All
Reporter LLVM Bugzilla Contributor

Extended Description

One optimization that SAFECode currently lacks is a redundant check elimination pass. If there are two checks of the same type (e.g., a fastlscheck) and one of the checks is redundant, then SAFECode should remove one of the checks.

This optimization can be a little trickier than it initially looks. Load/store checks on heap objects must ensure that the heap object cannot be freed in-between the two checks. GEP checks and load/store checks have different semantics, so a special GEP check may be needed when the GEP check makes a load/store check redundant.

Endilll commented 4 months ago

SAFECode is archived.