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 through DCE.

Martin


if (0 == 1)
{
    xxxx
}

Then, in order to completely remove this unnecessary if condition and the
guarded true branch, I want to leverage the dead code elimination
optimization of gcc. However, I just cannot figure out a way of doing so. I
use the following command to output the instrumented GIMPLE code:

gcc -fdump-tree-all -fplugin=./instrumentor.so -g -fsanitize=address test.c

And notice that the instrumented gimple code is right there in the
outputs: test.c.322t.instrumentor. Everything seems fine.

Anyone could shed some light on how to re-optimize (e.g., with deadcode
elimination or just use -O3 if possible) the instrumented GIMPLE code?
Thank you very much.

Shuai


Reply via email to