Jun 24, 2019, 3:56:04 AM6/24/19
Partial dead code elimination has not been implemented by the gcc and icc. I saw dump files dumped by the gcc using the following command.
gcc -O3 -fdump-tree-all <file_name.c>
I can not even find a single pass for partial dead code elimination though in the research papers(Partial Dead Code Elimination, June 1994) algorithm is clearly mentioned. Applying partial dead code elimination, execution time either remains the same or decreases. I am wondering, why is it not implemented by the recent compilers?
example of partial dead code elimination
x = 4; y=7; y = 7;
y = 7; if(cond) then if(cond) then
if(cond) then x = 4; x = 3;
x = 3; -------------> x = 3; ---------------> else
else else x = 4;
z = 4; x = 4; z = 4;
end if; z = 4; end if;
out(x); end if; out(x)