[all-commits] [llvm/llvm-project] 05b1a1: [IROutliner] Adapting to hoisted bitcasts in CodeE...

Andrew Litteken via All-commits all-commits at lists.llvm.org
Wed Jan 13 09:15:45 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 05b1a15f703c3e01f4123424700bc37188af8af1
      https://github.com/llvm/llvm-project/commit/05b1a15f703c3e01f4123424700bc37188af8af1
  Author: Andrew Litteken <andrew.litteken at gmail.com>
  Date:   2021-01-13 (Wed, 13 Jan 2021)

  Changed paths:
    M llvm/lib/Transforms/IPO/IROutliner.cpp
    A llvm/test/Transforms/IROutliner/outlining-bitcasts.ll

  Log Message:
  -----------
  [IROutliner] Adapting to hoisted bitcasts in CodeExtractor

In commit 700d2417d8281ea56dfd7ac72d1a1473d03d2d59 the CodeExtractor
was updated so that bitcasts that have lifetime markers that beginning
outside of the region are deduplicated outside the region and are not
used as an output.  This caused a discrepancy in the IROutliner, where
in these cases there were arguments added to the aggregate function
that were not needed causing assertion errors.

The IROutliner queries the CodeExtractor twice to determine the inputs
and outputs, before and after `findAllocas` is called with the same
ValueSet for the outputs causing the duplication. This has been fixed
with a dummy ValueSet for the first call.

However, the additional bitcasts prevent us from using the same
similarity relationships that were previously defined by the
IR Similarity Analysis Pass. In these cases, we check whether the
initial version of the region being analyzed for outlining is still the
same as it was previously.  If it is not, i.e. because of the additional
bitcast instructions from the CodeExtractor, we discard the region.

Reviewers: yroux

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




More information about the All-commits mailing list