mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
cache result of UI.getOperandNo() instead of calling it twice, it is cheaper this way
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99394 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bbdca3f68e
commit
5eff285d8d
@ -440,8 +440,9 @@ static bool FindAllMemoryUses(Instruction *I,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (StoreInst *SI = dyn_cast<StoreInst>(*UI)) {
|
if (StoreInst *SI = dyn_cast<StoreInst>(*UI)) {
|
||||||
if (UI.getOperandNo() == 0) return true; // Storing addr, not into addr.
|
unsigned opNo = UI.getOperandNo();
|
||||||
MemoryUses.push_back(std::make_pair(SI, UI.getOperandNo()));
|
if (opNo == 0) return true; // Storing addr, not into addr.
|
||||||
|
MemoryUses.push_back(std::make_pair(SI, opNo));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user