[PATCH] D26872: Outliner: Add MIR-level outlining pass

Jessica Paquette via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 18 15:01:44 PST 2016


paquette created this revision.
paquette added reviewers: MatzeB, qcolombet, craig.topper, mkuper.
paquette added a subscriber: llvm-commits.
paquette set the repository for this revision to rL LLVM.
Herald added a subscriber: mgorny.

This is the third and final patch necessary for upstreaming the outliner described in the RFC at http://lists.llvm.org/pipermail/llvm-dev/2016-August/104170.html

The outliner is a code-size reduction pass which works by finding repeated sequences of instructions in a program, and replacing them with calls to functions. This would be especially useful to people working in low-memory environments, where sacrificing performance for space is acceptable.

This patch relies on the previous two patches:

TerminatedString: https://reviews.llvm.org/D26870
SuffixTree: https://reviews.llvm.org/D26871

This would add a interprocedural outliner directly before printing assembly. For reference on how this would work, this patch also includes X86 target hooks and an X86 test.

The outliner is run like so:

clang -mno-red-zone -mllvm -enable-machine-outliner file.c

I would love for people to test it out and tell me about how well it works for them, and maybe even play around with the provided target hooks. Tell me what you think!


Repository:
  rL LLVM

https://reviews.llvm.org/D26872

Files:
  include/llvm/CodeGen/Passes.h
  include/llvm/Target/TargetInstrInfo.h
  lib/CodeGen/CMakeLists.txt
  lib/CodeGen/MachineOutliner.cpp
  lib/CodeGen/MachineOutliner.h
  lib/CodeGen/TargetPassConfig.cpp
  lib/Target/X86/X86InstrInfo.cpp
  lib/Target/X86/X86InstrInfo.h
  test/CodeGen/X86/machineoutliner.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26872.78585.patch
Type: text/x-patch
Size: 28811 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161118/685b38d7/attachment.bin>


More information about the llvm-commits mailing list