[llvm][NFC] Refactor code to use ProfDataUtils
authorPaul Kirth <paulkirth@google.com>
Wed, 27 Jul 2022 21:44:24 +0000 (21:44 +0000)
committerPaul Kirth <paulkirth@google.com>
Wed, 3 Aug 2022 00:09:45 +0000 (00:09 +0000)
commitd434e40f398e3144c69d57d2a142d35e2f760a8e
tree00c21846399cb3514183698bee5e2e77c3a2acf7
parent6ac30fa6e94118613fd27f0fd896a86852eeea7a
[llvm][NFC] Refactor code to use ProfDataUtils

In this patch we replace common code patterns with the use of utility
functions for dealing with profiling metadata. There should be no change
in functionality, as the existing checks should be preserved in all
cases.

Reviewed By: bogner, davidxl

Differential Revision: https://reviews.llvm.org/D128860
15 files changed:
llvm/include/llvm/IR/Instruction.h
llvm/include/llvm/IR/ProfDataUtils.h
llvm/lib/Analysis/BranchProbabilityInfo.cpp
llvm/lib/CodeGen/CodeGenPrepare.cpp
llvm/lib/CodeGen/SelectOptimize.cpp
llvm/lib/IR/Metadata.cpp
llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
llvm/lib/Transforms/IPO/PartialInlining.cpp
llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
llvm/lib/Transforms/Scalar/JumpThreading.cpp
llvm/lib/Transforms/Utils/LoopPeel.cpp
llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
llvm/lib/Transforms/Utils/LoopUtils.cpp
llvm/lib/Transforms/Utils/MisExpect.cpp
llvm/lib/Transforms/Utils/SimplifyCFG.cpp