On Sat, Feb 8, 2014 at 8:29 AM, dxq <ziya...@163.com> wrote: > hi all, > > We found that gcc would run out of memory on Windows when compiling a *big* > function (100000 lines). > > More investigation shows that gcc crashes at the function *compute_avail*, > in tree-fre pass. *compute_avail* collects information from basic blocks, > so memory is allocated to record informantion. > However, if there are huge number of basic blocks, the memory would be > exhausted and gcc would crash down, especially for Windows PC, only 2G or 4G > memory generally. It's ok On linux, and *compute_avail* allocates *2.4G* > memory. I guess some optimization passes in gcc like FRE didn't consider the > extreme > case.
This was fixed for GCC 4.8, FRE no longer uses compute_avail (but PRE still does). Basically GCC 4.8 should (at -O1) compile most extreme cases just fine. Richard. > When disable tree-fre pass, gcc crashes at IRA pass. I will do more > investigation about that. > > Any suggestions? > > Thanks! > > danxiaoqiang > > > > -- > View this message in context: > http://gcc.1065356.n5.nabble.com/FRE-may-run-out-of-memory-tp1009578.html > Sent from the gcc - patches mailing list archive at Nabble.com.