[PATCH] D99123: [SampleFDO] Flow Sensitive Sample FDO (FSAFDO)

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 22 20:57:45 PDT 2021


davidxl added inline comments.


================
Comment at: llvm/lib/CodeGen/TargetPassConfig.cpp:1178
+  if (EnableFSDiscriminator && !FSNoFinalDiscrim)
+    addPass(createAddFSDiscriminatorsPass(PASS_LAST_DIS_BIT_BEG,
+                                          PASS_LAST_DIS_BIT_END));
----------------
Is it necessary for this pass? BranchFolding does not create new clones, but merge them, so discriminator subsections can be reused (even though after the branch folding, some of the discriminator in that section gets removed)?


================
Comment at: llvm/lib/CodeGen/TargetPassConfig.cpp:1478
+    std::string FSFile = getFSProfileFile();
+    if (!FSFile.empty())
+      addPass(createFSProfileLoaderPass(FSFile, PASS_2_DIS_BIT_BEG,
----------------
I can see the importance of adding pass to add discriminator after MBP due to tail dup in MBP, but how important (performance wise) it is to load sample profile again for branch folding pass?


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

https://reviews.llvm.org/D99123



More information about the llvm-commits mailing list