[OpenMP][IRBuilder] Perform finalization (incl. outlining) late
authorJohannes Doerfert <johannes@jdoerfert.de>
Mon, 10 Feb 2020 20:28:47 +0000 (14:28 -0600)
committerJohannes Doerfert <johannes@jdoerfert.de>
Wed, 12 Feb 2020 23:55:01 +0000 (17:55 -0600)
commit8a56d64d7620b3764f10f03f3a1e307fcdd72c2f
tree5266907a6e2f8e6d6ca36108aa08cee542620429
parent77b2ffc498e92cce7546d191f6712a3046300501
[OpenMP][IRBuilder] Perform finalization (incl. outlining) late

In order to fix PR44560 and to prepare for loop transformations we now
finalize a function late, which will also do the outlining late. The
logic is as before but the actual outlining step happens now after the
function was fully constructed. Once we have loop transformations we
can apply them in the finalize step before the outlining.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D74372
clang/lib/CodeGen/CodeGenFunction.cpp
llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
llvm/lib/Transforms/Utils/CodeExtractor.cpp
llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp