[llvm] 211117b - [NFC][MLInliner] remove curly braces for a few sinle-line loops

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 09:33:01 PDT 2020


Author: Mircea Trofin
Date: 2020-08-10T09:32:21-07:00
New Revision: 211117b66029f974c059366003c236713adfcfcb

URL: https://github.com/llvm/llvm-project/commit/211117b66029f974c059366003c236713adfcfcb
DIFF: https://github.com/llvm/llvm-project/commit/211117b66029f974c059366003c236713adfcfcb.diff

LOG: [NFC][MLInliner] remove curly braces for a few sinle-line loops

Added: 
    

Modified: 
    llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp b/llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp
index 6c0fa7a624e6..b20f9427525a 100644
--- a/llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp
+++ b/llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp
@@ -350,17 +350,16 @@ class ModelUnderTrainingRunner final : public MLModelRunner {
 
 TrainingLogger::TrainingLogger(StringRef LogFileName)
     : LogFileName(LogFileName) {
-  for (size_t I = 0; I < NumberOfFeatures; ++I) {
+  for (size_t I = 0; I < NumberOfFeatures; ++I)
     Features.push_back(InlineFeatures());
-  }
 }
 
 /// Log one inlining event.
 void TrainingLogger::logInlineEvent(const InlineEvent &Event,
                                     const MLModelRunner &ModelRunner) {
-  for (size_t I = 0; I < NumberOfFeatures; ++I) {
+  for (size_t I = 0; I < NumberOfFeatures; ++I)
     Features[I].push_back(ModelRunner.getFeature(I));
-  }
+
   Decisions.push_back(Event.AdvisedDecision);
   Effects.push_back(Event.Effect);
   Rewards.push_back(Event.Reward);


        


More information about the llvm-commits mailing list