This avoids unnecessary instrumentation.
What do you mean gone? Can you show me the patch?
We probably needs something to add analysis for HWASAN as well.
In case of legacy pass? Correct. I don't think we need to over optimize this deprecated case which is going to be removed at some point anyway.
For new PM it's irrelevant as it's does not declare requirements in advance.
@eugenis unrelated to the patch, but why do we this args if then we assert(!CompileKernel || Recover);
you don't need to hardcode local path here
would be nice to have also function which have __hwasan_generate_tag in either case to make sure
usually we remove irrelevant attributes #* and module flags !* to make test simpler
Thanks. I've misread the expression.
I like this even less than "plumbing", if you need shouldUseStackSafetyAnalysis please just pass Triple as in earlier versions.
Why do you need to avoid loading analysis? Revert does not explain what is broken.
I am still looking at the breakage. But if you looked at the logic before, there was the case DisableOptimization BUT ClUseStackAnalysis being explicitly set, which made us try to getAnalysis without having required it here.
I also like the plumbing more than this, but changed to this to see what you think.
Because ClUseStackSafety defaults to true, so this will be quite useless except if the user explicitly sets it to false. So then you end up duplicating the logic in shouldUseStackSafetyAnalysis, which is why I went for the Dummy (thinking about it, we don't actually need to setArch on it).
Sorry. broke a buildbot again: https://lab.llvm.org/buildbot/#/builders/139/builds/7613/steps/6/logs/FAIL__Clang__asan_c
I am not sure why I cannot reproduce this locally.
Pass 'HWAddressSanitizer' is not initialized. Verify if there is a pass dependency cycle. Required Passes: clang: /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:715: void llvm::PMTopLevelManager::schedulePass(llvm::Pass*): Assertion `PI && "Expected required passes to be initialized"' failed. PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.