How to dismantle the SSA form after?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



How to dismantle the SSA form after?
(e.g. after of the stage that used intensive dataflow analysis)

E.g., i've this code in SSA form for easier dataflow analysis:

function ( input's parameters a_1, c_3, f_6, i_9 ) {
   local var b_2, a_4, e_5, d_7, h_8, g_10;

   b_2 = a_1 ;
   a_4 = b_2 OP1 c_3 ;
   e_5 = a_4;
   d_7 = e_5 OP2 f_6 ;
   h_8 = d_7;
   g_10 = h_8 OP3 i_9 ;

   return g_10;
}

What will be the next form to SSA that attempt to "reuse" all
max. possible variables as one step more of optimization?

The next form can't be SSA form because this form doesn't
permit to reuse the same variables with same subscripts.

E.g. i've transformed to this optimized code hand-written
after last stage of optimization that used the SSA form.

function ( input's parameters a_1, c_3, f_6, i_9 ) {

   a_1 = a_1 OP1 c_3 ;
   a_1 = a_1 OP2 f_6 ;
   a_1 = a_1 OP3 i_9 ;

   return a_1;
}

The advantage is that it has not local variables, reuses the
same parameter as temporary variable and uses 4 instructions
versus 6 local vars and 7 instructions from the above code in
SSA form.

It will be easier for the stage of graph-coloring of the registers
with or without coalescing steps.

In the time of dismantling SSA form, it's attempting to optimize
"backward" the way of reusing the variables before of
generating GIMPLE or RTL code.

(optimize "backward" means optimize from end to start,
 from last var to first var although i think that forward too is possible)

   J.C. Pizarro

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux