Add [nonatomic] attribute to all SIL reference counting instructions.

This commit is contained in:
Roman Levenstein
2016-04-05 11:21:34 -07:00
parent ab8253cfde
commit 2e77b3990b
33 changed files with 441 additions and 206 deletions

View File

@@ -135,9 +135,10 @@ static FullApplySite speculateMonomorphicTarget(FullApplySite AI,
if (auto *Release =
dyn_cast<StrongReleaseInst>(std::next(Continue->begin()))) {
if (Release->getOperand() == CMI->getOperand()) {
VirtBuilder.createStrongRelease(Release->getLoc(), CMI->getOperand());
IdenBuilder.createStrongRelease(Release->getLoc(),
DownCastedClassInstance);
VirtBuilder.createStrongRelease(Release->getLoc(), CMI->getOperand(),
Atomicity::Atomic);
IdenBuilder.createStrongRelease(
Release->getLoc(), DownCastedClassInstance, Atomicity::Atomic);
Release->eraseFromParent();
}
}