Re:GCC 4.9 Release Series – Changes, New Features, and Fixes
by anaphor on Sunday April 13, 2014 @06:49AM
(#7580931)
For an example of a compiler other than GCC that does whole-program optimization see the Stalin Scheme compiler: https://github.com/barak/stalin
It uses a lot of memory because it requires keeping a representation of more or less the entire program in memory at one time, in a format which is amenable to analysis. It is not out of the ordinary for an optimizer's internal representation to be on the order of 1000x the size of the source code.