[llvm-commits] [llvm] r129908 - /llvm/trunk/lib/Target/PTX/PTXMachineFunctionInfo.h
Che-Liang Chiou
clchiou at gmail.com
Thu Apr 21 03:16:20 PDT 2011
Author: clchiou
Date: Thu Apr 21 05:16:20 2011
New Revision: 129908
URL: http://llvm.org/viewvc/llvm-project?rev=129908&view=rev
Log:
ptx: PTXMachineFunctionInfo no longer sort registers and so should not use std::binary_search
Modified:
llvm/trunk/lib/Target/PTX/PTXMachineFunctionInfo.h
Modified: llvm/trunk/lib/Target/PTX/PTXMachineFunctionInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/PTXMachineFunctionInfo.h?rev=129908&r1=129907&r2=129908&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PTX/PTXMachineFunctionInfo.h (original)
+++ llvm/trunk/lib/Target/PTX/PTXMachineFunctionInfo.h Thu Apr 21 05:16:20 2011
@@ -70,11 +70,12 @@
unsigned retReg() const { return reg_ret; }
bool isArgReg(unsigned reg) const {
- return std::binary_search(reg_arg.begin(), reg_arg.end(), reg);
+ return std::find(reg_arg.begin(), reg_arg.end(), reg) != reg_arg.end();
}
bool isLocalVarReg(unsigned reg) const {
- return std::binary_search(reg_local_var.begin(), reg_local_var.end(), reg);
+ return std::find(reg_local_var.begin(), reg_local_var.end(), reg)
+ != reg_local_var.end();
}
}; // class PTXMachineFunctionInfo
} // namespace llvm
More information about the llvm-commits
mailing list