[PATCH] D139338: [IRSim] Check largest sections first when analyzing similarity

Andrew Litteken via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 5 08:53:09 PST 2022


AndrewLitteken created this revision.
AndrewLitteken added a reviewer: paquette.
Herald added a subscriber: hiraditya.
Herald added a project: All.
AndrewLitteken requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

When we check for similarity, right now there is no order to how it is checked, except for via the suffix tree ordering.

We can reduce how much structural analysis we perform by checking the the regions in decreasing size.  In doing so, we know that if two large sections match, each of their contained regions also match.  This allows us to skip the structural checking for each smaller section.  IT does require that we use the large regions as a "bridge" to create the canonical mapping between the two regions.

This reduces compile time significantly for some benchmarks.  It will not perform as well for programs with many small items. F25504648: Screen Shot 2022-10-04 at 10.31.06 AM.png <https://reviews.llvm.org/F25504648>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D139338

Files:
  llvm/include/llvm/Analysis/IRSimilarityIdentifier.h
  llvm/lib/Analysis/IRSimilarityIdentifier.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139338.480131.patch
Type: text/x-patch
Size: 22047 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221205/629e282d/attachment.bin>


More information about the llvm-commits mailing list