On Fri, May 31, 2013 at 9:21 AM, Swati <swatira...@cse.iitb.ac.in> wrote: > For -flto-partition=balanced, if user does not specify the --param > lto-partitions and --param lto-min-partition, > will GCC partition the program? > If yes what is the criteria?
It will partition the program into lto-partitions partitions unless the partitions would not be of at least lto-min-partition size. > Where can we get more help on using the --param lto-partitions and --param > lto-min-partition? The default should be good. If you have a machine with very very many CPUs then increasing --param lto-partitions may help compile-time. > We want to know how the partitions are formed using these options. > Cases > 1. when we specify --param lto-partitions=3 -> no partitions are formed. Using a single partition results in a partition of size less than lto-min-partition so only one partition is used (to avoid creating very very small partitions). > 2. when we specify --param lto-partitions=3 --param lto-min-partition=5 -> 3 > partitions are formed > 3. when we specify --param lto-min-partition=5 -> 7 partitions are formed This means your program has size < 8 * 5 and thus at most 7 partitions of minimum size 5 are formed. > We understand cases 2 and 3. > However in case 1 why no partitions are formed? Because the default for lto-min-partition is 1000. > Is it that when lto-min-partition is not specified, partitions will not be > formed? No, it depends on the size of the input program. LTO tries to create --param lto-partitions number of partitions unless the partitions would become smaller than --param lto-min-partition, in which case the number of partitions is reduced until the partitions are at least of --param lto-min-partition size. Richard. > Regards, > Swati > > > On Friday 24 May 2013 02:06 PM, Richard Biener wrote: >> >> On Fri, May 24, 2013 at 9:14 AM, Swati<swatira...@cse.iitb.ac.in> wrote: >>> >>> Hello, >>> >>> -flto-partition=balanced is used to specify partitioning into equally >>> sized >>> chunks. >>> Is there an option to specify size or number of chunks? >> >> There are the --param lto-partitions and --param lto-min-partition params. >> >> Richard. >> >>> Regards, >>> Swati > >