[clang] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 11 02:33:54 PDT 2023


nikic wrote:

> GVN seems to have different behavior regarding LoopInfo in the LegacyPM and NewPM, but that's an orthogonal issue. I'll check whether always requiring LoopInfo in GVN has any compile-time impact, as I don't think this is supposed to be an optional analysis there (otherwise loop load PRE is not going to work reliably).

I've checked, and LoopInfo is always available in pipeline positions where GVN runs, so this effectively has no impact. I've made it a required analysis for the NewPM as well in https://github.com/llvm/llvm-project/commit/fa5884770ab240139f33a8b2be801673ca21b9c0.


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


More information about the cfe-commits mailing list