SIL: Move SILGen and passes over to use "builtin" instead of "apply (builtin_function_ref)".

Swift SVN r22785
This commit is contained in:
Joe Groff
2014-10-15 23:37:22 +00:00
parent 8a27fb8178
commit e3f9a2035c
96 changed files with 1119 additions and 1533 deletions

View File

@@ -583,13 +583,12 @@ bool LSBBForwarder::optimize(AliasAnalysis *AA, PostDominanceInfo *PDI,
continue;
}
if (auto *AI = dyn_cast<ApplyInst>(Inst))
if (auto *BI = dyn_cast<BuiltinFunctionRefInst>(&*AI->getCallee()))
if (isReadNone(BI)) {
DEBUG(llvm::dbgs() << " Found readnone builtin, does not "
"affect loads and stores.\n");
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;
}
// All other instructions that read from the memory location of the store
// invalidates the store.