[all-commits] [llvm/llvm-project] 805ec1: [IRSim] Check largest sections first when analyzin...

Andrew Litteken via All-commits all-commits at lists.llvm.org
Mon Mar 20 16:28:31 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 805ec19d7d9915989be8a8a626176b5e29e19eee
  Author: Andrew Litteken <andrew.litteken at gmail.com>
  Date:   2023-03-20 (Mon, 20 Mar 2023)

  Changed paths:
    M llvm/include/llvm/Analysis/IRSimilarityIdentifier.h
    M llvm/lib/Analysis/IRSimilarityIdentifier.cpp
    M llvm/test/Transforms/IROutliner/illegal-assumes.ll

  Log Message:
  [IRSim] Check largest sections first when analyzing similarity

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.

Reviewer: paquette
Differential Revision: https://reviews.llvm.org/D139338

More information about the All-commits mailing list