Nuke isReadNone function

We can now compute the same result with Inst.mayReadOrWriteMemory(). NFC.

Swift SVN r25743
This commit is contained in:
Arnold Schwaighofer
2015-03-04 05:03:45 +00:00
parent 951dc2875a
commit f7c01f2061
7 changed files with 13 additions and 51 deletions

View File

@@ -1092,12 +1092,11 @@ bool LSBBForwarder::optimize(LSContext &Ctx,
continue;
}
if (auto *BI = dyn_cast<BuiltinInst>(Inst))
if (isReadNone(BI)) {
DEBUG(llvm::dbgs() << " Found readnone builtin, does not "
"affect loads and stores.\n");
continue;
}
if (!Inst->mayReadOrWriteMemory()) {
DEBUG(llvm::dbgs() << " Found readnone instruction, does not "
"affect loads and stores.\n");
continue;
}
// All other instructions that read from the memory location of the store
// invalidates the store.