commit | 6cceb12d56275fc4914378c211e855118cdd14ef | [log] [tgz] |
---|---|---|
author | Benjamin Kramer <benny.kra@googlemail.com> | Sat Oct 15 13:15:05 2016 +0000 |
committer | Benjamin Kramer <benny.kra@googlemail.com> | Sat Oct 15 13:15:05 2016 +0000 |
tree | 35efb0a4a9c5b4a61f9ec0fb0927a7ea704e3ef8 | |
parent | ce6100541e34a881edb20f16f96db068ea749839 [diff] |
[SimplifyCFG] Use the error checking provided by getPrevNode. BasicBlock::size is O(insts), making this loop O(blocks*insts), which can be really slow on generated code. getPrevNode already checks if we're at the beginning of the block and returns nullptr if so, just use that instead. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284303 91177308-0d34-0410-b5e6-96231b3b80d8