mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +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 (UI.getOperandNo() == 0) return true; // Storing addr, not into addr.
|
||||
MemoryUses.push_back(std::make_pair(SI, UI.getOperandNo()));
|
||||
unsigned opNo = UI.getOperandNo();
|
||||
if (opNo == 0) return true; // Storing addr, not into addr.
|
||||
MemoryUses.push_back(std::make_pair(SI, opNo));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user