diff options
Diffstat (limited to 'llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp')
| -rw-r--r-- | llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp b/llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp index ecfefa36918c..d87fa849d839 100644 --- a/llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp +++ b/llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp @@ -1,9 +1,8 @@ //===- DevelopmentModeInlineAdvisor.cpp - runtime-loadable model runner --===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // @@ -228,6 +227,8 @@ private: (*CallerSizeEstimateBefore + *CalleeSizeEstimateBefore); getAdvisor()->updateNativeSizeEstimate(Reward); log(Reward, /*Success=*/true); + } else { + log(NoReward, /*Success=*/true); } } @@ -377,7 +378,7 @@ void TrainingLogger::logInlineEvent(const InlineEvent &Event, void TrainingLogger::print() { std::error_code EC; raw_fd_ostream OutFile(LogFileName, EC); - L->print(OutFile); + L->flush(OutFile); } DevelopmentModeMLInlineAdvisor::DevelopmentModeMLInlineAdvisor( |
