diff options
author | Chris Lattner <sabre@nondot.org> | 2002-04-09 19:46:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-04-09 19:46:27 +0000 |
commit | b62fc4a9b11662ec2c5fa190b513eae0a0810ce1 (patch) | |
tree | e281c946bd6e0e39a02e54c0200b20dbd6091817 /lib/Target | |
parent | 4674804d298d4afba7c2a66b28d7899d9e7f5474 (diff) | |
download | external_llvm-b62fc4a9b11662ec2c5fa190b513eae0a0810ce1.zip external_llvm-b62fc4a9b11662ec2c5fa190b513eae0a0810ce1.tar.gz external_llvm-b62fc4a9b11662ec2c5fa190b513eae0a0810ce1.tar.bz2 |
Eliminate unneccesary extraneous iterators
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2215 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/SparcV9/SparcV9RegInfo.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/Target/SparcV9/SparcV9RegInfo.cpp b/lib/Target/SparcV9/SparcV9RegInfo.cpp index b5eef09..027e14f 100644 --- a/lib/Target/SparcV9/SparcV9RegInfo.cpp +++ b/lib/Target/SparcV9/SparcV9RegInfo.cpp @@ -342,13 +342,10 @@ void UltraSparcRegInfo::suggestRegs4MethodArgs(const Function *Meth, // get the argument list const Function::ArgumentListType& ArgList = Meth->getArgumentList(); // get an iterator to arg list - Function::ArgumentListType::const_iterator ArgIt = ArgList.begin(); - // for each argument - for( unsigned argNo=0; ArgIt != ArgList.end() ; ++ArgIt, ++argNo) { - + for( unsigned argNo=0; argNo != ArgList.size(); ++argNo) { // get the LR of arg - LiveRange *const LR = LRI.getLiveRangeForValue((const Value *) *ArgIt); + LiveRange *LR = LRI.getLiveRangeForValue((const Value *)ArgList[argNo]); assert( LR && "No live range found for method arg"); unsigned RegType = getRegType( LR ); @@ -391,15 +388,12 @@ void UltraSparcRegInfo::colorMethodArgs(const Function *Meth, // get the argument list const Function::ArgumentListType& ArgList = Meth->getArgumentList(); // get an iterator to arg list - Function::ArgumentListType::const_iterator ArgIt = ArgList.begin(); MachineInstr *AdMI; - // for each argument - for( unsigned argNo=0; ArgIt != ArgList.end() ; ++ArgIt, ++argNo) { - + for( unsigned argNo=0; argNo != ArgList.size(); ++argNo) { // get the LR of arg - LiveRange *LR = LRI.getLiveRangeForValue(*ArgIt); + LiveRange *LR = LRI.getLiveRangeForValue((Value*)ArgList[argNo]); assert( LR && "No live range found for method arg"); |