mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-08 19:25:47 +00:00
cache result of operator*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108147 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -230,8 +230,9 @@ static bool isSafeAndProfitableToSinkLoad(LoadInst *L) {
|
|||||||
bool isAddressTaken = false;
|
bool isAddressTaken = false;
|
||||||
for (Value::use_iterator UI = AI->use_begin(), E = AI->use_end();
|
for (Value::use_iterator UI = AI->use_begin(), E = AI->use_end();
|
||||||
UI != E; ++UI) {
|
UI != E; ++UI) {
|
||||||
if (isa<LoadInst>(UI)) continue;
|
User *U = *UI;
|
||||||
if (StoreInst *SI = dyn_cast<StoreInst>(*UI)) {
|
if (isa<LoadInst>(U)) continue;
|
||||||
|
if (StoreInst *SI = dyn_cast<StoreInst>(U)) {
|
||||||
// If storing TO the alloca, then the address isn't taken.
|
// If storing TO the alloca, then the address isn't taken.
|
||||||
if (SI->getOperand(1) == AI) continue;
|
if (SI->getOperand(1) == AI) continue;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user