[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:40:10 PDT 2024
================
@@ -2326,6 +2327,9 @@ PreservedAnalyses SampleProfileLoaderPass::run(Module &M,
if (!FS)
FS = vfs::getRealFileSystem();
+ if (!DisableSampleLoaderInlining.getNumOccurrences() &&
+ DisableSampleProfileInlining)
+ DisableSampleLoaderInlining = true;
----------------
MatzeB wrote:
oh I think I misread the variables names. This actually changes the `cl::opt` setting based on the class parameter... I think that is dangerous then. In a ThinLTO or similar setting we could have multiple threads / LLVMContexts using different settings so we shouldn't just change the global variables IMO
https://github.com/llvm/llvm-project/pull/113985
More information about the llvm-commits
mailing list