public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug tree-optimization/28850] New: missed call -> jmp transformation; redundant unwind stuff. @ 2006-08-25 20:40 pluto at agmk dot net 2006-08-25 21:52 ` [Bug tree-optimization/28850] " rguenth at gcc dot gnu dot org ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: pluto at agmk dot net @ 2006-08-25 20:40 UTC (permalink / raw) To: gcc-bugs $ cat fake_bomber.cpp struct bomber { bomber() : bum( false ) { } ~bomber() { if ( bum ) throw 0; } // this will never throw private: bool bum; }; void zoo() { } void bar( void ( *f )() ) { #ifndef CALL2JMP bomber b; // fake bomber #endif f(); } void foo() { #ifndef CALL2JMP bomber b; // fake bomber #endif bar( &zoo ); } int main() { foo(); return 0; } $ g++ fake_bomber.cpp -o fake_bomber -O3 -fno-rtti --save-temps zoo(): rep ; ret bar(void (*)()): subq $8, %rsp call *%rdi addq $8, %rsp ret movq %rax, %rdi call _Unwind_Resume foo(): subq $8, %rsp movl zoo(), %edi call bar(void (*)()) addq $8, %rsp ret movq %rax, %rdi call _Unwind_Resume main: subq $8, %rsp call foo() xorl %eax, %eax addq $8, %rsp ret $ g++ fake_bomber.cpp -o fake_bomber -O3 -fno-rtti --save-temps -DCALL2JMP zoo(): rep ; ret bar(void (*)()): movq %rdi, %r11 jmp *%r11 foo(): rep ; ret main: xorl %eax, %eax ret -- Summary: missed call -> jmp transformation; redundant unwind stuff. Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pluto at agmk dot net GCC target triplet: x86-64-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28850 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/28850] missed call -> jmp transformation; redundant unwind stuff. 2006-08-25 20:40 [Bug tree-optimization/28850] New: missed call -> jmp transformation; redundant unwind stuff pluto at agmk dot net @ 2006-08-25 21:52 ` rguenth at gcc dot gnu dot org 2006-08-25 21:59 ` [Bug tree-optimization/28850] missed call -> jmp transformation; redundant unwind stuff with empty finally pinskia at gcc dot gnu dot org ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: rguenth at gcc dot gnu dot org @ 2006-08-25 21:52 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from rguenth at gcc dot gnu dot org 2006-08-25 21:51 ------- It's not entirely clear from your report, but this looks like a bug of PR13397? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28850 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/28850] missed call -> jmp transformation; redundant unwind stuff with empty finally 2006-08-25 20:40 [Bug tree-optimization/28850] New: missed call -> jmp transformation; redundant unwind stuff pluto at agmk dot net 2006-08-25 21:52 ` [Bug tree-optimization/28850] " rguenth at gcc dot gnu dot org @ 2006-08-25 21:59 ` pinskia at gcc dot gnu dot org 2006-08-26 10:07 ` rguenth at gcc dot gnu dot org 2009-03-29 13:32 ` hubicka at gcc dot gnu dot org 3 siblings, 0 replies; 5+ messages in thread From: pinskia at gcc dot gnu dot org @ 2006-08-25 21:59 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from pinskia at gcc dot gnu dot org 2006-08-25 21:59 ------- (In reply to comment #1) > It's not entirely clear from your report, but this looks like a bug of PR13397? No it is not fully related. One of the problems is that we don't remove empty finnally blocks. Reduced testcase for that problem: struct bomber { ~bomber() { } }; int g(void); int f(void) { bomber a; g(); } -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2006-08-25 21:59:14 date| | Summary|missed call -> jmp |missed call -> jmp |transformation; redundant |transformation; redundant |unwind stuff. |unwind stuff with empty | |finally http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28850 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/28850] missed call -> jmp transformation; redundant unwind stuff with empty finally 2006-08-25 20:40 [Bug tree-optimization/28850] New: missed call -> jmp transformation; redundant unwind stuff pluto at agmk dot net 2006-08-25 21:52 ` [Bug tree-optimization/28850] " rguenth at gcc dot gnu dot org 2006-08-25 21:59 ` [Bug tree-optimization/28850] missed call -> jmp transformation; redundant unwind stuff with empty finally pinskia at gcc dot gnu dot org @ 2006-08-26 10:07 ` rguenth at gcc dot gnu dot org 2009-03-29 13:32 ` hubicka at gcc dot gnu dot org 3 siblings, 0 replies; 5+ messages in thread From: rguenth at gcc dot gnu dot org @ 2006-08-26 10:07 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from rguenth at gcc dot gnu dot org 2006-08-26 10:07 ------- Indeed. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu dot | |org Keywords| |missed-optimization http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28850 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/28850] missed call -> jmp transformation; redundant unwind stuff with empty finally 2006-08-25 20:40 [Bug tree-optimization/28850] New: missed call -> jmp transformation; redundant unwind stuff pluto at agmk dot net ` (2 preceding siblings ...) 2006-08-26 10:07 ` rguenth at gcc dot gnu dot org @ 2009-03-29 13:32 ` hubicka at gcc dot gnu dot org 3 siblings, 0 replies; 5+ messages in thread From: hubicka at gcc dot gnu dot org @ 2009-03-29 13:32 UTC (permalink / raw) To: gcc-bugs ------- Comment #4 from hubicka at gcc dot gnu dot org 2009-03-29 13:32 ------- Subject: Bug 28850 Author: hubicka Date: Sun Mar 29 13:32:13 2009 New Revision: 145233 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145233 Log: PR middle-end/28850 * tree-pass.h (pass_cleanup_eh): New function. (remove_unreachable_regions): Break code handling RTL to rtl_remove_unreachable_regions; remove ERT_MUST_NOT_THROW that can not be reached by runtime. (can_be_reached_by_runtime): New function. (label_to_region_map): New function. (num_eh_regions): New function. (rtl_remove_unreachable_regions): New function. (convert_from_eh_region_ranges): Call rtl_remove_unreachable_regions. (remove_eh_region): New function. * except.h: Include sbitmap and vecprim. (remove_eh_region, remove_unreachable_regions, label_to_region_map, num_eh_regions): Declare. * passes.c (init_optimization_passes): Schedule cleanup_eh. * Makefile.in (EXCEPT_H): New; replace all uses of except.h by it. * tree-eh.c (tree_remove_unreachable_handlers): New function. (tree_empty_eh_handler_p): New function. (cleanup_empty_eh): New function. (cleanup_eh): New function. (pass_cleanup_eh): New function. Modified: trunk/gcc/ChangeLog trunk/gcc/Makefile.in trunk/gcc/except.c trunk/gcc/except.h trunk/gcc/passes.c trunk/gcc/tree-eh.c trunk/gcc/tree-pass.h -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28850 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-03-29 13:32 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2006-08-25 20:40 [Bug tree-optimization/28850] New: missed call -> jmp transformation; redundant unwind stuff pluto at agmk dot net 2006-08-25 21:52 ` [Bug tree-optimization/28850] " rguenth at gcc dot gnu dot org 2006-08-25 21:59 ` [Bug tree-optimization/28850] missed call -> jmp transformation; redundant unwind stuff with empty finally pinskia at gcc dot gnu dot org 2006-08-26 10:07 ` rguenth at gcc dot gnu dot org 2009-03-29 13:32 ` hubicka at gcc dot gnu dot org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).