OSDN Git Service

Resubmit "[CorrelatedValuePropagation] Fix prof branch_weights metadata handling...
authorYevgeny Rouban <yevgeny.rouban@azul.com>
Wed, 5 Jun 2019 05:46:40 +0000 (05:46 +0000)
committerYevgeny Rouban <yevgeny.rouban@azul.com>
Wed, 5 Jun 2019 05:46:40 +0000 (05:46 +0000)
commitba07e9c75b68125d7eb3083eee9fc52e78407593
tree621abe759e797e35f931220194bccbfd8f94ac06
parent5d5e129235ad1dc8d106da56736853b1df15301b
Resubmit "[CorrelatedValuePropagation] Fix prof branch_weights metadata handling for SwitchInst"

This reverts commit 5b32f60ec31ce136edac6f693538aeb6039f4ad0.
The fix is in commit 4f9e68148bd0dada2d6997625432385918ac2e2c.

This patch fixes the CorrelatedValuePropagation pass to keep
prof branch_weights metadata of SwitchInst consistent.
It makes use of SwitchInstProfUpdateWrapper.
New tests are added.

Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D62126

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362583 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
test/Transforms/CorrelatedValuePropagation/profmd.ll [new file with mode: 0644]