[llvm] Port Swift's merge function pass to llvm: merging functions that differ in constants (PR #68235)

Manman Ren via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 19 10:39:08 PDT 2023


manman-ren wrote:


> We should be able to just add the instruction and constant indexes to `StructuralHash`. All of the new additions should be gated behind the `DetailedHash` flag, and then I'd suggest adding a new flag like `IgnoringConst` that ignores constants when it's set to true.
> 
> `beginCompare` only clears the maps, so I don't think that should be a major issue. `GlobalNumberState` is something that is currently missing, so refactoring/moving code might be necessary there depending upon how others think everything should be implemented.

I am separating the hash-related code out of this pull request, and will upload the changes to hashes as patches on top of this PR.

The hash related changes will be needed by the global function merger. And I will try to do incremental changes as suggested!



https://github.com/llvm/llvm-project/pull/68235


More information about the llvm-commits mailing list