[PATCH] D43743: StructurizeCFG: Test for branch divergence correctly
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 26 08:10:46 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>();
----------------
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
Repository:
rL LLVM
https://reviews.llvm.org/D43743
More information about the llvm-commits
mailing list