OSDN Git Service

[CorrelatedValuePropagation] Fix prof branch_weights metadata handling for SwitchInst
authorYevgeny Rouban <yevgeny.rouban@azul.com>
Tue, 28 May 2019 11:33:50 +0000 (11:33 +0000)
committerYevgeny Rouban <yevgeny.rouban@azul.com>
Tue, 28 May 2019 11:33:50 +0000 (11:33 +0000)
commit689d9dc302a0dcd044f9d986cdec2ed3a2ccb3ef
treef7247f0e70c3e4a28fca6004e1806a28f9c4c53f
parentca8f172144cb287aa15e34abbd01c2c52525ced4
[CorrelatedValuePropagation] Fix prof branch_weights metadata handling for SwitchInst

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@361808 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
test/Transforms/CorrelatedValuePropagation/profmd.ll [new file with mode: 0644]