This is the mail archive of the gcc@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]

Memory overhead of tree-SSA optimization passes


Hi,
I've made another little experiment about memory usage.  On combine.c we
produce 20MB of garbage for -O0 compilation (compared to 12MB of 3.4),
29MB of garbage with -O2 but all optimizers on tree-ssa disabled (so we
only go in and out SSA) and 44MB with default settings.

If you look into individual optimizers, we currently have no optimizer
saving memory (except for possibly DCE that cause abort when disabled)
major offender are dominators and pre together producing 9.8MB of
garbage (roughly 3/4 of the overall overhead)

For PRE we consume most of memory in bitmaps, I am just testing patch
obstackeizing them that should actually help here reducing GGC garbage
to 40MB but still I don't follow why we need such an extreme amount of
bitmaps.

For DOM large portion of consumption comes from the fact that it
reverses every expression several times...

Honza

 -ftree-dce:
ICE with -fno-tree-dce
../../gcc/combine.c:3679: error: Pointers with a memory tag, should have points-to sets or point to malloc
plen_2486, name memory tag: NMT.7797, points-to vars: { }
plen, UID 655
../../gcc/combine.c:3679: internal compiler error: verify_flow_sensitive_alias_info failed.

 -ftree-dominator-opts:

Peak amount of GGC memory allocated before garbage collecting increased from 7806k to 8032k, overall 2.90%
Peak amount of GGC memory still allocated after garbage collectin increased from 5990k to 6018k, overall 0.47%
Amount of produced GGC garbage increased from 37459k to 43156k, overall 15.21%
Amount of memory still referenced at the end of compilation increased from 4429k to 4631k, overall 4.57%
Peak memory use before GGC: 7806k -> 8032k
Peak memory use after GGC: 5990k -> 6018k
Maximum of released memory in single GGC run: 2997k -> 2997k
Garbage: 37459k -> 43156k
Leak: 4631k -> 4429k
Overhead: 4602k -> 5496k
GGC runs: 21 -> 23

 -fno-tree-pre:

Peak amount of GGC memory allocated before garbage collecting increased from 8020k to 8032k, overall 0.15%
Peak amount of GGC memory still allocated after garbage collectin increased from 6011k to 6018k, overall 0.12%
Amount of produced GGC garbage increased from 39034k to 43156k, overall 10.56%
Peak memory use before GGC: 8020k -> 8032k
Peak memory use after GGC: 6011k -> 6018k
Maximum of released memory in single GGC run: 3093k -> 2997k
Garbage: 39034k -> 43156k
Leak: 4631k -> 4628k
Overhead: 5196k -> 5496k
GGC runs: 22 -> 23

 -ftree-lrs:

Peak amount of GGC memory allocated before garbage collecting increased from 7821k to 8032k, overall 2.70%
Peak amount of GGC memory still allocated after garbage collectin increased from 5990k to 6018k, overall 0.47%
Amount of produced GGC garbage increased from 42572k to 43156k, overall 1.37%
Amount of memory still referenced at the end of compilation increased from 4477k to 4631k, overall 3.45%
Peak memory use before GGC: 7821k -> 8032k
Peak memory use after GGC: 5990k -> 6018k
Maximum of released memory in single GGC run: 3025k -> 2997k
Garbage: 42572k -> 43156k
Leak: 4631k -> 4477k
Overhead: 5449k -> 5496k
GGC runs: 24 -> 23

 -ftree-copyrename:

Peak amount of GGC memory allocated before garbage collecting increased from 7903k to 8032k, overall 1.63%
Peak memory use before GGC: 7903k -> 8032k
Peak memory use after GGC: 6050k -> 6018k
Maximum of released memory in single GGC run: 3165k -> 2997k
Garbage: 43579k -> 43156k
Leak: 4631k -> 4721k
Overhead: 5565k -> 5496k
GGC runs: 24 -> 23

 -ftree-ter:

Peak amount of GGC memory allocated before garbage collecting increased from 7920k to 8032k, overall 1.41%
Peak memory use before GGC: 7920k -> 8032k
Peak memory use after GGC: 6064k -> 6018k
Maximum of released memory in single GGC run: 3193k -> 2997k
Garbage: 43666k -> 43156k
Leak: 4631k -> 4734k
Overhead: 5585k -> 5496k
GGC runs: 24 -> 23

 -ftree-loop-optimize:

Peak amount of GGC memory allocated before garbage collecting increased from 7942k to 8032k, overall 1.13%
Peak amount of GGC memory still allocated after garbage collectin increased from 5990k to 6018k, overall 0.47%
Peak memory use before GGC: 7942k -> 8032k
Peak memory use after GGC: 5990k -> 6018k
Maximum of released memory in single GGC run: 3152k -> 2997k
Garbage: 43360k -> 43156k
Leak: 4631k -> 4642k
Overhead: 4788k -> 5496k
GGC runs: 24 -> 23

 -ftree-ch:

Amount of produced GGC garbage increased from 42114k to 43156k, overall 2.47%
Peak memory use before GGC: 8027k -> 8032k
Peak memory use after GGC: 6017k -> 6018k
Maximum of released memory in single GGC run: 2997k -> 2997k
Garbage: 42114k -> 43156k
Leak: 4631k -> 4633k
Overhead: 5094k -> 5496k
GGC runs: 23 -> 23

 -ftree-dse:

Peak amount of GGC memory still allocated after garbage collectin increased from 6010k to 6018k, overall 0.13%
Peak memory use before GGC: 8031k -> 8032k
Peak memory use after GGC: 6010k -> 6018k
Maximum of released memory in single GGC run: 2997k -> 2997k
Garbage: 43139k -> 43156k
Leak: 4631k -> 4631k
Overhead: 5264k -> 5496k
GGC runs: 23 -> 23

 -ftree-ccp:

Peak amount of GGC memory still allocated after garbage collecting increased from 6010k to 6018k, overall 0.13%
Peak memory use before GGC: 8031k -> 8032k
Peak memory use after GGC: 6010k -> 6018k
Maximum of released memory in single GGC run: 2997k -> 2997k
Garbage: 43144k -> 43156k
Leak: 4631k -> 4631k
Overhead: 5476k -> 5496k
GGC runs: 23 -> 23

 -ftree-loop-im:

Amount of memory still referenced at the end of compilation increased from 4626k to 4631k, overall 0.12%
Peak memory use before GGC: 8026k -> 8032k
Peak memory use after GGC: 6012k -> 6018k
Maximum of released memory in single GGC run: 2997k -> 2997k
Garbage: 43161k -> 43156k
Leak: 4631k -> 4626k
Overhead: 5391k -> 5496k
GGC runs: 23 -> 23

 -ftree-combine-temps:

Peak memory use before GGC: 8032k -> 8032k
Peak memory use after GGC: 6018k -> 6018k
Maximum of released memory in single GGC run: 2997k -> 2997k
Garbage: 43156k -> 43156k
Leak: 4631k -> 4631k
Overhead: 5496k -> 5496k
GGC runs: 23 -> 23


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