[email protected]
[Top] [All Lists]

Re: Whole program optimization and functions-only-called-once.

Subject: Re: Whole program optimization and functions-only-called-once.
From: Jan Hubicka
Date: Sat, 21 Nov 2009 18:36:37 +0100
> Jan Hubicka wrote:
>>> Toon Moene wrote:
>>>> Jan Hubicka wrote:
>>>>> :) It would be nice to know what caused the OOM.  Is just one of  
>>>>> passes exploding
>>>>> on presence of very large bodies?
>>>> I'll try to figure this out over the weekend (sorry, don't have 
>>>> more  spare time).
>>>> It's most probably a single pass, because the memory requirements 
>>>> kept  creeping up to 12.5 Gbytes from 10, slowly increasing all the 
>>>> time over several minutes.
>>> Here are the tracebacks from gdb attached to the lto1 process, while 
>>> it  was expanding from 7 to 12 Gb:
>> Hopefully Vladimir will know answer here.  Do you have any idea how many BBs
>> and loops are in the large function?
> I saw some functions which could have slowed down regional IRA a lot.   
> For example, a small function with 50 loops one after another.   
> Therefore IRA has already code (decreasing # of regions/loops for  
> consideration) to deal with the situation.

I know little about weather prediction, but as usual simulation I would not
expect it to have very deep loop nests. Toon, would be possible to have loop 
of the function in question?
> The worst what I saw a few years ago.  One customer system generated  
> functions with 100K blocks and >1M pseudos.   But fortunately they  
> started to split the code into several functions.

What about the following patch that avoid ineffectivity of the loop exists
enumerating code? Or is IRA enumerating exists in every loop just once during
the analysis?


Index: ira.c
--- ira.c       (revision 154387)
+++ ira.c       (working copy)
@@ -3172,6 +3172,7 @@ ira (FILE *f)
   ira_assert (current_loops == NULL);
   flow_loops_find (&ira_loops);
+  record_loop_exits ();
   current_loops = &ira_loops;
   if (internal_flag_ira_verbose > 0 && ira_dump_file != NULL)
@@ -3215,6 +3216,7 @@ ira (FILE *f)
          df_analyze ();
          flow_loops_find (&ira_loops);
+         record_loop_exits ();
          current_loops = &ira_loops;
          setup_allocno_assignment_flags ();

<Prev in Thread] Current Thread [Next in Thread>