Hi. It's quite some time the discussion has started. Now is time for me to refresh IPA ICF and I would like integrate operand_equal_p with what I currently have in ICF (::compare_operand). I like the idea of a class that will provide both operand_equal_valueize and hash_operand_valueize. These will be implemented in func_checker and can provide basically the same what Honza suggested. Reading the thread, I noticed Richi would prefer to use something like: template int operand_equal_p_1 (const_tree arg0, const_tree arg1, unsigned int flags, tree (*valueize)(tree)) { #define VALUEIZE(op) (with_valueize && valueize) ? valueize (op) : op ... } To be honest, it looks to me only as an optimization which will fold call to valueize in current operand_equal_p. I'm sending a slightly tested pair of patches which does the abstraction factoring and ICF adaptation. I would expect a feedback before I'll prepare a proper fix. Thanks, Martin