Hi Honza,
On 12/10/16 22:16, Jan Hubicka wrote:
Hi,
This patch uses the get/set_ptr_nonnull so that ipa-vrp also
propagates nonnull ranges for pinter.
Bootstrapped and regression tested this with other patched without
any new regressions on x86_64-linux-gnu.
Is this OK for trunk?
Thanks,
Kugan
gcc/ChangeLog:
2016-10-12 Kugan Vivekanandarajah <kugan.vivekanandara...@linaro.org>
* ipa-prop.c (ipa_compute_jump_functions_for_edge): Set value range
for pointer type too.
(ipcp_update_vr): set_ptr_nonnull for pointer.
gcc/testsuite/ChangeLog:
2016-10-12 Kugan Vivekanandarajah <kugan.vivekanandara...@linaro.org>
* gcc.dg/ipa/vrp4.c: New test.
OK, thank you!
We should be able to derive a lot of (useful) non-null information from the
fact that the pointers are dereferenced either prior the function call or in a
statement that postdominate the function entry.
I will try with spec2k/2006. Do you have any specific benchmark in mind
that I can try first?
I guess we could also give (semi)
useful -Wmissing-attribute=nonnull hints in that case.
I will send a follow up patch for this.
Thanks,
Kugan
Honza