A GGC related question

dxq ziyan01@163.com
Fri Nov 22 15:12:00 GMT 2013


hi,

I'm doing a work to make unroll, doloop, and sms pass work together as
following way: 
  * before the first unroll pass, duplicate all global information such as
insn chain and CFG as backup.
  * unroll with factor = 1, go on to finish sms, and record the result of
swp, ii, loop count etc
  * go back unroll pass, discard the all global information, using the
backup rerun again to sms with unroll factor = 2, and record the result of
swp.
  * repeat above steps with unroll factor = 4.
  * ok, it's time to decide which factor is the best one, and rerun with it,
done.
  
we have implemented it, and it works well. but, if the compiled file is too
big, 
gcc would carsh down with ICE. we find out that copying consumes lots of
memories so that GGC purge the backup.

we have done some try:
  * adjust the ggc_min_heap and ggc_min_expand, and disable ggc collect
while doing sms & unroll, but it can not be the optimal way.
  * put the backup in the pool, but it doesn't work. is pool ok for GTY data
structs like rtx, basic_block, edge ? if not, why? is there any way to make
the backup insn chain not touched by the GGC?
  * force to ggc collect at the end of tree_rest_of_compilation, but if
inlining happens, it crashes down. if the functions are independent, is it
safe to force to do GGC after tree_rest_of_compilation?
   
   Brs,
   Thanks!

    danxiaoqiang



--
View this message in context: http://gcc.1065356.n5.nabble.com/A-GGC-related-question-tp988400.html
Sent from the gcc - patches mailing list archive at Nabble.com.



More information about the Gcc-patches mailing list