projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bbdca3f
)
cache result of UI.getOperandNo() instead of calling it twice, it is cheaper this way
author
Gabor Greif
<ggreif@gmail.com>
Wed, 24 Mar 2010 10:12:54 +0000
(10:12 +0000)
committer
Gabor Greif
<ggreif@gmail.com>
Wed, 24 Mar 2010 10:12:54 +0000
(10:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99394
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Utils/AddrModeMatcher.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Utils/AddrModeMatcher.cpp
b/lib/Transforms/Utils/AddrModeMatcher.cpp
index be6b3834f27398cd49df9e835cf94ebf4d177adb..c70bab5492ef652cb6270ac7f7cde7a91b45a941 100644
(file)
--- a/
lib/Transforms/Utils/AddrModeMatcher.cpp
+++ b/
lib/Transforms/Utils/AddrModeMatcher.cpp
@@
-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;
}