[llvm] r206013 - [ARM64, C++11] Range'ify use-lists iterators in address type promotion.
Jim Grosbach
grosbach at apple.com
Thu Apr 10 18:13:10 PDT 2014
Author: grosbach
Date: Thu Apr 10 20:13:10 2014
New Revision: 206013
URL: http://llvm.org/viewvc/llvm-project?rev=206013&view=rev
Log:
[ARM64,C++11] Range'ify use-lists iterators in address type promotion.
Modified:
llvm/trunk/lib/Target/ARM64/ARM64AddressTypePromotion.cpp
Modified: llvm/trunk/lib/Target/ARM64/ARM64AddressTypePromotion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM64/ARM64AddressTypePromotion.cpp?rev=206013&r1=206012&r2=206013&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM64/ARM64AddressTypePromotion.cpp (original)
+++ llvm/trunk/lib/Target/ARM64/ARM64AddressTypePromotion.cpp Thu Apr 10 20:13:10 2014
@@ -214,10 +214,8 @@ ARM64AddressTypePromotion::shouldConside
if (SExt->getType() != ConsideredSExtType)
return false;
- for (Value::const_use_iterator UseIt = SExt->use_begin(),
- EndUseIt = SExt->use_end();
- UseIt != EndUseIt; ++UseIt) {
- if (isa<GetElementPtrInst>(*UseIt))
+ for (const Use &U : SExt->uses()) {
+ if (isa<GetElementPtrInst>(*U))
return true;
}
@@ -438,10 +436,8 @@ void ARM64AddressTypePromotion::analyzeS
bool insert = false;
// #1.
- for (Value::use_iterator UseIt = SExt->use_begin(),
- EndUseIt = SExt->use_end();
- UseIt != EndUseIt; ++UseIt) {
- const Instruction *Inst = dyn_cast<GetElementPtrInst>(*UseIt);
+ for (const Use &U : SExt->uses()) {
+ const Instruction *Inst = dyn_cast<GetElementPtrInst>(U);
if (Inst && Inst->getNumOperands() > 2) {
DEBUG(dbgs() << "Interesting use in GetElementPtrInst\n" << *Inst
<< '\n');
More information about the llvm-commits
mailing list