[PATCH] D80987: [Instruction] Remove setProfWeight()
Yevgeny Rouban via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 2 02:12:43 PDT 2020
yrouban created this revision.
yrouban added reviewers: reames, yamauchi, davidxl, xur.
Herald added subscribers: kuter, hiraditya.
Herald added a reviewer: jdoerfert.
Herald added a reviewer: sstefan1.
Herald added a project: LLVM.
Remove the function //Instruction::setProfWeight()// and make use of //Instruction::copyMetadata(.., {LLVMContext::MD_prof})//.
This is correct for all use cases of //setProfWeight()// as it is applied to CallBase instructions only.
This change results in prof metadata copied intact even if the source has "VP". The old pair of calls extractProfTotalWeight() + setProfWeight() resulted in setting branch_weights if the source had "VP" data.
This is a split part of D80618 <https://reviews.llvm.org/D80618>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D80987
Files:
llvm/include/llvm/IR/Instruction.h
llvm/lib/IR/Instruction.cpp
llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/test/Transforms/InstCombine/cast-call-combine-prof.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80987.267820.patch
Type: text/x-patch
Size: 4586 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200602/14dc8db1/attachment.bin>
More information about the llvm-commits
mailing list