Created attachment 39578 [details] genautomata output MIPS32 Hello, bootstrapping/crosscompiling gcc 5.4.0 for MIPS, genautomata uses a lot of memory. This causes swapping/thrashing and extremely long build times on low memory systems. According to valgrind massif report, it requires 527MB of heap now. genautomata output(-time -progress -stats) attached to PR. Probably we need to try to decrease reservations for `xlp_cpu', `xlp_fpu' since simple disable(comment out it in mips.md) of xlp support decreases heap usage down to 43MB. Similar to bug 70473, which requests that a new bug is filed. Thank you for your attention!
I haven't tested for MIPS specifically but I believe it given the genautomata memory footprint on other architectures, so I'll confirm.
cc-ing MIPS maintainer
I guess I can just add that this problem has only became worse. With LAST_UPDATED Fri Jun 26 21:36:32 CEST 2020 Fri Jun 26 19:36:32 UTC 2020 (revision 0fce12c0920:2873383514d:0801f419440c14f6772b28f763ad7d40f7f7a580) (a.k.a r11-1677) I just tried to build on CompileFarm gcc24, which is a "EdgeRouter Pro" mips64 with 2 GB memory but no swap, and with "gcc version 8.3.0 (Debian 8.3.0-6)". Needless to say, genautomata fails. Also tried in vain: configuring with --enable-checking=release.
I do some testing, adding scheduling description file one by one order by on date. file added date size(M) 5400.md 8/20/2002 13 5500.md 8/20/2002 13 sr71k.md 8/20/2002 18 7000.md 7/15/2003 20 9000.md 7/15/2003 22 sb1.md 4/21/2004 23 4130.md 5/6/2004 24 3000.md 6/24/2004 25 4000.md 7/12/2004 25 4100.md 7/12/2004 25 4300.md 7/12/2004 25 4600.md 7/12/2004 25 5000.md 7/12/2004 26 6000.md 7/12/2004 26 generic.md 7/12/2004 26 24k.md 5/9/2005 35 4k.md 5/13/2005 36 5k.md 7/29/2005 38 74k.md 4/16/2007 42 20kc.md 7/16/2007 46 xlr.md 6/6/2008 47 loongson2ef.md 6/15/2008 51 octeon.md 9/21/2008 53 10000.md 10/6/2008 58 xlp.md 7/22/2012 450 p5600.md 6/5/2014 1370 m5100.md 7/22/2015 1382 i6400.md 7/23/2015 1502 p6600.md 6/13/2018 2393 gs464.md 11/7/2018 2403 gs464e.md 11/7/2018 2411 gs264e.md 11/7/2018 2419
Created attachment 48830 [details] testing patch this patch reduce reservation of model do not more than 10 cycles. The memory of genautomata down to 1GB. the patch modified files: modified: gcc/config/mips/gs464.md modified: gcc/config/mips/i6400.md modified: gcc/config/mips/m5100.md modified: gcc/config/mips/p5600.md modified: gcc/config/mips/p6600.md modified: gcc/config/mips/xlp.md modified: gcc/config/mips/xlr.md I will do some performance test on Loongson 3A1000 (gs464) target. If someone has other machines, pleae do some performance test.
(In reply to Paul Hua from comment #5) > Created attachment 48830 [details] > testing patch > > this patch reduce reservation of model do not more than 10 cycles. The > memory of genautomata down to 1GB. > > the patch modified files: > > modified: gcc/config/mips/gs464.md > modified: gcc/config/mips/i6400.md > modified: gcc/config/mips/m5100.md > modified: gcc/config/mips/p5600.md > modified: gcc/config/mips/p6600.md > modified: gcc/config/mips/xlp.md > modified: gcc/config/mips/xlr.md > > I will do some performance test on Loongson 3A1000 (gs464) target. > > If someone has other machines, pleae do some performance test. Please submit this patch to the gcc-patches mailing list for review.