[PATCH] D62656: Make SwitchInstProfUpdateWrapper safer
Yevgeny Rouban via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 30 06:03:01 PDT 2019
yrouban created this revision.
yrouban added reviewers: davidxl, nikic, reames, eraman, chandlerc.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
yrouban added a child revision: D62126: [CorrelatedValuePropagation] Fix prof branch_weights metadata handling for SwitchInst.
While prof branch_weights inconsistencies are being fixed patch by patch (pass by pass) we need //SwitchInstProfUpdateWrapper// to be safe with respect to inconsistent metadata that can come from passes that have not been fixed yet. See the bug found by @nikic in D62126 <https://reviews.llvm.org/D62126>.
This patch introduces one more state (called //Invalid//) to the wrapper class that allows users to work with the underlying //SwitchInst// ignoring the prof metadata changes.
Created a unit test for the //SwitchInstProfUpdateWrapper// class.
rG LLVM Github Monorepo
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8670 bytes
Desc: not available
More information about the llvm-commits