]> granicus.if.org Git - llvm/commit
Re-commit r357452: SimplifyCFG SinkCommonCodeFromPredecessors: Also sink function...
authorHans Wennborg <hans@hanshq.net>
Tue, 16 Apr 2019 12:13:25 +0000 (12:13 +0000)
committerHans Wennborg <hans@hanshq.net>
Tue, 16 Apr 2019 12:13:25 +0000 (12:13 +0000)
commita2389c7d86cbc8ceed7a1c4d5bf51d3cfa1f5e25
tree7b1bae936b3edd65a76493ab00cdeba1841d328f
parent7c29aa76245c7e42d15f8eb826056eec996e226a
Re-commit r357452: SimplifyCFG SinkCommonCodeFromPredecessors: Also sink function calls without used results (PR41259)

The original commit caused false positives from AddressSanitizer's
use-after-scope checks, which have now been fixed in r358478.

> 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/llvm/trunk@358483 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/SimplifyCFG.cpp
test/CodeGen/AArch64/max-jump-table.ll
test/CodeGen/AArch64/min-jump-table.ll
test/CodeGen/AArch64/win64-jumptable.ll
test/CodeGen/ARM/cmpxchg-idioms.ll
test/Transforms/SimplifyCFG/sink-common-code.ll