This is the mail archive of the gcc-bugs@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]

[Bug optimization/13044] Calls to stack object destructors should be merged for multiple return points


------- Additional Comments From bryner at brianryner dot com  2003-11-14 02:59 -------
Created an attachment (id=5132)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5132&action=view)
testcase

Compiled with:
c++ -Os -fno-exceptions -c -o early_return_optimize.o early_return_optimize.cpp


using a gcc trunk build from Oct. 27.

I'll attach the generated assembly next, but to summarize: in earlyReturn1(), a
call to ~A() is generated for each |return|.  It could equivalently generate
the code in earlyReturn2(), which is 8 bytes smaller.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13044


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