This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ipa-vrp] Use get/set_ptr_nonnull in ipa-vrp


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.vivekanandarajah@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.vivekanandarajah@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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]