mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-23 05:52:40 +00:00
Don't track users of undef values; they aren't interesting for
register pressure. llvm-svn: 105501
This commit is contained in:
parent
8e3fbf47cb
commit
17ad6b5d21
@ -2095,8 +2095,12 @@ LSRInstance::CollectLoopInvariantFixupsAndFormulae() {
|
||||
} else if (const SCEVUnknown *U = dyn_cast<SCEVUnknown>(S)) {
|
||||
if (!Inserted.insert(U)) continue;
|
||||
const Value *V = U->getValue();
|
||||
if (const Instruction *Inst = dyn_cast<Instruction>(V))
|
||||
if (const Instruction *Inst = dyn_cast<Instruction>(V)) {
|
||||
// Look for instructions defined outside the loop.
|
||||
if (L->contains(Inst)) continue;
|
||||
} else if (isa<UndefValue>(V))
|
||||
// Undef doesn't have a live range, so it doesn't matter.
|
||||
continue;
|
||||
for (Value::const_use_iterator UI = V->use_begin(), UE = V->use_end();
|
||||
UI != UE; ++UI) {
|
||||
const Instruction *UserInst = dyn_cast<Instruction>(*UI);
|
||||
|
Loading…
x
Reference in New Issue
Block a user