diff options
author | Kazu Hirata <kazu@google.com> | 2021-01-12 21:43:50 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-01-12 21:43:50 -0800 |
commit | 8a20e2b3d3e149f9e40dc34673fce7953d985c24 (patch) | |
tree | 28a179996425ae6237e922771b424f982b1ccbc9 /llvm/lib/Transforms/Utils/InlineFunction.cpp | |
parent | 2c2d489b78c43072b65f3d8c88c91def4c69f320 (diff) | |
download | llvm-8a20e2b3d3e149f9e40dc34673fce7953d985c24.zip llvm-8a20e2b3d3e149f9e40dc34673fce7953d985c24.tar.gz llvm-8a20e2b3d3e149f9e40dc34673fce7953d985c24.tar.bz2 |
[llvm] Use Optional::getValueOr (NFC)
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineFunction.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index e480d7b..65bf6a3 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -1568,8 +1568,7 @@ static void updateCallProfile(Function *Callee, const ValueToValueMapTy &VMap, return; auto CallSiteCount = PSI ? PSI->getProfileCount(TheCall, CallerBFI) : None; int64_t CallCount = - std::min(CallSiteCount.hasValue() ? CallSiteCount.getValue() : 0, - CalleeEntryCount.getCount()); + std::min(CallSiteCount.getValueOr(0), CalleeEntryCount.getCount()); updateProfileCallee(Callee, -CallCount, &VMap); } |