1. [Statepoint] Remove redundant clear of call target on register (details)
  2. Reapply "[OpenMP][IRBuilder] Perform finalization (incl. outlining) late" (details)
Commit a6f38b46972e4e6978c3a768001903d3f3334cb7 by serguei.katkov
[Statepoint] Remove redundant clear of call target on register

Patchable statepoint is lowered into sequence of nops, so zeroed call target
should not be on register. It is better to use getTargetConstant instead
of getConstant to select zero constant for call target.

Reviewers: reames
Reviewed By: reames
Subscribers: llvm-commits
Differential Revision:
The file was modifiedllvm/test/CodeGen/X86/statepoint-call-lowering.ll (diff)
The file was modifiedllvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp (diff)
Commit 70cac41a2b7e4a7a28c36a544c9813c833d494bb by johannes
Reapply "[OpenMP][IRBuilder] Perform finalization (incl. outlining) late"

Reapply 8a56d64d7620b3764f10f03f3a1e307fcdd72c2f with minor fixes.

The problem was that cancellation can cause new edges to the parallel
region exit block which is not outlined. The CodeExtractor will encode
the information which "exit" was taken as a return value. The fix is to
ensure we do not return any value from the outlined function, to prevent
control to value conversion we ensure a single exit block for the
outlined region.

This reverts commit 3aac953afa34885a72df96f2b703b65f85cbb149.
The file was modifiedclang/lib/CodeGen/CodeGenFunction.cpp (diff)
The file was modifiedllvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp (diff)
The file was modifiedllvm/unittests/Frontend/OpenMPIRBuilderTest.cpp (diff)
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h (diff)
The file was modifiedllvm/lib/Transforms/Utils/CodeExtractor.cpp (diff)