[SimplifyCFG] Use hasNUses instead of comparing getNumUses to a constant."
authorCraig Topper <craig.topper@gmail.com>
Mon, 17 Apr 2017 22:13:00 +0000 (22:13 +0000)
committerCraig Topper <craig.topper@gmail.com>
Mon, 17 Apr 2017 22:13:00 +0000 (22:13 +0000)
commitc228068d909273b6ddca3f5bbd8bf26f7550d5f7
tree53a2a692a1d54ac1e96c54d3d5660f37c2aa76c6
parentfb289ecde06ab88e82701c8a386f960572d1a7bb
[SimplifyCFG] Use hasNUses instead of comparing getNumUses to a constant."

The use list is a linked list so getNumUses requires a linear scan through the whole list. hasNUses will stop scanning at N and see if that is the end.

llvm-svn: 300505
llvm/lib/Transforms/Utils/SimplifyCFG.cpp