[all-commits] [llvm/llvm-project] bd4b1b: [IRSim] Adding support for recognizing branch simi...
Andrew Litteken via All-commits
all-commits at lists.llvm.org
Mon Sep 6 11:56:33 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bd4b1b5f6d52154c1fbefabf8acdd1eb6d55235f
https://github.com/llvm/llvm-project/commit/bd4b1b5f6d52154c1fbefabf8acdd1eb6d55235f
Author: Andrew Litteken <andrew_litteken at apple.com>
Date: 2021-09-06 (Mon, 06 Sep 2021)
Changed paths:
M llvm/include/llvm/Analysis/IRSimilarityIdentifier.h
M llvm/lib/Analysis/IRSimilarityIdentifier.cpp
M llvm/lib/Transforms/IPO/IROutliner.cpp
M llvm/test/Analysis/IRSimilarityIdentifier/basic.ll
M llvm/test/Analysis/IRSimilarityIdentifier/different.ll
M llvm/test/Transforms/IROutliner/illegal-branches.ll
M llvm/test/Transforms/IROutliner/illegal-catchpad.ll
M llvm/test/Transforms/IROutliner/illegal-cleanup.ll
M llvm/test/Transforms/IROutliner/illegal-landingpad.ll
A llvm/test/Transforms/IROutliner/region-end-of-module.ll
M llvm/test/tools/llvm-sim/single-sim-file.test
M llvm/test/tools/llvm-sim/single-sim.test
M llvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp
Log Message:
-----------
[IRSim] Adding support for recognizing branch similarity
The current IRSimilarityIdentifier does not try to find similarity across blocks, this patch provides a mechanism to compare two branches against one another, to find similarity across basic blocks, rather than just within them.
This adds a step in the similarity identification process that labels all of the basic blocks so that we can identify the relative branching locations. Within an IRSimilarityCandidate we use these relative locations to determine whether if the branching to other relative locations in the same region is the same between branches. If they are, we consider them similar.
We do not consider the relative location of the branch if the target branch is outside of the region. In this case, both branches must exit to a location outside the region, but the exact relative location does not matter.
Reviewers: paquette, yroux
Differential Revision: https://reviews.llvm.org/D106989
More information about the All-commits
mailing list