[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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D62656
Files:
llvm/include/llvm/IR/Instructions.h
llvm/lib/IR/Instructions.cpp
llvm/unittests/IR/InstructionsTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62656.202166.patch
Type: text/x-patch
Size: 8670 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190530/28d9b2e3/attachment.bin>
More information about the llvm-commits
mailing list