aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopSimplify.cpp
diff options
context:
space:
mode:
authorWei Mi <wmi@google.com>2019-04-22 17:04:51 +0000
committerWei Mi <wmi@google.com>2019-04-22 17:04:51 +0000
commit01f8d556aa7274336f94afe6581bded378f3b4f4 (patch)
tree9600b79e316f6aa46746381943a760a06c25b4f2 /llvm/lib/Transforms/Utils/LoopSimplify.cpp
parent7cdec273ddac51fa002fb9eaaf36e274d311a856 (diff)
downloadllvm-01f8d556aa7274336f94afe6581bded378f3b4f4.zip
llvm-01f8d556aa7274336f94afe6581bded378f3b4f4.tar.gz
llvm-01f8d556aa7274336f94afe6581bded378f3b4f4.tar.bz2
[PGO/SamplePGO][NFC] Move the function updateProfWeight from Instruction
to CallInst. The issue was raised here: https://reviews.llvm.org/D60903#1472783 The function Instruction::updateProfWeight is only used for CallInst in profile update. From the current interface, it is very easy to think that the function can also be used for branch instruction. However, Branch instruction does't need the scaling the function provides for branch_weights and VP (value profile), in addition, scaling may introduce inaccuracy for branch probablity. The patch moves the function updateProfWeight from Instruction class to CallInst to remove the confusion. The patch also changes the scaling of branch_weights from a loop to a block because we know that ProfileData for branch_weights of CallInst will only have two operands at most. Differential Revision: https://reviews.llvm.org/D60911 llvm-svn: 358900
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopSimplify.cpp')
0 files changed, 0 insertions, 0 deletions