Implement the "close to the edge" idea for eliminating unnecessary undefined behaviour checks
afd opened this issue · 1 comments
afd commented
-
For each UB suppression where we have the ability to check whether it was necessary (loop limiter, array bounds clamp, safe math wrapper, but I guess not the evaluation order suppressions), have a way to associate a unique id with it
-
Implement a mode where each check will write a boolean to an SSBO array index to indicate whether the check was needed. For wrappers this will require more parameter passing (or generation of a separate wrapper per wrapper call site)
AaronGhost commented
Implemented with the series of commit ending with 6a46a09 in the glslsmith scripts.
Options to use the ub suppression are specified with --double-run
. It has been tested properly with Shadertrap only.