[NFC] SwitchInst: Introduce wrapper for prof branch_weights handling
authorYevgeny Rouban <yevgeny.rouban@azul.com>
Fri, 24 May 2019 04:34:23 +0000 (04:34 +0000)
committerYevgeny Rouban <yevgeny.rouban@azul.com>
Fri, 24 May 2019 04:34:23 +0000 (04:34 +0000)
commitc652b3455ec55704f2e7d152fa7e4f45283b3258
tree233b1d74ff243f1afcbc25d1e071388f3e4baaeb
parent01d6173667f77722a31070fd186a50d3b3740207
[NFC] SwitchInst: Introduce wrapper for prof branch_weights handling

This patch introduces a wrapper class that re-implements
several mutator methods of SwitchInst to handle changes
of prof branch_weights metadata along with remove/add
switch case methods.
Subsequent patches will use this wrapper to implement
prof branch_weights metadata handling for SwitchInst.

Reviewers: davidx, eraman, reames, chandlerc
Reviewed By: davidx
Differential Revision: https://reviews.llvm.org/D62122

llvm-svn: 361596
llvm/include/llvm/IR/Instructions.h
llvm/lib/IR/Instructions.cpp