[llvm][ir] Purge MD_prof custom accessors
authorChristian Ulmann <christian.ulmann@nextsilicon.com>
Thu, 19 Jan 2023 11:04:53 +0000 (12:04 +0100)
committerChristian Ulmann <christian.ulmann@nextsilicon.com>
Thu, 19 Jan 2023 13:26:26 +0000 (14:26 +0100)
commite741b8c2e5200269f846bdd88ca98e44681fe8df
tree633474d1ab03298472179373e5b21ea8c9ec1e05
parent7e5681cf295a267de0b8c2216f049d0285a73c4c
[llvm][ir] Purge MD_prof custom accessors

This commit purges direct accesses to MD_prof metadata and replaces them
with the accessors provided from the utility file wherever possible.
This commit can be seen as the first step towards switching the branch weights to 64 bits.
See post here: https://discourse.llvm.org/t/extend-md-prof-branch-weights-metadata-from-32-to-64-bits/67492

Reviewed By: davidxl, paulkirth

Differential Revision: https://reviews.llvm.org/D141393
13 files changed:
llvm/include/llvm/Analysis/CFGPrinter.h
llvm/include/llvm/IR/Instructions.h
llvm/include/llvm/IR/ProfDataUtils.h
llvm/lib/Analysis/BranchProbabilityInfo.cpp
llvm/lib/IR/Instruction.cpp
llvm/lib/IR/Instructions.cpp
llvm/lib/IR/Metadata.cpp
llvm/lib/IR/ProfDataUtils.cpp
llvm/lib/Transforms/IPO/PartialInlining.cpp
llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
llvm/lib/Transforms/Scalar/JumpThreading.cpp
llvm/lib/Transforms/Scalar/LoopPredication.cpp
llvm/lib/Transforms/Utils/Local.cpp