[Gfortran, Patch] PR12456 - Optimize single character.
Feng Wang
wf_cs@yahoo.com
Thu Jan 5 01:58:00 GMT 2006
--- Feng Wang <wf_cs@yahoo.com> wrote:
> --- Tobias Schl¨¹ter <tobias.schlueter@physik.uni-muenchen.de> wrote:
>
> > Feng Wang wrote:
> > > :ADDPATCH fortran:
> > >
> > > This patch fix PR12456. If a string's length is 1, we convert it to a
> > single
> > > character. This will optimize string copy, string compare, including
> > related
> > > intrinsic functions.
> > >
> > > ChangeLog entry:
> > >
> > > 2006-01-04 Feng Wang <fengwang@nudt.edu.cn>
> > >
> > > PR fortran/12456
> > > * trans-expr.c (gfc_to_single_character): Convert string to single
> > > character if its length is 1.
> > > (gfc_conv_expr_op): Use it.
> > > (gfc_trans_string_copy): Use it.
> > > * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Use it.
> > > * trans.h (gfc_to_single_character): Add prototype.
> > >
> > > Testsuite ChangeLog:
> > >
> > > 2006-01-04 Feng Wang <fengwang@nudt.edu.cn>
> > >
> > > PR fortran/12456
> > > * gfortran.dg/pr12456.f90: New test.
> >
> > I don't mind Andrew approving patches, I'm just wondering if you can
> actually
> > verify that your patch has the desired effect, e.g. by scanning the
> assembler
> > output for the string library routines, and making sure that they're not
> > called.
> >
>
> Yes, I verified.
>
Sorry, Tobi. I mistook your suggestion. Now the attached file is a new test
case.
Regression tested on i686-pc-linux-gnu.
Best Regards,
Feng Wang
--
Creative Compiler Research Group,
National University of Defense Technology, China.
__________________________________________________
¸Ã¿ìâ²áÃÃ
»¢³¬´óÃÃÿÃâ·ÃÃÃÃä?
http://cn.mail.yahoo.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr12456.f90
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060105/37eed935/attachment.f90>
More information about the Gcc-patches
mailing list