[PATCH] D82730: [SimplifyCFG] Merge identical basic blocks (WIP)

JF Bastien via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 30 10:50:26 PDT 2020


jfb added a comment.

I like this, but it's going to run into the same issues as MergeFuncs. Can you sync with @hiraditya and @vish99 to solve both block comparison and function comparison using the same methodology? The we can turn both of them on by default. Or in other words, how does this not have exactly the same issues MergeFuncs has? The principal one is that the IR comparator goes out of sync with IR definition, and we get miscompiles because of this.

Block hashing seems useful. mergeFuncs also hashes IR, but for the whole function. I wonder if hashing blocks should be an analysis pass, which we invalidate when we change IR, and which both this pass as well as MergeFuncs consumes (i.e. try to de-dup functions, then blocks, and use the block hash to create a hash for entire functions).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82730/new/

https://reviews.llvm.org/D82730





More information about the llvm-commits mailing list