forked from OSchip/llvm-project
Added code that ensures that we don't try to reduce an empty vector of basic
blocks. This fixes the bugpoint regressions. llvm-svn: 7569
This commit is contained in:
parent
22c550e442
commit
fe69bc502d
|
|
@ -142,7 +142,7 @@ public:
|
||||||
|
|
||||||
virtual TestResult doTest(std::vector<BasicBlock*> &Prefix,
|
virtual TestResult doTest(std::vector<BasicBlock*> &Prefix,
|
||||||
std::vector<BasicBlock*> &Kept) {
|
std::vector<BasicBlock*> &Kept) {
|
||||||
if (TestBlocks(Kept))
|
if (!Kept.empty() && TestBlocks(Kept))
|
||||||
return KeepSuffix;
|
return KeepSuffix;
|
||||||
if (!Prefix.empty() && TestBlocks(Prefix))
|
if (!Prefix.empty() && TestBlocks(Prefix))
|
||||||
return KeepPrefix;
|
return KeepPrefix;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue