[llvm] [SampleFDO] Support enabling sample loader pass in O0 mode (PR #113985)

Lei Wang via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 1 14:57:26 PDT 2024


================
@@ -2326,6 +2327,9 @@ PreservedAnalyses SampleProfileLoaderPass::run(Module &M,
 
   if (!FS)
     FS = vfs::getRealFileSystem();
+  if (!DisableSampleLoaderInlining.getNumOccurrences() &&
+      DisableSampleProfileInlining)
+    DisableSampleLoaderInlining = true;
----------------
wlei-llvm wrote:

Ah, good point, I was to avoid setting the global variable in `PassBuilderPipelines.cpp`, so just learned this can also happen in the pass class. OK, I will try setting a class field.

https://github.com/llvm/llvm-project/pull/113985


More information about the llvm-commits mailing list