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]

[RFC][PR69708] IPA inline not working for function reference in static const struc


Hi,

As discussed in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69708 and corresponding mailing list discussion, IPA CP is not detecting a jump-function with the sq function as value.


static int sq(int x) {
  return x * x;
}

static const F f = {sq};
...
dosomething (g(f, x));
...

I added a check at determine_locally_known_aggregate_parts to detect this. This fixes the testcase and passes x86-64-linux-gnu lto bootstrap and regression testing with no new regression. Does this look sensible place to fix this?

Thanks,
Kugan

gcc/ChangeLog:



2016-03-01  Kugan Vivekanandarajah  <kuganv@linaro.org>



	* ipa-prop.c (determine_locally_known_aggregate_parts): Determine jump

	 function for static constant initialization.

Attachment: PR69708.txt
Description: Text document


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