ptx: PTXMachineFunctionInfo no longer sort registers and so should not use std::binary_search

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129908 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Che-Liang Chiou 2011-04-21 10:16:20 +00:00
parent 69ba413057
commit 4a17cad900

View File

@ -70,11 +70,12 @@ public:
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