[Gfortran, Patch] PR12456 - Optimize single character.

Feng Wang wf_cs@yahoo.com
Thu Jan 5 00:51:00 GMT 2006


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


Best Regards,
Feng Wang

--
Creative Compiler Research Group,
National University of Defense Technology, China.

__________________________________________________
¸Ï¿ì×¢²áÑÅ»¢³¬´óÈÝÁ¿Ãâ·ÑÓÊÏä?
http://cn.mail.yahoo.com



More information about the Gcc-patches mailing list