[all-commits] [llvm/llvm-project] 144cd2: [CodeExtractor] Creating exit stubs based off orig...

Andrew Litteken via All-commits all-commits at lists.llvm.org
Wed Sep 8 15:15:50 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 144cd22baef2d068f077e514de1b4f0d8b0973cf
      https://github.com/llvm/llvm-project/commit/144cd22baef2d068f077e514de1b4f0d8b0973cf
  Author: Andrew Litteken <andrew_litteken at apple.com>
  Date:   2021-09-08 (Wed, 08 Sep 2021)

  Changed paths:
    M llvm/include/llvm/Transforms/Utils/CodeExtractor.h
    M llvm/lib/Transforms/Utils/CodeExtractor.cpp
    M llvm/unittests/Transforms/Utils/CodeExtractorTest.cpp

  Log Message:
  -----------
  [CodeExtractor] Creating exit stubs based off original order branch instructions.

Previously the CodeExtractor created exit stubs, and the subsequent return value of the outlined function based on the order of out-of-region blocks after splitting any phi nodes, and collecting the blocks to be outlined. This could cause differences in order if there was a difference of exit block phi nodes between the two regions. This patch moves the collection of the output target blocks to be before this occurs, so that the assignment of target block to output value will be the same, regardless of the contents of the output block.

Reviewers: paquette, roelofs

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




More information about the All-commits mailing list