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

Andrew Litteken via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 8 15:20:27 PDT 2020


AndrewLitteken added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp:210
+
+  // Map from instructions in one block to instructions in the other.
+  SmallDenseMap<const Instruction *, const Instruction *> Map;
----------------
I have a similar checking mechanism for checking if two sections of IR are similar, so it might make sense to create a shared utility function for the instruction mapping/comparison section.  Where a basic block or range of instructions is passed in and the "`isSameOperationAs`" check for the range is performed, then if we develop new mechanisms for whether these sections are the same operations both passes get the same gains.


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

https://reviews.llvm.org/D82730





More information about the llvm-commits mailing list