[PATCH] D43743: StructurizeCFG: Test for branch divergence correctly
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 26 09:35:19 PDT 2018
arsenm added inline comments.
================
Comment at: lib/Transforms/Scalar/StructurizeCFG.cpp:937-938
// TODO: We could probably be smarter here with how we handle sub-regions.
- auto &DA = getAnalysis<DivergenceAnalysis>();
- if (hasOnlyUniformBranches(R, DA)) {
+ unsigned UniformMDKindID =
+ R->getEntry()->getContext().getMDKindID("structurizecfg.uniform");
+ DA = &getAnalysis<DivergenceAnalysis>();
----------------
arsenm wrote:
> This seems to be increasing the reliance on metadata? Is this passing information from one RegionPass invocation to another? Metadata isn't really intended to be way to pass information like that
I have a patch to stop using a RegionPass and instead just use the RegionInfo directly in a FunctionPass. Would that help avoid this?
Repository:
rL LLVM
https://reviews.llvm.org/D43743
More information about the llvm-commits
mailing list