[llvm] [SampleFDO] Support enabling sample loader pass in O0 mode (PR #113985)
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 1 14:37:07 PDT 2024
================
@@ -2326,6 +2327,9 @@ PreservedAnalyses SampleProfileLoaderPass::run(Module &M,
if (!FS)
FS = vfs::getRealFileSystem();
+ if (!DisableSampleLoaderInlining.getNumOccurrences() &&
+ DisableSampleProfileInlining)
+ DisableSampleLoaderInlining = true;
----------------
MatzeB wrote:
I think this mixes up global variable and class field and may be good to allow setting true and false from command line?
```suggestion
if (!::DisableSampleLoaderInlining.getNumOccurrences())
this->DisableSampleLoaderInlining = ::DisableSampleLoaderInlining;
```
https://github.com/llvm/llvm-project/pull/113985
More information about the llvm-commits
mailing list