[PATCH] D36655: Move SampleProfileLoader pass before all simplification passes.
Dehao Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 13 15:49:56 PDT 2017
danielcdh added a comment.
In https://reviews.llvm.org/D36655#840188, @davidxl wrote:
> Is there a functional test case (i.e., better matching with this change)?
Looks like function tests like this is not welcomed in llvm/clang as unittests are supposed to test a single component instead of multiple components. Maybe we can make it into part of the test that we run outside of llvm/clang to validate performance?
> While it does not matter in the longer run, it is probably better to not diverge the sample PGO behavior of the new PM with legacy PM too much, so perhaps make the same change to legacy PM?
I just looked at the possibility of changing this in legacy PM, it will be non-trivial to do it because SampleProfileLoader pass is a module pass, which needs to run after AddDiscriminator pass, which is a function pass that runs in populateFunctionPassManager. And the simplification passes also runs in that function. We will need to break populateFunctionPassManager into 2 parts to invoke AddDiscriminator pass first, and then run SampleProfileLoader module pass, and then populateFunctionPassManager. Needs to change a lot across clang and llvm PassManagerBuilder.
https://reviews.llvm.org/D36655
More information about the llvm-commits
mailing list