Followup to https://reviews.llvm.org/D64183, this seems to be one of the
analyses necessary for many of the passes that have not been converted
yet to the NewPM, and already converted but not scheduled?
It seems like this is the way those passes get access to the TargetMachine, if they need it.
Does this need some sort of test? I was experimenting with an external pass, which needed access to the TM from the NewPM, and it seemed to be functional in combination my custom module pass transform, such that this runs MyPass successfully:
opt --mtriple=x86_64-unknown-linux-gnu -enable-new-pm=1 --load-pass-plugin=libjulia-codegen%shlibext -passes='require<machine-module>,MyPass' -S