[PATCH] D108657: [CodeExtractor] Ensuring ordering of exitStub creation

Andrew Litteken via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 24 12:59:19 PDT 2021


AndrewLitteken created this revision.
AndrewLitteken added reviewers: paquette, jroelofs.
Herald added a subscriber: hiraditya.
AndrewLitteken requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108657

Files:
  llvm/include/llvm/Transforms/Utils/CodeExtractor.h
  llvm/lib/Transforms/Utils/CodeExtractor.cpp
  llvm/unittests/Transforms/Utils/CodeExtractorTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108657.368437.patch
Type: text/x-patch
Size: 9025 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210824/6832b59f/attachment.bin>


More information about the llvm-commits mailing list