On Wed, 2020-06-17 at 15:10 +0800, Shuai Wang via Gcc wrote:
> Dear Martin,
> 
> Thanks for the information. I am tentatively experimenting some random
> gadgets; given the critical if condition belonging to each sanitizer check,
> i will do some data flow analysis and then decide whether to remove that
> check or not (done). If so, I will rewrite that if condition into always
> false (done), and hope I can re-launch the dead code elimination pass of
> GCC to automatically remove that particular sanitizer check (and the if
> condition).
> 
> This is just some random hacks, so probably far from the adoption stage...
> If it does, then i will be glad to reach out and discuss more on the
> details (although i am not sure how it goes)...
If you just ensure that the cfg cleanups are done when the pass is done the 
right things will just happen.  CFG cleanups are typically signaled by 
returning TODO_cleanup_cfg at the end of the pass.  There should be numerous 
examples throughout the GCC source code.

jeff


Reply via email to