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 debug/58315] [4.8/4.9/5 Regression] Excessive memory use with -g


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58315

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aoliva at gcc dot gnu.org,
                   |                            |rth at gcc dot gnu.org

--- Comment #14 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
I'm not very familiar with the var tracking code, but one thing I see odd here
is a ton of similar var_location notes attached to each instruction (well, not
each instruction, but a lot of the instructions are affected while generating
code for test01, test02, test03, test04, etc).

I see an instruction like this:

(insn:TI 52195 52199 83288 6386 (set (mem/c:DI (plus:DI (reg/f:DI 6 bp)
                (const_int -25880 [0xffffffffffff9ae8])) [125 %sfp+-25864 S8
A64])
        (reg:DI 0 ax)) 89 {*movdi_internal}
     (expr_list:REG_DEAD (reg:DI 0 ax)
        (nil)))
(jump_insn 83288 52195 83289 6386 (set (pc)
        (label_ref 34659)) 653 {jump}
     (nil)
 -> 34659)

Followed by over 1000 var_location notes:

(note 11489581 83289 11489582 (var_location this(0x7fffe7223360)  (plus:DI
(reg/f:DI 6 bp)
    (const_int -21808 [0xffffffffffffaad0]))) NOTE_INSN_VAR_LOCATION)
(note 11489582 11489581 11489583 (var_location this(0x7fffe8d7dc60)  (plus:DI
(reg/f:DI 6 bp)
    (const_int -25200 [0xffffffffffff9d90]))) NOTE_INSN_VAR_LOCATION)
(note 11489583 11489582 11489584 (var_location this(0x7fffe72236c0)  (plus:DI
(reg/f:DI 6 bp)
    (const_int -21856 [0xffffffffffffaaa0]))) NOTE_INSN_VAR_LOCATION)
(note 11489584 11489583 11489585 (var_location this(0x7fffe7223bd0)  (plus:DI
(reg/f:DI 6 bp)
    (const_int -6576 [0xffffffffffffe650]))) NOTE_INSN_VAR_LOCATION)
(note 11489585 11489584 11489586 (var_location this(0x7fffe7223cf0)  (plus:DI
(reg/f:DI 6 bp)
    (const_int -21872 [0xffffffffffffaa90]))) NOTE_INSN_VAR_LOCATION)
(note 11489586 11489585 11489587 (var_location this(0x7fffe941e090)  (plus:DI
(reg/f:DI 6 bp)
    (const_int -25136 [0xffffffffffff9dd0]))) NOTE_INSN_VAR_LOCATION)

etc
etc etc
.

Notice all of them are the "this" pointer, but I have hacked the RTL dumping
code to also print the address of the DECL to show that every "this" is
actually a different instance.

This looks suspect.  Anyone have a clue, otherwise I'm going to continue
banging my head against a wall here?


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