[PATCH] D109448: [IRSim][IROutliner] Treating Called Functions as Values and Outlining Indirect Calls

Andrew Litteken via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 8 09:47:16 PDT 2021


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

The outliner currently requires that function calls not be indirect calls, and have that the function name, and function type must match, as well as other attributes such as calling conventions.  This patch treats called functions as values, and just another operand, and named function calls as constants.  This allows functions to be treated like any other constant, or input and output into the outlined functions.

There are also debugging flags added to enforce the old behaviors where indirect calls not be allowed, and to enforce the old rule that function calls names must also match.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D109448

Files:
  llvm/include/llvm/Analysis/IRSimilarityIdentifier.h
  llvm/include/llvm/Transforms/IPO/IROutliner.h
  llvm/lib/Analysis/IRSimilarityIdentifier.cpp
  llvm/lib/Transforms/IPO/IROutliner.cpp
  llvm/test/Transforms/IROutliner/illegal-indirect-calls.ll
  llvm/test/Transforms/IROutliner/legal-indirect-calls.ll
  llvm/test/Transforms/IROutliner/outlining-call-and-indirect.ll
  llvm/test/Transforms/IROutliner/outlining-calls-names-must-match.ll
  llvm/test/Transforms/IROutliner/outlining-calls.ll
  llvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109448.371372.patch
Type: text/x-patch
Size: 30323 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210908/1eb2fef1/attachment.bin>


More information about the llvm-commits mailing list