[PATCH] D86975: [IRSim][IROutliner] Adding the extraction basics for the IROutliner.

Andrew Litteken via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 1 13:23:58 PDT 2020


AndrewLitteken created this revision.
Herald added subscribers: llvm-commits, hiraditya, mgorny.
Herald added a project: LLVM.
AndrewLitteken requested review of this revision.

Extracting the similar regions is the first step in the IROutliner.

Using the IRSimilarityIdentifier, we collect the SimilarityGroups and sort them by how many instructions will be removed.  Each IRSimilarityCandidate is used to define an OutlinableRegion.  Each region is ordered by their occurrence in the Module and the regions that are not compatible with previously outlined regions are discarded.

Each region is then extracted with the CodeExtractor into its own function.
We test that correctly extract in:

- `test/Transforms/IROutliner/extraction.ll`
- `test/Transforms/IROutliner/address-taken.ll`
- `test/Transforms/IROutliner/outlining-same-globals.ll`
- `test/Transforms/IROutliner/outlining-same-constants.ll`
- `test/Transforms/IROutliner/outlining-different-structure.ll`


https://reviews.llvm.org/D86975

Files:
  llvm/include/llvm/InitializePasses.h
  llvm/include/llvm/Transforms/IPO.h
  llvm/include/llvm/Transforms/IPO/IROutliner.h
  llvm/lib/Passes/PassBuilder.cpp
  llvm/lib/Passes/PassRegistry.def
  llvm/lib/Transforms/IPO/CMakeLists.txt
  llvm/lib/Transforms/IPO/IPO.cpp
  llvm/lib/Transforms/IPO/IROutliner.cpp
  llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
  llvm/test/Transforms/IROutliner/extraction.ll
  llvm/test/Transforms/IROutliner/outlining-address-taken.ll
  llvm/test/Transforms/IROutliner/outlining-different-structure.ll
  llvm/test/Transforms/IROutliner/outlining-same-constants.ll
  llvm/test/Transforms/IROutliner/outlining-same-globals.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86975.289268.patch
Type: text/x-patch
Size: 42358 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200901/eab2209c/attachment-0001.bin>


More information about the llvm-commits mailing list