Mercurial > hg > CbC > CbC_llvm
comparison lib/CodeGen/UnreachableBlockElim.cpp @ 83:60c9769439b8 LLVM3.7
LLVM 3.7
author | Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 18 Feb 2015 14:55:36 +0900 |
parents | 54457678186b |
children | afa8332a0e37 |
comparison
equal
deleted
inserted
replaced
78:af83660cff7b | 83:60c9769439b8 |
---|---|
86 // Actually remove the blocks now. | 86 // Actually remove the blocks now. |
87 for (unsigned i = 0, e = DeadBlocks.size(); i != e; ++i) { | 87 for (unsigned i = 0, e = DeadBlocks.size(); i != e; ++i) { |
88 DeadBlocks[i]->eraseFromParent(); | 88 DeadBlocks[i]->eraseFromParent(); |
89 } | 89 } |
90 | 90 |
91 return DeadBlocks.size(); | 91 return !DeadBlocks.empty(); |
92 } | 92 } |
93 | 93 |
94 | 94 |
95 namespace { | 95 namespace { |
96 class UnreachableMachineBlockElim : public MachineFunctionPass { | 96 class UnreachableMachineBlockElim : public MachineFunctionPass { |
202 } | 202 } |
203 } | 203 } |
204 | 204 |
205 F.RenumberBlocks(); | 205 F.RenumberBlocks(); |
206 | 206 |
207 return (DeadBlocks.size() || ModifiedPHI); | 207 return (!DeadBlocks.empty() || ModifiedPHI); |
208 } | 208 } |