Bug 13871 - g++ creates excessive amounts of NOTE_INSN_DELETED insns
Summary: g++ creates excessive amounts of NOTE_INSN_DELETED insns
Status: RESOLVED DUPLICATE of bug 13764
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.4.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: memory-hog
Depends on:
Blocks:
 
Reported: 2004-01-26 21:12 UTC by Dan Nicolaescu
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Nicolaescu 2004-01-26 21:12:09 UTC
Using the testcase in PR8361
gcc from CVS HEAD
x86-linux
g++ -O2 -fno-inline generate-3.4.ii -dr

count the total number of insns in the .01.rtl dump:
grep -c "^(" generate-3.4.ii.01.rtl
138865

count the number of NOTE_INSN_DELETED insns:

grep -c "^(note.*DELETED" generate-3.4.ii.01.rtl
36070

So 25% of the total number of insns created are NOTE_INSN_DELETED. 


Another data point, compare the RTL generated by gcc and g++ for the same
preprocessed file: combine.i 

   Total number of insns in the .01.rtl dump:
   gcc:33014
   g++:42638

   Total number of NOTE_INSN_DELETED insns in the .01.rtl dump:
   gcc:1966
   g++:9799

These NOTE_INSN_DELETED insns are deleted later in the compilation process, but 
they create extra garbage to be collected, and affect the spatial locality of 
insns.
Comment 1 Andrew Pinski 2004-01-26 22:28:02 UTC
This is a dup of bug 13764.  The problem is caused by the C++ front-end creating extra blocks.

*** This bug has been marked as a duplicate of 13764 ***