This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN


On 07/13/2015 01:55 AM, Richard Biener wrote:
I *think* these are closely enough related that some code can be factored out
a bit and reused in both r_e_f_i_e and r_t_e to discover both types of
equivalences for DOM and for jump threading.

Indeed - the odd thing here is that one function uses
const_and_copies->record_const_or_copy directly while the other one
record_equality (this function is _solely_ used by
record_equivalences_from_incoming_edge).   I didn't want to introduce
a callback to commonize the code (though in principle we could use
a template function with a function template parameter...)
Funny you should mention that -- I poked at a bit at refactoring the code last night, saw this issue and decided to sleep on it a bit as I didn't want to introduce the callback either.

The code for handling the equivalency tables is in a bit of a state of flux in preparation for handling 47679. That work got pushed down on the stack. There's still untangling to do in this space.


That said, I don't see that record_equality does sth not suitable
if called from record_temporary_equivalences.  So if we make
use of that function we could simply call record_temporary_equivalences
from record_equivalences_from_incoming_edge.
Agreed.

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]