gcc -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definitio n -Wc++-compat -fno-common -DHAVE_CONFIG_H -o cc1plus \ cp/cp-lang.o c-family/stub-objc.o cp/call.o cp/decl.o cp/expr.o cp /pt.o cp/typeck2.o cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parser.o cp/ptre e.o cp/rtti.o cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o cp/method.o cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o cp/optimize.o cp/mangl e.o cp/cp-objcp-common.o cp/name-lookup.o cp/cxx-pretty-print.o cp/cp-gimplify.o tree-mudflap.o attribs.o incpath.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-lex.o c-f amily/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/ c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec. o default-c.o cc1plus-checksum.o main.o tree-browser.o libbackend.a libcommon-ta rget.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -lmpc -lmpfr -lgmp -rdynamic -ldl -L../zlib -lz libbackend.a(reorg.o): In function `dbr_schedule': /home/dave/gnu/gcc/objdir/gcc/../../gcc/gcc/reorg.c:3971: undefined reference to `make_return_insns'
Confirmed. Misses some #ifdef (relies on optimization otherwise). Bernd, seems to be caused by your patch.
Ugh, code prettyfication gone wrong. Will fix. However, you'll probably also want to add "return" patterns to PA for optimization.
On 8/30/2011 7:31 AM, bernds at gcc dot gnu.org wrote: > However, you'll probably also want to add "return" patterns to PA for > optimization. > I don't think the conditions required to define a "return" pattern are met. Possibly, a "simple_return" pattern could be defined. Is this what you are suggesting? Dave
Surely the PA has some kind of return instruction? Most ports define a "return" pattern with an insn condition that requires that the epilogue is empty. In that case, jumps to the end of the function will be replaced by return instructions. Also, the "return" pattern can in this case emit either a "return" or a "simple_return" rtx; they are equivalent if there is no epilogue. You can define a "simple_return" pattern, but it will only gain anything once the final shrink-wrapping bits are in.
On 30-Aug-11, at 11:06 AM, bernds at gcc dot gnu.org wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50232 > > --- Comment #4 from Bernd Schmidt <bernds at gcc dot gnu.org> > 2011-08-30 15:06:05 UTC --- > Surely the PA has some kind of return instruction? > Most ports define a "return" pattern with an insn condition that > requires that > the epilogue is empty. In that case, jumps to the end of the > function will be > replaced by return instructions. Also, the "return" pattern can in > this case > emit either a "return" or a "simple_return" rtx; they are equivalent > if there > is no epilogue. Thanks. I'm testing a patch. Dave -- John David Anglin dave.anglin@bell.net
Author: danglin Date: Sat Sep 3 16:21:27 2011 New Revision: 178500 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178500 Log: PR Bug middle-end/50232 * config/pa/pa.md (return): Define "return" insn pattern. (epilogue): Use it when no epilogue is needed. * config/pa/pa.c (pa_can_use_return_insn): New function. * config/pa/pa-protos.h (pa_can_use_return_insn): Declare. Modified: trunk/gcc/ChangeLog trunk/gcc/config/pa/pa-protos.h trunk/gcc/config/pa/pa.c trunk/gcc/config/pa/pa.md
Author: danglin Date: Sat Sep 3 16:30:32 2011 New Revision: 178501 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178501 Log: PR middle-end/50232 Correct log entry for last change. Modified: trunk/gcc/ChangeLog
Fixed.
Author: danglin Date: Mon Mar 12 17:08:20 2012 New Revision: 185252 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185252 Log: Backport from mainline 2011-09-03 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> PR Bug middle-end/50232 * config/pa/pa.md (return): Define "return" insn pattern. (epilogue): Use it when no epilogue is needed. * config/pa/pa.c (pa_can_use_return_insn): New function. * config/pa/pa-protos.h (pa_can_use_return_insn): Declare. Modified: branches/gcc-4_6-branch/gcc/ChangeLog branches/gcc-4_6-branch/gcc/config/pa/pa-protos.h branches/gcc-4_6-branch/gcc/config/pa/pa.c branches/gcc-4_6-branch/gcc/config/pa/pa.md