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.
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 ***