[PATCH] D86977: [IRSim][IROutliner] Limit to extracting regions that only require inputs

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


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

Extracted regions can have both inputs and outputs.  In addition, the CodeExtractor removes inputs that are only used in llvm.assumes, and sunken allocas (values are used entirely in the extracted region as denoted by lifetime intrinsics).  We also cannot combine sections that have different constants in the same structural location, and these constants will have to be elevated to arguments. This patch limits the extracted regions to those that only require inputs, and do not have any other special cases.

We test that we do not outline the wrong constants in:

- `test/Transforms/IROutliner/outliner-different-constants.ll`
- `test/Transforms/IROutliner/outliner-different-globals.ll`
- `test/Transforms/IROutliner/outliner-constant-vs-registers.ll`

We test that correctly outline in:

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D86977

Files:
  llvm/include/llvm/Transforms/IPO/IROutliner.h
  llvm/lib/Transforms/IPO/IROutliner.cpp
  llvm/test/Transforms/IROutliner/extraction.ll
  llvm/test/Transforms/IROutliner/illegal-assumes.ll
  llvm/test/Transforms/IROutliner/illegal-memcpy.ll
  llvm/test/Transforms/IROutliner/illegal-memmove.ll
  llvm/test/Transforms/IROutliner/illegal-vaarg.ll
  llvm/test/Transforms/IROutliner/outlining-constants-vs-registers.ll
  llvm/test/Transforms/IROutliner/outlining-different-constants.ll
  llvm/test/Transforms/IROutliner/outlining-different-globals.ll
  llvm/test/Transforms/IROutliner/outlining-different-structure.ll
  llvm/test/Transforms/IROutliner/outlining-same-constants.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86977.289272.patch
Type: text/x-patch
Size: 37933 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200901/128f7108/attachment.bin>


More information about the llvm-commits mailing list