[PATCH] D107878: [SampleFDO] Flow Sensitive Sample FDO (FSAFDO) profile loader
Wei Mi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 12 14:56:32 PDT 2021
wmi added inline comments.
================
Comment at: llvm/lib/CodeGen/FlowSensitiveSampleProfile.cpp:242
+ continue;
+ BB->setSuccProbability(SI, NewProb);
+ bool Show = false;
----------------
Looks like the BB prob update shouldn't be guarded by ShowFSBranchProb.
================
Comment at: llvm/lib/CodeGen/FlowSensitiveSampleProfile.cpp:245-248
+ if (OldProb > NewProb)
+ Diff = OldProb - NewProb;
+ else
+ Diff = NewProb - OldProb;
----------------
Nit: Diff = std::abs(OldProb - NewProb);
================
Comment at: llvm/lib/CodeGen/FlowSensitiveSampleProfile.cpp:249-265
+ Show =
+ (Diff >= BranchProbability(FSProfileDebugProbDiffThreshold, 100));
+ Show &= (BBWeight_Orig >= FSProfileDebugBWThreshold);
+
+ auto DIL = BB->findBranchDebugLoc();
+ auto SuccDIL = Succ->findBranchDebugLoc();
+ if (Show) {
----------------
Enclose the block of debug output with LLVM_DEBUG({ ... }).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107878/new/
https://reviews.llvm.org/D107878
More information about the llvm-commits
mailing list