]> granicus.if.org Git - clang/commit
Re-commit r357452 (take 2): "SimplifyCFG SinkCommonCodeFromPredecessors: Also sink...
authorHans Wennborg <hans@hanshq.net>
Tue, 28 May 2019 12:19:38 +0000 (12:19 +0000)
committerHans Wennborg <hans@hanshq.net>
Tue, 28 May 2019 12:19:38 +0000 (12:19 +0000)
commit4e88d5da2df1a93f4971d459e1c52b7b98b21a92
tree9ed8c8429470c5ef5f1f03ca1520a33dee8b271a
parent4ec0ef8a5ee1fd59b62a13d9d1c6b7cd29611ca5
Re-commit r357452 (take 2): "SimplifyCFG SinkCommonCodeFromPredecessors: Also sink function calls without used results (PR41259)"

This was reverted in r360086 as it was supected of causing mysterious test
failures internally. However, it was never concluded that this patch was the
root cause.

> The code was previously checking that candidates for sinking had exactly
> one use or were a store instruction (which can't have uses). This meant
> we could sink call instructions only if they had a use.
>
> That limitation seemed a bit arbitrary, so this patch changes it to
> "instruction has zero or one use" which seems more natural and removes
> the need to special-case stores.
>
> Differential revision: https://reviews.llvm.org/D59936

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361811 91177308-0d34-0410-b5e6-96231b3b80d8
test/CodeGenCXX/nrvo.cpp
test/CodeGenCXX/stack-reuse-exceptions.cpp
test/CodeGenObjC/exceptions.m