[llvm] r258636 - Don't check if a list is empty with ilist::size.
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 23 12:58:09 PST 2016
Author: d0k
Date: Sat Jan 23 14:58:09 2016
New Revision: 258636
URL: http://llvm.org/viewvc/llvm-project?rev=258636&view=rev
Log:
Don't check if a list is empty with ilist::size.
ilist::size() is O(n) while ilist::empty() is O(1)
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=258636&r1=258635&r2=258636&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Sat Jan 23 14:58:09 2016
@@ -1502,7 +1502,7 @@ SelectionDAGISel::FinishBasicBlock() {
// CodeGen Failure MBB if we have not codegened it yet.
MachineBasicBlock *FailureMBB = SDB->SPDescriptor.getFailureMBB();
- if (!FailureMBB->size()) {
+ if (FailureMBB->empty()) {
FuncInfo->MBB = FailureMBB;
FuncInfo->InsertPt = FailureMBB->end();
SDB->visitSPDescriptorFailure(SDB->SPDescriptor);
More information about the llvm-commits
mailing list