Re: Re-optimize instrumented GIMPLE code

2020-06-17 Thread Jeff Law via Gcc
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

Re: Re-optimize instrumented GIMPLE code

2020-06-17 Thread Richard Biener via Gcc
On Wed, Jun 17, 2020 at 4:11 AM Shuai Wang via Gcc wrote: > > Hello, > > Suppose I have changed certain if condition in the GIMPLE code (generated > by the `sanopt` pass) into the following format: > > if (0 == 1) > { > > } > > Then, in order to completely remove this unnecessary if condit

Re: Re-optimize instrumented GIMPLE code

2020-06-17 Thread Martin Liška
On 6/17/20 9:10 AM, Shuai Wang 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). I

Re: Re-optimize instrumented GIMPLE code

2020-06-17 Thread Shuai Wang via Gcc
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

Re: Re-optimize instrumented GIMPLE code

2020-06-17 Thread Martin Liška
On 6/17/20 9:00 AM, Shuai Wang wrote: Dear Martin, Thanks for the kind reply. Hey. You're welcome. I don't have a strong preference between `asan0` vs. `sanopt`. But I note that I am primarily working on sanitizer enabled code, where I can only find some .ASAN_CHECK function calls in `asa

Re: Re-optimize instrumented GIMPLE code

2020-06-17 Thread Shuai Wang via Gcc
Dear Martin, Thanks for the kind reply. I don't have a strong preference between `asan0` vs. `sanopt`. But I note that I am primarily working on sanitizer enabled code, where I can only find some .ASAN_CHECK function calls in `asan0`, but those function calls seem have been inlined in `sanopt`. In

Re: Re-optimize instrumented GIMPLE code

2020-06-16 Thread Martin Liška
On 6/17/20 4:10 AM, Shuai Wang via Gcc wrote: Hello, Suppose I have changed certain if condition in the GIMPLE code (generated by the `sanopt` pass) into the following format: Hello. What kind of instrumentation are you doing? Can you make the instrumentation in a ASAN pass? Then you'll go th

Re-optimize instrumented GIMPLE code

2020-06-16 Thread Shuai Wang via Gcc
Hello, Suppose I have changed certain if condition in the GIMPLE code (generated by the `sanopt` pass) into the following format: if (0 == 1) { } Then, in order to completely remove this unnecessary if condition and the guarded true branch, I want to leverage the dead code elimination op