[PATCH] D106989: [IRSim] Finding Branch Similarity

Andrew Litteken via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 30 09:44:17 PDT 2021


AndrewLitteken added inline comments.


================
Comment at: llvm/include/llvm/Analysis/IRSimilarityIdentifier.h:130
 
+  SmallVector<int, 4> RelativeBlockLocations;
+
----------------
paquette wrote:
> Why int?
I'll add a comment for this variable, but it's because we could be targeting blocks that are "in front of" the other blocks in the function, or behind, so it needs to be able to be positive or negative.


================
Comment at: llvm/lib/Analysis/IRSimilarityIdentifier.cpp:805
+  
+  if (StringLen == 2) {
+    const unsigned StartIdx = *RS.StartIndices.begin();
----------------
paquette wrote:
> why is there a special case for 2? comment?
This should probably get moved to the outliner side of things.


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

https://reviews.llvm.org/D106989



More information about the llvm-commits mailing list