Hi! On Mon, Jul 14, 2025 at 04:16:03PM -0400, Bradley Lucier wrote: > On 7/14/25 15:58, Segher Boessenkool wrote: > > More interesting information is where the boundary is 🙂 There are a > > lot of numbers under 400000, some bigger than others 😉 > > I'm sorry, I don't understand this comment about a "boundary"; on x86_64 I > did not get a warning that PRE was disabled no matter how small I made > max-gcse-memory. With some numbers you do get the warning, with some numbers you do not; the interesting number is where (or whereabouts) it flips. > To elaborate: > > 1. On aarch64, PRE is disabled for some large routines in my project, which > was reported by the -Wdisabled-optimization flag, so I noticed this while > make'ing my project. In response, we set the size of max-gcse-memory to > 400000KB, so now PRE is disabled only for very large routines. > > 2. I did not get any warnings from -Wdisabled-optimization on x86_64 Linux > about PRE being disabled either with the default max-gcse-size (128MB) or > with the increased max-gcse-size (400000KB) > > 3. I concluded (maybe incorrectly) that PRE ran without problems on x86_64. It looks like a correct conclusion. Running PRE on x86 takes less memory (because x86 code can be optimised way less. There are fewer registers anyway, that is a factor in the smount of work needed for many optimisations). > 4. I wanted to see whether this was true, so I set max-gcse-memory to 400 > (400KB), so small as to be almost certain to cause PRE to be disabled. > > 5. I did not get a notice that PRE was disabled from > -Wdisabled-optimization. > > So, I don't understand what's going on. Is PRE run at all on this code on > x86_64? PRE is run whenever you use -fgcse, to a first order approximation :-) The biggest contraindication is functions that call setjmp, those will never get PRE done. There is nothing that disables PRE on any architecture. Segher