public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/54343] New: RTL postreload leaks DF memory
@ 2012-08-21 11:41 rguenth at gcc dot gnu.org
  2012-08-21 11:50 ` [Bug rtl-optimization/54343] " steven at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-08-21 11:41 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 54343
           Summary: RTL postreload leaks DF memory
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rguenth@gcc.gnu.org


With valgrind on the testcase from PR54146 you can see leaks of the kind

==28803== 3,984 bytes in 249 blocks are definitely lost in loss record 28,125
of 29,883
==28803==    at 0x4C29ADD: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==28803==    by 0xCE28D7: xmalloc (xmalloc.c:147)
==28803==    by 0x6B064D: df_refs_add_to_chains(df_collection_rec*,
basic_block_def*, rtx_def*) (df-scan.c:2669)
==28803==    by 0x6B5144: df_bb_refs_record(int, bool) (df-scan.c:3644)
==28803==    by 0x6B524C: df_scan_blocks() (df-scan.c:678)
==28803==    by 0x7B6B7D: rest_of_handle_reload() (ira.c:4390)
==28803==    by 0x818C4A: execute_one_pass(opt_pass*) (passes.c:2157)
==28803==    by 0x818F94: execute_pass_list(opt_pass*) (passes.c:2212)
==28803==    by 0x818FA6: execute_pass_list(opt_pass*) (passes.c:2213)
==28803==    by 0x68F583: expand_function(cgraph_node*) (cgraphunit.c:1609)
==28803==    by 0x6909E8: compile() (cgraphunit.c:1714)
==28803==    by 0x690F64: finalize_compilation_unit() (cgraphunit.c:2089)

do_reload re-adds the live problem and calls run_fast_dce.  Either that
or subsequent passes that end up removing instructions do not bother
with freeing associated DF info.  At least I don't see that delete_insn
calls df_insn_delete or so.  Thus keeping DF initialized throughout
postreload may be not the best idea ...


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-02-20 14:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-21 11:41 [Bug rtl-optimization/54343] New: RTL postreload leaks DF memory rguenth at gcc dot gnu.org
2012-08-21 11:50 ` [Bug rtl-optimization/54343] " steven at gcc dot gnu.org
2012-08-21 19:20 ` steven at gcc dot gnu.org
2012-08-21 21:25 ` dnovillo at gcc dot gnu.org
2012-08-22  9:33 ` rguenth at gcc dot gnu.org
2012-08-22 12:43 ` dnovillo at google dot com
2012-08-22 13:02 ` rguenther at suse dot de
2013-03-03 17:09 ` steven at gcc dot gnu.org
2024-02-20 14:01 ` rguenth at gcc dot gnu.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).