[all-commits] [llvm/llvm-project] b1191c: [IROutliner] Adding support for elevating constant...

Andrew Litteken via All-commits all-commits at lists.llvm.org
Wed Dec 23 11:03:46 PST 2020


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

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/IROutliner.h
    M llvm/lib/Transforms/IPO/IROutliner.cpp
    M llvm/test/Transforms/IROutliner/outlining-constants-vs-registers.ll
    M llvm/test/Transforms/IROutliner/outlining-different-constants.ll
    M llvm/test/Transforms/IROutliner/outlining-different-globals.ll

  Log Message:
  -----------
  [IROutliner] Adding support for elevating constants that are not the same in each region to arguments

When there are constants that have the same structural location, but not
the same value, between different regions, we cannot simply outline the
region. Instead, we find the constants that are not the same in each
location, and promote them to arguments to be passed into the respective
functions. At each call site, we pass the constant in as an argument
regardless of type.

Added/Edited Tests:

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

Reviewers: paquette, jroelofs

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




More information about the All-commits mailing list