[PATCH] D114400: [SampleFDO] Compute BFI if the sample loader changes BPI in FSAFDO

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 23 15:40:19 PST 2021


hoy added inline comments.


================
Comment at: llvm/lib/CodeGen/MIRSampleProfile.cpp:318
+  if (Changed)
+    MBFI->calculate(MF, *MBFI->getMBPI(), *&getAnalysis<MachineLoopInfo>());
 
----------------
wenlei wrote:
> When profile loader leads to change, we should probably recalculate BFI. But should BFI calculation be done outside of sample loader given BFI is a separate analysis? The IR BFI is done outside of sample loader. 
> 
> It feels to me that updating MBFI inside sample loader kind of breaks the componentization. 
Normally you would mark this pass to not preserve BFI and rely on subsequent LazyBFI pass to update BFI automatically. But it's a bit special here in that we are using the BFI right after here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114400/new/

https://reviews.llvm.org/D114400



More information about the llvm-commits mailing list