diff options
author | Adam Nemet <anemet@apple.com> | 2018-02-24 17:29:09 +0000 |
---|---|---|
committer | Adam Nemet <anemet@apple.com> | 2018-02-24 17:29:09 +0000 |
commit | e4e1de60aad588eef8e564fd3b6f00cf2b9e3311 (patch) | |
tree | 266bc1c7bd08bc27327bcd4edd179e1a96ff3f7c /llvm/lib | |
parent | 38bbc16a8b1eb04fca23485af441e3282301d885 (diff) | |
download | bcm5719-llvm-e4e1de60aad588eef8e564fd3b6f00cf2b9e3311.tar.gz bcm5719-llvm-e4e1de60aad588eef8e564fd3b6f00cf2b9e3311.zip |
Revert "StructurizeCFG: Test for branch divergence correctly"
This reverts commit r325881.
Breaks many bots
llvm-svn: 326037
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Scalar/StructurizeCFG.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp b/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp index dc4d1f73f87..b8fb80b6cc2 100644 --- a/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp +++ b/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp @@ -55,12 +55,6 @@ static const char *const FlowBlockName = "Flow"; namespace { -static cl::opt<bool> ForceSkipUniformRegions( - "structurizecfg-skip-uniform-regions", - cl::Hidden, - cl::desc("Force whether the StructurizeCFG pass skips uniform regions"), - cl::init(false)); - // Definition of the complex types used in this pass. using BBValuePair = std::pair<BasicBlock *, Value *>; @@ -248,11 +242,8 @@ class StructurizeCFG : public RegionPass { public: static char ID; - explicit StructurizeCFG(bool SkipUniformRegions_ = false) - : RegionPass(ID), - SkipUniformRegions(SkipUniformRegions_) { - if (ForceSkipUniformRegions.getNumOccurrences()) - SkipUniformRegions = ForceSkipUniformRegions.getValue(); + explicit StructurizeCFG(bool SkipUniformRegions = false) + : RegionPass(ID), SkipUniformRegions(SkipUniformRegions) { initializeStructurizeCFGPass(*PassRegistry::getPassRegistry()); } @@ -894,7 +885,7 @@ static bool hasOnlyUniformBranches(const Region *R, if (!Br || !Br->isConditional()) continue; - if (!DA.isUniform(Br)) + if (!DA.isUniform(Br->getCondition())) return false; DEBUG(dbgs() << "BB: " << BB->getName() << " has uniform terminator\n"); } |