[PATCH] D107878: [SampleFDO] Flow Sensitive Sample FDO (FSAFDO) profile loader

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 18 13:36:24 PDT 2021


wenlei accepted this revision.
wenlei added inline comments.


================
Comment at: llvm/lib/CodeGen/FlowSensitiveSampleProfile.cpp:293
+  Function &Func = F.getFunction();
+  clearFunctionData(false);
+  Samples = Reader->getSamplesFor(Func);
----------------
xur wrote:
> wenlei wrote:
> > xur wrote:
> > > wenlei wrote:
> > > > Why do we keep dominator tree and loop info?
> > > Profile loader does not invalid these infos (this is different in SampleLoader, where inline will change it)
> > This is still all per-function info, so it needs to be cleared before we use the profile loader to process the next function, right? or did i miss anything?
> We initialize these data structures per function in setInitVals(). Each function will have its own value and no need to clear. 
Ok, but resetting it isn't going to cause problem either, right? Just trying to understand if there's a correctness issue that requires not resetting these fields. If not, might as well not adding the special case and always reset/clear. Seem unnecessary to skip reset, but not a big deal though.


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

https://reviews.llvm.org/D107878



More information about the llvm-commits mailing list