[llvm] 0f17499 - [CodeGen][NFC] Remove stray SDag BFI computation with NewPM (#208181)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 8 03:49:24 PDT 2026


Author: Alexis Engelke
Date: 2026-07-08T12:49:18+02:00
New Revision: 0f174998859cfaa48e848bb44400522acd0c4dc3

URL: https://github.com/llvm/llvm-project/commit/0f174998859cfaa48e848bb44400522acd0c4dc3
DIFF: https://github.com/llvm/llvm-project/commit/0f174998859cfaa48e848bb44400522acd0c4dc3.diff

LOG: [CodeGen][NFC] Remove stray SDag BFI computation with NewPM (#208181)

This looks like an accident -- there's no need to compute the
BlockFrequencyInfo unconditionally and then discarding it. After this,
enabling the NewPM CodeGen pipeline is faster than the legacy PM.

Added: 
    

Modified: 
    llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 5ae52cae771fb..bbc825bdd6999 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -491,7 +491,6 @@ void SelectionDAGISel::initializeAnalysisResults(
   AC = &FAM.getResult<AssumptionAnalysis>(Fn);
   auto *PSI = MAMP.getCachedResult<ProfileSummaryAnalysis>(*Fn.getParent());
   BlockFrequencyInfo *BFI = nullptr;
-  FAM.getResult<BlockFrequencyAnalysis>(Fn);
   if (PSI && PSI->hasProfileSummary() && RegisterPGOPasses)
     BFI = &FAM.getResult<BlockFrequencyAnalysis>(Fn);
 


        


More information about the llvm-commits mailing list