This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: patch for 930513-1 on Darwin
- To: dalej at apple dot com (Dale Johannesen)
- Subject: Re: patch for 930513-1 on Darwin
- From: Joern Rennecke <amylaar at redhat dot com>
- Date: Tue, 19 Jun 2001 18:18:42 +0100 (BST)
- Cc: gcc at gcc dot gnu dot org
> This turns out to be interesting. With -static, a function address is
> pushed forward into a call in a case like this:
> int (*p) = foo;
> (*p)();
> It is combine, not cse, that does this, and it does so because combine
> has hardwired code that knows that (lo_sum (high foo) foo)==(foo).
>
> The usual case on Darwin, however, is pic, and there is no analogous
> code in combine for pic trees, so the substitution does not take place.
> Do you think it might be a good idea to add such code? Pic trees are
> different on different targets, of course, so it would have to be a
> macro. (I can also imagine that this substitution might not be a good
> idea with pic on some targets.)
You could tech combine to use splitters also in the case of combining two
insns, and just require that the split creates only one non-note insn.
Then you can describe the target dependent bits in a splitter.