This is the mail archive of the gcc@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: two-element struct performance (was: strict-aliasing and typedefs)


In message <20040220080315.GA25175@redhat.com>, Richard Henderson writes:
 >On Thu, Feb 19, 2004 at 04:16:59PM -0700, law@redhat.com wrote:
 >> Doing better would require that the tree-ssa optimizers know about ABI
 >> details for passing parameters and return values -- if it had that knowledg
 >e
 >> then it would know that the caller will provide a suitable memory location
 >> for the return value and we could use it directly instead of first building
 >> the return value in T.6.
 >
 >I don't know that tree-ssa knowledge of ABI details is quite necessary.
 >
 >I think if we'd performed the computation into a RESULT_DECL rather than
 >into a VAR_DECL temporary, that would effectively do the job since we
 >can arrange for the RESULT_DECL to have rtl appropriate for a caller
 >provided memory location.
Done.  It's pretty trivial.  We now get the following:

  T.2 = arg->im + 0.0;
  T.6.re = arg->re + 1.0e+0;
  T.6.im = T.2;
  return T.6;

The only thing I see now is that TER didn't replace the use of T.2 with
its earlier assignment.  Probably due to the store between the assignment
to T.2 and the later use of T.2.

Testing in progress.

jeff



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