This change passes down ACT to SampleProfileLoader for the new PM. Also remove the default value for SampleProfileLoader class as it is not used.
Name = SampleProfileFile ? Looking below, this is a separate refactoring. Perhaps separate the two out? Otherwise, at least make the desccription clear that there are two different refactoring.
Any reason why you want a named temporary?
Since ACT is an immutable pass that doesn't require the module, you can move the initialization of ACT to the constructor of the legacy pass.
you don't need the std::function here. Just use auto.