mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-30 20:34:21 +00:00
[ARM64,C++11] Range'ify use-lists iterators in address type promotion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206013 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e6cd1ac2d5
commit
a117c712c7
@ -214,10 +214,8 @@ ARM64AddressTypePromotion::shouldConsiderSExt(const Instruction *SExt) const {
|
||||
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::analyzeSExtension(Instructions &SExtInsts) {
|
||||
|
||||
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');
|
||||
|
Loading…
x
Reference in New Issue
Block a user