https://github.com/lukel97 approved this pull request. Rest of this PR LGTM. My opinion is that we should still pull the subtarget checks out before we any of the `getAnalysis` calls but I'll leave it up to you https://github.com/llvm/llvm-project/pull/235407