Certain normalizations can be used to discover more sharing (e.g De Bruijn indices).
Really want to "hash n cache" at all levels for best results.
Maybe two different sources compile to the same IR?
If the IR contains file and line number info, that seems pretty unlikely.
Right, the point would be for the hash to strip out file info, line numbers, whitespace, comments, any stylistic choices which turn out to be equivalent "under-the-hood" in some straightforward way, and probably even the bound variable names (with de Bruijn indexes).