CCP propagating conditional expression constants
Sebastian Pop
sebastian.pop@inria.fr
Fri Jan 5 11:34:00 GMT 2007
Hi,
here is a patch on which I have worked with Basile Starynkevitch
for propagating constants inferred from conditional expressions.
The basic testcase from which we started was something like
if (x == 0)
a = b / x;
and we wanted to issue an error for the division by zero.
In the process we just remarked that x was not replaced by zero
in the then_clause, and that we have support for warnings for
division by zero only in the front ends, ie. we'll later propose a patch
for such warnings also after CCP and other code transforms on GIMPLE.
The attached patch still causes a libjava failure that I don't know how
to fix. The error comes from the fact that some of the new
SSA_NAMEs are not marked correctly as occuring in abnormal phi
nodes. Is there some function that updates these ssa names that I forgot
to use in the attached patch?
Thanks,
Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 652_ccp.diff
Type: text/x-patch
Size: 5727 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070105/3a110254/attachment.bin>
More information about the Gcc-patches
mailing list