[all-commits] [llvm/llvm-project] e6ae62: [IROutliner] Adding support for consolidating func...

Andrew Litteken via All-commits all-commits at lists.llvm.org
Mon Dec 28 14:17:26 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e6ae623314bab3ddd983ed941bf63a6d4c63a1f4
      https://github.com/llvm/llvm-project/commit/e6ae623314bab3ddd983ed941bf63a6d4c63a1f4
  Author: Andrew Litteken <andrew.litteken at gmail.com>
  Date:   2020-12-28 (Mon, 28 Dec 2020)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/IROutliner.h
    M llvm/lib/Transforms/IPO/IROutliner.cpp
    M llvm/test/Transforms/IROutliner/extraction.ll
    M llvm/test/Transforms/IROutliner/illegal-assumes.ll
    M llvm/test/Transforms/IROutliner/illegal-memcpy.ll
    M llvm/test/Transforms/IROutliner/illegal-memmove.ll
    M llvm/test/Transforms/IROutliner/illegal-vaarg.ll
    A llvm/test/Transforms/IROutliner/outlining-different-output-blocks.ll
    A llvm/test/Transforms/IROutliner/outlining-remapped-outputs.ll
    A llvm/test/Transforms/IROutliner/outlining-same-output-blocks.ll

  Log Message:
  -----------
  [IROutliner] Adding support for consolidating functions with different output arguments.

Certain regions can have values introduced inside the region that are
used outside of the region. These may not be the same for each similar
region, so we must create one over arching set of arguments for the
consolidated function.

We do this by iterating over the outputs for each extracted function,
and creating as many different arguments to encapsulate the different
outputs sets. For each output set, we create a different block with the
necessary stores from the value to the output register. There is then
one switch statement, controlled by an argument to the function, to
differentiate which block to use.

Changed Tests for consistency:
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

Tests to test new functionality:
llvm/test/Transforms/IROutliner/outlining-different-output-blocks.ll
llvm/test/Transforms/IROutliner/outlining-remapped-outputs.ll
llvm/test/Transforms/IROutliner/outlining-same-output-blocks.ll

Reviewers: jroelofs, paquette

Differential Revision: https://reviews.llvm.org/D87296




More information about the All-commits mailing list