[llvm] r349534 - Change the objc ARC optimizer to use the new objc.* intrinsics
Pete Cooper via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 18 12:32:50 PST 2018
Author: pete
Date: Tue Dec 18 12:32:49 2018
New Revision: 349534
URL: http://llvm.org/viewvc/llvm-project?rev=349534&view=rev
Log:
Change the objc ARC optimizer to use the new objc.* intrinsics
We're moving ARC optimisation and ARC emission in clang away from runtime methods
and towards intrinsics. This is the part which actually uses the intrinsics in the ARC
optimizer when both analyzing the existing calls and emitting new ones.
Differential Revision: https://reviews.llvm.org/D55348
Reviewers: ahatanak
Modified:
llvm/trunk/include/llvm/Analysis/ObjCARCAnalysisUtils.h
llvm/trunk/include/llvm/Analysis/ObjCARCInstKind.h
llvm/trunk/lib/Analysis/ObjCARCInstKind.cpp
llvm/trunk/lib/Transforms/ObjCARC/ARCRuntimeEntryPoints.h
llvm/trunk/lib/Transforms/ObjCARC/ObjCARCContract.cpp
llvm/trunk/test/Transforms/ObjCARC/allocas.ll
llvm/trunk/test/Transforms/ObjCARC/apelim.ll
llvm/trunk/test/Transforms/ObjCARC/basic.ll
llvm/trunk/test/Transforms/ObjCARC/cfg-hazards.ll
llvm/trunk/test/Transforms/ObjCARC/clang-arc-use-barrier.ll
llvm/trunk/test/Transforms/ObjCARC/comdat-ipo.ll
llvm/trunk/test/Transforms/ObjCARC/contract-catchswitch.ll
llvm/trunk/test/Transforms/ObjCARC/contract-end-of-use-list.ll
llvm/trunk/test/Transforms/ObjCARC/contract-marker-funclet.ll
llvm/trunk/test/Transforms/ObjCARC/contract-marker.ll
llvm/trunk/test/Transforms/ObjCARC/contract-replace-arg-use.ll
llvm/trunk/test/Transforms/ObjCARC/contract-storestrong-funclet.ll
llvm/trunk/test/Transforms/ObjCARC/contract-storestrong-ivar.ll
llvm/trunk/test/Transforms/ObjCARC/contract-storestrong.ll
llvm/trunk/test/Transforms/ObjCARC/contract-testcases.ll
llvm/trunk/test/Transforms/ObjCARC/contract.ll
llvm/trunk/test/Transforms/ObjCARC/empty-block.ll
llvm/trunk/test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll
llvm/trunk/test/Transforms/ObjCARC/escape.ll
llvm/trunk/test/Transforms/ObjCARC/expand.ll
llvm/trunk/test/Transforms/ObjCARC/funclet.ll
llvm/trunk/test/Transforms/ObjCARC/gvn.ll
llvm/trunk/test/Transforms/ObjCARC/intrinsic-use-isolated.ll
llvm/trunk/test/Transforms/ObjCARC/intrinsic-use.ll
llvm/trunk/test/Transforms/ObjCARC/invoke-2.ll
llvm/trunk/test/Transforms/ObjCARC/invoke.ll
llvm/trunk/test/Transforms/ObjCARC/move-and-form-retain-autorelease.ll
llvm/trunk/test/Transforms/ObjCARC/move-and-merge-autorelease.ll
llvm/trunk/test/Transforms/ObjCARC/nested.ll
llvm/trunk/test/Transforms/ObjCARC/opt-catchswitch.ll
llvm/trunk/test/Transforms/ObjCARC/path-overflow.ll
llvm/trunk/test/Transforms/ObjCARC/pointer-types.ll
llvm/trunk/test/Transforms/ObjCARC/post-inlining.ll
llvm/trunk/test/Transforms/ObjCARC/pr12270.ll
llvm/trunk/test/Transforms/ObjCARC/retain-block-side-effects.ll
llvm/trunk/test/Transforms/ObjCARC/retain-not-declared.ll
llvm/trunk/test/Transforms/ObjCARC/rle-s2l.ll
llvm/trunk/test/Transforms/ObjCARC/rv.ll
llvm/trunk/test/Transforms/ObjCARC/split-backedge.ll
llvm/trunk/test/Transforms/ObjCARC/tail-call-invariant-enforcement.ll
llvm/trunk/test/Transforms/ObjCARC/unsafe-claim-rv.ll
llvm/trunk/test/Transforms/ObjCARC/weak-contract.ll
llvm/trunk/test/Transforms/ObjCARC/weak-copies.ll
llvm/trunk/test/Transforms/ObjCARC/weak-dce.ll
llvm/trunk/test/Transforms/ObjCARC/weak.ll
Modified: llvm/trunk/include/llvm/Analysis/ObjCARCAnalysisUtils.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ObjCARCAnalysisUtils.h?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/ObjCARCAnalysisUtils.h (original)
+++ llvm/trunk/include/llvm/Analysis/ObjCARCAnalysisUtils.h Tue Dec 18 12:32:49 2018
@@ -51,25 +51,25 @@ extern bool EnableARCOpts;
/// on.
inline bool ModuleHasARC(const Module &M) {
return
- M.getNamedValue("objc_retain") ||
- M.getNamedValue("objc_release") ||
- M.getNamedValue("objc_autorelease") ||
- M.getNamedValue("objc_retainAutoreleasedReturnValue") ||
- M.getNamedValue("objc_unsafeClaimAutoreleasedReturnValue") ||
- M.getNamedValue("objc_retainBlock") ||
- M.getNamedValue("objc_autoreleaseReturnValue") ||
- M.getNamedValue("objc_autoreleasePoolPush") ||
- M.getNamedValue("objc_loadWeakRetained") ||
- M.getNamedValue("objc_loadWeak") ||
- M.getNamedValue("objc_destroyWeak") ||
- M.getNamedValue("objc_storeWeak") ||
- M.getNamedValue("objc_initWeak") ||
- M.getNamedValue("objc_moveWeak") ||
- M.getNamedValue("objc_copyWeak") ||
- M.getNamedValue("objc_retainedObject") ||
- M.getNamedValue("objc_unretainedObject") ||
- M.getNamedValue("objc_unretainedPointer") ||
- M.getNamedValue("clang.arc.use");
+ M.getNamedValue("llvm.objc.retain") ||
+ M.getNamedValue("llvm.objc.release") ||
+ M.getNamedValue("llvm.objc.autorelease") ||
+ M.getNamedValue("llvm.objc.retainAutoreleasedReturnValue") ||
+ M.getNamedValue("llvm.objc.unsafeClaimAutoreleasedReturnValue") ||
+ M.getNamedValue("llvm.objc.retainBlock") ||
+ M.getNamedValue("llvm.objc.autoreleaseReturnValue") ||
+ M.getNamedValue("llvm.objc.autoreleasePoolPush") ||
+ M.getNamedValue("llvm.objc.loadWeakRetained") ||
+ M.getNamedValue("llvm.objc.loadWeak") ||
+ M.getNamedValue("llvm.objc.destroyWeak") ||
+ M.getNamedValue("llvm.objc.storeWeak") ||
+ M.getNamedValue("llvm.objc.initWeak") ||
+ M.getNamedValue("llvm.objc.moveWeak") ||
+ M.getNamedValue("llvm.objc.copyWeak") ||
+ M.getNamedValue("llvm.objc.retainedObject") ||
+ M.getNamedValue("llvm.objc.unretainedObject") ||
+ M.getNamedValue("llvm.objc.unretainedPointer") ||
+ M.getNamedValue("llvm.objc.clang.arc.use");
}
/// This is a wrapper around getUnderlyingObject which also knows how to
Modified: llvm/trunk/include/llvm/Analysis/ObjCARCInstKind.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ObjCARCInstKind.h?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/ObjCARCInstKind.h (original)
+++ llvm/trunk/include/llvm/Analysis/ObjCARCInstKind.h Tue Dec 18 12:32:49 2018
@@ -11,6 +11,7 @@
#define LLVM_ANALYSIS_OBJCARCINSTKIND_H
#include "llvm/IR/Function.h"
+#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/Instructions.h"
namespace llvm {
@@ -48,7 +49,7 @@ enum class ARCInstKind {
CopyWeak, ///< objc_copyWeak (derived)
DestroyWeak, ///< objc_destroyWeak (derived)
StoreStrong, ///< objc_storeStrong (derived)
- IntrinsicUser, ///< clang.arc.use
+ IntrinsicUser, ///< llvm.objc.clang.arc.use
CallOrUser, ///< could call objc_release and/or "use" pointers
Call, ///< could call objc_release
User, ///< could "use" a pointer
Modified: llvm/trunk/lib/Analysis/ObjCARCInstKind.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ObjCARCInstKind.cpp?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ObjCARCInstKind.cpp (original)
+++ llvm/trunk/lib/Analysis/ObjCARCInstKind.cpp Tue Dec 18 12:32:49 2018
@@ -85,97 +85,73 @@ raw_ostream &llvm::objcarc::operator<<(r
}
ARCInstKind llvm::objcarc::GetFunctionClass(const Function *F) {
- Function::const_arg_iterator AI = F->arg_begin(), AE = F->arg_end();
- // No (mandatory) arguments.
- if (AI == AE)
- return StringSwitch<ARCInstKind>(F->getName())
- .Case("objc_autoreleasePoolPush", ARCInstKind::AutoreleasepoolPush)
- .Case("clang.arc.use", ARCInstKind::IntrinsicUser)
- .Default(ARCInstKind::CallOrUser);
-
- // One argument.
- const Argument *A0 = &*AI++;
- if (AI == AE) {
- // Argument is a pointer.
- PointerType *PTy = dyn_cast<PointerType>(A0->getType());
- if (!PTy)
- return ARCInstKind::CallOrUser;
-
- Type *ETy = PTy->getElementType();
- // Argument is i8*.
- if (ETy->isIntegerTy(8))
- return StringSwitch<ARCInstKind>(F->getName())
- .Case("objc_retain", ARCInstKind::Retain)
- .Case("objc_retainAutoreleasedReturnValue", ARCInstKind::RetainRV)
- .Case("objc_unsafeClaimAutoreleasedReturnValue", ARCInstKind::ClaimRV)
- .Case("objc_retainBlock", ARCInstKind::RetainBlock)
- .Case("objc_release", ARCInstKind::Release)
- .Case("objc_autorelease", ARCInstKind::Autorelease)
- .Case("objc_autoreleaseReturnValue", ARCInstKind::AutoreleaseRV)
- .Case("objc_autoreleasePoolPop", ARCInstKind::AutoreleasepoolPop)
- .Case("objc_retainedObject", ARCInstKind::NoopCast)
- .Case("objc_unretainedObject", ARCInstKind::NoopCast)
- .Case("objc_unretainedPointer", ARCInstKind::NoopCast)
- .Case("objc_retain_autorelease", ARCInstKind::FusedRetainAutorelease)
- .Case("objc_retainAutorelease", ARCInstKind::FusedRetainAutorelease)
- .Case("objc_retainAutoreleaseReturnValue",
- ARCInstKind::FusedRetainAutoreleaseRV)
- .Case("objc_sync_enter", ARCInstKind::User)
- .Case("objc_sync_exit", ARCInstKind::User)
- .Default(ARCInstKind::CallOrUser);
-
- // Argument is i8**
- if (PointerType *Pte = dyn_cast<PointerType>(ETy))
- if (Pte->getElementType()->isIntegerTy(8))
- return StringSwitch<ARCInstKind>(F->getName())
- .Case("objc_loadWeakRetained", ARCInstKind::LoadWeakRetained)
- .Case("objc_loadWeak", ARCInstKind::LoadWeak)
- .Case("objc_destroyWeak", ARCInstKind::DestroyWeak)
- .Default(ARCInstKind::CallOrUser);
-
- // Anything else with one argument.
+ Intrinsic::ID ID = F->getIntrinsicID();
+ switch (ID) {
+ default:
return ARCInstKind::CallOrUser;
+ case Intrinsic::objc_autorelease:
+ return ARCInstKind::Autorelease;
+ case Intrinsic::objc_autoreleasePoolPop:
+ return ARCInstKind::AutoreleasepoolPop;
+ case Intrinsic::objc_autoreleasePoolPush:
+ return ARCInstKind::AutoreleasepoolPush;
+ case Intrinsic::objc_autoreleaseReturnValue:
+ return ARCInstKind::AutoreleaseRV;
+ case Intrinsic::objc_copyWeak:
+ return ARCInstKind::CopyWeak;
+ case Intrinsic::objc_destroyWeak:
+ return ARCInstKind::DestroyWeak;
+ case Intrinsic::objc_initWeak:
+ return ARCInstKind::InitWeak;
+ case Intrinsic::objc_loadWeak:
+ return ARCInstKind::LoadWeak;
+ case Intrinsic::objc_loadWeakRetained:
+ return ARCInstKind::LoadWeakRetained;
+ case Intrinsic::objc_moveWeak:
+ return ARCInstKind::MoveWeak;
+ case Intrinsic::objc_release:
+ return ARCInstKind::Release;
+ case Intrinsic::objc_retain:
+ return ARCInstKind::Retain;
+ case Intrinsic::objc_retainAutorelease:
+ return ARCInstKind::FusedRetainAutorelease;
+ case Intrinsic::objc_retainAutoreleaseReturnValue:
+ return ARCInstKind::FusedRetainAutoreleaseRV;
+ case Intrinsic::objc_retainAutoreleasedReturnValue:
+ return ARCInstKind::RetainRV;
+ case Intrinsic::objc_retainBlock:
+ return ARCInstKind::RetainBlock;
+ case Intrinsic::objc_storeStrong:
+ return ARCInstKind::StoreStrong;
+ case Intrinsic::objc_storeWeak:
+ return ARCInstKind::StoreWeak;
+ case Intrinsic::objc_clang_arc_use:
+ return ARCInstKind::IntrinsicUser;
+ case Intrinsic::objc_unsafeClaimAutoreleasedReturnValue:
+ return ARCInstKind::ClaimRV;
+ case Intrinsic::objc_retainedObject:
+ return ARCInstKind::NoopCast;
+ case Intrinsic::objc_unretainedObject:
+ return ARCInstKind::NoopCast;
+ case Intrinsic::objc_unretainedPointer:
+ return ARCInstKind::NoopCast;
+ case Intrinsic::objc_retain_autorelease:
+ return ARCInstKind::FusedRetainAutorelease;
+ case Intrinsic::objc_sync_enter:
+ return ARCInstKind::User;
+ case Intrinsic::objc_sync_exit:
+ return ARCInstKind::User;
+ case Intrinsic::objc_arc_annotation_topdown_bbstart:
+ case Intrinsic::objc_arc_annotation_topdown_bbend:
+ case Intrinsic::objc_arc_annotation_bottomup_bbstart:
+ case Intrinsic::objc_arc_annotation_bottomup_bbend:
+ // Ignore annotation calls. This is important to stop the
+ // optimizer from treating annotations as uses which would
+ // make the state of the pointers they are attempting to
+ // elucidate to be incorrect.
+ return ARCInstKind::None;
}
-
- // Two arguments, first is i8**.
- const Argument *A1 = &*AI++;
- if (AI == AE)
- if (PointerType *PTy = dyn_cast<PointerType>(A0->getType()))
- if (PointerType *Pte = dyn_cast<PointerType>(PTy->getElementType()))
- if (Pte->getElementType()->isIntegerTy(8))
- if (PointerType *PTy1 = dyn_cast<PointerType>(A1->getType())) {
- Type *ETy1 = PTy1->getElementType();
- // Second argument is i8*
- if (ETy1->isIntegerTy(8))
- return StringSwitch<ARCInstKind>(F->getName())
- .Case("objc_storeWeak", ARCInstKind::StoreWeak)
- .Case("objc_initWeak", ARCInstKind::InitWeak)
- .Case("objc_storeStrong", ARCInstKind::StoreStrong)
- .Default(ARCInstKind::CallOrUser);
- // Second argument is i8**.
- if (PointerType *Pte1 = dyn_cast<PointerType>(ETy1))
- if (Pte1->getElementType()->isIntegerTy(8))
- return StringSwitch<ARCInstKind>(F->getName())
- .Case("objc_moveWeak", ARCInstKind::MoveWeak)
- .Case("objc_copyWeak", ARCInstKind::CopyWeak)
- // Ignore annotation calls. This is important to stop the
- // optimizer from treating annotations as uses which would
- // make the state of the pointers they are attempting to
- // elucidate to be incorrect.
- .Case("llvm.arc.annotation.topdown.bbstart",
- ARCInstKind::None)
- .Case("llvm.arc.annotation.topdown.bbend",
- ARCInstKind::None)
- .Case("llvm.arc.annotation.bottomup.bbstart",
- ARCInstKind::None)
- .Case("llvm.arc.annotation.bottomup.bbend",
- ARCInstKind::None)
- .Default(ARCInstKind::CallOrUser);
- }
-
- // Anything else.
- return ARCInstKind::CallOrUser;
}
// A whitelist of intrinsics that we know do not use objc pointers or decrement
Modified: llvm/trunk/lib/Transforms/ObjCARC/ARCRuntimeEntryPoints.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/ObjCARC/ARCRuntimeEntryPoints.h?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/ObjCARC/ARCRuntimeEntryPoints.h (original)
+++ llvm/trunk/lib/Transforms/ObjCARC/ARCRuntimeEntryPoints.h Tue Dec 18 12:32:49 2018
@@ -26,6 +26,7 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/DerivedTypes.h"
+#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/Support/ErrorHandling.h"
@@ -74,27 +75,27 @@ public:
switch (kind) {
case ARCRuntimeEntryPointKind::AutoreleaseRV:
- return getI8XRetI8XEntryPoint(AutoreleaseRV,
- "objc_autoreleaseReturnValue", true);
+ return getIntrinsicEntryPoint(AutoreleaseRV,
+ Intrinsic::objc_autoreleaseReturnValue);
case ARCRuntimeEntryPointKind::Release:
- return getVoidRetI8XEntryPoint(Release, "objc_release");
+ return getIntrinsicEntryPoint(Release, Intrinsic::objc_release);
case ARCRuntimeEntryPointKind::Retain:
- return getI8XRetI8XEntryPoint(Retain, "objc_retain", true);
+ return getIntrinsicEntryPoint(Retain, Intrinsic::objc_retain);
case ARCRuntimeEntryPointKind::RetainBlock:
- return getI8XRetI8XEntryPoint(RetainBlock, "objc_retainBlock", false);
+ return getIntrinsicEntryPoint(RetainBlock, Intrinsic::objc_retainBlock);
case ARCRuntimeEntryPointKind::Autorelease:
- return getI8XRetI8XEntryPoint(Autorelease, "objc_autorelease", true);
+ return getIntrinsicEntryPoint(Autorelease, Intrinsic::objc_autorelease);
case ARCRuntimeEntryPointKind::StoreStrong:
- return getI8XRetI8XXI8XEntryPoint(StoreStrong, "objc_storeStrong");
+ return getIntrinsicEntryPoint(StoreStrong, Intrinsic::objc_storeStrong);
case ARCRuntimeEntryPointKind::RetainRV:
- return getI8XRetI8XEntryPoint(RetainRV,
- "objc_retainAutoreleasedReturnValue", true);
+ return getIntrinsicEntryPoint(RetainRV,
+ Intrinsic::objc_retainAutoreleasedReturnValue);
case ARCRuntimeEntryPointKind::RetainAutorelease:
- return getI8XRetI8XEntryPoint(RetainAutorelease, "objc_retainAutorelease",
- true);
+ return getIntrinsicEntryPoint(RetainAutorelease,
+ Intrinsic::objc_retainAutorelease);
case ARCRuntimeEntryPointKind::RetainAutoreleaseRV:
- return getI8XRetI8XEntryPoint(RetainAutoreleaseRV,
- "objc_retainAutoreleaseReturnValue", true);
+ return getIntrinsicEntryPoint(RetainAutoreleaseRV,
+ Intrinsic::objc_retainAutoreleaseReturnValue);
}
llvm_unreachable("Switch should be a covered switch.");
@@ -131,54 +132,11 @@ private:
/// Declaration for objc_retainAutoreleaseReturnValue().
Constant *RetainAutoreleaseRV = nullptr;
- Constant *getVoidRetI8XEntryPoint(Constant *&Decl, StringRef Name) {
+ Constant *getIntrinsicEntryPoint(Constant *&Decl, Intrinsic::ID IntID) {
if (Decl)
return Decl;
- LLVMContext &C = TheModule->getContext();
- Type *Params[] = { PointerType::getUnqual(Type::getInt8Ty(C)) };
- AttributeList Attr = AttributeList().addAttribute(
- C, AttributeList::FunctionIndex, Attribute::NoUnwind);
- FunctionType *Fty = FunctionType::get(Type::getVoidTy(C), Params,
- /*isVarArg=*/false);
- return Decl = TheModule->getOrInsertFunction(Name, Fty, Attr);
- }
-
- Constant *getI8XRetI8XEntryPoint(Constant *&Decl, StringRef Name,
- bool NoUnwind = false) {
- if (Decl)
- return Decl;
-
- LLVMContext &C = TheModule->getContext();
- Type *I8X = PointerType::getUnqual(Type::getInt8Ty(C));
- Type *Params[] = { I8X };
- FunctionType *Fty = FunctionType::get(I8X, Params, /*isVarArg=*/false);
- AttributeList Attr = AttributeList();
-
- if (NoUnwind)
- Attr = Attr.addAttribute(C, AttributeList::FunctionIndex,
- Attribute::NoUnwind);
-
- return Decl = TheModule->getOrInsertFunction(Name, Fty, Attr);
- }
-
- Constant *getI8XRetI8XXI8XEntryPoint(Constant *&Decl, StringRef Name) {
- if (Decl)
- return Decl;
-
- LLVMContext &C = TheModule->getContext();
- Type *I8X = PointerType::getUnqual(Type::getInt8Ty(C));
- Type *I8XX = PointerType::getUnqual(I8X);
- Type *Params[] = { I8XX, I8X };
-
- AttributeList Attr = AttributeList().addAttribute(
- C, AttributeList::FunctionIndex, Attribute::NoUnwind);
- Attr = Attr.addParamAttribute(C, 0, Attribute::NoCapture);
-
- FunctionType *Fty = FunctionType::get(Type::getVoidTy(C), Params,
- /*isVarArg=*/false);
-
- return Decl = TheModule->getOrInsertFunction(Name, Fty, Attr);
+ return Decl = Intrinsic::getDeclaration(TheModule, IntID);
}
};
Modified: llvm/trunk/lib/Transforms/ObjCARC/ObjCARCContract.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/ObjCARC/ObjCARCContract.cpp?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/ObjCARC/ObjCARCContract.cpp (original)
+++ llvm/trunk/lib/Transforms/ObjCARC/ObjCARCContract.cpp Tue Dec 18 12:32:49 2018
@@ -522,7 +522,7 @@ bool ObjCARCContract::tryToPeepholeInstr
TailOkForStoreStrongs = false;
return true;
case ARCInstKind::IntrinsicUser:
- // Remove calls to @clang.arc.use(...).
+ // Remove calls to @llvm.objc.clang.arc.use(...).
Inst->eraseFromParent();
return true;
default:
Modified: llvm/trunk/test/Transforms/ObjCARC/allocas.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/allocas.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/allocas.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/allocas.ll Tue Dec 18 12:32:49 2018
@@ -1,13 +1,13 @@
; RUN: opt -objc-arc -S < %s | FileCheck %s
-declare i8* @objc_retain(i8*)
-declare i8* @objc_retainAutoreleasedReturnValue(i8*)
-declare void @objc_release(i8*)
-declare i8* @objc_autorelease(i8*)
-declare i8* @objc_autoreleaseReturnValue(i8*)
-declare void @objc_autoreleasePoolPop(i8*)
-declare i8* @objc_autoreleasePoolPush()
-declare i8* @objc_retainBlock(i8*)
+declare i8* @llvm.objc.retain(i8*)
+declare i8* @llvm.objc.retainAutoreleasedReturnValue(i8*)
+declare void @llvm.objc.release(i8*)
+declare i8* @llvm.objc.autorelease(i8*)
+declare i8* @llvm.objc.autoreleaseReturnValue(i8*)
+declare void @llvm.objc.autoreleasePoolPop(i8*)
+declare i8* @llvm.objc.autoreleasePoolPush()
+declare i8* @llvm.objc.retainBlock(i8*)
declare i8* @objc_retainedObject(i8*)
declare i8* @objc_unretainedObject(i8*)
@@ -25,7 +25,7 @@ declare void @use_alloca(i8**)
declare void @llvm.dbg.value(metadata, metadata, metadata)
-declare i8* @objc_msgSend(i8*, i8*, ...)
+declare i8* @llvm.objc.msgSend(i8*, i8*, ...)
; In the presence of allocas, unconditionally remove retain/release pairs only
@@ -44,77 +44,77 @@ declare i8* @objc_msgSend(i8*, i8*, ...)
; rdar://13750319
; CHECK: define void @test1a(i8* %x)
-; CHECK: @objc_retain(i8* %x)
-; CHECK: @objc_retain(i8* %x)
-; CHECK: @objc_release(i8* %y)
-; CHECK: @objc_release(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
+; CHECK: @llvm.objc.release(i8* %y)
+; CHECK: @llvm.objc.release(i8* %x)
; CHECK: ret void
; CHECK: }
define void @test1a(i8* %x) {
entry:
%A = alloca i8*
- tail call i8* @objc_retain(i8* %x)
- tail call i8* @objc_retain(i8* %x)
+ tail call i8* @llvm.objc.retain(i8* %x)
+ tail call i8* @llvm.objc.retain(i8* %x)
store i8* %x, i8** %A, align 8
%y = load i8*, i8** %A
call void @use_alloca(i8** %A)
- call void @objc_release(i8* %y), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %y), !clang.imprecise_release !0
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %x), !clang.imprecise_release !0
ret void
}
; CHECK: define void @test1b(i8* %x)
-; CHECK: @objc_retain(i8* %x)
-; CHECK: @objc_retain(i8* %x)
-; CHECK: @objc_release(i8* %y)
-; CHECK: @objc_release(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
+; CHECK: @llvm.objc.release(i8* %y)
+; CHECK: @llvm.objc.release(i8* %x)
; CHECK: ret void
; CHECK: }
define void @test1b(i8* %x) {
entry:
%A = alloca i8*
%gep = getelementptr i8*, i8** %A, i32 0
- tail call i8* @objc_retain(i8* %x)
- tail call i8* @objc_retain(i8* %x)
+ tail call i8* @llvm.objc.retain(i8* %x)
+ tail call i8* @llvm.objc.retain(i8* %x)
store i8* %x, i8** %gep, align 8
%y = load i8*, i8** %A
call void @use_alloca(i8** %A)
- call void @objc_release(i8* %y), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %y), !clang.imprecise_release !0
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %x), !clang.imprecise_release !0
ret void
}
; CHECK: define void @test1c(i8* %x)
-; CHECK: @objc_retain(i8* %x)
-; CHECK: @objc_retain(i8* %x)
-; CHECK: @objc_release(i8* %y)
-; CHECK: @objc_release(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
+; CHECK: @llvm.objc.release(i8* %y)
+; CHECK: @llvm.objc.release(i8* %x)
; CHECK: ret void
; CHECK: }
define void @test1c(i8* %x) {
entry:
%A = alloca i8*, i32 3
%gep = getelementptr i8*, i8** %A, i32 2
- tail call i8* @objc_retain(i8* %x)
- tail call i8* @objc_retain(i8* %x)
+ tail call i8* @llvm.objc.retain(i8* %x)
+ tail call i8* @llvm.objc.retain(i8* %x)
store i8* %x, i8** %gep, align 8
%y = load i8*, i8** %gep
call void @use_alloca(i8** %A)
- call void @objc_release(i8* %y), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %y), !clang.imprecise_release !0
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %x), !clang.imprecise_release !0
ret void
}
; CHECK: define void @test1d(i8* %x)
-; CHECK: @objc_retain(i8* %x)
-; CHECK: @objc_retain(i8* %x)
-; CHECK: @objc_release(i8* %y)
-; CHECK: @objc_release(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
+; CHECK: @llvm.objc.release(i8* %y)
+; CHECK: @llvm.objc.release(i8* %x)
; CHECK: ret void
; CHECK: }
define void @test1d(i8* %x) {
@@ -132,22 +132,22 @@ use_allocaB:
exit:
%A = phi i8** [ %allocaA, %use_allocaA ], [ %allocaB, %use_allocaB ]
%gep = getelementptr i8*, i8** %A, i32 0
- tail call i8* @objc_retain(i8* %x)
- tail call i8* @objc_retain(i8* %x)
+ tail call i8* @llvm.objc.retain(i8* %x)
+ tail call i8* @llvm.objc.retain(i8* %x)
store i8* %x, i8** %gep, align 8
%y = load i8*, i8** %gep
call void @use_alloca(i8** %A)
- call void @objc_release(i8* %y), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %y), !clang.imprecise_release !0
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %x), !clang.imprecise_release !0
ret void
}
; CHECK: define void @test1e(i8* %x)
-; CHECK: @objc_retain(i8* %x)
-; CHECK: @objc_retain(i8* %x)
-; CHECK: @objc_release(i8* %y)
-; CHECK: @objc_release(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
+; CHECK: @llvm.objc.release(i8* %y)
+; CHECK: @llvm.objc.release(i8* %x)
; CHECK: ret void
; CHECK: }
define void @test1e(i8* %x) {
@@ -165,22 +165,22 @@ use_allocaB:
exit:
%A = phi i8** [ %allocaA, %use_allocaA ], [ %allocaB, %use_allocaB ]
%gep = getelementptr i8*, i8** %A, i32 2
- tail call i8* @objc_retain(i8* %x)
- tail call i8* @objc_retain(i8* %x)
+ tail call i8* @llvm.objc.retain(i8* %x)
+ tail call i8* @llvm.objc.retain(i8* %x)
store i8* %x, i8** %gep, align 8
%y = load i8*, i8** %gep
call void @use_alloca(i8** %A)
- call void @objc_release(i8* %y), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %y), !clang.imprecise_release !0
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %x), !clang.imprecise_release !0
ret void
}
; CHECK: define void @test1f(i8* %x)
-; CHECK: @objc_retain(i8* %x)
-; CHECK: @objc_retain(i8* %x)
-; CHECK: @objc_release(i8* %y)
-; CHECK: @objc_release(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
+; CHECK: @llvm.objc.release(i8* %y)
+; CHECK: @llvm.objc.release(i8* %x)
; CHECK: ret void
; CHECK: }
define void @test1f(i8* %x) {
@@ -188,14 +188,14 @@ entry:
%allocaOne = alloca i8*
%allocaTwo = alloca i8*
%A = select i1 undef, i8** %allocaOne, i8** %allocaTwo
- tail call i8* @objc_retain(i8* %x)
- tail call i8* @objc_retain(i8* %x)
+ tail call i8* @llvm.objc.retain(i8* %x)
+ tail call i8* @llvm.objc.retain(i8* %x)
store i8* %x, i8** %A, align 8
%y = load i8*, i8** %A
call void @use_alloca(i8** %A)
- call void @objc_release(i8* %y), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %y), !clang.imprecise_release !0
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %x), !clang.imprecise_release !0
ret void
}
@@ -204,10 +204,10 @@ entry:
; CHECK: define void @test2a(i8* %x)
-; CHECK: @objc_retain(i8* %x)
-; CHECK: @objc_retain(i8* %x)
-; CHECK: @objc_release(i8* %y)
-; CHECK: @objc_release(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
+; CHECK: @llvm.objc.release(i8* %y)
+; CHECK: @llvm.objc.release(i8* %x)
; CHECK: ret void
; CHECK: }
define void @test2a(i8* %x) {
@@ -224,20 +224,20 @@ bb2:
br label %bb3
bb3:
- tail call i8* @objc_retain(i8* %x)
- tail call i8* @objc_retain(i8* %x)
+ tail call i8* @llvm.objc.retain(i8* %x)
+ tail call i8* @llvm.objc.retain(i8* %x)
call void @use_alloca(i8** %A)
- call void @objc_release(i8* %y), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %y), !clang.imprecise_release !0
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %x), !clang.imprecise_release !0
ret void
}
; CHECK: define void @test2b(i8* %x)
-; CHECK: @objc_retain(i8* %x)
-; CHECK: @objc_retain(i8* %x)
-; CHECK: @objc_release(i8* %y)
-; CHECK: @objc_release(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
+; CHECK: @llvm.objc.release(i8* %y)
+; CHECK: @llvm.objc.release(i8* %x)
; CHECK: ret void
; CHECK: }
define void @test2b(i8* %x) {
@@ -256,20 +256,20 @@ bb2:
br label %bb3
bb3:
- tail call i8* @objc_retain(i8* %x)
- tail call i8* @objc_retain(i8* %x)
+ tail call i8* @llvm.objc.retain(i8* %x)
+ tail call i8* @llvm.objc.retain(i8* %x)
call void @use_alloca(i8** %A)
- call void @objc_release(i8* %y), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %y), !clang.imprecise_release !0
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %x), !clang.imprecise_release !0
ret void
}
; CHECK: define void @test2c(i8* %x)
-; CHECK: @objc_retain(i8* %x)
-; CHECK: @objc_retain(i8* %x)
-; CHECK: @objc_release(i8* %y)
-; CHECK: @objc_release(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
+; CHECK: @llvm.objc.release(i8* %y)
+; CHECK: @llvm.objc.release(i8* %x)
; CHECK: ret void
; CHECK: }
define void @test2c(i8* %x) {
@@ -279,7 +279,7 @@ entry:
store i8* %x, i8** %gep1, align 8
%gep2 = getelementptr i8*, i8** %A, i32 2
%y = load i8*, i8** %gep2
- tail call i8* @objc_retain(i8* %x)
+ tail call i8* @llvm.objc.retain(i8* %x)
br label %bb1
bb1:
@@ -289,24 +289,24 @@ bb2:
br label %bb3
bb3:
- tail call i8* @objc_retain(i8* %x)
+ tail call i8* @llvm.objc.retain(i8* %x)
call void @use_alloca(i8** %A)
- call void @objc_release(i8* %y), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %y), !clang.imprecise_release !0
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %x), !clang.imprecise_release !0
ret void
}
; CHECK: define void @test2d(i8* %x)
-; CHECK: @objc_retain(i8* %x)
-; CHECK: @objc_retain(i8* %x)
-; CHECK: @objc_release(i8* %y)
-; CHECK: @objc_release(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
+; CHECK: @llvm.objc.release(i8* %y)
+; CHECK: @llvm.objc.release(i8* %x)
; CHECK: ret void
; CHECK: }
define void @test2d(i8* %x) {
entry:
- tail call i8* @objc_retain(i8* %x)
+ tail call i8* @llvm.objc.retain(i8* %x)
br label %bb1
bb1:
@@ -328,11 +328,11 @@ bb2:
bb3:
%A = phi i8** [ %Abb1, %bb1 ], [ %Abb2, %bb2 ]
%y = phi i8* [ %ybb1, %bb1 ], [ %ybb2, %bb2 ]
- tail call i8* @objc_retain(i8* %x)
+ tail call i8* @llvm.objc.retain(i8* %x)
call void @use_alloca(i8** %A)
- call void @objc_release(i8* %y), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %y), !clang.imprecise_release !0
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %x), !clang.imprecise_release !0
ret void
}
@@ -344,21 +344,21 @@ bb3:
; CHECK: define void @test3a() {
; CHECK: entry:
-; CHECK: @objc_retainAutoreleasedReturnValue
-; CHECK: @objc_retain
-; CHECK: @objc_retain
-; CHECK: @objc_retain
-; CHECK: @objc_retain
+; CHECK: @llvm.objc.retainAutoreleasedReturnValue
+; CHECK: @llvm.objc.retain
+; CHECK: @llvm.objc.retain
+; CHECK: @llvm.objc.retain
+; CHECK: @llvm.objc.retain
; CHECK: arraydestroy.body:
-; CHECK: @objc_release
-; CHECK-NOT: @objc_release
+; CHECK: @llvm.objc.release
+; CHECK-NOT: @llvm.objc.release
; CHECK: arraydestroy.done:
-; CHECK-NOT: @objc_release
+; CHECK-NOT: @llvm.objc.release
; CHECK: arraydestroy.body1:
-; CHECK: @objc_release
-; CHECK-NOT: @objc_release
+; CHECK: @llvm.objc.release
+; CHECK-NOT: @llvm.objc.release
; CHECK: arraydestroy.done1:
-; CHECK: @objc_release
+; CHECK: @llvm.objc.release
; CHECK: ret void
; CHECK: }
define void @test3a() {
@@ -367,22 +367,22 @@ entry:
%objs = alloca [2 x i8*], align 16
%call1 = call i8* @returner()
- %tmp0 = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %call1)
+ %tmp0 = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call1)
%objs.begin = getelementptr inbounds [2 x i8*], [2 x i8*]* %objs, i64 0, i64 0
- tail call i8* @objc_retain(i8* %call1)
+ tail call i8* @llvm.objc.retain(i8* %call1)
store i8* %call1, i8** %objs.begin, align 8
%objs.elt = getelementptr inbounds [2 x i8*], [2 x i8*]* %objs, i64 0, i64 1
- tail call i8* @objc_retain(i8* %call1)
+ tail call i8* @llvm.objc.retain(i8* %call1)
store i8* %call1, i8** %objs.elt
%call2 = call i8* @returner1()
%call3 = call i8* @returner2()
%keys.begin = getelementptr inbounds [2 x i8*], [2 x i8*]* %keys, i64 0, i64 0
- tail call i8* @objc_retain(i8* %call2)
+ tail call i8* @llvm.objc.retain(i8* %call2)
store i8* %call2, i8** %keys.begin, align 8
%keys.elt = getelementptr inbounds [2 x i8*], [2 x i8*]* %keys, i64 0, i64 1
- tail call i8* @objc_retain(i8* %call3)
+ tail call i8* @llvm.objc.retain(i8* %call3)
store i8* %call3, i8** %keys.elt
%gep = getelementptr inbounds [2 x i8*], [2 x i8*]* %objs, i64 0, i64 2
@@ -392,7 +392,7 @@ arraydestroy.body:
%arraydestroy.elementPast = phi i8** [ %gep, %entry ], [ %arraydestroy.element, %arraydestroy.body ]
%arraydestroy.element = getelementptr inbounds i8*, i8** %arraydestroy.elementPast, i64 -1
%destroy_tmp = load i8*, i8** %arraydestroy.element, align 8
- call void @objc_release(i8* %destroy_tmp), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %destroy_tmp), !clang.imprecise_release !0
%objs_ptr = getelementptr inbounds [2 x i8*], [2 x i8*]* %objs, i64 0, i64 0
%arraydestroy.cmp = icmp eq i8** %arraydestroy.element, %objs_ptr
br i1 %arraydestroy.cmp, label %arraydestroy.done, label %arraydestroy.body
@@ -405,13 +405,13 @@ arraydestroy.body1:
%arraydestroy.elementPast1 = phi i8** [ %gep1, %arraydestroy.done ], [ %arraydestroy.element1, %arraydestroy.body1 ]
%arraydestroy.element1 = getelementptr inbounds i8*, i8** %arraydestroy.elementPast1, i64 -1
%destroy_tmp1 = load i8*, i8** %arraydestroy.element1, align 8
- call void @objc_release(i8* %destroy_tmp1), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %destroy_tmp1), !clang.imprecise_release !0
%keys_ptr = getelementptr inbounds [2 x i8*], [2 x i8*]* %keys, i64 0, i64 0
%arraydestroy.cmp1 = icmp eq i8** %arraydestroy.element1, %keys_ptr
br i1 %arraydestroy.cmp1, label %arraydestroy.done1, label %arraydestroy.body1
arraydestroy.done1:
- call void @objc_release(i8* %call1), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %call1), !clang.imprecise_release !0
ret void
}
@@ -422,21 +422,21 @@ arraydestroy.done1:
; CHECK: define void @test3b() {
; CHECK: entry:
-; CHECK: @objc_retainAutoreleasedReturnValue
-; CHECK: @objc_retain
-; CHECK: @objc_retain
-; CHECK: @objc_retain
-; CHECK: @objc_retain
+; CHECK: @llvm.objc.retainAutoreleasedReturnValue
+; CHECK: @llvm.objc.retain
+; CHECK: @llvm.objc.retain
+; CHECK: @llvm.objc.retain
+; CHECK: @llvm.objc.retain
; CHECK: arraydestroy.body:
-; CHECK: @objc_release
-; CHECK-NOT: @objc_release
+; CHECK: @llvm.objc.release
+; CHECK-NOT: @llvm.objc.release
; CHECK: arraydestroy.done:
-; CHECK-NOT: @objc_release
+; CHECK-NOT: @llvm.objc.release
; CHECK: arraydestroy.body1:
-; CHECK: @objc_release
-; CHECK-NOT: @objc_release
+; CHECK: @llvm.objc.release
+; CHECK-NOT: @llvm.objc.release
; CHECK: arraydestroy.done1:
-; CHECK: @objc_release
+; CHECK: @llvm.objc.release
; CHECK: ret void
; CHECK: }
define void @test3b() {
@@ -445,23 +445,23 @@ entry:
%objs = alloca [2 x i8*], align 16
%call1 = call i8* @returner()
- %tmp0 = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %call1)
- %tmp1 = tail call i8* @objc_retain(i8* %call1)
+ %tmp0 = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call1)
+ %tmp1 = tail call i8* @llvm.objc.retain(i8* %call1)
%objs.begin = getelementptr inbounds [2 x i8*], [2 x i8*]* %objs, i64 0, i64 0
- tail call i8* @objc_retain(i8* %call1)
+ tail call i8* @llvm.objc.retain(i8* %call1)
store i8* %call1, i8** %objs.begin, align 8
%objs.elt = getelementptr inbounds [2 x i8*], [2 x i8*]* %objs, i64 0, i64 1
- tail call i8* @objc_retain(i8* %call1)
+ tail call i8* @llvm.objc.retain(i8* %call1)
store i8* %call1, i8** %objs.elt
%call2 = call i8* @returner1()
%call3 = call i8* @returner2()
%keys.begin = getelementptr inbounds [2 x i8*], [2 x i8*]* %keys, i64 0, i64 0
- tail call i8* @objc_retain(i8* %call2)
+ tail call i8* @llvm.objc.retain(i8* %call2)
store i8* %call2, i8** %keys.begin, align 8
%keys.elt = getelementptr inbounds [2 x i8*], [2 x i8*]* %keys, i64 0, i64 1
- tail call i8* @objc_retain(i8* %call3)
+ tail call i8* @llvm.objc.retain(i8* %call3)
store i8* %call3, i8** %keys.elt
%gep = getelementptr inbounds [2 x i8*], [2 x i8*]* %objs, i64 0, i64 2
@@ -471,7 +471,7 @@ arraydestroy.body:
%arraydestroy.elementPast = phi i8** [ %gep, %entry ], [ %arraydestroy.element, %arraydestroy.body ]
%arraydestroy.element = getelementptr inbounds i8*, i8** %arraydestroy.elementPast, i64 -1
%destroy_tmp = load i8*, i8** %arraydestroy.element, align 8
- call void @objc_release(i8* %destroy_tmp), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %destroy_tmp), !clang.imprecise_release !0
%objs_ptr = getelementptr inbounds [2 x i8*], [2 x i8*]* %objs, i64 0, i64 0
%arraydestroy.cmp = icmp eq i8** %arraydestroy.element, %objs_ptr
br i1 %arraydestroy.cmp, label %arraydestroy.done, label %arraydestroy.body
@@ -484,14 +484,14 @@ arraydestroy.body1:
%arraydestroy.elementPast1 = phi i8** [ %gep1, %arraydestroy.done ], [ %arraydestroy.element1, %arraydestroy.body1 ]
%arraydestroy.element1 = getelementptr inbounds i8*, i8** %arraydestroy.elementPast1, i64 -1
%destroy_tmp1 = load i8*, i8** %arraydestroy.element1, align 8
- call void @objc_release(i8* %destroy_tmp1), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %destroy_tmp1), !clang.imprecise_release !0
%keys_ptr = getelementptr inbounds [2 x i8*], [2 x i8*]* %keys, i64 0, i64 0
%arraydestroy.cmp1 = icmp eq i8** %arraydestroy.element1, %keys_ptr
br i1 %arraydestroy.cmp1, label %arraydestroy.done1, label %arraydestroy.body1
arraydestroy.done1:
- call void @objc_release(i8* %call1), !clang.imprecise_release !0
- call void @objc_release(i8* %call1), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %call1), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %call1), !clang.imprecise_release !0
ret void
}
Modified: llvm/trunk/test/Transforms/ObjCARC/apelim.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/apelim.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/apelim.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/apelim.ll Tue Dec 18 12:32:49 2018
@@ -31,25 +31,25 @@ entry:
; CHECK: }
define internal void @_GLOBAL__I_x() {
entry:
- %0 = call i8* @objc_autoreleasePoolPush() nounwind
+ %0 = call i8* @llvm.objc.autoreleasePoolPush() nounwind
call void @__cxx_global_var_init()
- call void @objc_autoreleasePoolPop(i8* %0) nounwind
+ call void @llvm.objc.autoreleasePoolPop(i8* %0) nounwind
ret void
}
; CHECK: define internal void @_GLOBAL__I_y() {
-; CHECK: %0 = call i8* @objc_autoreleasePoolPush() [[NUW:#[0-9]+]]
-; CHECK: call void @objc_autoreleasePoolPop(i8* %0) [[NUW]]
+; CHECK: %0 = call i8* @llvm.objc.autoreleasePoolPush() [[NUW:#[0-9]+]]
+; CHECK: call void @llvm.objc.autoreleasePoolPop(i8* %0) [[NUW]]
; CHECK: }
define internal void @_GLOBAL__I_y() {
entry:
- %0 = call i8* @objc_autoreleasePoolPush() nounwind
+ %0 = call i8* @llvm.objc.autoreleasePoolPush() nounwind
call void @__dxx_global_var_init()
- call void @objc_autoreleasePoolPop(i8* %0) nounwind
+ call void @llvm.objc.autoreleasePoolPop(i8* %0) nounwind
ret void
}
-declare i8* @objc_autoreleasePoolPush()
-declare void @objc_autoreleasePoolPop(i8*)
+declare i8* @llvm.objc.autoreleasePoolPush()
+declare void @llvm.objc.autoreleasePoolPop(i8*)
; CHECK: attributes #0 = { nounwind }
Modified: llvm/trunk/test/Transforms/ObjCARC/basic.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/basic.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/basic.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/basic.ll Tue Dec 18 12:32:49 2018
@@ -2,19 +2,19 @@
target datalayout = "e-p:64:64:64"
-declare i8* @objc_retain(i8*)
-declare i8* @objc_retainAutoreleasedReturnValue(i8*)
-declare i8* @objc_unsafeClaimAutoreleasedReturnValue(i8*)
-declare void @objc_release(i8*)
-declare i8* @objc_autorelease(i8*)
-declare i8* @objc_autoreleaseReturnValue(i8*)
-declare void @objc_autoreleasePoolPop(i8*)
-declare i8* @objc_autoreleasePoolPush()
-declare i8* @objc_retainBlock(i8*)
-
-declare i8* @objc_retainedObject(i8*)
-declare i8* @objc_unretainedObject(i8*)
-declare i8* @objc_unretainedPointer(i8*)
+declare i8* @llvm.objc.retain(i8*)
+declare i8* @llvm.objc.retainAutoreleasedReturnValue(i8*)
+declare i8* @llvm.objc.unsafeClaimAutoreleasedReturnValue(i8*)
+declare void @llvm.objc.release(i8*)
+declare i8* @llvm.objc.autorelease(i8*)
+declare i8* @llvm.objc.autoreleaseReturnValue(i8*)
+declare void @llvm.objc.autoreleasePoolPop(i8*)
+declare i8* @llvm.objc.autoreleasePoolPush()
+declare i8* @llvm.objc.retainBlock(i8*)
+
+declare i8* @llvm.objc.retainedObject(i8*)
+declare i8* @llvm.objc.unretainedObject(i8*)
+declare i8* @llvm.objc.unretainedPointer(i8*)
declare void @use_pointer(i8*)
declare void @callee()
@@ -25,19 +25,19 @@ declare void @bar(i32 ()*)
declare void @llvm.dbg.value(metadata, metadata, metadata)
-declare i8* @objc_msgSend(i8*, i8*, ...)
+declare i8* @llvm.objc.msgSend(i8*, i8*, ...)
; Simple retain+release pair deletion, with some intervening control
; flow and harmless instructions.
; CHECK: define void @test0_precise(i32* %x, i1 %p) [[NUW:#[0-9]+]] {
-; CHECK: @objc_retain
-; CHECK: @objc_release
+; CHECK: @llvm.objc.retain
+; CHECK: @llvm.objc.release
; CHECK: }
define void @test0_precise(i32* %x, i1 %p) nounwind {
entry:
%a = bitcast i32* %x to i8*
- %0 = call i8* @objc_retain(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %a) nounwind
br i1 %p, label %t, label %f
t:
@@ -52,17 +52,17 @@ f:
return:
%c = bitcast i32* %x to i8*
- call void @objc_release(i8* %c) nounwind
+ call void @llvm.objc.release(i8* %c) nounwind
ret void
}
; CHECK: define void @test0_imprecise(i32* %x, i1 %p) [[NUW]] {
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test0_imprecise(i32* %x, i1 %p) nounwind {
entry:
%a = bitcast i32* %x to i8*
- %0 = call i8* @objc_retain(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %a) nounwind
br i1 %p, label %t, label %f
t:
@@ -77,23 +77,23 @@ f:
return:
%c = bitcast i32* %x to i8*
- call void @objc_release(i8* %c) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %c) nounwind, !clang.imprecise_release !0
ret void
}
; Like test0 but the release isn't always executed when the retain is,
; so the optimization is not safe.
-; TODO: Make the objc_release's argument be %0.
+; TODO: Make the llvm.objc.release's argument be %0.
; CHECK: define void @test1_precise(i32* %x, i1 %p, i1 %q) [[NUW]] {
-; CHECK: @objc_retain(i8* %a)
-; CHECK: @objc_release
+; CHECK: @llvm.objc.retain(i8* %a)
+; CHECK: @llvm.objc.release
; CHECK: }
define void @test1_precise(i32* %x, i1 %p, i1 %q) nounwind {
entry:
%a = bitcast i32* %x to i8*
- %0 = call i8* @objc_retain(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %a) nounwind
br i1 %p, label %t, label %f
t:
@@ -109,7 +109,7 @@ f:
return:
%c = bitcast i32* %x to i8*
- call void @objc_release(i8* %c) nounwind
+ call void @llvm.objc.release(i8* %c) nounwind
ret void
alt_return:
@@ -117,13 +117,13 @@ alt_return:
}
; CHECK: define void @test1_imprecise(i32* %x, i1 %p, i1 %q) [[NUW]] {
-; CHECK: @objc_retain(i8* %a)
-; CHECK: @objc_release
+; CHECK: @llvm.objc.retain(i8* %a)
+; CHECK: @llvm.objc.release
; CHECK: }
define void @test1_imprecise(i32* %x, i1 %p, i1 %q) nounwind {
entry:
%a = bitcast i32* %x to i8*
- %0 = call i8* @objc_retain(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %a) nounwind
br i1 %p, label %t, label %f
t:
@@ -139,7 +139,7 @@ f:
return:
%c = bitcast i32* %x to i8*
- call void @objc_release(i8* %c) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %c) nounwind, !clang.imprecise_release !0
ret void
alt_return:
@@ -151,15 +151,15 @@ alt_return:
; CHECK: define void @test1b_precise(i8* %x, i1 %p, i1 %q) {
; CHECK: entry:
-; CHECK: tail call i8* @objc_retain(i8* %x) [[NUW]]
-; CHECK-NOT: @objc_
+; CHECK: tail call i8* @llvm.objc.retain(i8* %x) [[NUW]]
+; CHECK-NOT: @llvm.objc.
; CHECK: if.end5:
-; CHECK: tail call void @objc_release(i8* %x) [[NUW]]
-; CHECK-NOT: @objc_
+; CHECK: tail call void @llvm.objc.release(i8* %x) [[NUW]]
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test1b_precise(i8* %x, i1 %p, i1 %q) {
entry:
- tail call i8* @objc_retain(i8* %x) nounwind
+ tail call i8* @llvm.objc.retain(i8* %x) nounwind
br i1 %p, label %if.then, label %if.end
if.then: ; preds = %entry
@@ -174,21 +174,21 @@ if.then3:
br label %if.end5
if.end5: ; preds = %if.then3, %if.end
- tail call void @objc_release(i8* %x) nounwind
+ tail call void @llvm.objc.release(i8* %x) nounwind
ret void
}
; CHECK-LABEL: define void @test1b_imprecise(
; CHECK: entry:
-; CHECK: tail call i8* @objc_retain(i8* %x) [[NUW:#[0-9]+]]
-; CHECK-NOT: @objc_
+; CHECK: tail call i8* @llvm.objc.retain(i8* %x) [[NUW:#[0-9]+]]
+; CHECK-NOT: @llvm.objc.
; CHECK: if.end5:
-; CHECK: tail call void @objc_release(i8* %x) [[NUW]], !clang.imprecise_release ![[RELEASE:[0-9]+]]
-; CHECK-NOT: @objc_
+; CHECK: tail call void @llvm.objc.release(i8* %x) [[NUW]], !clang.imprecise_release ![[RELEASE:[0-9]+]]
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test1b_imprecise(i8* %x, i1 %p, i1 %q) {
entry:
- tail call i8* @objc_retain(i8* %x) nounwind
+ tail call i8* @llvm.objc.retain(i8* %x) nounwind
br i1 %p, label %if.then, label %if.end
if.then: ; preds = %entry
@@ -203,7 +203,7 @@ if.then3:
br label %if.end5
if.end5: ; preds = %if.then3, %if.end
- tail call void @objc_release(i8* %x) nounwind, !clang.imprecise_release !0
+ tail call void @llvm.objc.release(i8* %x) nounwind, !clang.imprecise_release !0
ret void
}
@@ -212,13 +212,13 @@ if.end5:
; so the optimization is not safe.
; CHECK-LABEL: define void @test2_precise(
-; CHECK: @objc_retain(i8* %a)
-; CHECK: @objc_release
+; CHECK: @llvm.objc.retain(i8* %a)
+; CHECK: @llvm.objc.release
; CHECK: }
define void @test2_precise(i32* %x, i1 %p) nounwind {
entry:
%a = bitcast i32* %x to i8*
- %0 = call i8* @objc_retain(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %a) nounwind
br i1 %p, label %t, label %f
t:
@@ -236,18 +236,18 @@ f:
return:
%c = bitcast i32* %x to i8*
- call void @objc_release(i8* %c) nounwind
+ call void @llvm.objc.release(i8* %c) nounwind
ret void
}
; CHECK-LABEL: define void @test2_imprecise(
-; CHECK: @objc_retain(i8* %a)
-; CHECK: @objc_release
+; CHECK: @llvm.objc.retain(i8* %a)
+; CHECK: @llvm.objc.release
; CHECK: }
define void @test2_imprecise(i32* %x, i1 %p) nounwind {
entry:
%a = bitcast i32* %x to i8*
- %0 = call i8* @objc_retain(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %a) nounwind
br i1 %p, label %t, label %f
t:
@@ -265,7 +265,7 @@ f:
return:
%c = bitcast i32* %x to i8*
- call void @objc_release(i8* %c) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %c) nounwind, !clang.imprecise_release !0
ret void
}
@@ -275,18 +275,18 @@ return:
; TODO: For now, assume this can't happen.
; CHECK-LABEL: define void @test3_precise(
-; TODO: @objc_retain(i8* %a)
-; TODO: @objc_release
+; TODO: @llvm.objc.retain(i8* %a)
+; TODO: @llvm.objc.release
; CHECK: }
define void @test3_precise(i32* %x, i1* %q) nounwind {
entry:
%a = bitcast i32* %x to i8*
- %0 = call i8* @objc_retain(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %a) nounwind
br label %loop
loop:
%c = bitcast i32* %x to i8*
- call void @objc_release(i8* %c) nounwind
+ call void @llvm.objc.release(i8* %c) nounwind
%j = load volatile i1, i1* %q
br i1 %j, label %loop, label %return
@@ -295,18 +295,18 @@ return:
}
; CHECK-LABEL: define void @test3_imprecise(
-; TODO: @objc_retain(i8* %a)
-; TODO: @objc_release
+; TODO: @llvm.objc.retain(i8* %a)
+; TODO: @llvm.objc.release
; CHECK: }
define void @test3_imprecise(i32* %x, i1* %q) nounwind {
entry:
%a = bitcast i32* %x to i8*
- %0 = call i8* @objc_retain(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %a) nounwind
br label %loop
loop:
%c = bitcast i32* %x to i8*
- call void @objc_release(i8* %c) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %c) nounwind, !clang.imprecise_release !0
%j = load volatile i1, i1* %q
br i1 %j, label %loop, label %return
@@ -321,8 +321,8 @@ return:
; so the optimization is not safe.
; CHECK-LABEL: define void @test4_precise(
-; TODO: @objc_retain(i8* %a)
-; TODO: @objc_release
+; TODO: @llvm.objc.retain(i8* %a)
+; TODO: @llvm.objc.release
; CHECK: }
define void @test4_precise(i32* %x, i1* %q) nounwind {
entry:
@@ -330,19 +330,19 @@ entry:
loop:
%a = bitcast i32* %x to i8*
- %0 = call i8* @objc_retain(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %a) nounwind
%j = load volatile i1, i1* %q
br i1 %j, label %loop, label %return
return:
%c = bitcast i32* %x to i8*
- call void @objc_release(i8* %c) nounwind
+ call void @llvm.objc.release(i8* %c) nounwind
ret void
}
; CHECK-LABEL: define void @test4_imprecise(
-; TODO: @objc_retain(i8* %a)
-; TODO: @objc_release
+; TODO: @llvm.objc.retain(i8* %a)
+; TODO: @llvm.objc.release
; CHECK: }
define void @test4_imprecise(i32* %x, i1* %q) nounwind {
entry:
@@ -350,13 +350,13 @@ entry:
loop:
%a = bitcast i32* %x to i8*
- %0 = call i8* @objc_retain(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %a) nounwind
%j = load volatile i1, i1* %q
br i1 %j, label %loop, label %return
return:
%c = bitcast i32* %x to i8*
- call void @objc_release(i8* %c) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %c) nounwind, !clang.imprecise_release !0
ret void
}
@@ -365,34 +365,34 @@ return:
; so the optimization is not safe.
; CHECK-LABEL: define void @test5a(
-; CHECK: @objc_retain(i8*
-; CHECK: @objc_release
+; CHECK: @llvm.objc.retain(i8*
+; CHECK: @llvm.objc.release
; CHECK: }
define void @test5a(i32* %x, i1 %q, i8* %y) nounwind {
entry:
%a = bitcast i32* %x to i8*
- %0 = call i8* @objc_retain(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %a) nounwind
%s = select i1 %q, i8* %y, i8* %0
call void @use_pointer(i8* %s)
store i32 7, i32* %x
%c = bitcast i32* %x to i8*
- call void @objc_release(i8* %c) nounwind
+ call void @llvm.objc.release(i8* %c) nounwind
ret void
}
; CHECK-LABEL: define void @test5b(
-; CHECK: @objc_retain(i8*
-; CHECK: @objc_release
+; CHECK: @llvm.objc.retain(i8*
+; CHECK: @llvm.objc.release
; CHECK: }
define void @test5b(i32* %x, i1 %q, i8* %y) nounwind {
entry:
%a = bitcast i32* %x to i8*
- %0 = call i8* @objc_retain(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %a) nounwind
%s = select i1 %q, i8* %y, i8* %0
call void @use_pointer(i8* %s)
store i32 7, i32* %x
%c = bitcast i32* %x to i8*
- call void @objc_release(i8* %c) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %c) nounwind, !clang.imprecise_release !0
ret void
}
@@ -402,17 +402,17 @@ entry:
; CHECK-LABEL: define void @test6a(
; CHECK: entry:
-; CHECK: tail call i8* @objc_retain(
+; CHECK: tail call i8* @llvm.objc.retain
; CHECK: t:
-; CHECK: call void @objc_release(
+; CHECK: call void @llvm.objc.release
; CHECK: f:
-; CHECK: call void @objc_release(
+; CHECK: call void @llvm.objc.release
; CHECK: return:
; CHECK: }
define void @test6a(i32* %x, i1 %p) nounwind {
entry:
%a = bitcast i32* %x to i8*
- %0 = call i8* @objc_retain(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %a) nounwind
br i1 %p, label %t, label %f
t:
@@ -420,14 +420,14 @@ t:
%b = bitcast i32* %x to float*
store float 2.0, float* %b
%ct = bitcast i32* %x to i8*
- call void @objc_release(i8* %ct) nounwind
+ call void @llvm.objc.release(i8* %ct) nounwind
br label %return
f:
store i32 7, i32* %x
call void @callee()
%cf = bitcast i32* %x to i8*
- call void @objc_release(i8* %cf) nounwind
+ call void @llvm.objc.release(i8* %cf) nounwind
br label %return
return:
@@ -435,12 +435,12 @@ return:
}
; CHECK-LABEL: define void @test6b(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test6b(i32* %x, i1 %p) nounwind {
entry:
%a = bitcast i32* %x to i8*
- %0 = call i8* @objc_retain(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %a) nounwind
br i1 %p, label %t, label %f
t:
@@ -448,14 +448,14 @@ t:
%b = bitcast i32* %x to float*
store float 2.0, float* %b
%ct = bitcast i32* %x to i8*
- call void @objc_release(i8* %ct) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %ct) nounwind, !clang.imprecise_release !0
br label %return
f:
store i32 7, i32* %x
call void @callee()
%cf = bitcast i32* %x to i8*
- call void @objc_release(i8* %cf) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %cf) nounwind, !clang.imprecise_release !0
br label %return
return:
@@ -464,17 +464,17 @@ return:
; CHECK-LABEL: define void @test6c(
; CHECK: entry:
-; CHECK: tail call i8* @objc_retain(
+; CHECK: tail call i8* @llvm.objc.retain
; CHECK: t:
-; CHECK: call void @objc_release(
+; CHECK: call void @llvm.objc.release
; CHECK: f:
-; CHECK: call void @objc_release(
+; CHECK: call void @llvm.objc.release
; CHECK: return:
; CHECK: }
define void @test6c(i32* %x, i1 %p) nounwind {
entry:
%a = bitcast i32* %x to i8*
- %0 = call i8* @objc_retain(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %a) nounwind
br i1 %p, label %t, label %f
t:
@@ -482,14 +482,14 @@ t:
%b = bitcast i32* %x to float*
store float 2.0, float* %b
%ct = bitcast i32* %x to i8*
- call void @objc_release(i8* %ct) nounwind
+ call void @llvm.objc.release(i8* %ct) nounwind
br label %return
f:
store i32 7, i32* %x
call void @callee()
%cf = bitcast i32* %x to i8*
- call void @objc_release(i8* %cf) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %cf) nounwind, !clang.imprecise_release !0
br label %return
return:
@@ -498,17 +498,17 @@ return:
; CHECK-LABEL: define void @test6d(
; CHECK: entry:
-; CHECK: tail call i8* @objc_retain(
+; CHECK: tail call i8* @llvm.objc.retain
; CHECK: t:
-; CHECK: call void @objc_release(
+; CHECK: call void @llvm.objc.release
; CHECK: f:
-; CHECK: call void @objc_release(
+; CHECK: call void @llvm.objc.release
; CHECK: return:
; CHECK: }
define void @test6d(i32* %x, i1 %p) nounwind {
entry:
%a = bitcast i32* %x to i8*
- %0 = call i8* @objc_retain(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %a) nounwind
br i1 %p, label %t, label %f
t:
@@ -516,14 +516,14 @@ t:
%b = bitcast i32* %x to float*
store float 2.0, float* %b
%ct = bitcast i32* %x to i8*
- call void @objc_release(i8* %ct) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %ct) nounwind, !clang.imprecise_release !0
br label %return
f:
store i32 7, i32* %x
call void @callee()
%cf = bitcast i32* %x to i8*
- call void @objc_release(i8* %cf) nounwind
+ call void @llvm.objc.release(i8* %cf) nounwind
br label %return
return:
@@ -536,13 +536,13 @@ return:
; CHECK-LABEL: define void @test7(
; CHECK: entry:
-; CHECK-NOT: objc_
+; CHECK-NOT: llvm.objc.
; CHECK: t:
-; CHECK: call i8* @objc_retain
+; CHECK: call i8* @llvm.objc.retain
; CHECK: f:
-; CHECK: call i8* @objc_retain
+; CHECK: call i8* @llvm.objc.retain
; CHECK: return:
-; CHECK: call void @objc_release
+; CHECK: call void @llvm.objc.release
; CHECK: }
define void @test7(i32* %x, i1 %p) nounwind {
entry:
@@ -550,26 +550,26 @@ entry:
br i1 %p, label %t, label %f
t:
- %0 = call i8* @objc_retain(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %a) nounwind
store i8 3, i8* %a
%b = bitcast i32* %x to float*
store float 2.0, float* %b
br label %return
f:
- %1 = call i8* @objc_retain(i8* %a) nounwind
+ %1 = call i8* @llvm.objc.retain(i8* %a) nounwind
store i32 7, i32* %x
call void @callee()
br label %return
return:
%c = bitcast i32* %x to i8*
- call void @objc_release(i8* %c) nounwind
+ call void @llvm.objc.release(i8* %c) nounwind
ret void
}
; CHECK-LABEL: define void @test7b(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test7b(i32* %x, i1 %p) nounwind {
entry:
@@ -577,21 +577,21 @@ entry:
br i1 %p, label %t, label %f
t:
- %0 = call i8* @objc_retain(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %a) nounwind
store i8 3, i8* %a
%b = bitcast i32* %x to float*
store float 2.0, float* %b
br label %return
f:
- %1 = call i8* @objc_retain(i8* %a) nounwind
+ %1 = call i8* @llvm.objc.retain(i8* %a) nounwind
store i32 7, i32* %x
call void @callee()
br label %return
return:
%c = bitcast i32* %x to i8*
- call void @objc_release(i8* %c) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %c) nounwind, !clang.imprecise_release !0
ret void
}
@@ -599,11 +599,11 @@ return:
; CHECK-LABEL: define void @test7c(
; CHECK: t:
-; CHECK: call i8* @objc_retainBlock
+; CHECK: call i8* @llvm.objc.retainBlock
; CHECK: f:
-; CHECK: call i8* @objc_retain
+; CHECK: call i8* @llvm.objc.retain
; CHECK: return:
-; CHECK: call void @objc_release
+; CHECK: call void @llvm.objc.release
; CHECK: }
define void @test7c(i32* %x, i1 %p) nounwind {
entry:
@@ -611,21 +611,21 @@ entry:
br i1 %p, label %t, label %f
t:
- %0 = call i8* @objc_retainBlock(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retainBlock(i8* %a) nounwind
store i8 3, i8* %a
%b = bitcast i32* %x to float*
store float 2.0, float* %b
br label %return
f:
- %1 = call i8* @objc_retain(i8* %a) nounwind
+ %1 = call i8* @llvm.objc.retain(i8* %a) nounwind
store i32 7, i32* %x
call void @callee()
br label %return
return:
%c = bitcast i32* %x to i8*
- call void @objc_release(i8* %c) nounwind
+ call void @llvm.objc.release(i8* %c) nounwind
ret void
}
@@ -635,14 +635,14 @@ return:
; CHECK-LABEL: define void @test8a(
; CHECK: entry:
; CHECK: t:
-; CHECK: @objc_retain
+; CHECK: @llvm.objc.retain
; CHECK: f:
-; CHECK: @objc_retain
+; CHECK: @llvm.objc.retain
; CHECK: mid:
; CHECK: u:
-; CHECK: @objc_release
+; CHECK: @llvm.objc.release
; CHECK: g:
-; CHECK: @objc_release
+; CHECK: @llvm.objc.release
; CHECK: return:
; CHECK: }
define void @test8a(i32* %x, i1 %p, i1 %q) nounwind {
@@ -651,14 +651,14 @@ entry:
br i1 %p, label %t, label %f
t:
- %0 = call i8* @objc_retain(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %a) nounwind
store i8 3, i8* %a
%b = bitcast i32* %x to float*
store float 2.0, float* %b
br label %mid
f:
- %1 = call i8* @objc_retain(i8* %a) nounwind
+ %1 = call i8* @llvm.objc.retain(i8* %a) nounwind
store i32 7, i32* %x
br label %mid
@@ -668,12 +668,12 @@ mid:
u:
call void @callee()
%cu = bitcast i32* %x to i8*
- call void @objc_release(i8* %cu) nounwind
+ call void @llvm.objc.release(i8* %cu) nounwind
br label %return
g:
%cg = bitcast i32* %x to i8*
- call void @objc_release(i8* %cg) nounwind
+ call void @llvm.objc.release(i8* %cg) nounwind
br label %return
return:
@@ -681,7 +681,7 @@ return:
}
; CHECK-LABEL: define void @test8b(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test8b(i32* %x, i1 %p, i1 %q) nounwind {
entry:
@@ -689,14 +689,14 @@ entry:
br i1 %p, label %t, label %f
t:
- %0 = call i8* @objc_retain(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %a) nounwind
store i8 3, i8* %a
%b = bitcast i32* %x to float*
store float 2.0, float* %b
br label %mid
f:
- %1 = call i8* @objc_retain(i8* %a) nounwind
+ %1 = call i8* @llvm.objc.retain(i8* %a) nounwind
store i32 7, i32* %x
br label %mid
@@ -706,12 +706,12 @@ mid:
u:
call void @callee()
%cu = bitcast i32* %x to i8*
- call void @objc_release(i8* %cu) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %cu) nounwind, !clang.imprecise_release !0
br label %return
g:
%cg = bitcast i32* %x to i8*
- call void @objc_release(i8* %cg) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %cg) nounwind, !clang.imprecise_release !0
br label %return
return:
@@ -721,14 +721,14 @@ return:
; CHECK-LABEL: define void @test8c(
; CHECK: entry:
; CHECK: t:
-; CHECK: @objc_retain
+; CHECK: @llvm.objc.retain
; CHECK: f:
-; CHECK: @objc_retain
+; CHECK: @llvm.objc.retain
; CHECK: mid:
; CHECK: u:
-; CHECK: @objc_release
+; CHECK: @llvm.objc.release
; CHECK: g:
-; CHECK: @objc_release
+; CHECK: @llvm.objc.release
; CHECK: return:
; CHECK: }
define void @test8c(i32* %x, i1 %p, i1 %q) nounwind {
@@ -737,14 +737,14 @@ entry:
br i1 %p, label %t, label %f
t:
- %0 = call i8* @objc_retain(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %a) nounwind
store i8 3, i8* %a
%b = bitcast i32* %x to float*
store float 2.0, float* %b
br label %mid
f:
- %1 = call i8* @objc_retain(i8* %a) nounwind
+ %1 = call i8* @llvm.objc.retain(i8* %a) nounwind
store i32 7, i32* %x
br label %mid
@@ -754,12 +754,12 @@ mid:
u:
call void @callee()
%cu = bitcast i32* %x to i8*
- call void @objc_release(i8* %cu) nounwind
+ call void @llvm.objc.release(i8* %cu) nounwind
br label %return
g:
%cg = bitcast i32* %x to i8*
- call void @objc_release(i8* %cg) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %cg) nounwind, !clang.imprecise_release !0
br label %return
return:
@@ -769,14 +769,14 @@ return:
; CHECK-LABEL: define void @test8d(
; CHECK: entry:
; CHECK: t:
-; CHECK: @objc_retain
+; CHECK: @llvm.objc.retain
; CHECK: f:
-; CHECK: @objc_retain
+; CHECK: @llvm.objc.retain
; CHECK: mid:
; CHECK: u:
-; CHECK: @objc_release
+; CHECK: @llvm.objc.release
; CHECK: g:
-; CHECK: @objc_release
+; CHECK: @llvm.objc.release
; CHECK: return:
; CHECK: }
define void @test8d(i32* %x, i1 %p, i1 %q) nounwind {
@@ -785,14 +785,14 @@ entry:
br i1 %p, label %t, label %f
t:
- %0 = call i8* @objc_retain(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %a) nounwind
store i8 3, i8* %a
%b = bitcast i32* %x to float*
store float 2.0, float* %b
br label %mid
f:
- %1 = call i8* @objc_retain(i8* %a) nounwind
+ %1 = call i8* @llvm.objc.retain(i8* %a) nounwind
store i32 7, i32* %x
br label %mid
@@ -802,12 +802,12 @@ mid:
u:
call void @callee()
%cu = bitcast i32* %x to i8*
- call void @objc_release(i8* %cu) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %cu) nounwind, !clang.imprecise_release !0
br label %return
g:
%cg = bitcast i32* %x to i8*
- call void @objc_release(i8* %cg) nounwind
+ call void @llvm.objc.release(i8* %cg) nounwind
br label %return
return:
@@ -817,58 +817,58 @@ return:
; Trivial retain+release pair deletion.
; CHECK-LABEL: define void @test9(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test9(i8* %x) nounwind {
entry:
- %0 = call i8* @objc_retain(i8* %x) nounwind
- call void @objc_release(i8* %0) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %0) nounwind
ret void
}
; Retain+release pair, but on an unknown pointer relationship. Don't delete!
; CHECK-LABEL: define void @test9b(
-; CHECK: @objc_retain(i8* %x)
-; CHECK: @objc_release(i8* %s)
+; CHECK: @llvm.objc.retain(i8* %x)
+; CHECK: @llvm.objc.release(i8* %s)
; CHECK: }
define void @test9b(i8* %x, i1 %j, i8* %p) nounwind {
entry:
- %0 = call i8* @objc_retain(i8* %x) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %x) nounwind
%s = select i1 %j, i8* %x, i8* %p
- call void @objc_release(i8* %s) nounwind
+ call void @llvm.objc.release(i8* %s) nounwind
ret void
}
; Trivial retain+release pair with intervening calls - don't delete!
; CHECK-LABEL: define void @test10(
-; CHECK: @objc_retain(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
; CHECK: @callee
; CHECK: @use_pointer
-; CHECK: @objc_release
+; CHECK: @llvm.objc.release
; CHECK: }
define void @test10(i8* %x) nounwind {
entry:
- %0 = call i8* @objc_retain(i8* %x) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %x) nounwind
call void @callee()
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %0) nounwind
+ call void @llvm.objc.release(i8* %0) nounwind
ret void
}
; Trivial retain+autoreleaserelease pair. Don't delete!
-; Also, add a tail keyword, since objc_retain can never be passed
+; Also, add a tail keyword, since llvm.objc.retain can never be passed
; a stack argument.
; CHECK-LABEL: define void @test11(
-; CHECK: tail call i8* @objc_retain(i8* %x) [[NUW]]
-; CHECK: call i8* @objc_autorelease(i8* %0) [[NUW]]
+; CHECK: tail call i8* @llvm.objc.retain(i8* %x) [[NUW]]
+; CHECK: call i8* @llvm.objc.autorelease(i8* %0) [[NUW]]
; CHECK: }
define void @test11(i8* %x) nounwind {
entry:
- %0 = call i8* @objc_retain(i8* %x) nounwind
- call i8* @objc_autorelease(i8* %0) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %x) nounwind
+ call i8* @llvm.objc.autorelease(i8* %0) nounwind
call void @use_pointer(i8* %x)
ret void
}
@@ -881,8 +881,8 @@ entry:
; CHECK: }
define void @test11a(i8* %x) nounwind {
entry:
- %0 = call i8* @objc_retain(i8* %x) nounwind
- call i8* @objc_autorelease(i8* %0) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %x) nounwind
+ call i8* @llvm.objc.autorelease(i8* %0) nounwind
ret void
}
@@ -891,13 +891,13 @@ entry:
; want it to be in the autorelease pool.
; CHECK-LABEL: define i8* @test11b(
-; CHECK: tail call i8* @objc_retain(i8* %x) [[NUW]]
-; CHECK: call i8* @objc_autorelease(i8* %0) [[NUW]]
+; CHECK: tail call i8* @llvm.objc.retain(i8* %x) [[NUW]]
+; CHECK: call i8* @llvm.objc.autorelease(i8* %0) [[NUW]]
; CHECK: }
define i8* @test11b(i8* %x) nounwind {
entry:
- %0 = call i8* @objc_retain(i8* %x) nounwind
- call i8* @objc_autorelease(i8* %0) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %x) nounwind
+ call i8* @llvm.objc.autorelease(i8* %0) nounwind
ret i8* %x
}
@@ -906,34 +906,34 @@ entry:
; CHECK-LABEL: define void @test12(
; CHECK-NEXT: entry:
-; CHECK-NEXT: @objc_retain(i8* %x)
-; CHECK-NEXT: @objc_retain
-; CHECK: @objc_release
+; CHECK-NEXT: @llvm.objc.retain(i8* %x)
+; CHECK-NEXT: @llvm.objc.retain
+; CHECK: @llvm.objc.release
; CHECK: }
define void @test12(i8* %x, i64 %n) {
entry:
- call i8* @objc_retain(i8* %x) nounwind
- call i8* @objc_retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
call void @use_pointer(i8* %x)
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
ret void
}
; Trivial retain,autorelease pair. Don't delete!
; CHECK-LABEL: define void @test13(
-; CHECK: tail call i8* @objc_retain(i8* %x) [[NUW]]
-; CHECK: tail call i8* @objc_retain(i8* %x) [[NUW]]
+; CHECK: tail call i8* @llvm.objc.retain(i8* %x) [[NUW]]
+; CHECK: tail call i8* @llvm.objc.retain(i8* %x) [[NUW]]
; CHECK: @use_pointer(i8* %x)
-; CHECK: call i8* @objc_autorelease(i8* %x) [[NUW]]
+; CHECK: call i8* @llvm.objc.autorelease(i8* %x) [[NUW]]
; CHECK: }
define void @test13(i8* %x, i64 %n) {
entry:
- call i8* @objc_retain(i8* %x) nounwind
- call i8* @objc_retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
call void @use_pointer(i8* %x)
- call i8* @objc_autorelease(i8* %x) nounwind
+ call i8* @llvm.objc.autorelease(i8* %x) nounwind
ret void
}
@@ -941,22 +941,22 @@ entry:
; CHECK-LABEL: define void @test13b(
; CHECK-NEXT: entry:
-; CHECK-NEXT: @objc_retain(i8* %x)
+; CHECK-NEXT: @llvm.objc.retain(i8* %x)
; CHECK-NEXT: @use_pointer
; CHECK-NEXT: @use_pointer
; CHECK-NEXT: @use_pointer
-; CHECK-NEXT: @objc_release
+; CHECK-NEXT: @llvm.objc.release
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test13b(i8* %x, i64 %n) {
entry:
- call i8* @objc_retain(i8* %x) nounwind
- call i8* @objc_retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
call void @use_pointer(i8* %x)
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
ret void
}
@@ -964,20 +964,20 @@ entry:
; autoreleasePoolPop in the way.
; CHECK-LABEL: define void @test13c(
-; CHECK: @objc_retain(i8* %x)
-; CHECK: @objc_autoreleasePoolPop
-; CHECK: @objc_retain(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
+; CHECK: @llvm.objc.autoreleasePoolPop
+; CHECK: @llvm.objc.retain(i8* %x)
; CHECK: @use_pointer
-; CHECK: @objc_release
+; CHECK: @llvm.objc.release
; CHECK: }
define void @test13c(i8* %x, i64 %n) {
entry:
- call i8* @objc_retain(i8* %x) nounwind
- call void @objc_autoreleasePoolPop(i8* undef)
- call i8* @objc_retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
+ call void @llvm.objc.autoreleasePoolPop(i8* undef)
+ call i8* @llvm.objc.retain(i8* %x) nounwind
call void @use_pointer(i8* %x)
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
ret void
}
@@ -986,24 +986,24 @@ entry:
; CHECK-LABEL: define void @test13d(
; CHECK-NEXT: entry:
-; CHECK-NEXT: @objc_retain(i8* %x)
-; CHECK-NEXT: @objc_autoreleasePoolPush
+; CHECK-NEXT: @llvm.objc.retain(i8* %x)
+; CHECK-NEXT: @llvm.objc.autoreleasePoolPush
; CHECK-NEXT: @use_pointer
; CHECK-NEXT: @use_pointer
; CHECK-NEXT: @use_pointer
-; CHECK-NEXT: @objc_release
+; CHECK-NEXT: @llvm.objc.release
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test13d(i8* %x, i64 %n) {
entry:
- call i8* @objc_retain(i8* %x) nounwind
- call i8* @objc_autoreleasePoolPush()
- call i8* @objc_retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
+ call i8* @llvm.objc.autoreleasePoolPush()
+ call i8* @llvm.objc.retain(i8* %x) nounwind
call void @use_pointer(i8* %x)
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
ret void
}
@@ -1013,20 +1013,20 @@ entry:
; CHECK-LABEL: define void @test14(
; CHECK-NEXT: entry:
-; CHECK-NEXT: @objc_retain
+; CHECK-NEXT: @llvm.objc.retain
; CHECK-NEXT: @use_pointer
; CHECK-NEXT: @use_pointer
-; CHECK-NEXT: @objc_release
-; CHECK-NEXT: @objc_release
+; CHECK-NEXT: @llvm.objc.release
+; CHECK-NEXT: @llvm.objc.release
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test14(i8* %x, i64 %n) {
entry:
- call i8* @objc_retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
call void @use_pointer(i8* %x)
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x) nounwind
- call void @objc_release(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
ret void
}
@@ -1035,18 +1035,18 @@ entry:
; CHECK-LABEL: define void @test15(
; CHECK-NEXT: entry:
-; CHECK-NEXT: @objc_retain(i8* %x)
+; CHECK-NEXT: @llvm.objc.retain(i8* %x)
; CHECK-NEXT: @use_pointer
-; CHECK-NEXT: @objc_autorelease(i8* %x)
-; CHECK-NEXT: @objc_release
+; CHECK-NEXT: @llvm.objc.autorelease(i8* %x)
+; CHECK-NEXT: @llvm.objc.release
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test15(i8* %x, i64 %n) {
entry:
- call i8* @objc_retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
call void @use_pointer(i8* %x)
- call i8* @objc_autorelease(i8* %x) nounwind
- call void @objc_release(i8* %x) nounwind
+ call i8* @llvm.objc.autorelease(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
ret void
}
@@ -1055,52 +1055,52 @@ entry:
; CHECK-LABEL: define void @test15b(
; CHECK-NEXT: entry:
-; CHECK-NEXT: @objc_retain
-; CHECK-NEXT: @objc_autorelease
-; CHECK-NEXT: @objc_release
+; CHECK-NEXT: @llvm.objc.retain
+; CHECK-NEXT: @llvm.objc.autorelease
+; CHECK-NEXT: @llvm.objc.release
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test15b(i8* %x, i64 %n) {
entry:
- call i8* @objc_retain(i8* %x) nounwind
- call i8* @objc_autorelease(i8* %x) nounwind
- call void @objc_release(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
+ call i8* @llvm.objc.autorelease(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
ret void
}
; CHECK-LABEL: define void @test15c(
; CHECK-NEXT: entry:
-; CHECK-NEXT: @objc_autorelease
+; CHECK-NEXT: @llvm.objc.autorelease
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test15c(i8* %x, i64 %n) {
entry:
- call i8* @objc_retain(i8* %x) nounwind
- call i8* @objc_autorelease(i8* %x) nounwind
- call void @objc_release(i8* %x) nounwind, !clang.imprecise_release !0
+ call i8* @llvm.objc.retain(i8* %x) nounwind
+ call i8* @llvm.objc.autorelease(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind, !clang.imprecise_release !0
ret void
}
; Retain+release pairs in diamonds, all dominated by a retain.
; CHECK-LABEL: define void @test16a(
-; CHECK: @objc_retain(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
; CHECK-NOT: @objc
; CHECK: purple:
; CHECK: @use_pointer
-; CHECK: @objc_release
+; CHECK: @llvm.objc.release
; CHECK: }
define void @test16a(i1 %a, i1 %b, i8* %x) {
entry:
- call i8* @objc_retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
br i1 %a, label %red, label %orange
red:
- call i8* @objc_retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
br label %yellow
orange:
- call i8* @objc_retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
br label %yellow
yellow:
@@ -1109,38 +1109,38 @@ yellow:
br i1 %b, label %green, label %blue
green:
- call void @objc_release(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
br label %purple
blue:
- call void @objc_release(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
br label %purple
purple:
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
ret void
}
; CHECK-LABEL: define void @test16b(
-; CHECK: @objc_retain(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
; CHECK-NOT: @objc
; CHECK: purple:
; CHECK-NEXT: @use_pointer
; CHECK-NEXT: @use_pointer
-; CHECK-NEXT: @objc_release
+; CHECK-NEXT: @llvm.objc.release
; CHECK: }
define void @test16b(i1 %a, i1 %b, i8* %x) {
entry:
- call i8* @objc_retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
br i1 %a, label %red, label %orange
red:
- call i8* @objc_retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
br label %yellow
orange:
- call i8* @objc_retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
br label %yellow
yellow:
@@ -1149,38 +1149,38 @@ yellow:
br i1 %b, label %green, label %blue
green:
- call void @objc_release(i8* %x) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %x) nounwind, !clang.imprecise_release !0
br label %purple
blue:
- call void @objc_release(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
br label %purple
purple:
call void @use_pointer(i8* %x)
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
ret void
}
; CHECK-LABEL: define void @test16c(
-; CHECK: @objc_retain(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
; CHECK-NOT: @objc
; CHECK: purple:
; CHECK: @use_pointer
-; CHECK: @objc_release
+; CHECK: @llvm.objc.release
; CHECK: }
define void @test16c(i1 %a, i1 %b, i8* %x) {
entry:
- call i8* @objc_retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
br i1 %a, label %red, label %orange
red:
- call i8* @objc_retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
br label %yellow
orange:
- call i8* @objc_retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
br label %yellow
yellow:
@@ -1189,34 +1189,34 @@ yellow:
br i1 %b, label %green, label %blue
green:
- call void @objc_release(i8* %x) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %x) nounwind, !clang.imprecise_release !0
br label %purple
blue:
- call void @objc_release(i8* %x) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %x) nounwind, !clang.imprecise_release !0
br label %purple
purple:
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %x) nounwind, !clang.imprecise_release !0
ret void
}
; CHECK-LABEL: define void @test16d(
-; CHECK: @objc_retain(i8* %x)
-; CHECK: @objc
+; CHECK: @llvm.objc.retain(i8* %x)
+; CHECK: @llvm.objc
; CHECK: }
define void @test16d(i1 %a, i1 %b, i8* %x) {
entry:
- call i8* @objc_retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
br i1 %a, label %red, label %orange
red:
- call i8* @objc_retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
br label %yellow
orange:
- call i8* @objc_retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
br label %yellow
yellow:
@@ -1225,11 +1225,11 @@ yellow:
br i1 %b, label %green, label %blue
green:
- call void @objc_release(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
br label %purple
blue:
- call void @objc_release(i8* %x) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %x) nounwind, !clang.imprecise_release !0
br label %purple
purple:
@@ -1239,24 +1239,24 @@ purple:
; Delete no-ops.
; CHECK-LABEL: define void @test18(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test18() {
- call i8* @objc_retain(i8* null)
- call void @objc_release(i8* null)
- call i8* @objc_autorelease(i8* null)
+ call i8* @llvm.objc.retain(i8* null)
+ call void @llvm.objc.release(i8* null)
+ call i8* @llvm.objc.autorelease(i8* null)
ret void
}
; Delete no-ops where undef can be assumed to be null.
; CHECK-LABEL: define void @test18b(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test18b() {
- call i8* @objc_retain(i8* undef)
- call void @objc_release(i8* undef)
- call i8* @objc_autorelease(i8* undef)
+ call i8* @llvm.objc.retain(i8* undef)
+ call void @llvm.objc.release(i8* undef)
+ call i8* @llvm.objc.autorelease(i8* undef)
ret void
}
@@ -1266,34 +1266,34 @@ define void @test18b() {
; CHECK: define void @test19(i32* %y) {
; CHECK: %z = bitcast i32* %y to i8*
; CHECK: %0 = bitcast i32* %y to i8*
-; CHECK: %1 = tail call i8* @objc_retain(i8* %0)
+; CHECK: %1 = tail call i8* @llvm.objc.retain(i8* %0)
; CHECK: call void @use_pointer(i8* %z)
; CHECK: call void @use_pointer(i8* %z)
; CHECK: %2 = bitcast i32* %y to i8*
-; CHECK: call void @objc_release(i8* %2)
+; CHECK: call void @llvm.objc.release(i8* %2)
; CHECK: ret void
; CHECK: }
define void @test19(i32* %y) {
entry:
%x = bitcast i32* %y to i8*
- %0 = call i8* @objc_retain(i8* %x) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %x) nounwind
%z = bitcast i32* %y to i8*
call void @use_pointer(i8* %z)
call void @use_pointer(i8* %z)
- call void @objc_release(i8* %x)
+ call void @llvm.objc.release(i8* %x)
ret void
}
; Bitcast insertion
; CHECK-LABEL: define void @test20(
-; CHECK: %tmp1 = tail call i8* @objc_retain(i8* %tmp) [[NUW]]
+; CHECK: %tmp1 = tail call i8* @llvm.objc.retain(i8* %tmp) [[NUW]]
; CHECK-NEXT: invoke
; CHECK: }
define void @test20(double* %self) personality i32 (...)* @__gxx_personality_v0 {
if.then12:
%tmp = bitcast double* %self to i8*
- %tmp1 = call i8* @objc_retain(i8* %tmp) nounwind
+ %tmp1 = call i8* @llvm.objc.retain(i8* %tmp) nounwind
invoke void @invokee()
to label %invoke.cont23 unwind label %lpad20
@@ -1321,8 +1321,8 @@ if.end:
define i8* @test21() {
entry:
%call = call i8* @returner()
- %0 = call i8* @objc_retain(i8* %call) nounwind
- %1 = call i8* @objc_autorelease(i8* %0) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %call) nounwind
+ %1 = call i8* @llvm.objc.autorelease(i8* %0) nounwind
ret i8* %1
}
@@ -1331,10 +1331,10 @@ entry:
; CHECK-LABEL: define void @test22(
; CHECK: B:
; CHECK: %1 = bitcast double* %p to i8*
-; CHECK: call void @objc_release(i8* %1)
+; CHECK: call void @llvm.objc.release(i8* %1)
; CHECK: br label %C
; CHECK: C: ; preds = %B, %A
-; CHECK-NOT: @objc_release
+; CHECK-NOT: @llvm.objc.release
; CHECK: }
define void @test22(double* %p, i1 %a) {
br i1 %a, label %A, label %B
@@ -1345,16 +1345,16 @@ B:
C:
%h = phi double* [ null, %A ], [ %p, %B ]
%c = bitcast double* %h to i8*
- call void @objc_release(i8* %c), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %c), !clang.imprecise_release !0
ret void
}
-; Do not move an objc_release that doesn't have the clang.imprecise_release tag.
+; Do not move an llvm.objc.release that doesn't have the clang.imprecise_release tag.
; CHECK-LABEL: define void @test22_precise(
; CHECK: %[[P0:.*]] = phi double*
; CHECK: %[[V0:.*]] = bitcast double* %[[P0]] to i8*
-; CHECK: call void @objc_release(i8* %[[V0]])
+; CHECK: call void @llvm.objc.release(i8* %[[V0]])
; CHECK: ret void
define void @test22_precise(double* %p, i1 %a) {
br i1 %a, label %A, label %B
@@ -1365,21 +1365,21 @@ B:
C:
%h = phi double* [ null, %A ], [ %p, %B ]
%c = bitcast double* %h to i8*
- call void @objc_release(i8* %c)
+ call void @llvm.objc.release(i8* %c)
ret void
}
; Any call can decrement a retain count.
; CHECK-LABEL: define void @test24(
-; CHECK: @objc_retain(i8* %a)
-; CHECK: @objc_release
+; CHECK: @llvm.objc.retain(i8* %a)
+; CHECK: @llvm.objc.release
; CHECK: }
define void @test24(i8* %r, i8* %a) {
- call i8* @objc_retain(i8* %a)
+ call i8* @llvm.objc.retain(i8* %a)
call void @use_pointer(i8* %r)
%q = load i8, i8* %a
- call void @objc_release(i8* %a)
+ call void @llvm.objc.release(i8* %a)
ret void
}
@@ -1388,14 +1388,14 @@ define void @test24(i8* %r, i8* %a) {
; CHECK-LABEL: define void @test25(
; CHECK: entry:
-; CHECK: call i8* @objc_retain(i8* %p)
+; CHECK: call i8* @llvm.objc.retain(i8* %p)
; CHECK: true:
; CHECK: done:
-; CHECK: call void @objc_release(i8* %p)
+; CHECK: call void @llvm.objc.release(i8* %p)
; CHECK: }
define void @test25(i8* %p, i1 %x) {
entry:
- %f0 = call i8* @objc_retain(i8* %p)
+ %f0 = call i8* @llvm.objc.retain(i8* %p)
call void @callee()
br i1 %x, label %true, label %done
@@ -1404,7 +1404,7 @@ true:
br label %done
done:
- call void @objc_release(i8* %p)
+ call void @llvm.objc.release(i8* %p)
ret void
}
@@ -1413,14 +1413,14 @@ done:
; CHECK-LABEL: define void @test26(
; CHECK: entry:
-; CHECK: call i8* @objc_retain(i8* %p)
+; CHECK: call i8* @llvm.objc.retain(i8* %p)
; CHECK: true:
; CHECK: done:
-; CHECK: call void @objc_release(i8* %p)
+; CHECK: call void @llvm.objc.release(i8* %p)
; CHECK: }
define void @test26(i8* %p, i1 %x) {
entry:
- %f0 = call i8* @objc_retain(i8* %p)
+ %f0 = call i8* @llvm.objc.retain(i8* %p)
br i1 %x, label %true, label %done
true:
@@ -1429,7 +1429,7 @@ true:
done:
store i8 0, i8* %p
- call void @objc_release(i8* %p)
+ call void @llvm.objc.release(i8* %p)
ret void
}
@@ -1437,15 +1437,15 @@ done:
; CHECK-LABEL: define void @test27(
; CHECK: entry:
-; CHECK: call i8* @objc_retain(i8* %p)
+; CHECK: call i8* @llvm.objc.retain(i8* %p)
; CHECK: loop:
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: done:
-; CHECK: call void @objc_release
+; CHECK: call void @llvm.objc.release
; CHECK: }
define void @test27(i8* %p, i1 %x, i1 %y) {
entry:
- %f0 = call i8* @objc_retain(i8* %p)
+ %f0 = call i8* @llvm.objc.retain(i8* %p)
br i1 %x, label %loop, label %done
loop:
@@ -1454,25 +1454,25 @@ loop:
br i1 %y, label %done, label %loop
done:
- call void @objc_release(i8* %p)
+ call void @llvm.objc.release(i8* %p)
ret void
}
; Trivial code motion case: Triangle.
; CHECK-LABEL: define void @test28(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: true:
-; CHECK: call i8* @objc_retain(
+; CHECK: call i8* @llvm.objc.retain
; CHECK: call void @callee()
; CHECK: store
-; CHECK: call void @objc_release
+; CHECK: call void @llvm.objc.release
; CHECK: done:
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test28(i8* %p, i1 %x) {
entry:
- %f0 = call i8* @objc_retain(i8* %p)
+ %f0 = call i8* @llvm.objc.retain(i8* %p)
br i1 %x, label %true, label %done
true:
@@ -1481,7 +1481,7 @@ true:
br label %done
done:
- call void @objc_release(i8* %p), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %p), !clang.imprecise_release !0
ret void
}
@@ -1489,19 +1489,19 @@ done:
; unrelated memory references!
; CHECK-LABEL: define void @test28b(
-; CHECK: call i8* @objc_retain(
+; CHECK: call i8* @llvm.objc.retain
; CHECK: true:
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: call void @callee()
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: store
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: done:
-; CHECK: @objc_release
+; CHECK: @llvm.objc.release
; CHECK: }
define void @test28b(i8* %p, i1 %x, i8* noalias %t) {
entry:
- %f0 = call i8* @objc_retain(i8* %p)
+ %f0 = call i8* @llvm.objc.retain(i8* %p)
br i1 %x, label %true, label %done
true:
@@ -1511,7 +1511,7 @@ true:
done:
store i8 0, i8* %t
- call void @objc_release(i8* %p)
+ call void @llvm.objc.release(i8* %p)
ret void
}
@@ -1519,18 +1519,18 @@ done:
; unrelated memory references! And preserve the metadata.
; CHECK-LABEL: define void @test28c(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: true:
-; CHECK: call i8* @objc_retain(
+; CHECK: call i8* @llvm.objc.retain
; CHECK: call void @callee()
; CHECK: store
-; CHECK: call void @objc_release(i8* %p) [[NUW]], !clang.imprecise_release
+; CHECK: call void @llvm.objc.release(i8* %p) [[NUW]], !clang.imprecise_release
; CHECK: done:
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test28c(i8* %p, i1 %x, i8* noalias %t) {
entry:
- %f0 = call i8* @objc_retain(i8* %p)
+ %f0 = call i8* @llvm.objc.retain(i8* %p)
br i1 %x, label %true, label %done
true:
@@ -1540,28 +1540,28 @@ true:
done:
store i8 0, i8* %t
- call void @objc_release(i8* %p), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %p), !clang.imprecise_release !0
ret void
}
; Like test28. but with two releases.
; CHECK-LABEL: define void @test29(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: true:
-; CHECK: call i8* @objc_retain(
+; CHECK: call i8* @llvm.objc.retain
; CHECK: call void @callee()
; CHECK: store
-; CHECK: call void @objc_release
-; CHECK-NOT: @objc_release
+; CHECK: call void @llvm.objc.release
+; CHECK-NOT: @llvm.objc.release
; CHECK: done:
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: ohno:
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test29(i8* %p, i1 %x, i1 %y) {
entry:
- %f0 = call i8* @objc_retain(i8* %p)
+ %f0 = call i8* @llvm.objc.retain(i8* %p)
br i1 %x, label %true, label %done
true:
@@ -1570,11 +1570,11 @@ true:
br i1 %y, label %done, label %ohno
done:
- call void @objc_release(i8* %p)
+ call void @llvm.objc.release(i8* %p)
ret void
ohno:
- call void @objc_release(i8* %p)
+ call void @llvm.objc.release(i8* %p)
ret void
}
@@ -1582,23 +1582,23 @@ ohno:
; with an extra release.
; CHECK-LABEL: define void @test30(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: true:
-; CHECK: call i8* @objc_retain(
+; CHECK: call i8* @llvm.objc.retain
; CHECK: call void @callee()
; CHECK: store
-; CHECK: call void @objc_release
-; CHECK-NOT: @objc_release
+; CHECK: call void @llvm.objc.release
+; CHECK-NOT: @llvm.objc.release
; CHECK: false:
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: done:
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: ohno:
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test30(i8* %p, i1 %x, i1 %y, i1 %z) {
entry:
- %f0 = call i8* @objc_retain(i8* %p)
+ %f0 = call i8* @llvm.objc.retain(i8* %p)
br i1 %x, label %true, label %false
true:
@@ -1610,58 +1610,58 @@ false:
br i1 %z, label %done, label %ohno
done:
- call void @objc_release(i8* %p)
+ call void @llvm.objc.release(i8* %p)
ret void
ohno:
- call void @objc_release(i8* %p)
+ call void @llvm.objc.release(i8* %p)
ret void
}
; Basic case with a mergeable release.
; CHECK-LABEL: define void @test31(
-; CHECK: call i8* @objc_retain(i8* %p)
+; CHECK: call i8* @llvm.objc.retain(i8* %p)
; CHECK: call void @callee()
; CHECK: store
-; CHECK: call void @objc_release
-; CHECK-NOT: @objc_release
+; CHECK: call void @llvm.objc.release
+; CHECK-NOT: @llvm.objc.release
; CHECK: true:
-; CHECK-NOT: @objc_release
+; CHECK-NOT: @llvm.objc.release
; CHECK: false:
-; CHECK-NOT: @objc_release
+; CHECK-NOT: @llvm.objc.release
; CHECK: ret void
-; CHECK-NOT: @objc_release
+; CHECK-NOT: @llvm.objc.release
; CHECK: }
define void @test31(i8* %p, i1 %x) {
entry:
- %f0 = call i8* @objc_retain(i8* %p)
+ %f0 = call i8* @llvm.objc.retain(i8* %p)
call void @callee()
store i8 0, i8* %p
br i1 %x, label %true, label %false
true:
- call void @objc_release(i8* %p)
+ call void @llvm.objc.release(i8* %p)
ret void
false:
- call void @objc_release(i8* %p)
+ call void @llvm.objc.release(i8* %p)
ret void
}
; Don't consider bitcasts or getelementptrs direct uses.
; CHECK-LABEL: define void @test32(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: true:
-; CHECK: call i8* @objc_retain(
+; CHECK: call i8* @llvm.objc.retain
; CHECK: call void @callee()
; CHECK: store
-; CHECK: call void @objc_release
+; CHECK: call void @llvm.objc.release
; CHECK: done:
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test32(i8* %p, i1 %x) {
entry:
- %f0 = call i8* @objc_retain(i8* %p)
+ %f0 = call i8* @llvm.objc.retain(i8* %p)
br i1 %x, label %true, label %done
true:
@@ -1672,25 +1672,25 @@ true:
done:
%g = bitcast i8* %p to i8*
%h = getelementptr i8, i8* %g, i64 0
- call void @objc_release(i8* %g)
+ call void @llvm.objc.release(i8* %g)
ret void
}
; Do consider icmps to be direct uses.
; CHECK-LABEL: define void @test33(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: true:
-; CHECK: call i8* @objc_retain(
+; CHECK: call i8* @llvm.objc.retain
; CHECK: call void @callee()
; CHECK: icmp
-; CHECK: call void @objc_release
+; CHECK: call void @llvm.objc.release
; CHECK: done:
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test33(i8* %p, i1 %x, i8* %y) {
entry:
- %f0 = call i8* @objc_retain(i8* %p)
+ %f0 = call i8* @llvm.objc.retain(i8* %p)
br i1 %x, label %true, label %done
true:
@@ -1701,7 +1701,7 @@ true:
done:
%g = bitcast i8* %p to i8*
%h = getelementptr i8, i8* %g, i64 0
- call void @objc_release(i8* %g)
+ call void @llvm.objc.release(i8* %g)
ret void
}
@@ -1709,14 +1709,14 @@ done:
; releases.
; CHECK-LABEL: define void @test34a(
-; CHECK: call i8* @objc_retain
+; CHECK: call i8* @llvm.objc.retain
; CHECK: true:
; CHECK: done:
-; CHECK: call void @objc_release
+; CHECK: call void @llvm.objc.release
; CHECK: }
define void @test34a(i8* %p, i1 %x, i8* %y) {
entry:
- %f0 = call i8* @objc_retain(i8* %p)
+ %f0 = call i8* @llvm.objc.retain(i8* %p)
br i1 %x, label %true, label %done
true:
@@ -1726,16 +1726,16 @@ true:
done:
%g = bitcast i8* %p to i8*
%h = getelementptr i8, i8* %g, i64 0
- call void @objc_release(i8* %g)
+ call void @llvm.objc.release(i8* %g)
ret void
}
; CHECK-LABEL: define void @test34b(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test34b(i8* %p, i1 %x, i8* %y) {
entry:
- %f0 = call i8* @objc_retain(i8* %p)
+ %f0 = call i8* @llvm.objc.retain(i8* %p)
br i1 %x, label %true, label %done
true:
@@ -1745,7 +1745,7 @@ true:
done:
%g = bitcast i8* %p to i8*
%h = getelementptr i8, i8* %g, i64 0
- call void @objc_release(i8* %g), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %g), !clang.imprecise_release !0
ret void
}
@@ -1756,14 +1756,14 @@ done:
; Precise.
; CHECK-LABEL: define void @test35a(
; CHECK: entry:
-; CHECK: call i8* @objc_retain
+; CHECK: call i8* @llvm.objc.retain
; CHECK: true:
; CHECK: done:
-; CHECK: call void @objc_release
+; CHECK: call void @llvm.objc.release
; CHECK: }
define void @test35a(i8* %p, i1 %x, i8* %y) {
entry:
- %f0 = call i8* @objc_retain(i8* %p)
+ %f0 = call i8* @llvm.objc.retain(i8* %p)
br i1 %x, label %true, label %done
true:
@@ -1773,17 +1773,17 @@ true:
done:
%g = bitcast i8* %p to i8*
%h = getelementptr i8, i8* %g, i64 0
- call void @objc_release(i8* %g)
+ call void @llvm.objc.release(i8* %g)
ret void
}
; Imprecise.
; CHECK-LABEL: define void @test35b(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test35b(i8* %p, i1 %x, i8* %y) {
entry:
- %f0 = call i8* @objc_retain(i8* %p)
+ %f0 = call i8* @llvm.objc.retain(i8* %p)
br i1 %x, label %true, label %done
true:
@@ -1793,50 +1793,50 @@ true:
done:
%g = bitcast i8* %p to i8*
%h = getelementptr i8, i8* %g, i64 0
- call void @objc_release(i8* %g), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %g), !clang.imprecise_release !0
ret void
}
; Delete a retain,release if there's no actual use and we have precise release.
; CHECK-LABEL: define void @test36a(
-; CHECK: @objc_retain
+; CHECK: @llvm.objc.retain
; CHECK: call void @callee()
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: call void @callee()
-; CHECK: @objc_release
+; CHECK: @llvm.objc.release
; CHECK: }
define void @test36a(i8* %p) {
entry:
- call i8* @objc_retain(i8* %p)
+ call i8* @llvm.objc.retain(i8* %p)
call void @callee()
call void @callee()
- call void @objc_release(i8* %p)
+ call void @llvm.objc.release(i8* %p)
ret void
}
; Like test36, but with metadata.
; CHECK-LABEL: define void @test36b(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test36b(i8* %p) {
entry:
- call i8* @objc_retain(i8* %p)
+ call i8* @llvm.objc.retain(i8* %p)
call void @callee()
call void @callee()
- call void @objc_release(i8* %p), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %p), !clang.imprecise_release !0
ret void
}
; Be aggressive about analyzing phis to eliminate possible uses.
; CHECK-LABEL: define void @test38(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test38(i8* %p, i1 %u, i1 %m, i8* %z, i8* %y, i8* %x, i8* %w) {
entry:
- call i8* @objc_retain(i8* %p)
+ call i8* @llvm.objc.retain(i8* %p)
br i1 %u, label %true, label %false
true:
br i1 %m, label %a, label %b
@@ -1859,36 +1859,36 @@ f:
g:
%h = phi i8* [ %j, %e ], [ %k, %f ]
call void @use_pointer(i8* %h)
- call void @objc_release(i8* %p), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %p), !clang.imprecise_release !0
ret void
}
; Delete retain,release pairs around loops.
; CHECK-LABEL: define void @test39(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test39(i8* %p) {
entry:
- %0 = call i8* @objc_retain(i8* %p)
+ %0 = call i8* @llvm.objc.retain(i8* %p)
br label %loop
loop: ; preds = %loop, %entry
br i1 undef, label %loop, label %exit
exit: ; preds = %loop
- call void @objc_release(i8* %0), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %0), !clang.imprecise_release !0
ret void
}
; Delete retain,release pairs around loops containing uses.
; CHECK-LABEL: define void @test39b(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test39b(i8* %p) {
entry:
- %0 = call i8* @objc_retain(i8* %p)
+ %0 = call i8* @llvm.objc.retain(i8* %p)
br label %loop
loop: ; preds = %loop, %entry
@@ -1896,18 +1896,18 @@ loop:
br i1 undef, label %loop, label %exit
exit: ; preds = %loop
- call void @objc_release(i8* %0), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %0), !clang.imprecise_release !0
ret void
}
; Delete retain,release pairs around loops containing potential decrements.
; CHECK-LABEL: define void @test39c(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test39c(i8* %p) {
entry:
- %0 = call i8* @objc_retain(i8* %p)
+ %0 = call i8* @llvm.objc.retain(i8* %p)
br label %loop
loop: ; preds = %loop, %entry
@@ -1915,7 +1915,7 @@ loop:
br i1 undef, label %loop, label %exit
exit: ; preds = %loop
- call void @objc_release(i8* %0), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %0), !clang.imprecise_release !0
ret void
}
@@ -1923,11 +1923,11 @@ exit:
; the successors are in a different order.
; CHECK-LABEL: define void @test40(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test40(i8* %p) {
entry:
- %0 = call i8* @objc_retain(i8* %p)
+ %0 = call i8* @llvm.objc.retain(i8* %p)
br label %loop
loop: ; preds = %loop, %entry
@@ -1935,7 +1935,7 @@ loop:
br i1 undef, label %exit, label %loop
exit: ; preds = %loop
- call void @objc_release(i8* %0), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %0), !clang.imprecise_release !0
ret void
}
@@ -1944,26 +1944,26 @@ exit:
; CHECK-LABEL: define void @test42(
; CHECK-NEXT: entry:
-; CHECK-NEXT: call i8* @objc_retain(i8* %p)
-; CHECK-NEXT: call i8* @objc_autorelease(i8* %p)
+; CHECK-NEXT: call i8* @llvm.objc.retain(i8* %p)
+; CHECK-NEXT: call i8* @llvm.objc.autorelease(i8* %p)
; CHECK-NEXT: call void @use_pointer(i8* %p)
; CHECK-NEXT: call void @use_pointer(i8* %p)
; CHECK-NEXT: call void @use_pointer(i8* %p)
; CHECK-NEXT: call void @use_pointer(i8* %p)
-; CHECK-NEXT: call void @objc_release(i8* %p)
+; CHECK-NEXT: call void @llvm.objc.release(i8* %p)
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test42(i8* %p) {
entry:
- call i8* @objc_retain(i8* %p)
- call i8* @objc_autorelease(i8* %p)
- call i8* @objc_retain(i8* %p)
+ call i8* @llvm.objc.retain(i8* %p)
+ call i8* @llvm.objc.autorelease(i8* %p)
+ call i8* @llvm.objc.retain(i8* %p)
call void @use_pointer(i8* %p)
call void @use_pointer(i8* %p)
- call void @objc_release(i8* %p)
+ call void @llvm.objc.release(i8* %p)
call void @use_pointer(i8* %p)
call void @use_pointer(i8* %p)
- call void @objc_release(i8* %p)
+ call void @llvm.objc.release(i8* %p)
ret void
}
@@ -1972,24 +1972,24 @@ entry:
; CHECK-LABEL: define void @test43(
; CHECK-NEXT: entry:
-; CHECK-NEXT: call i8* @objc_retain(i8* %p)
-; CHECK-NEXT: call i8* @objc_autorelease(i8* %p)
-; CHECK-NEXT: call i8* @objc_retain
+; CHECK-NEXT: call i8* @llvm.objc.retain(i8* %p)
+; CHECK-NEXT: call i8* @llvm.objc.autorelease(i8* %p)
+; CHECK-NEXT: call i8* @llvm.objc.retain
; CHECK-NEXT: call void @use_pointer(i8* %p)
; CHECK-NEXT: call void @use_pointer(i8* %p)
-; CHECK-NEXT: call void @objc_autoreleasePoolPop(i8* undef)
-; CHECK-NEXT: call void @objc_release
+; CHECK-NEXT: call void @llvm.objc.autoreleasePoolPop(i8* undef)
+; CHECK-NEXT: call void @llvm.objc.release
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test43(i8* %p) {
entry:
- call i8* @objc_retain(i8* %p)
- call i8* @objc_autorelease(i8* %p)
- call i8* @objc_retain(i8* %p)
+ call i8* @llvm.objc.retain(i8* %p)
+ call i8* @llvm.objc.autorelease(i8* %p)
+ call i8* @llvm.objc.retain(i8* %p)
call void @use_pointer(i8* %p)
call void @use_pointer(i8* %p)
- call void @objc_autoreleasePoolPop(i8* undef)
- call void @objc_release(i8* %p)
+ call void @llvm.objc.autoreleasePoolPop(i8* undef)
+ call void @llvm.objc.release(i8* %p)
ret void
}
@@ -1998,74 +1998,74 @@ entry:
; CHECK-LABEL: define void @test43b(
; CHECK-NEXT: entry:
-; CHECK-NEXT: call i8* @objc_retain(i8* %p)
-; CHECK-NEXT: call i8* @objc_autorelease(i8* %p)
+; CHECK-NEXT: call i8* @llvm.objc.retain(i8* %p)
+; CHECK-NEXT: call i8* @llvm.objc.autorelease(i8* %p)
; CHECK-NEXT: call void @use_pointer(i8* %p)
; CHECK-NEXT: call void @use_pointer(i8* %p)
-; CHECK-NEXT: call i8* @objc_autoreleasePoolPush()
+; CHECK-NEXT: call i8* @llvm.objc.autoreleasePoolPush()
; CHECK-NEXT: call void @use_pointer(i8* %p)
-; CHECK-NEXT: call void @objc_release
+; CHECK-NEXT: call void @llvm.objc.release
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test43b(i8* %p) {
entry:
- call i8* @objc_retain(i8* %p)
- call i8* @objc_autorelease(i8* %p)
- call i8* @objc_retain(i8* %p)
+ call i8* @llvm.objc.retain(i8* %p)
+ call i8* @llvm.objc.autorelease(i8* %p)
+ call i8* @llvm.objc.retain(i8* %p)
call void @use_pointer(i8* %p)
call void @use_pointer(i8* %p)
- call i8* @objc_autoreleasePoolPush()
- call void @objc_release(i8* %p)
+ call i8* @llvm.objc.autoreleasePoolPush()
+ call void @llvm.objc.release(i8* %p)
call void @use_pointer(i8* %p)
- call void @objc_release(i8* %p)
+ call void @llvm.objc.release(i8* %p)
ret void
}
; Do retain+release elimination for non-provenance pointers.
; CHECK-LABEL: define void @test44(
-; CHECK-NOT: objc_
+; CHECK-NOT: llvm.objc.
; CHECK: }
define void @test44(i8** %pp) {
%p = load i8*, i8** %pp
- %q = call i8* @objc_retain(i8* %p)
- call void @objc_release(i8* %q)
+ %q = call i8* @llvm.objc.retain(i8* %p)
+ call void @llvm.objc.release(i8* %q)
ret void
}
; Don't delete retain+release with an unknown-provenance
-; may-alias objc_release between them.
+; may-alias llvm.objc.release between them.
; CHECK-LABEL: define void @test45(
-; CHECK: call i8* @objc_retain(i8* %p)
-; CHECK: call void @objc_release(i8* %q)
+; CHECK: call i8* @llvm.objc.retain(i8* %p)
+; CHECK: call void @llvm.objc.release(i8* %q)
; CHECK: call void @use_pointer(i8* %p)
-; CHECK: call void @objc_release(i8* %p)
+; CHECK: call void @llvm.objc.release(i8* %p)
; CHECK: }
define void @test45(i8** %pp, i8** %qq) {
%p = load i8*, i8** %pp
%q = load i8*, i8** %qq
- call i8* @objc_retain(i8* %p)
- call void @objc_release(i8* %q)
+ call i8* @llvm.objc.retain(i8* %p)
+ call void @llvm.objc.release(i8* %q)
call void @use_pointer(i8* %p)
- call void @objc_release(i8* %p)
+ call void @llvm.objc.release(i8* %p)
ret void
}
; Don't delete retain and autorelease here.
; CHECK-LABEL: define void @test46(
-; CHECK: tail call i8* @objc_retain(i8* %p) [[NUW]]
+; CHECK: tail call i8* @llvm.objc.retain(i8* %p) [[NUW]]
; CHECK: true:
-; CHECK: call i8* @objc_autorelease(i8* %p) [[NUW]]
+; CHECK: call i8* @llvm.objc.autorelease(i8* %p) [[NUW]]
; CHECK: }
define void @test46(i8* %p, i1 %a) {
entry:
- call i8* @objc_retain(i8* %p)
+ call i8* @llvm.objc.retain(i8* %p)
br i1 %a, label %true, label %false
true:
- call i8* @objc_autorelease(i8* %p)
+ call i8* @llvm.objc.autorelease(i8* %p)
call void @use_pointer(i8* %p)
ret void
@@ -2080,7 +2080,7 @@ false:
; CHECK: ret i8* %p
; CHECK: }
define i8* @test47(i8* %p) nounwind {
- %x = call i8* @objc_retainedObject(i8* %p)
+ %x = call i8* @llvm.objc.retainedObject(i8* %p)
ret i8* %x
}
@@ -2091,7 +2091,7 @@ define i8* @test47(i8* %p) nounwind {
; CHECK: ret i8* %p
; CHECK: }
define i8* @test48(i8* %p) nounwind {
- %x = call i8* @objc_unretainedObject(i8* %p)
+ %x = call i8* @llvm.objc.unretainedObject(i8* %p)
ret i8* %x
}
@@ -2102,36 +2102,36 @@ define i8* @test48(i8* %p) nounwind {
; CHECK: ret i8* %p
; CHECK: }
define i8* @test49(i8* %p) nounwind {
- %x = call i8* @objc_unretainedPointer(i8* %p)
+ %x = call i8* @llvm.objc.unretainedPointer(i8* %p)
ret i8* %x
}
; Do delete retain+release with intervening stores of the address value if we
-; have imprecise release attached to objc_release.
+; have imprecise release attached to llvm.objc.release.
; CHECK-LABEL: define void @test50a(
-; CHECK-NEXT: call i8* @objc_retain
+; CHECK-NEXT: call i8* @llvm.objc.retain
; CHECK-NEXT: call void @callee
; CHECK-NEXT: store
-; CHECK-NEXT: call void @objc_release
+; CHECK-NEXT: call void @llvm.objc.release
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test50a(i8* %p, i8** %pp) {
- call i8* @objc_retain(i8* %p)
+ call i8* @llvm.objc.retain(i8* %p)
call void @callee()
store i8* %p, i8** %pp
- call void @objc_release(i8* %p)
+ call void @llvm.objc.release(i8* %p)
ret void
}
; CHECK-LABEL: define void @test50b(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test50b(i8* %p, i8** %pp) {
- call i8* @objc_retain(i8* %p)
+ call i8* @llvm.objc.retain(i8* %p)
call void @callee()
store i8* %p, i8** %pp
- call void @objc_release(i8* %p), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %p), !clang.imprecise_release !0
ret void
}
@@ -2140,28 +2140,28 @@ define void @test50b(i8* %p, i8** %pp) {
; address value.
; CHECK-LABEL: define void @test51a(
-; CHECK: call i8* @objc_retain(i8* %p)
-; CHECK: call void @objc_release(i8* %p)
+; CHECK: call i8* @llvm.objc.retain(i8* %p)
+; CHECK: call void @llvm.objc.release(i8* %p)
; CHECK: ret void
; CHECK: }
define void @test51a(i8* %p) {
- call i8* @objc_retain(i8* %p)
+ call i8* @llvm.objc.retain(i8* %p)
call void @callee()
store i8 0, i8* %p
- call void @objc_release(i8* %p)
+ call void @llvm.objc.release(i8* %p)
ret void
}
; CHECK-LABEL: define void @test51b(
-; CHECK: call i8* @objc_retain(i8* %p)
-; CHECK: call void @objc_release(i8* %p)
+; CHECK: call i8* @llvm.objc.retain(i8* %p)
+; CHECK: call void @llvm.objc.release(i8* %p)
; CHECK: ret void
; CHECK: }
define void @test51b(i8* %p) {
- call i8* @objc_retain(i8* %p)
+ call i8* @llvm.objc.retain(i8* %p)
call void @callee()
store i8 0, i8* %p
- call void @objc_release(i8* %p), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %p), !clang.imprecise_release !0
ret void
}
@@ -2169,36 +2169,36 @@ define void @test51b(i8* %p) {
; unknown provenance.
; CHECK-LABEL: define void @test52a(
-; CHECK: call i8* @objc_retain
+; CHECK: call i8* @llvm.objc.retain
; CHECK: call void @callee()
; CHECK: call void @use_pointer(i8* %z)
-; CHECK: call void @objc_release
+; CHECK: call void @llvm.objc.release
; CHECK: ret void
; CHECK: }
define void @test52a(i8** %zz, i8** %pp) {
%p = load i8*, i8** %pp
- %1 = call i8* @objc_retain(i8* %p)
+ %1 = call i8* @llvm.objc.retain(i8* %p)
call void @callee()
%z = load i8*, i8** %zz
call void @use_pointer(i8* %z)
- call void @objc_release(i8* %p)
+ call void @llvm.objc.release(i8* %p)
ret void
}
; CHECK-LABEL: define void @test52b(
-; CHECK: call i8* @objc_retain
+; CHECK: call i8* @llvm.objc.retain
; CHECK: call void @callee()
; CHECK: call void @use_pointer(i8* %z)
-; CHECK: call void @objc_release
+; CHECK: call void @llvm.objc.release
; CHECK: ret void
; CHECK: }
define void @test52b(i8** %zz, i8** %pp) {
%p = load i8*, i8** %pp
- %1 = call i8* @objc_retain(i8* %p)
+ %1 = call i8* @llvm.objc.retain(i8* %p)
call void @callee()
%z = load i8*, i8** %zz
call void @use_pointer(i8* %z)
- call void @objc_release(i8* %p), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %p), !clang.imprecise_release !0
ret void
}
@@ -2208,15 +2208,15 @@ define void @test52b(i8** %zz, i8** %pp)
; See rdar://10551239.
; CHECK-LABEL: define void @test53(
-; CHECK: @objc_
+; CHECK: @llvm.objc.
; CHECK: }
define void @test53(void ()** %zz, i8** %pp) {
%p = load i8*, i8** %pp
- %1 = call i8* @objc_retain(i8* %p)
+ %1 = call i8* @llvm.objc.retain(i8* %p)
call void @callee()
%z = load void ()*, void ()** %zz
call void @callee_fnptr(void ()* %z)
- call void @objc_release(i8* %p)
+ call void @llvm.objc.release(i8* %p)
ret void
}
@@ -2224,12 +2224,12 @@ define void @test53(void ()** %zz, i8**
; CHECK-LABEL: define void @test54(
; CHECK: call i8* @returner()
-; CHECK-NEXT: call void @objc_release(i8* %t) [[NUW]], !clang.imprecise_release ![[RELEASE]]
+; CHECK-NEXT: call void @llvm.objc.release(i8* %t) [[NUW]], !clang.imprecise_release ![[RELEASE]]
; CHECK-NEXT: ret void
; CHECK: }
define void @test54() {
%t = call i8* @returner()
- call i8* @objc_autorelease(i8* %t)
+ call i8* @llvm.objc.autorelease(i8* %t)
ret void
}
@@ -2240,10 +2240,10 @@ define void @test54() {
; CHECK: }
define void @test55(i8* %x) {
entry:
- %0 = call i8* @objc_retain(i8* %x) nounwind
- %1 = call i8* @objc_retain(i8* %x) nounwind
- call void @objc_release(i8* %x) nounwind
- call void @objc_release(i8* %x) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %x) nounwind
+ %1 = call i8* @llvm.objc.retain(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
ret void
}
@@ -2255,30 +2255,30 @@ entry:
; CHECK-LABEL: define void @test56(
; CHECK-NOT: @objc
; CHECK: if.then:
-; CHECK-NEXT: %0 = tail call i8* @objc_retain(i8* %x) [[NUW]]
+; CHECK-NEXT: %0 = tail call i8* @llvm.objc.retain(i8* %x) [[NUW]]
; CHECK-NEXT: tail call void @use_pointer(i8* %x)
; CHECK-NEXT: tail call void @use_pointer(i8* %x)
-; CHECK-NEXT: tail call void @objc_release(i8* %x) [[NUW]], !clang.imprecise_release ![[RELEASE]]
+; CHECK-NEXT: tail call void @llvm.objc.release(i8* %x) [[NUW]], !clang.imprecise_release ![[RELEASE]]
; CHECK-NEXT: br label %if.end
; CHECK-NOT: @objc
; CHECK: }
define void @test56(i8* %x, i32 %n) {
entry:
- %0 = tail call i8* @objc_retain(i8* %x) nounwind
- %1 = tail call i8* @objc_retain(i8* %0) nounwind
+ %0 = tail call i8* @llvm.objc.retain(i8* %x) nounwind
+ %1 = tail call i8* @llvm.objc.retain(i8* %0) nounwind
%tobool = icmp eq i32 %n, 0
br i1 %tobool, label %if.end, label %if.then
if.then: ; preds = %entry
- %2 = tail call i8* @objc_retain(i8* %1) nounwind
+ %2 = tail call i8* @llvm.objc.retain(i8* %1) nounwind
tail call void @use_pointer(i8* %2)
tail call void @use_pointer(i8* %2)
- tail call void @objc_release(i8* %2) nounwind, !clang.imprecise_release !0
+ tail call void @llvm.objc.release(i8* %2) nounwind, !clang.imprecise_release !0
br label %if.end
if.end: ; preds = %entry, %if.then
- tail call void @objc_release(i8* %1) nounwind, !clang.imprecise_release !0
- tail call void @objc_release(i8* %0) nounwind, !clang.imprecise_release !0
+ tail call void @llvm.objc.release(i8* %1) nounwind, !clang.imprecise_release !0
+ tail call void @llvm.objc.release(i8* %0) nounwind, !clang.imprecise_release !0
ret void
}
@@ -2288,26 +2288,26 @@ if.end:
; CHECK-LABEL: define void @test57(
; CHECK-NEXT: entry:
-; CHECK-NEXT: tail call i8* @objc_retain(i8* %x) [[NUW]]
+; CHECK-NEXT: tail call i8* @llvm.objc.retain(i8* %x) [[NUW]]
; CHECK-NEXT: call void @use_pointer(i8* %x)
; CHECK-NEXT: call void @use_pointer(i8* %x)
-; CHECK-NEXT: tail call i8* @objc_retain(i8* %x) [[NUW]]
+; CHECK-NEXT: tail call i8* @llvm.objc.retain(i8* %x) [[NUW]]
; CHECK-NEXT: call void @use_pointer(i8* %x)
; CHECK-NEXT: call void @use_pointer(i8* %x)
-; CHECK-NEXT: call void @objc_release(i8* %x) [[NUW]]
+; CHECK-NEXT: call void @llvm.objc.release(i8* %x) [[NUW]]
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test57(i8* %x) nounwind {
entry:
- call i8* @objc_retain(i8* %x) nounwind
- call i8* @objc_retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
call void @use_pointer(i8* %x)
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x) nounwind
- call i8* @objc_retain(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
call void @use_pointer(i8* %x)
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
ret void
}
@@ -2316,20 +2316,20 @@ entry:
; CHECK-LABEL: define void @test58(
; CHECK-NEXT: entry:
-; CHECK-NEXT: @objc_retain
+; CHECK-NEXT: @llvm.objc.retain
; CHECK-NEXT: call void @use_pointer(i8* %x)
; CHECK-NEXT: call void @use_pointer(i8* %x)
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test58(i8* %x) nounwind {
entry:
- call i8* @objc_retain(i8* %x) nounwind
- call i8* @objc_retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
call void @use_pointer(i8* %x)
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x) nounwind
- call i8* @objc_retain(i8* %x) nounwind
- call void @objc_release(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
+ call i8* @llvm.objc.retain(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
ret void
}
@@ -2337,20 +2337,20 @@ entry:
; CHECK-LABEL: define void @test59(
; CHECK-NEXT: entry:
-; CHECK-NEXT: %0 = tail call i8* @objc_retain(i8* %x) [[NUW]]
+; CHECK-NEXT: %0 = tail call i8* @llvm.objc.retain(i8* %x) [[NUW]]
; CHECK-NEXT: call void @use_pointer(i8* %x)
; CHECK-NEXT: call void @use_pointer(i8* %x)
-; CHECK-NEXT: call void @objc_release(i8* %x) [[NUW]]
+; CHECK-NEXT: call void @llvm.objc.release(i8* %x) [[NUW]]
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test59(i8* %x) nounwind {
entry:
- %a = call i8* @objc_retain(i8* %x) nounwind
- call void @objc_release(i8* %x) nounwind
- %b = call i8* @objc_retain(i8* %x) nounwind
+ %a = call i8* @llvm.objc.retain(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
+ %b = call i8* @llvm.objc.retain(i8* %x) nounwind
call void @use_pointer(i8* %x)
call void @use_pointer(i8* %x)
- call void @objc_release(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
ret void
}
@@ -2363,71 +2363,71 @@ entry:
; @something is not constant.
; CHECK-LABEL: define void @test60a(
-; CHECK: call i8* @objc_retain
-; CHECK: call void @objc_release
+; CHECK: call i8* @llvm.objc.retain
+; CHECK: call void @llvm.objc.release
; CHECK: }
define void @test60a() {
%t = load i8*, i8** @constptr
%s = load i8*, i8** @something
- call i8* @objc_retain(i8* %s)
+ call i8* @llvm.objc.retain(i8* %s)
call void @callee()
call void @use_pointer(i8* %t)
- call void @objc_release(i8* %s)
+ call void @llvm.objc.release(i8* %s)
ret void
}
; CHECK-LABEL: define void @test60b(
-; CHECK: call i8* @objc_retain
-; CHECK-NOT: call i8* @objc_retain
-; CHECK-NOT: call i8* @objc_release
+; CHECK: call i8* @llvm.objc.retain
+; CHECK-NOT: call i8* @llvm.objc.retain
+; CHECK-NOT: call i8* @llvm.objc.release
; CHECK: }
define void @test60b() {
%t = load i8*, i8** @constptr
%s = load i8*, i8** @something
- call i8* @objc_retain(i8* %t)
- call i8* @objc_retain(i8* %t)
+ call i8* @llvm.objc.retain(i8* %t)
+ call i8* @llvm.objc.retain(i8* %t)
call void @callee()
call void @use_pointer(i8* %s)
- call void @objc_release(i8* %t)
+ call void @llvm.objc.release(i8* %t)
ret void
}
; CHECK-LABEL: define void @test60c(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test60c() {
%t = load i8*, i8** @constptr
%s = load i8*, i8** @something
- call i8* @objc_retain(i8* %t)
+ call i8* @llvm.objc.retain(i8* %t)
call void @callee()
call void @use_pointer(i8* %s)
- call void @objc_release(i8* %t), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %t), !clang.imprecise_release !0
ret void
}
; CHECK-LABEL: define void @test60d(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test60d() {
%t = load i8*, i8** @constptr
%s = load i8*, i8** @something
- call i8* @objc_retain(i8* %t)
+ call i8* @llvm.objc.retain(i8* %t)
call void @callee()
call void @use_pointer(i8* %s)
- call void @objc_release(i8* %t)
+ call void @llvm.objc.release(i8* %t)
ret void
}
; CHECK-LABEL: define void @test60e(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test60e() {
%t = load i8*, i8** @constptr
%s = load i8*, i8** @something
- call i8* @objc_retain(i8* %t)
+ call i8* @llvm.objc.retain(i8* %t)
call void @callee()
call void @use_pointer(i8* %s)
- call void @objc_release(i8* %t), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %t), !clang.imprecise_release !0
ret void
}
@@ -2435,14 +2435,14 @@ define void @test60e() {
; pointers.
; CHECK-LABEL: define void @test61(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test61() {
%t = load i8*, i8** @constptr
- call i8* @objc_retain(i8* %t)
+ call i8* @llvm.objc.retain(i8* %t)
call void @callee()
call void @use_pointer(i8* %t)
- call void @objc_release(i8* %t)
+ call void @llvm.objc.release(i8* %t)
ret void
}
@@ -2450,23 +2450,23 @@ define void @test61() {
; other is outside the loop.
; CHECK-LABEL: define void @test62(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test62(i8* %x, i1* %p) nounwind {
entry:
br label %loop
loop:
- call i8* @objc_retain(i8* %x)
+ call i8* @llvm.objc.retain(i8* %x)
%q = load i1, i1* %p
br i1 %q, label %loop.more, label %exit
loop.more:
- call void @objc_release(i8* %x)
+ call void @llvm.objc.release(i8* %x)
br label %loop
exit:
- call void @objc_release(i8* %x)
+ call void @llvm.objc.release(i8* %x)
ret void
}
@@ -2475,21 +2475,21 @@ exit:
; CHECK-LABEL: define void @test63(
; CHECK: loop:
-; CHECK: tail call i8* @objc_retain(i8* %x)
+; CHECK: tail call i8* @llvm.objc.retain(i8* %x)
; CHECK: loop.more:
-; CHECK: call void @objc_release(i8* %x)
+; CHECK: call void @llvm.objc.release(i8* %x)
; CHECK: }
define void @test63(i8* %x, i1* %p) nounwind {
entry:
br label %loop
loop:
- call i8* @objc_retain(i8* %x)
+ call i8* @llvm.objc.retain(i8* %x)
%q = load i1, i1* %p
br i1 %q, label %loop.more, label %exit
loop.more:
- call void @objc_release(i8* %x)
+ call void @llvm.objc.release(i8* %x)
br label %loop
exit:
@@ -2501,16 +2501,16 @@ exit:
; CHECK-LABEL: define void @test64(
; CHECK: loop:
-; CHECK: tail call i8* @objc_retain(i8* %x)
+; CHECK: tail call i8* @llvm.objc.retain(i8* %x)
; CHECK: exit:
-; CHECK: call void @objc_release(i8* %x)
+; CHECK: call void @llvm.objc.release(i8* %x)
; CHECK: }
define void @test64(i8* %x, i1* %p) nounwind {
entry:
br label %loop
loop:
- call i8* @objc_retain(i8* %x)
+ call i8* @llvm.objc.retain(i8* %x)
%q = load i1, i1* %p
br i1 %q, label %loop.more, label %exit
@@ -2518,7 +2518,7 @@ loop.more:
br label %loop
exit:
- call void @objc_release(i8* %x)
+ call void @llvm.objc.release(i8* %x)
ret void
}
@@ -2526,9 +2526,9 @@ exit:
; CHECK-LABEL: define i8* @test65(
; CHECK: if.then:
-; CHECK: call i8* @objc_autorelease(
+; CHECK: call i8* @llvm.objc.autorelease(
; CHECK: return:
-; CHECK-NOT: @objc_autorelease
+; CHECK-NOT: @llvm.objc.autorelease
; CHECK: }
define i8* @test65(i1 %x) {
entry:
@@ -2536,12 +2536,12 @@ entry:
if.then: ; preds = %entry
%c = call i8* @returner()
- %s = call i8* @objc_retainAutoreleasedReturnValue(i8* %c) nounwind
+ %s = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %c) nounwind
br label %return
return: ; preds = %if.then, %entry
%retval = phi i8* [ %s, %if.then ], [ null, %entry ]
- %q = call i8* @objc_autorelease(i8* %retval) nounwind
+ %q = call i8* @llvm.objc.autorelease(i8* %retval) nounwind
ret i8* %retval
}
@@ -2549,24 +2549,24 @@ return:
; CHECK-LABEL: define i8* @test65b(
; CHECK: if.then:
-; CHECK-NOT: @objc_autorelease
+; CHECK-NOT: @llvm.objc.autorelease
; CHECK: return:
-; CHECK: call i8* @objc_autorelease(
+; CHECK: call i8* @llvm.objc.autorelease(
; CHECK: }
define i8* @test65b(i1 %x) {
entry:
- %t = call i8* @objc_autoreleasePoolPush()
+ %t = call i8* @llvm.objc.autoreleasePoolPush()
br i1 %x, label %return, label %if.then
if.then: ; preds = %entry
%c = call i8* @returner()
- %s = call i8* @objc_retainAutoreleasedReturnValue(i8* %c) nounwind
+ %s = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %c) nounwind
br label %return
return: ; preds = %if.then, %entry
%retval = phi i8* [ %s, %if.then ], [ null, %entry ]
- call void @objc_autoreleasePoolPop(i8* %t)
- %q = call i8* @objc_autorelease(i8* %retval) nounwind
+ call void @llvm.objc.autoreleasePoolPop(i8* %t)
+ %q = call i8* @llvm.objc.autorelease(i8* %retval) nounwind
ret i8* %retval
}
@@ -2575,9 +2575,9 @@ return:
; CHECK-LABEL: define i8* @test65c(
; CHECK: if.then:
-; CHECK-NOT: @objc_autorelease
+; CHECK-NOT: @llvm.objc.autorelease
; CHECK: return:
-; CHECK: call i8* @objc_autoreleaseReturnValue(
+; CHECK: call i8* @llvm.objc.autoreleaseReturnValue(
; CHECK: }
define i8* @test65c(i1 %x) {
entry:
@@ -2585,20 +2585,20 @@ entry:
if.then: ; preds = %entry
%c = call i8* @returner()
- %s = call i8* @objc_retainAutoreleasedReturnValue(i8* %c) nounwind
+ %s = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %c) nounwind
br label %return
return: ; preds = %if.then, %entry
%retval = phi i8* [ %s, %if.then ], [ null, %entry ]
- %q = call i8* @objc_autoreleaseReturnValue(i8* %retval) nounwind
+ %q = call i8* @llvm.objc.autoreleaseReturnValue(i8* %retval) nounwind
ret i8* %retval
}
; CHECK-LABEL: define i8* @test65d(
; CHECK: if.then:
-; CHECK-NOT: @objc_autorelease
+; CHECK-NOT: @llvm.objc.autorelease
; CHECK: return:
-; CHECK: call i8* @objc_autoreleaseReturnValue(
+; CHECK: call i8* @llvm.objc.autoreleaseReturnValue(
; CHECK: }
define i8* @test65d(i1 %x) {
entry:
@@ -2606,23 +2606,23 @@ entry:
if.then: ; preds = %entry
%c = call i8* @returner()
- %s = call i8* @objc_unsafeClaimAutoreleasedReturnValue(i8* %c) nounwind
+ %s = call i8* @llvm.objc.unsafeClaimAutoreleasedReturnValue(i8* %c) nounwind
br label %return
return: ; preds = %if.then, %entry
%retval = phi i8* [ %s, %if.then ], [ null, %entry ]
- %q = call i8* @objc_autoreleaseReturnValue(i8* %retval) nounwind
+ %q = call i8* @llvm.objc.autoreleaseReturnValue(i8* %retval) nounwind
ret i8* %retval
}
-; An objc_retain can serve as a may-use for a different pointer.
+; An llvm.objc.retain can serve as a may-use for a different pointer.
; rdar://11931823
; CHECK-LABEL: define void @test66a(
-; CHECK: tail call i8* @objc_retain(i8* %cond) [[NUW]]
-; CHECK: tail call void @objc_release(i8* %call) [[NUW]]
-; CHECK: tail call i8* @objc_retain(i8* %tmp8) [[NUW]]
-; CHECK: tail call void @objc_release(i8* %cond) [[NUW]]
+; CHECK: tail call i8* @llvm.objc.retain(i8* %cond) [[NUW]]
+; CHECK: tail call void @llvm.objc.release(i8* %call) [[NUW]]
+; CHECK: tail call i8* @llvm.objc.retain(i8* %tmp8) [[NUW]]
+; CHECK: tail call void @llvm.objc.release(i8* %cond) [[NUW]]
; CHECK: }
define void @test66a(i8* %tmp5, i8* %bar, i1 %tobool, i1 %tobool1, i8* %call) {
entry:
@@ -2633,19 +2633,19 @@ cond.true:
cond.end: ; preds = %cond.true, %entry
%cond = phi i8* [ %tmp5, %cond.true ], [ %call, %entry ]
- %tmp7 = tail call i8* @objc_retain(i8* %cond) nounwind
- tail call void @objc_release(i8* %call) nounwind
+ %tmp7 = tail call i8* @llvm.objc.retain(i8* %cond) nounwind
+ tail call void @llvm.objc.release(i8* %call) nounwind
%tmp8 = select i1 %tobool1, i8* %cond, i8* %bar
- %tmp9 = tail call i8* @objc_retain(i8* %tmp8) nounwind
- tail call void @objc_release(i8* %cond) nounwind
+ %tmp9 = tail call i8* @llvm.objc.retain(i8* %tmp8) nounwind
+ tail call void @llvm.objc.release(i8* %cond) nounwind
ret void
}
; CHECK-LABEL: define void @test66b(
-; CHECK: tail call i8* @objc_retain(i8* %cond) [[NUW]]
-; CHECK: tail call void @objc_release(i8* %call) [[NUW]]
-; CHECK: tail call i8* @objc_retain(i8* %tmp8) [[NUW]]
-; CHECK: tail call void @objc_release(i8* %cond) [[NUW]]
+; CHECK: tail call i8* @llvm.objc.retain(i8* %cond) [[NUW]]
+; CHECK: tail call void @llvm.objc.release(i8* %call) [[NUW]]
+; CHECK: tail call i8* @llvm.objc.retain(i8* %tmp8) [[NUW]]
+; CHECK: tail call void @llvm.objc.release(i8* %cond) [[NUW]]
; CHECK: }
define void @test66b(i8* %tmp5, i8* %bar, i1 %tobool, i1 %tobool1, i8* %call) {
entry:
@@ -2656,19 +2656,19 @@ cond.true:
cond.end: ; preds = %cond.true, %entry
%cond = phi i8* [ %tmp5, %cond.true ], [ %call, %entry ]
- %tmp7 = tail call i8* @objc_retain(i8* %cond) nounwind
- tail call void @objc_release(i8* %call) nounwind, !clang.imprecise_release !0
+ %tmp7 = tail call i8* @llvm.objc.retain(i8* %cond) nounwind
+ tail call void @llvm.objc.release(i8* %call) nounwind, !clang.imprecise_release !0
%tmp8 = select i1 %tobool1, i8* %cond, i8* %bar
- %tmp9 = tail call i8* @objc_retain(i8* %tmp8) nounwind
- tail call void @objc_release(i8* %cond) nounwind
+ %tmp9 = tail call i8* @llvm.objc.retain(i8* %tmp8) nounwind
+ tail call void @llvm.objc.release(i8* %cond) nounwind
ret void
}
; CHECK-LABEL: define void @test66c(
-; CHECK: tail call i8* @objc_retain(i8* %cond) [[NUW]]
-; CHECK: tail call void @objc_release(i8* %call) [[NUW]]
-; CHECK: tail call i8* @objc_retain(i8* %tmp8) [[NUW]]
-; CHECK: tail call void @objc_release(i8* %cond) [[NUW]]
+; CHECK: tail call i8* @llvm.objc.retain(i8* %cond) [[NUW]]
+; CHECK: tail call void @llvm.objc.release(i8* %call) [[NUW]]
+; CHECK: tail call i8* @llvm.objc.retain(i8* %tmp8) [[NUW]]
+; CHECK: tail call void @llvm.objc.release(i8* %cond) [[NUW]]
; CHECK: }
define void @test66c(i8* %tmp5, i8* %bar, i1 %tobool, i1 %tobool1, i8* %call) {
entry:
@@ -2679,19 +2679,19 @@ cond.true:
cond.end: ; preds = %cond.true, %entry
%cond = phi i8* [ %tmp5, %cond.true ], [ %call, %entry ]
- %tmp7 = tail call i8* @objc_retain(i8* %cond) nounwind
- tail call void @objc_release(i8* %call) nounwind
+ %tmp7 = tail call i8* @llvm.objc.retain(i8* %cond) nounwind
+ tail call void @llvm.objc.release(i8* %call) nounwind
%tmp8 = select i1 %tobool1, i8* %cond, i8* %bar
- %tmp9 = tail call i8* @objc_retain(i8* %tmp8) nounwind, !clang.imprecise_release !0
- tail call void @objc_release(i8* %cond) nounwind
+ %tmp9 = tail call i8* @llvm.objc.retain(i8* %tmp8) nounwind, !clang.imprecise_release !0
+ tail call void @llvm.objc.release(i8* %cond) nounwind
ret void
}
; CHECK-LABEL: define void @test66d(
-; CHECK: tail call i8* @objc_retain(i8* %cond) [[NUW]]
-; CHECK: tail call void @objc_release(i8* %call) [[NUW]]
-; CHECK: tail call i8* @objc_retain(i8* %tmp8) [[NUW]]
-; CHECK: tail call void @objc_release(i8* %cond) [[NUW]]
+; CHECK: tail call i8* @llvm.objc.retain(i8* %cond) [[NUW]]
+; CHECK: tail call void @llvm.objc.release(i8* %call) [[NUW]]
+; CHECK: tail call i8* @llvm.objc.retain(i8* %tmp8) [[NUW]]
+; CHECK: tail call void @llvm.objc.release(i8* %cond) [[NUW]]
; CHECK: }
define void @test66d(i8* %tmp5, i8* %bar, i1 %tobool, i1 %tobool1, i8* %call) {
entry:
@@ -2702,11 +2702,11 @@ cond.true:
cond.end: ; preds = %cond.true, %entry
%cond = phi i8* [ %tmp5, %cond.true ], [ %call, %entry ]
- %tmp7 = tail call i8* @objc_retain(i8* %cond) nounwind
- tail call void @objc_release(i8* %call) nounwind, !clang.imprecise_release !0
+ %tmp7 = tail call i8* @llvm.objc.retain(i8* %cond) nounwind
+ tail call void @llvm.objc.release(i8* %call) nounwind, !clang.imprecise_release !0
%tmp8 = select i1 %tobool1, i8* %cond, i8* %bar
- %tmp9 = tail call i8* @objc_retain(i8* %tmp8) nounwind
- tail call void @objc_release(i8* %cond) nounwind, !clang.imprecise_release !0
+ %tmp9 = tail call i8* @llvm.objc.retain(i8* %tmp8) nounwind
+ tail call void @llvm.objc.release(i8* %cond) nounwind, !clang.imprecise_release !0
ret void
}
@@ -2719,13 +2719,13 @@ declare i32 @puts(i8* nocapture) nounwin
@str = internal constant [16 x i8] c"-[ Top0 _getX ]\00"
; CHECK: define { <2 x float>, <2 x float> } @"\01-[A z]"({}* %self, i8* nocapture %_cmd) [[NUW]] {
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define {<2 x float>, <2 x float>} @"\01-[A z]"({}* %self, i8* nocapture %_cmd) nounwind {
invoke.cont:
%0 = bitcast {}* %self to i8*
- %1 = tail call i8* @objc_retain(i8* %0) nounwind
+ %1 = tail call i8* @llvm.objc.retain(i8* %0) nounwind
tail call void @llvm.dbg.value(metadata {}* %self, metadata !DILocalVariable(scope: !2), metadata !DIExpression()), !dbg !DILocation(scope: !2)
tail call void @llvm.dbg.value(metadata {}* %self, metadata !DILocalVariable(scope: !2), metadata !DIExpression()), !dbg !DILocation(scope: !2)
%ivar = load i64, i64* @"OBJC_IVAR_$_A.myZ", align 8
@@ -2753,7 +2753,7 @@ invoke.cont:
%add.ptr24 = getelementptr i8, i8* %0, i64 %ivar23
%4 = bitcast i8* %add.ptr24 to i128*
%srcval = load i128, i128* %4, align 4
- tail call void @objc_release(i8* %0) nounwind
+ tail call void @llvm.objc.release(i8* %0) nounwind
%tmp29 = trunc i128 %srcval to i64
%tmp30 = bitcast i64 %tmp29 to <2 x float>
%tmp31 = insertvalue {<2 x float>, <2 x float>} undef, <2 x float> %tmp30, 0
@@ -2765,15 +2765,15 @@ invoke.cont:
}
; CHECK: @"\01-[Top0 _getX]"({}* %self, i8* nocapture %_cmd) [[NUW]] {
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define i32 @"\01-[Top0 _getX]"({}* %self, i8* nocapture %_cmd) nounwind {
invoke.cont:
%0 = bitcast {}* %self to i8*
- %1 = tail call i8* @objc_retain(i8* %0) nounwind
+ %1 = tail call i8* @llvm.objc.retain(i8* %0) nounwind
%puts = tail call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
- tail call void @objc_release(i8* %0) nounwind
+ tail call void @llvm.objc.release(i8* %0) nounwind
ret i32 0
}
@@ -2785,36 +2785,36 @@ invoke.cont:
; CHECK: define void @loop(i8* %x, i64 %n) {
; CHECK: for.body:
-; CHECK-NOT: @objc_
-; CHECK: @objc_msgSend
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
+; CHECK: @llvm.objc.msgSend
+; CHECK-NOT: @llvm.objc.
; CHECK: for.end:
; CHECK: }
define void @loop(i8* %x, i64 %n) {
entry:
- %0 = tail call i8* @objc_retain(i8* %x) nounwind
+ %0 = tail call i8* @llvm.objc.retain(i8* %x) nounwind
%cmp9 = icmp sgt i64 %n, 0
br i1 %cmp9, label %for.body, label %for.end
for.body: ; preds = %entry, %for.body
%i.010 = phi i64 [ %inc, %for.body ], [ 0, %entry ]
- %1 = tail call i8* @objc_retain(i8* %x) nounwind
+ %1 = tail call i8* @llvm.objc.retain(i8* %x) nounwind
%tmp5 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8
- %call = tail call i8* (i8*, i8*, ...) @objc_msgSend(i8* %1, i8* %tmp5)
- tail call void @objc_release(i8* %1) nounwind, !clang.imprecise_release !0
+ %call = tail call i8* (i8*, i8*, ...) @llvm.objc.msgSend(i8* %1, i8* %tmp5)
+ tail call void @llvm.objc.release(i8* %1) nounwind, !clang.imprecise_release !0
%inc = add nsw i64 %i.010, 1
%exitcond = icmp eq i64 %inc, %n
br i1 %exitcond, label %for.end, label %for.body
for.end: ; preds = %for.body, %entry
- tail call void @objc_release(i8* %x) nounwind, !clang.imprecise_release !0
+ tail call void @llvm.objc.release(i8* %x) nounwind, !clang.imprecise_release !0
ret void
}
; ObjCARCOpt can delete the retain,release on self.
; CHECK: define void @TextEditTest(%2* %self, %3* %pboard) {
-; CHECK-NOT: call i8* @objc_retain(i8* %tmp7)
+; CHECK-NOT: call i8* @llvm.objc.retain(i8* %tmp7)
; CHECK: }
%0 = type { i8* (i8*, %struct._message_ref_t*, ...)*, i8* }
@@ -2873,34 +2873,34 @@ define void @TextEditTest(%2* %self, %3*
entry:
%err = alloca %4*, align 8
%tmp7 = bitcast %2* %self to i8*
- %tmp8 = call i8* @objc_retain(i8* %tmp7) nounwind
+ %tmp8 = call i8* @llvm.objc.retain(i8* %tmp7) nounwind
store %4* null, %4** %err, align 8
%tmp1 = load %struct._class_t*, %struct._class_t** @"\01L_OBJC_CLASSLIST_REFERENCES_$_17", align 8
%tmp2 = load %struct.__CFString*, %struct.__CFString** @kUTTypePlainText, align 8
%tmp3 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_19", align 8
%tmp4 = bitcast %struct._class_t* %tmp1 to i8*
- %call5 = call i8* (i8*, i8*, ...) @objc_msgSend(i8* %tmp4, i8* %tmp3, %struct.__CFString* %tmp2)
+ %call5 = call i8* (i8*, i8*, ...) @llvm.objc.msgSend(i8* %tmp4, i8* %tmp3, %struct.__CFString* %tmp2)
%tmp5 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_21", align 8
%tmp6 = bitcast %3* %pboard to i8*
- %call76 = call i8* (i8*, i8*, ...) @objc_msgSend(i8* %tmp6, i8* %tmp5, i8* %call5)
- %tmp9 = call i8* @objc_retain(i8* %call76) nounwind
+ %call76 = call i8* (i8*, i8*, ...) @llvm.objc.msgSend(i8* %tmp6, i8* %tmp5, i8* %call5)
+ %tmp9 = call i8* @llvm.objc.retain(i8* %call76) nounwind
%tobool = icmp eq i8* %tmp9, null
br i1 %tobool, label %end, label %land.lhs.true
land.lhs.true: ; preds = %entry
%tmp11 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_23", align 8
- %call137 = call i8* (i8*, i8*, ...) @objc_msgSend(i8* %tmp6, i8* %tmp11, i8* %tmp9)
+ %call137 = call i8* (i8*, i8*, ...) @llvm.objc.msgSend(i8* %tmp6, i8* %tmp11, i8* %tmp9)
%tmp = bitcast i8* %call137 to %1*
- %tmp10 = call i8* @objc_retain(i8* %call137) nounwind
- call void @objc_release(i8* null) nounwind
- %tmp12 = call i8* @objc_retain(i8* %call137) nounwind
- call void @objc_release(i8* null) nounwind
+ %tmp10 = call i8* @llvm.objc.retain(i8* %call137) nounwind
+ call void @llvm.objc.release(i8* null) nounwind
+ %tmp12 = call i8* @llvm.objc.retain(i8* %call137) nounwind
+ call void @llvm.objc.release(i8* null) nounwind
%tobool16 = icmp eq i8* %call137, null
br i1 %tobool16, label %end, label %if.then
if.then: ; preds = %land.lhs.true
%tmp19 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_25", align 8
- %call21 = call signext i8 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8 (i8*, i8*)*)(i8* %call137, i8* %tmp19)
+ %call21 = call signext i8 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8 (i8*, i8*)*)(i8* %call137, i8* %tmp19)
%tobool22 = icmp eq i8 %call21, 0
br i1 %tobool22, label %if.then44, label %land.lhs.true23
@@ -2908,10 +2908,10 @@ land.lhs.true23:
%tmp24 = load %struct._class_t*, %struct._class_t** @"\01L_OBJC_CLASSLIST_REFERENCES_$_26", align 8
%tmp26 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_28", align 8
%tmp27 = bitcast %struct._class_t* %tmp24 to i8*
- %call2822 = call i8* (i8*, i8*, ...) @objc_msgSend(i8* %tmp27, i8* %tmp26, i8* %call137)
+ %call2822 = call i8* (i8*, i8*, ...) @llvm.objc.msgSend(i8* %tmp27, i8* %tmp26, i8* %call137)
%tmp13 = bitcast i8* %call2822 to %5*
- %tmp14 = call i8* @objc_retain(i8* %call2822) nounwind
- call void @objc_release(i8* null) nounwind
+ %tmp14 = call i8* @llvm.objc.retain(i8* %call2822) nounwind
+ call void @llvm.objc.release(i8* null) nounwind
%tobool30 = icmp eq i8* %call2822, null
br i1 %tobool30, label %if.then44, label %if.end
@@ -2919,38 +2919,38 @@ if.end:
%tmp32 = load %struct._class_t*, %struct._class_t** @"\01L_OBJC_CLASSLIST_REFERENCES_$_29", align 8
%tmp33 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_31", align 8
%tmp34 = bitcast %struct._class_t* %tmp32 to i8*
- %call35 = call i8* (i8*, i8*, ...) @objc_msgSend(i8* %tmp34, i8* %tmp33)
+ %call35 = call i8* (i8*, i8*, ...) @llvm.objc.msgSend(i8* %tmp34, i8* %tmp33)
%tmp37 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_33", align 8
- %call3923 = call i8* (i8*, i8*, ...) @objc_msgSend(i8* %call35, i8* %tmp37, i8* %call2822, i32 signext 1, %4** %err)
+ %call3923 = call i8* (i8*, i8*, ...) @llvm.objc.msgSend(i8* %call35, i8* %tmp37, i8* %call2822, i32 signext 1, %4** %err)
%cmp = icmp eq i8* %call3923, null
br i1 %cmp, label %if.then44, label %end
if.then44: ; preds = %if.end, %land.lhs.true23, %if.then
%url.025 = phi %5* [ %tmp13, %if.end ], [ %tmp13, %land.lhs.true23 ], [ null, %if.then ]
%tmp49 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_35", align 8
- %call51 = call %struct._NSRange bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to %struct._NSRange (i8*, i8*, i64, i64)*)(i8* %call137, i8* %tmp49, i64 0, i64 0)
+ %call51 = call %struct._NSRange bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to %struct._NSRange (i8*, i8*, i64, i64)*)(i8* %call137, i8* %tmp49, i64 0, i64 0)
%call513 = extractvalue %struct._NSRange %call51, 0
%call514 = extractvalue %struct._NSRange %call51, 1
%tmp52 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_37", align 8
- %call548 = call i8* (i8*, i8*, ...) @objc_msgSend(i8* %call137, i8* %tmp52, i64 %call513, i64 %call514)
+ %call548 = call i8* (i8*, i8*, ...) @llvm.objc.msgSend(i8* %call137, i8* %tmp52, i64 %call513, i64 %call514)
%tmp55 = load %struct._class_t*, %struct._class_t** @"\01L_OBJC_CLASSLIST_REFERENCES_$_38", align 8
%tmp56 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_40", align 8
%tmp57 = bitcast %struct._class_t* %tmp55 to i8*
- %call58 = call i8* (i8*, i8*, ...) @objc_msgSend(i8* %tmp57, i8* %tmp56)
+ %call58 = call i8* (i8*, i8*, ...) @llvm.objc.msgSend(i8* %tmp57, i8* %tmp56)
%tmp59 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_42", align 8
- %call6110 = call i8* (i8*, i8*, ...) @objc_msgSend(i8* %call548, i8* %tmp59, i8* %call58)
- %tmp15 = call i8* @objc_retain(i8* %call6110) nounwind
- call void @objc_release(i8* %call137) nounwind
+ %call6110 = call i8* (i8*, i8*, ...) @llvm.objc.msgSend(i8* %call548, i8* %tmp59, i8* %call58)
+ %tmp15 = call i8* @llvm.objc.retain(i8* %call6110) nounwind
+ call void @llvm.objc.release(i8* %call137) nounwind
%tmp64 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_46", align 8
- %call66 = call signext i8 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8 (i8*, i8*, %1*)*)(i8* %call6110, i8* %tmp64, %1* bitcast (%struct.NSConstantString* @_unnamed_cfstring_44 to %1*))
+ %call66 = call signext i8 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8 (i8*, i8*, %1*)*)(i8* %call6110, i8* %tmp64, %1* bitcast (%struct.NSConstantString* @_unnamed_cfstring_44 to %1*))
%tobool67 = icmp eq i8 %call66, 0
br i1 %tobool67, label %if.end74, label %if.then68
if.then68: ; preds = %if.then44
%tmp70 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_48", align 8
- %call7220 = call i8* (i8*, i8*, ...) @objc_msgSend(i8* %call6110, i8* %tmp70)
- %tmp16 = call i8* @objc_retain(i8* %call7220) nounwind
- call void @objc_release(i8* %call6110) nounwind
+ %call7220 = call i8* (i8*, i8*, ...) @llvm.objc.msgSend(i8* %call6110, i8* %tmp70)
+ %tmp16 = call i8* @llvm.objc.retain(i8* %call7220) nounwind
+ call void @llvm.objc.release(i8* %call6110) nounwind
br label %if.end74
if.end74: ; preds = %if.then68, %if.then44
@@ -2964,7 +2964,7 @@ if.end74:
land.lhs.true80: ; preds = %if.end74
%tmp82 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_25", align 8
- %call84 = call signext i8 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8 (i8*, i8*)*)(i8* %filename.0.in, i8* %tmp82)
+ %call84 = call signext i8 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8 (i8*, i8*)*)(i8* %filename.0.in, i8* %tmp82)
%tobool86 = icmp eq i8 %call84, 0
br i1 %tobool86, label %if.then109, label %if.end106
@@ -2972,17 +2972,17 @@ if.end106:
%tmp88 = load %struct._class_t*, %struct._class_t** @"\01L_OBJC_CLASSLIST_REFERENCES_$_26", align 8
%tmp90 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_28", align 8
%tmp91 = bitcast %struct._class_t* %tmp88 to i8*
- %call9218 = call i8* (i8*, i8*, ...) @objc_msgSend(i8* %tmp91, i8* %tmp90, i8* %filename.0.in)
+ %call9218 = call i8* (i8*, i8*, ...) @llvm.objc.msgSend(i8* %tmp91, i8* %tmp90, i8* %filename.0.in)
%tmp20 = bitcast i8* %call9218 to %5*
- %tmp21 = call i8* @objc_retain(i8* %call9218) nounwind
+ %tmp21 = call i8* @llvm.objc.retain(i8* %call9218) nounwind
%tmp22 = bitcast %5* %url.025 to i8*
- call void @objc_release(i8* %tmp22) nounwind
+ call void @llvm.objc.release(i8* %tmp22) nounwind
%tmp94 = load %struct._class_t*, %struct._class_t** @"\01L_OBJC_CLASSLIST_REFERENCES_$_29", align 8
%tmp95 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_31", align 8
%tmp96 = bitcast %struct._class_t* %tmp94 to i8*
- %call97 = call i8* (i8*, i8*, ...) @objc_msgSend(i8* %tmp96, i8* %tmp95)
+ %call97 = call i8* (i8*, i8*, ...) @llvm.objc.msgSend(i8* %tmp96, i8* %tmp95)
%tmp99 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_33", align 8
- %call10119 = call i8* (i8*, i8*, ...) @objc_msgSend(i8* %call97, i8* %tmp99, i8* %call9218, i32 signext 1, %4** %err)
+ %call10119 = call i8* (i8*, i8*, ...) @llvm.objc.msgSend(i8* %call97, i8* %tmp99, i8* %call9218, i32 signext 1, %4** %err)
%phitmp = icmp eq i8* %call10119, null
br i1 %phitmp, label %if.then109, label %end
@@ -3000,12 +3000,12 @@ if.then112:
%tmp118 = load %1*, %1** @NSFilePathErrorKey, align 8
%tmp119 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_53", align 8
%tmp120 = bitcast %struct._class_t* %tmp115 to i8*
- %call12113 = call i8* (i8*, i8*, ...) @objc_msgSend(i8* %tmp120, i8* %tmp119, %1* %call117, %1* %tmp118, i8* null)
+ %call12113 = call i8* (i8*, i8*, ...) @llvm.objc.msgSend(i8* %tmp120, i8* %tmp119, %1* %call117, %1* %tmp118, i8* null)
%tmp122 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_55", align 8
%tmp123 = bitcast %struct._class_t* %tmp113 to i8*
- %call12414 = call i8* (i8*, i8*, ...) @objc_msgSend(i8* %tmp123, i8* %tmp122, %1* %tmp114, i64 258, i8* %call12113)
- %tmp23 = call i8* @objc_retain(i8* %call12414) nounwind
- %tmp25 = call i8* @objc_autorelease(i8* %tmp23) nounwind
+ %call12414 = call i8* (i8*, i8*, ...) @llvm.objc.msgSend(i8* %tmp123, i8* %tmp122, %1* %tmp114, i64 258, i8* %call12113)
+ %tmp23 = call i8* @llvm.objc.retain(i8* %call12414) nounwind
+ %tmp25 = call i8* @llvm.objc.autorelease(i8* %tmp23) nounwind
%tmp28 = bitcast i8* %tmp25 to %4*
store %4* %tmp28, %4** %err, align 8
br label %if.end125
@@ -3015,44 +3015,44 @@ if.end125:
%tmp126 = load %struct._class_t*, %struct._class_t** @"\01L_OBJC_CLASSLIST_REFERENCES_$_56", align 8
%tmp128 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_58", align 8
%tmp129 = bitcast %struct._class_t* %tmp126 to i8*
- %call13015 = call i8* (i8*, i8*, ...) @objc_msgSend(i8* %tmp129, i8* %tmp128, %4* %tmp127)
+ %call13015 = call i8* (i8*, i8*, ...) @llvm.objc.msgSend(i8* %tmp129, i8* %tmp128, %4* %tmp127)
%tmp131 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_60", align 8
- %call13317 = call i8* (i8*, i8*, ...) @objc_msgSend(i8* %call13015, i8* %tmp131)
+ %call13317 = call i8* (i8*, i8*, ...) @llvm.objc.msgSend(i8* %call13015, i8* %tmp131)
br label %end
end: ; preds = %if.end125, %if.end106, %if.end, %land.lhs.true, %entry
%filename.2 = phi %1* [ %filename.0, %if.end106 ], [ %filename.0, %if.end125 ], [ %tmp, %land.lhs.true ], [ null, %entry ], [ %tmp, %if.end ]
%origFilename.0 = phi %1* [ %tmp, %if.end106 ], [ %tmp, %if.end125 ], [ %tmp, %land.lhs.true ], [ null, %entry ], [ %tmp, %if.end ]
%url.2 = phi %5* [ %tmp20, %if.end106 ], [ %url.129, %if.end125 ], [ null, %land.lhs.true ], [ null, %entry ], [ %tmp13, %if.end ]
- call void @objc_release(i8* %tmp9) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %tmp9) nounwind, !clang.imprecise_release !0
%tmp29 = bitcast %5* %url.2 to i8*
- call void @objc_release(i8* %tmp29) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %tmp29) nounwind, !clang.imprecise_release !0
%tmp30 = bitcast %1* %origFilename.0 to i8*
- call void @objc_release(i8* %tmp30) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %tmp30) nounwind, !clang.imprecise_release !0
%tmp31 = bitcast %1* %filename.2 to i8*
- call void @objc_release(i8* %tmp31) nounwind, !clang.imprecise_release !0
- call void @objc_release(i8* %tmp7) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %tmp31) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %tmp7) nounwind, !clang.imprecise_release !0
ret void
}
declare i32 @__gxx_personality_v0(...)
-declare i32 @objc_sync_enter(i8*)
-declare i32 @objc_sync_exit(i8*)
+declare i32 @llvm.objc.sync.enter(i8*)
+declare i32 @llvm.objc.sync.exit(i8*)
; Make sure that we understand that objc_sync_{enter,exit} are IC_User not
; IC_Call/IC_CallOrUser.
; CHECK-LABEL: define void @test67(
-; CHECK-NEXT: call i32 @objc_sync_enter(i8* %x)
-; CHECK-NEXT: call i32 @objc_sync_exit(i8* %x)
+; CHECK-NEXT: call i32 @llvm.objc.sync.enter(i8* %x)
+; CHECK-NEXT: call i32 @llvm.objc.sync.exit(i8* %x)
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test67(i8* %x) {
- call i8* @objc_retain(i8* %x)
- call i32 @objc_sync_enter(i8* %x)
- call i32 @objc_sync_exit(i8* %x)
- call void @objc_release(i8* %x), !clang.imprecise_release !0
+ call i8* @llvm.objc.retain(i8* %x)
+ call i32 @llvm.objc.sync.enter(i8* %x)
+ call i32 @llvm.objc.sync.exit(i8* %x)
+ call void @llvm.objc.release(i8* %x), !clang.imprecise_release !0
ret void
}
@@ -3069,6 +3069,6 @@ define void @test67(i8* %x) {
!4 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
!5 = !{i32 2, !"Debug Info Version", i32 3}
-; CHECK: attributes #0 = { nounwind readnone speculatable }
; CHECK: attributes [[NUW]] = { nounwind }
+; CHECK: attributes #1 = { nounwind readnone speculatable }
; CHECK: ![[RELEASE]] = !{}
Modified: llvm/trunk/test/Transforms/ObjCARC/cfg-hazards.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/cfg-hazards.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/cfg-hazards.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/cfg-hazards.ll Tue Dec 18 12:32:49 2018
@@ -5,21 +5,21 @@
; across them.
declare void @use_pointer(i8*)
-declare i8* @objc_retain(i8*)
-declare void @objc_release(i8*)
+declare i8* @llvm.objc.retain(i8*)
+declare void @llvm.objc.release(i8*)
declare void @callee()
declare void @block_callee(void ()*)
; CHECK-LABEL: define void @test0(
-; CHECK: call i8* @objc_retain(
+; CHECK: call i8* @llvm.objc.retain
; CHECK: for.body:
; CHECK-NOT: @objc
; CHECK: for.end:
-; CHECK: call void @objc_release(
+; CHECK: call void @llvm.objc.release
; CHECK: }
define void @test0(i8* %digits) {
entry:
- %tmp1 = call i8* @objc_retain(i8* %digits) nounwind
+ %tmp1 = call i8* @llvm.objc.retain(i8* %digits) nounwind
call void @use_pointer(i8* %digits)
br label %for.body
@@ -31,20 +31,20 @@ for.body:
br i1 %cmp, label %for.body, label %for.end
for.end: ; preds = %for.body
- call void @objc_release(i8* %digits) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %digits) nounwind, !clang.imprecise_release !0
ret void
}
; CHECK-LABEL: define void @test1(
-; CHECK: call i8* @objc_retain(
+; CHECK: call i8* @llvm.objc.retain
; CHECK: for.body:
; CHECK-NOT: @objc
; CHECK: for.end:
-; CHECK: void @objc_release(
+; CHECK: void @llvm.objc.release
; CHECK: }
define void @test1(i8* %digits) {
entry:
- %tmp1 = call i8* @objc_retain(i8* %digits) nounwind
+ %tmp1 = call i8* @llvm.objc.retain(i8* %digits) nounwind
br label %for.body
for.body: ; preds = %for.body, %entry
@@ -56,20 +56,20 @@ for.body:
br i1 %cmp, label %for.body, label %for.end
for.end: ; preds = %for.body
- call void @objc_release(i8* %digits) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %digits) nounwind, !clang.imprecise_release !0
ret void
}
; CHECK-LABEL: define void @test2(
-; CHECK: call i8* @objc_retain(
+; CHECK: call i8* @llvm.objc.retain
; CHECK: for.body:
; CHECK-NOT: @objc
; CHECK: for.end:
-; CHECK: void @objc_release(
+; CHECK: void @llvm.objc.release
; CHECK: }
define void @test2(i8* %digits) {
entry:
- %tmp1 = call i8* @objc_retain(i8* %digits) nounwind
+ %tmp1 = call i8* @llvm.objc.retain(i8* %digits) nounwind
br label %for.body
for.body: ; preds = %for.body, %entry
@@ -81,7 +81,7 @@ for.body:
for.end: ; preds = %for.body
call void @use_pointer(i8* %digits)
- call void @objc_release(i8* %digits) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %digits) nounwind, !clang.imprecise_release !0
ret void
}
@@ -89,17 +89,17 @@ for.end:
; CHECK: define void @test3(i8* %a) #0 {
; CHECK-NEXT: entry:
-; CHECK-NEXT: tail call i8* @objc_retain(i8* %a) [[NUW:#[0-9]+]]
+; CHECK-NEXT: tail call i8* @llvm.objc.retain(i8* %a) [[NUW:#[0-9]+]]
; CHECK-NEXT: br label %loop
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: exit:
-; CHECK-NEXT: call void @objc_release(i8* %a)
+; CHECK-NEXT: call void @llvm.objc.release(i8* %a)
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test3(i8* %a) nounwind {
entry:
- %outer = call i8* @objc_retain(i8* %a) nounwind
- %inner = call i8* @objc_retain(i8* %a) nounwind
+ %outer = call i8* @llvm.objc.retain(i8* %a) nounwind
+ %inner = call i8* @llvm.objc.retain(i8* %a) nounwind
br label %loop
loop:
@@ -108,24 +108,24 @@ loop:
br i1 undef, label %loop, label %exit
exit:
- call void @objc_release(i8* %a) nounwind
- call void @objc_release(i8* %a) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %a) nounwind
+ call void @llvm.objc.release(i8* %a) nounwind, !clang.imprecise_release !0
ret void
}
; CHECK: define void @test4(i8* %a) #0 {
; CHECK-NEXT: entry:
-; CHECK-NEXT: tail call i8* @objc_retain(i8* %a) [[NUW]]
+; CHECK-NEXT: tail call i8* @llvm.objc.retain(i8* %a) [[NUW]]
; CHECK-NEXT: br label %loop
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: exit:
-; CHECK-NEXT: call void @objc_release(i8* %a)
+; CHECK-NEXT: call void @llvm.objc.release(i8* %a)
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test4(i8* %a) nounwind {
entry:
- %outer = call i8* @objc_retain(i8* %a) nounwind
- %inner = call i8* @objc_retain(i8* %a) nounwind
+ %outer = call i8* @llvm.objc.retain(i8* %a) nounwind
+ %inner = call i8* @llvm.objc.retain(i8* %a) nounwind
br label %loop
loop:
@@ -138,26 +138,26 @@ more:
br i1 undef, label %loop, label %exit
exit:
- call void @objc_release(i8* %a) nounwind
- call void @objc_release(i8* %a) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %a) nounwind
+ call void @llvm.objc.release(i8* %a) nounwind, !clang.imprecise_release !0
ret void
}
; CHECK: define void @test5(i8* %a) #0 {
; CHECK-NEXT: entry:
-; CHECK-NEXT: tail call i8* @objc_retain(i8* %a) [[NUW]]
+; CHECK-NEXT: tail call i8* @llvm.objc.retain(i8* %a) [[NUW]]
; CHECK-NEXT: call void @callee()
; CHECK-NEXT: br label %loop
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: exit:
; CHECK-NEXT: call void @use_pointer(i8* %a)
-; CHECK-NEXT: call void @objc_release(i8* %a)
+; CHECK-NEXT: call void @llvm.objc.release(i8* %a)
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test5(i8* %a) nounwind {
entry:
- %outer = tail call i8* @objc_retain(i8* %a) nounwind
- %inner = tail call i8* @objc_retain(i8* %a) nounwind
+ %outer = tail call i8* @llvm.objc.retain(i8* %a) nounwind
+ %inner = tail call i8* @llvm.objc.retain(i8* %a) nounwind
call void @callee()
br label %loop
@@ -172,25 +172,25 @@ more:
exit:
call void @use_pointer(i8* %a)
- call void @objc_release(i8* %a) nounwind
- call void @objc_release(i8* %a) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %a) nounwind
+ call void @llvm.objc.release(i8* %a) nounwind, !clang.imprecise_release !0
ret void
}
; CHECK: define void @test6(i8* %a) #0 {
; CHECK-NEXT: entry:
-; CHECK-NEXT: tail call i8* @objc_retain(i8* %a) [[NUW]]
+; CHECK-NEXT: tail call i8* @llvm.objc.retain(i8* %a) [[NUW]]
; CHECK-NEXT: br label %loop
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: exit:
; CHECK-NEXT: call void @use_pointer(i8* %a)
-; CHECK-NEXT: call void @objc_release(i8* %a)
+; CHECK-NEXT: call void @llvm.objc.release(i8* %a)
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test6(i8* %a) nounwind {
entry:
- %outer = tail call i8* @objc_retain(i8* %a) nounwind
- %inner = tail call i8* @objc_retain(i8* %a) nounwind
+ %outer = tail call i8* @llvm.objc.retain(i8* %a) nounwind
+ %inner = tail call i8* @llvm.objc.retain(i8* %a) nounwind
br label %loop
loop:
@@ -205,25 +205,25 @@ more:
exit:
call void @use_pointer(i8* %a)
- call void @objc_release(i8* %a) nounwind
- call void @objc_release(i8* %a) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %a) nounwind
+ call void @llvm.objc.release(i8* %a) nounwind, !clang.imprecise_release !0
ret void
}
; CHECK: define void @test7(i8* %a) #0 {
; CHECK-NEXT: entry:
-; CHECK-NEXT: tail call i8* @objc_retain(i8* %a) [[NUW]]
+; CHECK-NEXT: tail call i8* @llvm.objc.retain(i8* %a) [[NUW]]
; CHECK-NEXT: call void @callee()
; CHECK-NEXT: br label %loop
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: exit:
-; CHECK-NEXT: call void @objc_release(i8* %a)
+; CHECK-NEXT: call void @llvm.objc.release(i8* %a)
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test7(i8* %a) nounwind {
entry:
- %outer = tail call i8* @objc_retain(i8* %a) nounwind
- %inner = tail call i8* @objc_retain(i8* %a) nounwind
+ %outer = tail call i8* @llvm.objc.retain(i8* %a) nounwind
+ %inner = tail call i8* @llvm.objc.retain(i8* %a) nounwind
call void @callee()
br label %loop
@@ -238,24 +238,24 @@ more:
br i1 undef, label %exit, label %loop
exit:
- call void @objc_release(i8* %a) nounwind
- call void @objc_release(i8* %a) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %a) nounwind
+ call void @llvm.objc.release(i8* %a) nounwind, !clang.imprecise_release !0
ret void
}
; CHECK: define void @test8(i8* %a) #0 {
; CHECK-NEXT: entry:
-; CHECK-NEXT: tail call i8* @objc_retain(i8* %a) [[NUW]]
+; CHECK-NEXT: tail call i8* @llvm.objc.retain(i8* %a) [[NUW]]
; CHECK-NEXT: br label %loop
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: exit:
-; CHECK-NEXT: call void @objc_release(i8* %a)
+; CHECK-NEXT: call void @llvm.objc.release(i8* %a)
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test8(i8* %a) nounwind {
entry:
- %outer = tail call i8* @objc_retain(i8* %a) nounwind
- %inner = tail call i8* @objc_retain(i8* %a) nounwind
+ %outer = tail call i8* @llvm.objc.retain(i8* %a) nounwind
+ %inner = tail call i8* @llvm.objc.retain(i8* %a) nounwind
br label %loop
loop:
@@ -270,22 +270,22 @@ more:
br i1 undef, label %exit, label %loop
exit:
- call void @objc_release(i8* %a) nounwind
- call void @objc_release(i8* %a) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %a) nounwind
+ call void @llvm.objc.release(i8* %a) nounwind, !clang.imprecise_release !0
ret void
}
; CHECK: define void @test9(i8* %a) #0 {
; CHECK-NEXT: entry:
; CHECK-NEXT: br label %loop
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: exit:
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test9(i8* %a) nounwind {
entry:
- %outer = tail call i8* @objc_retain(i8* %a) nounwind
- %inner = tail call i8* @objc_retain(i8* %a) nounwind
+ %outer = tail call i8* @llvm.objc.retain(i8* %a) nounwind
+ %inner = tail call i8* @llvm.objc.retain(i8* %a) nounwind
br label %loop
loop:
@@ -299,22 +299,22 @@ more:
br i1 undef, label %exit, label %loop
exit:
- call void @objc_release(i8* %a) nounwind
- call void @objc_release(i8* %a) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %a) nounwind
+ call void @llvm.objc.release(i8* %a) nounwind, !clang.imprecise_release !0
ret void
}
; CHECK: define void @test10(i8* %a) #0 {
; CHECK-NEXT: entry:
; CHECK-NEXT: br label %loop
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: exit:
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test10(i8* %a) nounwind {
entry:
- %outer = tail call i8* @objc_retain(i8* %a) nounwind
- %inner = tail call i8* @objc_retain(i8* %a) nounwind
+ %outer = tail call i8* @llvm.objc.retain(i8* %a) nounwind
+ %inner = tail call i8* @llvm.objc.retain(i8* %a) nounwind
br label %loop
loop:
@@ -328,22 +328,22 @@ more:
br i1 undef, label %exit, label %loop
exit:
- call void @objc_release(i8* %a) nounwind
- call void @objc_release(i8* %a) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %a) nounwind
+ call void @llvm.objc.release(i8* %a) nounwind, !clang.imprecise_release !0
ret void
}
; CHECK: define void @test11(i8* %a) #0 {
; CHECK-NEXT: entry:
; CHECK-NEXT: br label %loop
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: exit:
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test11(i8* %a) nounwind {
entry:
- %outer = tail call i8* @objc_retain(i8* %a) nounwind
- %inner = tail call i8* @objc_retain(i8* %a) nounwind
+ %outer = tail call i8* @llvm.objc.retain(i8* %a) nounwind
+ %inner = tail call i8* @llvm.objc.retain(i8* %a) nounwind
br label %loop
loop:
@@ -356,8 +356,8 @@ more:
br i1 undef, label %exit, label %loop
exit:
- call void @objc_release(i8* %a) nounwind
- call void @objc_release(i8* %a) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %a) nounwind
+ call void @llvm.objc.release(i8* %a) nounwind, !clang.imprecise_release !0
ret void
}
@@ -365,19 +365,19 @@ exit:
; CHECK: define void @test12(i8* %a) #0 {
; CHECK-NEXT: entry:
-; CHECK-NEXT: %outer = tail call i8* @objc_retain(i8* %a) [[NUW]]
-; CHECK-NEXT: %inner = tail call i8* @objc_retain(i8* %a) [[NUW]]
+; CHECK-NEXT: %outer = tail call i8* @llvm.objc.retain(i8* %a) [[NUW]]
+; CHECK-NEXT: %inner = tail call i8* @llvm.objc.retain(i8* %a) [[NUW]]
; CHECK-NEXT: br label %loop
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: exit:
-; CHECK-NEXT: call void @objc_release(i8* %a) [[NUW]]
-; CHECK-NEXT: call void @objc_release(i8* %a) [[NUW]], !clang.imprecise_release !0
+; CHECK-NEXT: call void @llvm.objc.release(i8* %a) [[NUW]]
+; CHECK-NEXT: call void @llvm.objc.release(i8* %a) [[NUW]], !clang.imprecise_release !0
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test12(i8* %a) nounwind {
entry:
- %outer = tail call i8* @objc_retain(i8* %a) nounwind
- %inner = tail call i8* @objc_retain(i8* %a) nounwind
+ %outer = tail call i8* @llvm.objc.retain(i8* %a) nounwind
+ %inner = tail call i8* @llvm.objc.retain(i8* %a) nounwind
br label %loop
loop:
@@ -390,8 +390,8 @@ more:
br i1 undef, label %exit, label %loop
exit:
- call void @objc_release(i8* %a) nounwind
- call void @objc_release(i8* %a) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %a) nounwind
+ call void @llvm.objc.release(i8* %a) nounwind, !clang.imprecise_release !0
ret void
}
@@ -402,31 +402,31 @@ exit:
; CHECK: define void @test13(i8* %a) [[NUW]] {
; CHECK: entry:
-; CHECK: tail call i8* @objc_retain(i8* %a) [[NUW]]
+; CHECK: tail call i8* @llvm.objc.retain(i8* %a) [[NUW]]
; CHECK: loop:
-; CHECK: tail call i8* @objc_retain(i8* %a) [[NUW]]
+; CHECK: tail call i8* @llvm.objc.retain(i8* %a) [[NUW]]
; CHECK: call void @block_callee
-; CHECK: call void @objc_release(i8* %reloaded_a) [[NUW]]
+; CHECK: call void @llvm.objc.release(i8* %reloaded_a) [[NUW]]
; CHECK: exit:
-; CHECK: call void @objc_release(i8* %a) [[NUW]]
+; CHECK: call void @llvm.objc.release(i8* %a) [[NUW]]
; CHECK: }
define void @test13(i8* %a) nounwind {
entry:
%block = alloca i8*
- %a1 = tail call i8* @objc_retain(i8* %a) nounwind
+ %a1 = tail call i8* @llvm.objc.retain(i8* %a) nounwind
br label %loop
loop:
- %a2 = tail call i8* @objc_retain(i8* %a) nounwind
+ %a2 = tail call i8* @llvm.objc.retain(i8* %a) nounwind
store i8* %a, i8** %block, align 8
%casted_block = bitcast i8** %block to void ()*
call void @block_callee(void ()* %casted_block)
%reloaded_a = load i8*, i8** %block, align 8
- call void @objc_release(i8* %reloaded_a) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %reloaded_a) nounwind, !clang.imprecise_release !0
br i1 undef, label %loop, label %exit
exit:
- call void @objc_release(i8* %a) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %a) nounwind, !clang.imprecise_release !0
ret void
}
Modified: llvm/trunk/test/Transforms/ObjCARC/clang-arc-use-barrier.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/clang-arc-use-barrier.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/clang-arc-use-barrier.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/clang-arc-use-barrier.ll Tue Dec 18 12:32:49 2018
@@ -2,36 +2,36 @@
%0 = type opaque
-; Make sure ARC optimizer doesn't sink @obj_retain past @clang.arc.use.
+; Make sure ARC optimizer doesn't sink @obj_retain past @llvm.objc.clang.arc.use.
-; CHECK: call i8* @objc_retain(
-; CHECK: call void (...) @clang.arc.use(
-; CHECK: call i8* @objc_retain(
-; CHECK: call void (...) @clang.arc.use(
+; CHECK: call i8* @llvm.objc.retain
+; CHECK: call void (...) @llvm.objc.clang.arc.use(
+; CHECK: call i8* @llvm.objc.retain
+; CHECK: call void (...) @llvm.objc.clang.arc.use(
define void @runTest() local_unnamed_addr {
%1 = alloca %0*, align 8
%2 = alloca %0*, align 8
%3 = tail call %0* @foo0()
%4 = bitcast %0* %3 to i8*
- %5 = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %4)
+ %5 = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %4)
store %0* %3, %0** %1, align 8
call void @foo1(%0** nonnull %1)
%6 = load %0*, %0** %1, align 8
%7 = bitcast %0* %6 to i8*
- %8 = call i8* @objc_retain(i8* %7)
- call void (...) @clang.arc.use(%0* %3)
- call void @objc_release(i8* %4)
+ %8 = call i8* @llvm.objc.retain(i8* %7)
+ call void (...) @llvm.objc.clang.arc.use(%0* %3)
+ call void @llvm.objc.release(i8* %4)
store %0* %6, %0** %2, align 8
call void @foo1(%0** nonnull %2)
%9 = load %0*, %0** %2, align 8
%10 = bitcast %0* %9 to i8*
- %11 = call i8* @objc_retain(i8* %10)
- call void (...) @clang.arc.use(%0* %6)
+ %11 = call i8* @llvm.objc.retain(i8* %10)
+ call void (...) @llvm.objc.clang.arc.use(%0* %6)
%tmp1 = load %0*, %0** %2, align 8
- call void @objc_release(i8* %7)
+ call void @llvm.objc.release(i8* %7)
call void @foo2(%0* %9)
- call void @objc_release(i8* %10)
+ call void @llvm.objc.release(i8* %10)
ret void
}
@@ -39,7 +39,7 @@ declare %0* @foo0() local_unnamed_addr
declare void @foo1(%0**) local_unnamed_addr
declare void @foo2(%0*) local_unnamed_addr
-declare i8* @objc_retainAutoreleasedReturnValue(i8*) local_unnamed_addr
-declare i8* @objc_retain(i8*) local_unnamed_addr
-declare void @clang.arc.use(...) local_unnamed_addr
-declare void @objc_release(i8*) local_unnamed_addr
+declare i8* @llvm.objc.retainAutoreleasedReturnValue(i8*) local_unnamed_addr
+declare i8* @llvm.objc.retain(i8*) local_unnamed_addr
+declare void @llvm.objc.clang.arc.use(...) local_unnamed_addr
+declare void @llvm.objc.release(i8*) local_unnamed_addr
Modified: llvm/trunk/test/Transforms/ObjCARC/comdat-ipo.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/comdat-ipo.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/comdat-ipo.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/comdat-ipo.ll Tue Dec 18 12:32:49 2018
@@ -30,24 +30,24 @@ entry:
; CHECK-LABEL: define internal void @_GLOBAL__I_x() {
define internal void @_GLOBAL__I_x() {
entry:
-; CHECK: call i8* @objc_autoreleasePoolPush()
+; CHECK: call i8* @llvm.objc.autoreleasePoolPush()
; CHECK-NEXT: call void @__cxx_global_var_init()
-; CHECK-NEXT: call void @objc_autoreleasePoolPop(i8* %0)
+; CHECK-NEXT: call void @llvm.objc.autoreleasePoolPop(i8* %0)
; CHECK-NEXT: ret void
- %0 = call i8* @objc_autoreleasePoolPush() nounwind
+ %0 = call i8* @llvm.objc.autoreleasePoolPush() nounwind
call void @__cxx_global_var_init()
- call void @objc_autoreleasePoolPop(i8* %0) nounwind
+ call void @llvm.objc.autoreleasePoolPop(i8* %0) nounwind
ret void
}
define internal void @_GLOBAL__I_y() {
entry:
- %0 = call i8* @objc_autoreleasePoolPush() nounwind
+ %0 = call i8* @llvm.objc.autoreleasePoolPush() nounwind
call void @__dxx_global_var_init()
- call void @objc_autoreleasePoolPop(i8* %0) nounwind
+ call void @llvm.objc.autoreleasePoolPop(i8* %0) nounwind
ret void
}
-declare i8* @objc_autoreleasePoolPush()
-declare void @objc_autoreleasePoolPop(i8*)
+declare i8* @llvm.objc.autoreleasePoolPush()
+declare void @llvm.objc.autoreleasePoolPop(i8*)
Modified: llvm/trunk/test/Transforms/ObjCARC/contract-catchswitch.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/contract-catchswitch.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/contract-catchswitch.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/contract-catchswitch.ll Tue Dec 18 12:32:49 2018
@@ -6,8 +6,8 @@ target triple = "i686--windows-msvc19.11
%0 = type opaque
declare i32 @__CxxFrameHandler3(...)
-declare dllimport void @objc_release(i8*) local_unnamed_addr
-declare dllimport i8* @objc_retain(i8* returned) local_unnamed_addr
+declare dllimport void @llvm.objc.release(i8*) local_unnamed_addr
+declare dllimport i8* @llvm.objc.retain(i8* returned) local_unnamed_addr
@p = global i8* null, align 4
@@ -17,7 +17,7 @@ define void @g() local_unnamed_addr pers
entry:
%tmp = load i8*, i8** @p, align 4
%cast = bitcast i8* %tmp to %0*
- %tmp1 = tail call i8* @objc_retain(i8* %tmp) #0
+ %tmp1 = tail call i8* @llvm.objc.retain(i8* %tmp) #0
; Split the basic block to ensure bitcast ends up in entry.split.
br label %entry.split
@@ -43,8 +43,8 @@ catch1:
invoke.cont:
%tmp6 = load i8*, i8** @p, align 4
%cast1 = bitcast i8* %tmp6 to %0*
- %tmp7 = tail call i8* @objc_retain(i8* %tmp6) #0
- call void @objc_release(i8* %tmp) #0, !clang.imprecise_release !0
+ %tmp7 = tail call i8* @llvm.objc.retain(i8* %tmp6) #0
+ call void @llvm.objc.release(i8* %tmp) #0, !clang.imprecise_release !0
; Split the basic block to ensure bitcast ends up in invoke.cont.split.
br label %invoke.cont.split
@@ -59,7 +59,7 @@ ehcleanup:
%tmp8 = phi %0* [ %cast, %catch.dispatch1 ], [ %cast1, %invoke.cont.split ]
%tmp9 = cleanuppad within none []
%tmp10 = bitcast %0* %tmp8 to i8*
- call void @objc_release(i8* %tmp10) #0 [ "funclet"(token %tmp9) ]
+ call void @llvm.objc.release(i8* %tmp10) #0 [ "funclet"(token %tmp9) ]
cleanupret from %tmp9 unwind to caller
}
Modified: llvm/trunk/test/Transforms/ObjCARC/contract-end-of-use-list.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/contract-end-of-use-list.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/contract-end-of-use-list.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/contract-end-of-use-list.ll Tue Dec 18 12:32:49 2018
@@ -10,14 +10,14 @@ target triple = "x86_64-apple-darwin13.2
define internal i8* @foo() {
entry:
%call = call i8* @bar()
-; CHECK: %retained1 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call)
- %retained1 = call i8* @objc_retain(i8* %call)
+; CHECK: %retained1 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call)
+ %retained1 = call i8* @llvm.objc.retain(i8* %call)
%isnull = icmp eq i8* %retained1, null
br i1 %isnull, label %cleanup, label %if.end
if.end:
-; CHECK: %retained2 = call i8* @objc_retain(i8* %retained1)
- %retained2 = call i8* @objc_retain(i8* %retained1)
+; CHECK: %retained2 = call i8* @llvm.objc.retain(i8* %retained1)
+ %retained2 = call i8* @llvm.objc.retain(i8* %retained1)
br label %cleanup
cleanup:
@@ -27,4 +27,4 @@ cleanup:
declare i8* @bar()
-declare extern_weak i8* @objc_retain(i8*)
+declare extern_weak i8* @llvm.objc.retain(i8*)
Modified: llvm/trunk/test/Transforms/ObjCARC/contract-marker-funclet.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/contract-marker-funclet.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/contract-marker-funclet.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/contract-marker-funclet.ll Tue Dec 18 12:32:49 2018
@@ -21,22 +21,22 @@ catch.dispatch:
catch: ; preds = %catch.dispatch
%1 = catchpad within %0 [i8* null, i32 64, i8* null]
%call1 = call i8* @"\01?f@@YAPAUobjc_object@@XZ"() [ "funclet"(token %1) ]
- %2 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call1) [ "funclet"(token %1) ]
- call void @objc_release(i8* %2) [ "funclet"(token %1) ]
+ %2 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call1) [ "funclet"(token %1) ]
+ call void @llvm.objc.release(i8* %2) [ "funclet"(token %1) ]
br label %catch.1
catch.1: ; preds = %catch
%call2 = call i8* @"\01?f@@YAPAUobjc_object@@XZ"() [ "funclet"(token %1) ]
- %3 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call2) [ "funclet"(token %1) ]
- call void @objc_release(i8* %3) [ "funclet"(token %1) ]
+ %3 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call2) [ "funclet"(token %1) ]
+ call void @llvm.objc.release(i8* %3) [ "funclet"(token %1) ]
catchret from %1 to label %catchret.dest
catchret.dest: ; preds = %catch.1
ret void
invoke.cont: ; preds = %entry
- %4 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call)
- call void @objc_release(i8* %4)
+ %4 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call)
+ call void @llvm.objc.release(i8* %4)
ret void
}
@@ -44,9 +44,9 @@ declare i8* @"\01?f@@YAPAUobjc_object@@X
declare i32 @__CxxFrameHandler3(...)
-declare dllimport i8* @objc_retainAutoreleasedReturnValue(i8*)
+declare dllimport i8* @llvm.objc.retainAutoreleasedReturnValue(i8*)
-declare dllimport void @objc_release(i8*)
+declare dllimport void @llvm.objc.release(i8*)
!clang.arc.retainAutoreleasedReturnValueMarker = !{!0}
!0 = !{!"movl\09%ebp, %ebp\09\09// marker for objc_retainAutoreleaseReturnValue"}
Modified: llvm/trunk/test/Transforms/ObjCARC/contract-marker.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/contract-marker.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/contract-marker.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/contract-marker.ll Tue Dec 18 12:32:49 2018
@@ -4,14 +4,14 @@
; CHECK: %call = tail call i32* @qux()
; CHECK-NEXT: %tcall = bitcast i32* %call to i8*
; CHECK-NEXT: call void asm sideeffect "mov\09r7, r7\09\09@ marker for return value optimization", ""()
-; CHECK-NEXT: %0 = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %tcall) [[NUW:#[0-9]+]]
+; CHECK-NEXT: %0 = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %tcall) [[NUW:#[0-9]+]]
; CHECK: }
define void @foo() {
entry:
%call = tail call i32* @qux()
%tcall = bitcast i32* %call to i8*
- %0 = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %tcall) nounwind
+ %0 = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %tcall) nounwind
tail call void @bar(i8* %0)
ret void
}
@@ -20,22 +20,22 @@ entry:
; CHECK: %call = tail call i32* @qux()
; CHECK-NEXT: %tcall = bitcast i32* %call to i8*
; CHECK-NEXT: call void asm sideeffect "mov\09r7, r7\09\09@ marker for return value optimization", ""()
-; CHECK-NEXT: %0 = tail call i8* @objc_unsafeClaimAutoreleasedReturnValue(i8* %tcall) [[NUW:#[0-9]+]]
+; CHECK-NEXT: %0 = tail call i8* @llvm.objc.unsafeClaimAutoreleasedReturnValue(i8* %tcall) [[NUW:#[0-9]+]]
; CHECK: }
define void @foo2() {
entry:
%call = tail call i32* @qux()
%tcall = bitcast i32* %call to i8*
- %0 = tail call i8* @objc_unsafeClaimAutoreleasedReturnValue(i8* %tcall) nounwind
+ %0 = tail call i8* @llvm.objc.unsafeClaimAutoreleasedReturnValue(i8* %tcall) nounwind
tail call void @bar(i8* %0)
ret void
}
declare i32* @qux()
-declare i8* @objc_retainAutoreleasedReturnValue(i8*)
-declare i8* @objc_unsafeClaimAutoreleasedReturnValue(i8*)
+declare i8* @llvm.objc.retainAutoreleasedReturnValue(i8*)
+declare i8* @llvm.objc.unsafeClaimAutoreleasedReturnValue(i8*)
declare void @bar(i8*)
!clang.arc.retainAutoreleasedReturnValueMarker = !{!0}
Modified: llvm/trunk/test/Transforms/ObjCARC/contract-replace-arg-use.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/contract-replace-arg-use.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/contract-replace-arg-use.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/contract-replace-arg-use.ll Tue Dec 18 12:32:49 2018
@@ -1,20 +1,20 @@
; RUN: opt -objc-arc-contract -S < %s | FileCheck %s
-declare i8* @objc_autoreleaseReturnValue(i8*)
+declare i8* @llvm.objc.autoreleaseReturnValue(i8*)
declare i8* @foo1()
; Check that ARC contraction replaces the function return with the value
-; returned by @objc_autoreleaseReturnValue.
+; returned by @llvm.objc.autoreleaseReturnValue.
; CHECK-LABEL: define i32* @autoreleaseRVTailCall(
-; CHECK: %[[V0:[0-9]+]] = tail call i8* @objc_autoreleaseReturnValue(
+; CHECK: %[[V0:[0-9]+]] = tail call i8* @llvm.objc.autoreleaseReturnValue(
; CHECK: %[[V1:[0-9]+]] = bitcast i8* %[[V0]] to i32*
; CHECK: ret i32* %[[V1]]
define i32* @autoreleaseRVTailCall() {
%1 = call i8* @foo1()
%2 = bitcast i8* %1 to i32*
- %3 = tail call i8* @objc_autoreleaseReturnValue(i8* %1)
+ %3 = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %1)
ret i32* %2
}
@@ -23,7 +23,7 @@ declare i32* @foo2(i32);
; CHECK-LABEL: define i32* @autoreleaseRVTailCallPhi(
; CHECK: %[[PHIVAL:.*]] = phi i8* [ %{{.*}}, %bb1 ], [ %{{.*}}, %bb2 ]
; CHECK: %[[RETVAL:.*]] = phi i32* [ %{{.*}}, %bb1 ], [ %{{.*}}, %bb2 ]
-; CHECK: %[[V4:.*]] = tail call i8* @objc_autoreleaseReturnValue(i8* %[[PHIVAL]])
+; CHECK: %[[V4:.*]] = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %[[PHIVAL]])
; CHECK: %[[V0:.*]] = bitcast i8* %[[V4]] to i32*
; CHECK: ret i32* %[[V0]]
@@ -41,6 +41,6 @@ bb2:
bb3:
%phival = phi i8* [ %v1, %bb1 ], [ %v3, %bb2 ]
%retval = phi i32* [ %v0, %bb1 ], [ %v2, %bb2 ]
- %v4 = tail call i8* @objc_autoreleaseReturnValue(i8* %phival)
+ %v4 = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %phival)
ret i32* %retval
}
Modified: llvm/trunk/test/Transforms/ObjCARC/contract-storestrong-funclet.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/contract-storestrong-funclet.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/contract-storestrong-funclet.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/contract-storestrong-funclet.ll Tue Dec 18 12:32:49 2018
@@ -2,9 +2,9 @@
declare void @f()
declare i32 @__CxxFrameHandler3(...)
-declare dllimport i8* @objc_retain(i8*)
-declare dllimport i8* @objc_retainAutoreleasedReturnValue(i8*)
-declare dllimport void @objc_release(i8*)
+declare dllimport i8* @llvm.objc.retain(i8*)
+declare dllimport i8* @llvm.objc.retainAutoreleasedReturnValue(i8*)
+declare dllimport void @llvm.objc.release(i8*)
@x = external global i8*
@@ -12,26 +12,26 @@ define void @g(i8* %p) personality i8* b
invoke void @f() to label %invoke.cont unwind label %ehcleanup
invoke.cont:
- %call = tail call i8* @objc_retain(i8* %p) nounwind
+ %call = tail call i8* @llvm.objc.retain(i8* %p) nounwind
%tmp = load i8*, i8** @x, align 4
store i8* %call, i8** @x, align 4
- tail call void @objc_release(i8* %tmp) nounwind
+ tail call void @llvm.objc.release(i8* %tmp) nounwind
ret void
ehcleanup:
%1 = cleanuppad within none []
- %call1 = tail call i8* @objc_retain(i8* %p) nounwind [ "funclet"(token %1) ]
+ %call1 = tail call i8* @llvm.objc.retain(i8* %p) nounwind [ "funclet"(token %1) ]
%tmp1 = load i8*, i8** @x, align 4
store i8* %call1, i8** @x, align 4
- tail call void @objc_release(i8* %tmp1) nounwind [ "funclet"(token %1) ]
+ tail call void @llvm.objc.release(i8* %tmp1) nounwind [ "funclet"(token %1) ]
cleanupret from %1 unwind to caller
}
; CHECK-LABEL: invoke.cont:
-; CHECK: tail call void @objc_storeStrong(i8** @x, i8* %p) #0{{$}}
+; CHECK: tail call void @llvm.objc.storeStrong(i8** @x, i8* %p) #0{{$}}
; CHECK: ret void
; CHECK-LABEL: ehcleanup:
; CHECK: %1 = cleanuppad within none []
-; CHECK: tail call void @objc_storeStrong(i8** @x, i8* %p) #0 [ "funclet"(token %1) ]
+; CHECK: tail call void @llvm.objc.storeStrong(i8** @x, i8* %p) #0 [ "funclet"(token %1) ]
; CHECK: cleanupret from %1 unwind to caller
Modified: llvm/trunk/test/Transforms/ObjCARC/contract-storestrong-ivar.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/contract-storestrong-ivar.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/contract-storestrong-ivar.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/contract-storestrong-ivar.ll Tue Dec 18 12:32:49 2018
@@ -1,6 +1,6 @@
; RUN: opt -objc-arc-contract -S < %s | FileCheck %s
-; CHECK: tail call void @objc_storeStrong(i8**
+; CHECK: tail call void @llvm.objc.storeStrong(i8**
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-apple-darwin11.0.0"
@@ -10,9 +10,9 @@ target triple = "x86_64-apple-darwin11.0
@"OBJC_IVAR_$_Controller.preferencesController" = external global i64, section "__DATA, __objc_const", align 8
-declare i8* @objc_retain(i8*)
+declare i8* @llvm.objc.retain(i8*)
-declare void @objc_release(i8*)
+declare void @llvm.objc.release(i8*)
define hidden void @y(%0* nocapture %self, %1* %preferencesController) nounwind {
entry:
@@ -22,9 +22,9 @@ entry:
%tmp1 = bitcast i8* %add.ptr to %1**
%tmp2 = load %1*, %1** %tmp1, align 8
%tmp3 = bitcast %1* %preferencesController to i8*
- %tmp4 = tail call i8* @objc_retain(i8* %tmp3) nounwind
+ %tmp4 = tail call i8* @llvm.objc.retain(i8* %tmp3) nounwind
%tmp5 = bitcast %1* %tmp2 to i8*
- tail call void @objc_release(i8* %tmp5) nounwind
+ tail call void @llvm.objc.release(i8* %tmp5) nounwind
%tmp6 = bitcast i8* %tmp4 to %1*
store %1* %tmp6, %1** %tmp1, align 8
ret void
Modified: llvm/trunk/test/Transforms/ObjCARC/contract-storestrong.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/contract-storestrong.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/contract-storestrong.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/contract-storestrong.ll Tue Dec 18 12:32:49 2018
@@ -2,23 +2,23 @@
target datalayout = "e-p:64:64:64"
-declare i8* @objc_retain(i8*)
-declare void @objc_release(i8*)
+declare i8* @llvm.objc.retain(i8*)
+declare void @llvm.objc.release(i8*)
declare void @use_pointer(i8*)
@x = external global i8*
; CHECK-LABEL: define void @test0(
; CHECK: entry:
-; CHECK-NEXT: tail call void @objc_storeStrong(i8** @x, i8* %p) [[NUW:#[0-9]+]]
+; CHECK-NEXT: tail call void @llvm.objc.storeStrong(i8** @x, i8* %p) [[NUW:#[0-9]+]]
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test0(i8* %p) {
entry:
- %0 = tail call i8* @objc_retain(i8* %p) nounwind
+ %0 = tail call i8* @llvm.objc.retain(i8* %p) nounwind
%tmp = load i8*, i8** @x, align 8
store i8* %0, i8** @x, align 8
- tail call void @objc_release(i8* %tmp) nounwind
+ tail call void @llvm.objc.release(i8* %tmp) nounwind
ret void
}
@@ -26,18 +26,18 @@ entry:
; CHECK-LABEL: define void @test1(i8* %p) {
; CHECK-NEXT: entry:
-; CHECK-NEXT: %0 = tail call i8* @objc_retain(i8* %p) [[NUW]]
+; CHECK-NEXT: %0 = tail call i8* @llvm.objc.retain(i8* %p) [[NUW]]
; CHECK-NEXT: %tmp = load volatile i8*, i8** @x, align 8
; CHECK-NEXT: store i8* %0, i8** @x, align 8
-; CHECK-NEXT: tail call void @objc_release(i8* %tmp) [[NUW]]
+; CHECK-NEXT: tail call void @llvm.objc.release(i8* %tmp) [[NUW]]
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test1(i8* %p) {
entry:
- %0 = tail call i8* @objc_retain(i8* %p) nounwind
+ %0 = tail call i8* @llvm.objc.retain(i8* %p) nounwind
%tmp = load volatile i8*, i8** @x, align 8
store i8* %0, i8** @x, align 8
- tail call void @objc_release(i8* %tmp) nounwind
+ tail call void @llvm.objc.release(i8* %tmp) nounwind
ret void
}
@@ -45,18 +45,18 @@ entry:
; CHECK-LABEL: define void @test2(i8* %p) {
; CHECK-NEXT: entry:
-; CHECK-NEXT: %0 = tail call i8* @objc_retain(i8* %p) [[NUW]]
+; CHECK-NEXT: %0 = tail call i8* @llvm.objc.retain(i8* %p) [[NUW]]
; CHECK-NEXT: %tmp = load i8*, i8** @x, align 8
; CHECK-NEXT: store volatile i8* %0, i8** @x, align 8
-; CHECK-NEXT: tail call void @objc_release(i8* %tmp) [[NUW]]
+; CHECK-NEXT: tail call void @llvm.objc.release(i8* %tmp) [[NUW]]
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test2(i8* %p) {
entry:
- %0 = tail call i8* @objc_retain(i8* %p) nounwind
+ %0 = tail call i8* @llvm.objc.retain(i8* %p) nounwind
%tmp = load i8*, i8** @x, align 8
store volatile i8* %0, i8** @x, align 8
- tail call void @objc_release(i8* %tmp) nounwind
+ tail call void @llvm.objc.release(i8* %tmp) nounwind
ret void
}
@@ -65,20 +65,20 @@ entry:
; CHECK-LABEL: define void @test3(i8* %newValue) {
; CHECK-NEXT: entry:
-; CHECK-NEXT: %x0 = tail call i8* @objc_retain(i8* %newValue) [[NUW]]
+; CHECK-NEXT: %x0 = tail call i8* @llvm.objc.retain(i8* %newValue) [[NUW]]
; CHECK-NEXT: %x1 = load i8*, i8** @x, align 8
; CHECK-NEXT: store i8* %x0, i8** @x, align 8
; CHECK-NEXT: tail call void @use_pointer(i8* %x1), !clang.arc.no_objc_arc_exceptions !0
-; CHECK-NEXT: tail call void @objc_release(i8* %x1) [[NUW]], !clang.imprecise_release !0
+; CHECK-NEXT: tail call void @llvm.objc.release(i8* %x1) [[NUW]], !clang.imprecise_release !0
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test3(i8* %newValue) {
entry:
- %x0 = tail call i8* @objc_retain(i8* %newValue) nounwind
+ %x0 = tail call i8* @llvm.objc.retain(i8* %newValue) nounwind
%x1 = load i8*, i8** @x, align 8
store i8* %newValue, i8** @x, align 8
tail call void @use_pointer(i8* %x1), !clang.arc.no_objc_arc_exceptions !0
- tail call void @objc_release(i8* %x1) nounwind, !clang.imprecise_release !0
+ tail call void @llvm.objc.release(i8* %x1) nounwind, !clang.imprecise_release !0
ret void
}
@@ -86,36 +86,36 @@ entry:
; CHECK-LABEL: define i1 @test4(i8* %newValue, i8* %foo) {
; CHECK-NEXT: entry:
-; CHECK-NEXT: %x0 = tail call i8* @objc_retain(i8* %newValue) [[NUW]]
+; CHECK-NEXT: %x0 = tail call i8* @llvm.objc.retain(i8* %newValue) [[NUW]]
; CHECK-NEXT: %x1 = load i8*, i8** @x, align 8
; CHECK-NEXT: store i8* %x0, i8** @x, align 8
; CHECK-NEXT: %t = icmp eq i8* %x1, %foo
-; CHECK-NEXT: tail call void @objc_release(i8* %x1) [[NUW]], !clang.imprecise_release !0
+; CHECK-NEXT: tail call void @llvm.objc.release(i8* %x1) [[NUW]], !clang.imprecise_release !0
; CHECK-NEXT: ret i1 %t
; CHECK-NEXT: }
define i1 @test4(i8* %newValue, i8* %foo) {
entry:
- %x0 = tail call i8* @objc_retain(i8* %newValue) nounwind
+ %x0 = tail call i8* @llvm.objc.retain(i8* %newValue) nounwind
%x1 = load i8*, i8** @x, align 8
store i8* %newValue, i8** @x, align 8
%t = icmp eq i8* %x1, %foo
- tail call void @objc_release(i8* %x1) nounwind, !clang.imprecise_release !0
+ tail call void @llvm.objc.release(i8* %x1) nounwind, !clang.imprecise_release !0
ret i1 %t
}
-; Do form an objc_storeStrong here, because the use is before the store.
+; Do form an llvm.objc.storeStrong here, because the use is before the store.
; CHECK-LABEL: define i1 @test5(i8* %newValue, i8* %foo) {
; CHECK: %t = icmp eq i8* %x1, %foo
-; CHECK: tail call void @objc_storeStrong(i8** @x, i8* %newValue) [[NUW]]
+; CHECK: tail call void @llvm.objc.storeStrong(i8** @x, i8* %newValue) [[NUW]]
; CHECK: }
define i1 @test5(i8* %newValue, i8* %foo) {
entry:
- %x0 = tail call i8* @objc_retain(i8* %newValue) nounwind
+ %x0 = tail call i8* @llvm.objc.retain(i8* %newValue) nounwind
%x1 = load i8*, i8** @x, align 8
%t = icmp eq i8* %x1, %foo
store i8* %newValue, i8** @x, align 8
- tail call void @objc_release(i8* %x1) nounwind, !clang.imprecise_release !0
+ tail call void @llvm.objc.release(i8* %x1) nounwind, !clang.imprecise_release !0
ret i1 %t
}
@@ -123,49 +123,49 @@ entry:
; CHECK-LABEL: define i1 @test6(i8* %newValue, i8* %foo) {
; CHECK: %t = icmp eq i8* %x1, %foo
-; CHECK: tail call void @objc_storeStrong(i8** @x, i8* %newValue) [[NUW]]
+; CHECK: tail call void @llvm.objc.storeStrong(i8** @x, i8* %newValue) [[NUW]]
; CHECK: }
define i1 @test6(i8* %newValue, i8* %foo) {
entry:
- %x0 = tail call i8* @objc_retain(i8* %newValue) nounwind
+ %x0 = tail call i8* @llvm.objc.retain(i8* %newValue) nounwind
%x1 = load i8*, i8** @x, align 8
- tail call void @objc_release(i8* %x1) nounwind, !clang.imprecise_release !0
+ tail call void @llvm.objc.release(i8* %x1) nounwind, !clang.imprecise_release !0
%t = icmp eq i8* %x1, %foo
store i8* %newValue, i8** @x, align 8
ret i1 %t
}
-; Like test0, but there's no store, so don't form an objc_storeStrong.
+; Like test0, but there's no store, so don't form an llvm.objc.storeStrong.
; CHECK-LABEL: define void @test7(
; CHECK-NEXT: entry:
-; CHECK-NEXT: %0 = tail call i8* @objc_retain(i8* %p) [[NUW]]
+; CHECK-NEXT: %0 = tail call i8* @llvm.objc.retain(i8* %p) [[NUW]]
; CHECK-NEXT: %tmp = load i8*, i8** @x, align 8
-; CHECK-NEXT: tail call void @objc_release(i8* %tmp) [[NUW]]
+; CHECK-NEXT: tail call void @llvm.objc.release(i8* %tmp) [[NUW]]
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test7(i8* %p) {
entry:
- %0 = tail call i8* @objc_retain(i8* %p) nounwind
+ %0 = tail call i8* @llvm.objc.retain(i8* %p) nounwind
%tmp = load i8*, i8** @x, align 8
- tail call void @objc_release(i8* %tmp) nounwind
+ tail call void @llvm.objc.release(i8* %tmp) nounwind
ret void
}
-; Like test0, but there's no retain, so don't form an objc_storeStrong.
+; Like test0, but there's no retain, so don't form an llvm.objc.storeStrong.
; CHECK-LABEL: define void @test8(
; CHECK-NEXT: entry:
; CHECK-NEXT: %tmp = load i8*, i8** @x, align 8
; CHECK-NEXT: store i8* %p, i8** @x, align 8
-; CHECK-NEXT: tail call void @objc_release(i8* %tmp) [[NUW]]
+; CHECK-NEXT: tail call void @llvm.objc.release(i8* %tmp) [[NUW]]
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test8(i8* %p) {
entry:
%tmp = load i8*, i8** @x, align 8
store i8* %p, i8** @x, align 8
- tail call void @objc_release(i8* %tmp) nounwind
+ tail call void @llvm.objc.release(i8* %tmp) nounwind
ret void
}
@@ -176,13 +176,13 @@ entry:
; pointer.
;
; CHECK-LABEL: define i1 @test9(i8* %newValue, i8* %foo, i8* %unrelated_ptr) {
-; CHECK-NOT: objc_storeStrong
+; CHECK-NOT: llvm.objc.storeStrong
define i1 @test9(i8* %newValue, i8* %foo, i8* %unrelated_ptr) {
entry:
- %x0 = tail call i8* @objc_retain(i8* %newValue) nounwind
- tail call void @objc_release(i8* %unrelated_ptr) nounwind, !clang.imprecise_release !0
+ %x0 = tail call i8* @llvm.objc.retain(i8* %newValue) nounwind
+ tail call void @llvm.objc.release(i8* %unrelated_ptr) nounwind, !clang.imprecise_release !0
%x1 = load i8*, i8** @x, align 8
- tail call void @objc_release(i8* %x1) nounwind, !clang.imprecise_release !0
+ tail call void @llvm.objc.release(i8* %x1) nounwind, !clang.imprecise_release !0
%t = icmp eq i8* %x1, %foo
store i8* %newValue, i8** @x, align 8
ret i1 %t
@@ -191,13 +191,13 @@ entry:
; Make sure that we don't perform the optimization when we just have a call.
;
; CHECK-LABEL: define i1 @test10(i8* %newValue, i8* %foo, i8* %unrelated_ptr) {
-; CHECK-NOT: objc_storeStrong
+; CHECK-NOT: llvm.objc.storeStrong
define i1 @test10(i8* %newValue, i8* %foo, i8* %unrelated_ptr) {
entry:
- %x0 = tail call i8* @objc_retain(i8* %newValue) nounwind
+ %x0 = tail call i8* @llvm.objc.retain(i8* %newValue) nounwind
call void @use_pointer(i8* %unrelated_ptr)
%x1 = load i8*, i8** @x, align 8
- tail call void @objc_release(i8* %x1) nounwind, !clang.imprecise_release !0
+ tail call void @llvm.objc.release(i8* %x1) nounwind, !clang.imprecise_release !0
%t = icmp eq i8* %x1, %foo
store i8* %newValue, i8** @x, align 8
ret i1 %t
@@ -206,13 +206,13 @@ entry:
; Make sure we form the store strong if the use in between the retain
; and the store does not touch reference counts.
; CHECK-LABEL: define i1 @test11(i8* %newValue, i8* %foo, i8* %unrelated_ptr) {
-; CHECK: objc_storeStrong
+; CHECK: llvm.objc.storeStrong
define i1 @test11(i8* %newValue, i8* %foo, i8* %unrelated_ptr) {
entry:
- %x0 = tail call i8* @objc_retain(i8* %newValue) nounwind
+ %x0 = tail call i8* @llvm.objc.retain(i8* %newValue) nounwind
%t = icmp eq i8* %newValue, %foo
%x1 = load i8*, i8** @x, align 8
- tail call void @objc_release(i8* %x1) nounwind, !clang.imprecise_release !0
+ tail call void @llvm.objc.release(i8* %x1) nounwind, !clang.imprecise_release !0
store i8* %newValue, i8** @x, align 8
ret i1 %t
}
@@ -227,31 +227,31 @@ entry:
; CHECK-NEXT: %p32 = bitcast i8** @x to i32**
; CHECK-NEXT: %v32 = bitcast i8* %p to i32*
; CHECK-NEXT: %0 = bitcast i16** %p16 to i8**
-; CHECK-NEXT: tail call void @objc_storeStrong(i8** %0, i8* %p)
+; CHECK-NEXT: tail call void @llvm.objc.storeStrong(i8** %0, i8* %p)
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test12(i8* %p) {
entry:
- %retain = tail call i8* @objc_retain(i8* %p) nounwind
+ %retain = tail call i8* @llvm.objc.retain(i8* %p) nounwind
%p16 = bitcast i8** @x to i16**
%tmp16 = load i16*, i16** %p16, align 8
%tmp8 = bitcast i16* %tmp16 to i8*
%p32 = bitcast i8** @x to i32**
%v32 = bitcast i8* %retain to i32*
store i32* %v32, i32** %p32, align 8
- tail call void @objc_release(i8* %tmp8) nounwind
+ tail call void @llvm.objc.release(i8* %tmp8) nounwind
ret void
}
; This used to crash.
; CHECK-LABEL: define i8* @test13(
-; CHECK: tail call void @objc_storeStrong(i8** %{{.*}}, i8* %[[NEW:.*]])
+; CHECK: tail call void @llvm.objc.storeStrong(i8** %{{.*}}, i8* %[[NEW:.*]])
; CHECK-NEXT: ret i8* %[[NEW]]
define i8* @test13(i8* %a0, i8* %a1, i8** %addr, i8* %new) {
%old = load i8*, i8** %addr, align 8
- call void @objc_release(i8* %old)
- %retained = call i8* @objc_retain(i8* %new)
+ call void @llvm.objc.release(i8* %old)
+ %retained = call i8* @llvm.objc.retain(i8* %new)
store i8* %retained, i8** %addr, align 8
ret i8* %retained
}
Modified: llvm/trunk/test/Transforms/ObjCARC/contract-testcases.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/contract-testcases.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/contract-testcases.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/contract-testcases.ll Tue Dec 18 12:32:49 2018
@@ -7,13 +7,13 @@
%4 = type opaque
declare %0* @"\01-[NSAttributedString(Terminal) pathAtIndex:effectiveRange:]"(%1*, i8* nocapture, i64, %2*) optsize
-declare i8* @objc_retainAutoreleasedReturnValue(i8*)
-declare i8* @objc_msgSend_fixup(i8*, i8*, ...)
-declare i8* @objc_msgSend(i8*, i8*, ...)
-declare void @objc_release(i8*)
+declare i8* @llvm.objc.retainAutoreleasedReturnValue(i8*)
+declare i8* @llvm.objc.msgSend_fixup(i8*, i8*, ...)
+declare i8* @llvm.objc.msgSend(i8*, i8*, ...)
+declare void @llvm.objc.release(i8*)
declare %2 @NSUnionRange(i64, i64, i64, i64) optsize
-declare i8* @objc_autoreleaseReturnValue(i8*)
-declare i8* @objc_autorelease(i8*)
+declare i8* @llvm.objc.autoreleaseReturnValue(i8*)
+declare i8* @llvm.objc.autorelease(i8*)
declare i32 @__gxx_personality_sj0(...)
; Don't get in trouble on bugpointed code.
@@ -22,7 +22,7 @@ declare i32 @__gxx_personality_sj0(...)
define void @test0() {
bb:
%tmp = bitcast %4* undef to i8*
- %tmp1 = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %tmp) nounwind
+ %tmp1 = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %tmp) nounwind
br label %bb3
bb3: ; preds = %bb2
@@ -53,9 +53,9 @@ bb6:
; CHECK: }
define void @test1() {
bb:
- %tmp = tail call %0* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to %0* ()*)()
+ %tmp = tail call %0* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to %0* ()*)()
%tmp2 = bitcast %0* %tmp to i8*
- %tmp3 = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %tmp2) nounwind
+ %tmp3 = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %tmp2) nounwind
br i1 undef, label %bb7, label %bb7
bb7: ; preds = %bb6, %bb6, %bb5
@@ -70,15 +70,15 @@ bb7:
; CHECK: define void @_Z6doTestP8NSString() personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) {
; CHECK: invoke.cont: ; preds = %entry
; CHECK-NEXT: call void asm sideeffect "mov\09r7, r7\09\09@ marker for objc_retainAutoreleaseReturnValue", ""()
-; CHECK-NEXT: %tmp = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %call) [[NUW:#[0-9]+]]
+; CHECK-NEXT: %tmp = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call) [[NUW:#[0-9]+]]
; CHECK: }
define void @_Z6doTestP8NSString() personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) {
entry:
- %call = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* ()*)()
+ %call = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* ()*)()
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
- %tmp = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %call) nounwind
+ %tmp = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call) nounwind
unreachable
lpad: ; preds = %entry
Modified: llvm/trunk/test/Transforms/ObjCARC/contract.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/contract.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/contract.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/contract.ll Tue Dec 18 12:32:49 2018
@@ -2,11 +2,11 @@
target datalayout = "e-p:64:64:64"
-declare i8* @objc_retain(i8*)
-declare void @objc_release(i8*)
-declare i8* @objc_autorelease(i8*)
-declare i8* @objc_autoreleaseReturnValue(i8*)
-declare i8* @objc_retainAutoreleasedReturnValue(i8*)
+declare i8* @llvm.objc.retain(i8*)
+declare void @llvm.objc.release(i8*)
+declare i8* @llvm.objc.autorelease(i8*)
+declare i8* @llvm.objc.autoreleaseReturnValue(i8*)
+declare i8* @llvm.objc.retainAutoreleasedReturnValue(i8*)
declare void @use_pointer(i8*)
declare i8* @returner()
@@ -17,7 +17,7 @@ declare void @callee()
; CHECK: }
define void @test0(i8* %x) nounwind {
entry:
- %0 = call i8* @objc_retain(i8* %x) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %x) nounwind
call void @use_pointer(i8* %x)
ret void
}
@@ -27,7 +27,7 @@ entry:
; CHECK: }
define void @test1(i8* %x) nounwind {
entry:
- %0 = call i8* @objc_autorelease(i8* %x) nounwind
+ %0 = call i8* @llvm.objc.autorelease(i8* %x) nounwind
call void @use_pointer(i8* %x)
ret void
}
@@ -35,12 +35,12 @@ entry:
; Merge objc_retain and objc_autorelease into objc_retainAutorelease.
; CHECK-LABEL: define void @test2(
-; CHECK: tail call i8* @objc_retainAutorelease(i8* %x) [[NUW:#[0-9]+]]
+; CHECK: tail call i8* @llvm.objc.retainAutorelease(i8* %x) [[NUW:#[0-9]+]]
; CHECK: }
define void @test2(i8* %x) nounwind {
entry:
- %0 = tail call i8* @objc_retain(i8* %x) nounwind
- call i8* @objc_autorelease(i8* %0) nounwind
+ %0 = tail call i8* @llvm.objc.retain(i8* %x) nounwind
+ call i8* @llvm.objc.autorelease(i8* %0) nounwind
call void @use_pointer(i8* %x)
ret void
}
@@ -48,26 +48,26 @@ entry:
; Same as test2 but the value is returned. Do an RV optimization.
; CHECK-LABEL: define i8* @test2b(
-; CHECK: tail call i8* @objc_retainAutoreleaseReturnValue(i8* %x) [[NUW]]
+; CHECK: tail call i8* @llvm.objc.retainAutoreleaseReturnValue(i8* %x) [[NUW]]
; CHECK: }
define i8* @test2b(i8* %x) nounwind {
entry:
- %0 = tail call i8* @objc_retain(i8* %x) nounwind
- tail call i8* @objc_autoreleaseReturnValue(i8* %0) nounwind
+ %0 = tail call i8* @llvm.objc.retain(i8* %x) nounwind
+ tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %0) nounwind
ret i8* %x
}
; Merge a retain,autorelease pair around a call.
; CHECK-LABEL: define void @test3(
-; CHECK: tail call i8* @objc_retainAutorelease(i8* %x) [[NUW]]
+; CHECK: tail call i8* @llvm.objc.retainAutorelease(i8* %x) [[NUW]]
; CHECK: @use_pointer(i8* %0)
; CHECK: }
define void @test3(i8* %x, i64 %n) {
entry:
- tail call i8* @objc_retain(i8* %x) nounwind
+ tail call i8* @llvm.objc.retain(i8* %x) nounwind
call void @use_pointer(i8* %x)
- call i8* @objc_autorelease(i8* %x) nounwind
+ call i8* @llvm.objc.autorelease(i8* %x) nounwind
ret void
}
@@ -76,34 +76,34 @@ entry:
; CHECK-LABEL: define void @test4(
; CHECK-NEXT: entry:
-; CHECK-NEXT: @objc_retainAutorelease(i8* %x) [[NUW]]
+; CHECK-NEXT: @llvm.objc.retainAutorelease(i8* %x) [[NUW]]
; CHECK-NEXT: @use_pointer
-; CHECK-NEXT: @objc_release
+; CHECK-NEXT: @llvm.objc.release
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test4(i8* %x, i64 %n) {
entry:
- tail call i8* @objc_retain(i8* %x) nounwind
+ tail call i8* @llvm.objc.retain(i8* %x) nounwind
call void @use_pointer(i8* %x)
- call i8* @objc_autorelease(i8* %x) nounwind
- tail call void @objc_release(i8* %x) nounwind
+ call i8* @llvm.objc.autorelease(i8* %x) nounwind
+ tail call void @llvm.objc.release(i8* %x) nounwind
ret void
}
; Don't merge retain and autorelease if they're not control-equivalent.
; CHECK-LABEL: define void @test5(
-; CHECK: tail call i8* @objc_retain(i8* %p) [[NUW]]
+; CHECK: tail call i8* @llvm.objc.retain(i8* %p) [[NUW]]
; CHECK: true:
-; CHECK: call i8* @objc_autorelease(i8* %0) [[NUW]]
+; CHECK: call i8* @llvm.objc.autorelease(i8* %0) [[NUW]]
; CHECK: }
define void @test5(i8* %p, i1 %a) {
entry:
- tail call i8* @objc_retain(i8* %p) nounwind
+ tail call i8* @llvm.objc.retain(i8* %p) nounwind
br i1 %a, label %true, label %false
true:
- call i8* @objc_autorelease(i8* %p) nounwind
+ call i8* @llvm.objc.autorelease(i8* %p) nounwind
call void @use_pointer(i8* %p)
ret void
@@ -120,13 +120,13 @@ false:
; Those entrypoints don't exist yet though.
; CHECK-LABEL: define i8* @test6(
-; CHECK: call i8* @objc_retainAutoreleasedReturnValue(i8* %p) [[NUW]]
-; CHECK: %t = tail call i8* @objc_autoreleaseReturnValue(i8* %1) [[NUW]]
+; CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %p) [[NUW]]
+; CHECK: %t = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %1) [[NUW]]
; CHECK: }
define i8* @test6() {
%p = call i8* @returner()
- tail call i8* @objc_retainAutoreleasedReturnValue(i8* %p) nounwind
- %t = tail call i8* @objc_autoreleaseReturnValue(i8* %p) nounwind
+ tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %p) nounwind
+ %t = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %p) nounwind
call void @use_pointer(i8* %t)
ret i8* %t
}
@@ -134,15 +134,15 @@ define i8* @test6() {
; Don't spoil the RV optimization.
; CHECK: define i8* @test7(i8* %p)
-; CHECK: tail call i8* @objc_retain(i8* %p)
+; CHECK: tail call i8* @llvm.objc.retain(i8* %p)
; CHECK: call void @use_pointer(i8* %1)
-; CHECK: tail call i8* @objc_autoreleaseReturnValue(i8* %1)
+; CHECK: tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %1)
; CHECK: ret i8* %2
; CHECK-NEXT: }
define i8* @test7(i8* %p) {
- %1 = tail call i8* @objc_retain(i8* %p)
+ %1 = tail call i8* @llvm.objc.retain(i8* %p)
call void @use_pointer(i8* %p)
- %2 = tail call i8* @objc_autoreleaseReturnValue(i8* %p)
+ %2 = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %p)
ret i8* %p
}
@@ -156,7 +156,7 @@ entry:
br i1 %x, label %return, label %if.then
if.then: ; preds = %entry
- %p = call i8* @objc_retain(i8* %c) nounwind
+ %p = call i8* @llvm.objc.retain(i8* %c) nounwind
br label %return
return: ; preds = %if.then, %entry
@@ -164,12 +164,12 @@ return:
ret i8* %retval
}
-; Kill calls to @clang.arc.use(...)
+; Kill calls to @llvm.objc.clang.arc.use(...)
; CHECK-LABEL: define void @test9(
; CHECK-NOT: clang.arc.use
; CHECK: }
define void @test9(i8* %a, i8* %b) {
- call void (...) @clang.arc.use(i8* %a, i8* %b) nounwind
+ call void (...) @llvm.objc.clang.arc.use(i8* %a, i8* %b) nounwind
ret void
}
@@ -178,10 +178,10 @@ define void @test9(i8* %a, i8* %b) {
; is a return value.
; CHECK: define void @test10()
-; CHECK: tail call i8* @objc_retainAutoreleasedReturnValue(i8* %p)
+; CHECK: tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %p)
define void @test10() {
%p = call i8* @returner()
- tail call i8* @objc_retain(i8* %p) nounwind
+ tail call i8* @llvm.objc.retain(i8* %p) nounwind
ret void
}
@@ -190,11 +190,11 @@ define void @test10() {
; CHECK-LABEL: define void @test11(
; CHECK-NEXT: %y = call i8* @returner()
-; CHECK-NEXT: tail call i8* @objc_retainAutoreleasedReturnValue(i8* %y) [[NUW]]
+; CHECK-NEXT: tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %y) [[NUW]]
; CHECK-NEXT: ret void
define void @test11() {
%y = call i8* @returner()
- tail call i8* @objc_retain(i8* %y) nounwind
+ tail call i8* @llvm.objc.retain(i8* %y) nounwind
ret void
}
@@ -202,11 +202,11 @@ define void @test11() {
; argument is not a return value.
; CHECK-LABEL: define void @test12(
-; CHECK-NEXT: tail call i8* @objc_retain(i8* %y) [[NUW]]
+; CHECK-NEXT: tail call i8* @llvm.objc.retain(i8* %y) [[NUW]]
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test12(i8* %y) {
- tail call i8* @objc_retain(i8* %y) nounwind
+ tail call i8* @llvm.objc.retain(i8* %y) nounwind
ret void
}
@@ -216,17 +216,17 @@ define void @test12(i8* %y) {
; CHECK-LABEL: define void @test13(
; CHECK-NEXT: %y = call i8* @returner()
; CHECK-NEXT: call void @callee()
-; CHECK-NEXT: tail call i8* @objc_retain(i8* %y) [[NUW]]
+; CHECK-NEXT: tail call i8* @llvm.objc.retain(i8* %y) [[NUW]]
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test13() {
%y = call i8* @returner()
call void @callee()
- tail call i8* @objc_retain(i8* %y) nounwind
+ tail call i8* @llvm.objc.retain(i8* %y) nounwind
ret void
}
-declare void @clang.arc.use(...) nounwind
+declare void @llvm.objc.clang.arc.use(...) nounwind
; CHECK: attributes [[NUW]] = { nounwind }
Modified: llvm/trunk/test/Transforms/ObjCARC/empty-block.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/empty-block.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/empty-block.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/empty-block.ll Tue Dec 18 12:32:49 2018
@@ -3,33 +3,33 @@
%0 = type opaque
-declare i8* @objc_retain(i8*)
+declare i8* @llvm.objc.retain(i8*)
-declare void @objc_release(i8*)
+declare void @llvm.objc.release(i8*)
-declare i8* @objc_autoreleaseReturnValue(i8*)
+declare i8* @llvm.objc.autoreleaseReturnValue(i8*)
; Don't delete the autorelease.
; CHECK-LABEL: define %0* @test0(
-; CHECK: @objc_retain
+; CHECK: @llvm.objc.retain
; CHECK: .lr.ph:
-; CHECK-NOT: @objc_r
-; CHECK: @objc_autoreleaseReturnValue
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.r
+; CHECK: @llvm.objc.autoreleaseReturnValue
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define %0* @test0(%0* %buffer) nounwind {
%1 = bitcast %0* %buffer to i8*
- %2 = tail call i8* @objc_retain(i8* %1) nounwind
+ %2 = tail call i8* @llvm.objc.retain(i8* %1) nounwind
br i1 undef, label %.lr.ph, label %._crit_edge
.lr.ph: ; preds = %.lr.ph, %0
br i1 false, label %.lr.ph, label %._crit_edge
._crit_edge: ; preds = %.lr.ph, %0
- %3 = tail call i8* @objc_retain(i8* %1) nounwind
- tail call void @objc_release(i8* %1) nounwind, !clang.imprecise_release !0
- %4 = tail call i8* @objc_autoreleaseReturnValue(i8* %1) nounwind
+ %3 = tail call i8* @llvm.objc.retain(i8* %1) nounwind
+ tail call void @llvm.objc.release(i8* %1) nounwind, !clang.imprecise_release !0
+ %4 = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %1) nounwind
ret %0* %buffer
}
@@ -41,16 +41,16 @@ define %0* @test0(%0* %buffer) nounwind
define %0* @test1() nounwind {
%buffer = call %0* @foo()
%1 = bitcast %0* %buffer to i8*
- %2 = tail call i8* @objc_retain(i8* %1) nounwind
+ %2 = tail call i8* @llvm.objc.retain(i8* %1) nounwind
br i1 undef, label %.lr.ph, label %._crit_edge
.lr.ph: ; preds = %.lr.ph, %0
br i1 false, label %.lr.ph, label %._crit_edge
._crit_edge: ; preds = %.lr.ph, %0
- %3 = tail call i8* @objc_retain(i8* %1) nounwind
- tail call void @objc_release(i8* %1) nounwind, !clang.imprecise_release !0
- %4 = tail call i8* @objc_autoreleaseReturnValue(i8* %1) nounwind
+ %3 = tail call i8* @llvm.objc.retain(i8* %1) nounwind
+ tail call void @llvm.objc.release(i8* %1) nounwind, !clang.imprecise_release !0
+ %4 = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %1) nounwind
ret %0* %buffer
}
Modified: llvm/trunk/test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll Tue Dec 18 12:32:49 2018
@@ -39,66 +39,66 @@ entry:
%tmp = load %struct._class_t*, %struct._class_t** @"\01L_OBJC_CLASSLIST_REFERENCES_$_", align 8, !dbg !37
%tmp1 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8, !dbg !37, !invariant.load !38
%tmp2 = bitcast %struct._class_t* %tmp to i8*, !dbg !37
-; CHECK: call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* %tmp2, i8* %tmp1)
- %call = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* %tmp2, i8* %tmp1), !dbg !37, !clang.arc.no_objc_arc_exceptions !38
+; CHECK: call i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*)*)(i8* %tmp2, i8* %tmp1)
+ %call = call i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*)*)(i8* %tmp2, i8* %tmp1), !dbg !37, !clang.arc.no_objc_arc_exceptions !38
call void @llvm.dbg.value(metadata i8* %call, metadata !25, metadata !DIExpression()), !dbg !37
-; CHECK: call i8* @objc_retain(i8* %call) [[NUW:#[0-9]+]]
- %tmp3 = call i8* @objc_retain(i8* %call) nounwind, !dbg !39
+; CHECK: call i8* @llvm.objc.retain(i8* %call) [[NUW:#[0-9]+]]
+ %tmp3 = call i8* @llvm.objc.retain(i8* %call) nounwind, !dbg !39
call void @llvm.dbg.value(metadata i8* %call, metadata !25, metadata !DIExpression()), !dbg !39
invoke fastcc void @ThrowFunc(i8* %call)
to label %eh.cont unwind label %lpad, !dbg !40, !clang.arc.no_objc_arc_exceptions !38
eh.cont: ; preds = %entry
-; CHECK: call void @objc_release(i8* %call)
- call void @objc_release(i8* %call) nounwind, !dbg !42, !clang.imprecise_release !38
+; CHECK: call void @llvm.objc.release(i8* %call)
+ call void @llvm.objc.release(i8* %call) nounwind, !dbg !42, !clang.imprecise_release !38
br label %if.end, !dbg !43
lpad: ; preds = %entry
%tmp4 = landingpad { i8*, i32 }
catch i8* null, !dbg !40
%tmp5 = extractvalue { i8*, i32 } %tmp4, 0, !dbg !40
- %exn.adjusted = call i8* @objc_begin_catch(i8* %tmp5) nounwind, !dbg !44
+ %exn.adjusted = call i8* @llvm.objc.begin_catch(i8* %tmp5) nounwind, !dbg !44
call void @llvm.dbg.value(metadata i8 0, metadata !21, metadata !DIExpression()), !dbg !46
- call void @objc_end_catch(), !dbg !49, !clang.arc.no_objc_arc_exceptions !38
-; CHECK: call void @objc_release(i8* %call)
- call void @objc_release(i8* %call) nounwind, !dbg !42, !clang.imprecise_release !38
+ call void @llvm.objc.end_catch(), !dbg !49, !clang.arc.no_objc_arc_exceptions !38
+; CHECK: call void @llvm.objc.release(i8* %call)
+ call void @llvm.objc.release(i8* %call) nounwind, !dbg !42, !clang.imprecise_release !38
call void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring_ to i8*), i8* %call), !dbg !50, !clang.arc.no_objc_arc_exceptions !38
br label %if.end, !dbg !52
if.end: ; preds = %lpad, %eh.cont
call void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring_ to i8*), i8* %call), !dbg !53, !clang.arc.no_objc_arc_exceptions !38
-; CHECK: call void @objc_release(i8* %call)
- call void @objc_release(i8* %call) nounwind, !dbg !54, !clang.imprecise_release !38
+; CHECK: call void @llvm.objc.release(i8* %call)
+ call void @llvm.objc.release(i8* %call) nounwind, !dbg !54, !clang.imprecise_release !38
ret i32 0, !dbg !54
}
declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
-declare i8* @objc_msgSend(i8*, i8*, ...) nonlazybind
+declare i8* @llvm.objc.msgSend(i8*, i8*, ...) nonlazybind
-declare i8* @objc_retain(i8*) nonlazybind
+declare i8* @llvm.objc.retain(i8*) nonlazybind
-declare i8* @objc_begin_catch(i8*)
+declare i8* @llvm.objc.begin_catch(i8*)
-declare void @objc_end_catch()
+declare void @llvm.objc.end_catch()
-declare void @objc_exception_rethrow()
+declare void @llvm.objc.exception_rethrow()
define internal fastcc void @ThrowFunc(i8* %obj) uwtable noinline ssp !dbg !27 {
entry:
- %tmp = call i8* @objc_retain(i8* %obj) nounwind
+ %tmp = call i8* @llvm.objc.retain(i8* %obj) nounwind
call void @llvm.dbg.value(metadata i8* %obj, metadata !32, metadata !DIExpression()), !dbg !55
%tmp1 = load %struct._class_t*, %struct._class_t** @"\01L_OBJC_CLASSLIST_REFERENCES_$_1", align 8, !dbg !56
%tmp2 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_5", align 8, !dbg !56, !invariant.load !38
%tmp3 = bitcast %struct._class_t* %tmp1 to i8*, !dbg !56
- call void (i8*, i8*, %0*, %0*, ...) bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, %0*, %0*, ...)*)(i8* %tmp3, i8* %tmp2, %0* bitcast (%struct.NSConstantString* @_unnamed_cfstring_3 to %0*), %0* bitcast (%struct.NSConstantString* @_unnamed_cfstring_3 to %0*)), !dbg !56, !clang.arc.no_objc_arc_exceptions !38
- call void @objc_release(i8* %obj) nounwind, !dbg !58, !clang.imprecise_release !38
+ call void (i8*, i8*, %0*, %0*, ...) bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*, %0*, %0*, ...)*)(i8* %tmp3, i8* %tmp2, %0* bitcast (%struct.NSConstantString* @_unnamed_cfstring_3 to %0*), %0* bitcast (%struct.NSConstantString* @_unnamed_cfstring_3 to %0*)), !dbg !56, !clang.arc.no_objc_arc_exceptions !38
+ call void @llvm.objc.release(i8* %obj) nounwind, !dbg !58, !clang.imprecise_release !38
ret void, !dbg !58
}
declare i32 @__objc_personality_v0(...)
-declare void @objc_release(i8*) nonlazybind
+declare void @llvm.objc.release(i8*) nonlazybind
declare void @NSLog(i8*, ...)
@@ -107,8 +107,8 @@ declare void @llvm.dbg.value(metadata, m
; CHECK: attributes #0 = { ssp uwtable }
; CHECK: attributes #1 = { nounwind readnone speculatable }
; CHECK: attributes #2 = { nonlazybind }
-; CHECK: attributes #3 = { noinline ssp uwtable }
; CHECK: attributes [[NUW]] = { nounwind }
+; CHECK: attributes #4 = { noinline ssp uwtable }
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!33, !34, !35, !36, !61}
Modified: llvm/trunk/test/Transforms/ObjCARC/escape.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/escape.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/escape.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/escape.ll Tue Dec 18 12:32:49 2018
@@ -10,8 +10,8 @@ target datalayout = "e-p:64:64:64-i1:8:8
; with the objc_storeWeak call.
; CHECK-LABEL: define void @test0(
-; CHECK: %tmp7 = call i8* @objc_retainBlock(i8* %tmp6) [[NUW:#[0-9]+]], !clang.arc.copy_on_escape !0
-; CHECK: call void @objc_release(i8* %tmp7) [[NUW]], !clang.imprecise_release !0
+; CHECK: %tmp7 = call i8* @llvm.objc.retainBlock(i8* %tmp6) [[NUW:#[0-9]+]], !clang.arc.copy_on_escape !0
+; CHECK: call void @llvm.objc.release(i8* %tmp7) [[NUW]], !clang.imprecise_release !0
; CHECK: }
define void @test0() nounwind {
entry:
@@ -31,7 +31,7 @@ entry:
store i8* bitcast (void (i8*)* @__Block_byref_object_dispose_ to i8*), i8** %tmp2, align 8
%weakLogNTimes1 = getelementptr inbounds %struct.__block_byref_weakLogNTimes, %struct.__block_byref_weakLogNTimes* %weakLogNTimes, i64 0, i32 6
%tmp3 = bitcast void (...)** %weakLogNTimes1 to i8**
- %tmp4 = call i8* @objc_initWeak(i8** %tmp3, i8* null) nounwind
+ %tmp4 = call i8* @llvm.objc.initWeak(i8** %tmp3, i8* null) nounwind
%block.isa = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>, <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>* %block, i64 0, i32 0
store i8* null, i8** %block.isa, align 8
%block.flags = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>, <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>* %block, i64 0, i32 1
@@ -46,19 +46,19 @@ entry:
%tmp5 = bitcast %struct.__block_byref_weakLogNTimes* %weakLogNTimes to i8*
store i8* %tmp5, i8** %block.captured, align 8
%tmp6 = bitcast <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>* %block to i8*
- %tmp7 = call i8* @objc_retainBlock(i8* %tmp6) nounwind, !clang.arc.copy_on_escape !0
+ %tmp7 = call i8* @llvm.objc.retainBlock(i8* %tmp6) nounwind, !clang.arc.copy_on_escape !0
%tmp8 = load %struct.__block_byref_weakLogNTimes*, %struct.__block_byref_weakLogNTimes** %byref.forwarding, align 8
%weakLogNTimes3 = getelementptr inbounds %struct.__block_byref_weakLogNTimes, %struct.__block_byref_weakLogNTimes* %tmp8, i64 0, i32 6
%tmp9 = bitcast void (...)** %weakLogNTimes3 to i8**
- %tmp10 = call i8* @objc_storeWeak(i8** %tmp9, i8* %tmp7) nounwind
+ %tmp10 = call i8* @llvm.objc.storeWeak(i8** %tmp9, i8* %tmp7) nounwind
%tmp11 = getelementptr inbounds i8, i8* %tmp7, i64 16
%tmp12 = bitcast i8* %tmp11 to i8**
%tmp13 = load i8*, i8** %tmp12, align 8
%tmp14 = bitcast i8* %tmp13 to void (i8*, i32)*
call void %tmp14(i8* %tmp7, i32 10) nounwind, !clang.arc.no_objc_arc_exceptions !0
- call void @objc_release(i8* %tmp7) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %tmp7) nounwind, !clang.imprecise_release !0
call void @_Block_object_dispose(i8* %tmp5, i32 8) nounwind
- call void @objc_destroyWeak(i8** %tmp3) nounwind
+ call void @llvm.objc.destroyWeak(i8** %tmp3) nounwind
ret void
}
@@ -66,7 +66,7 @@ entry:
; so the optimization is valid.
; CHECK-LABEL: define void @test1(
-; CHECK-NOT: @objc_retainBlock
+; CHECK-NOT: @llvm.objc.retainBlock
; CHECK: }
define void @test1() nounwind {
entry:
@@ -86,7 +86,7 @@ entry:
store i8* bitcast (void (i8*)* @__Block_byref_object_dispose_ to i8*), i8** %tmp2, align 8
%weakLogNTimes1 = getelementptr inbounds %struct.__block_byref_weakLogNTimes, %struct.__block_byref_weakLogNTimes* %weakLogNTimes, i64 0, i32 6
%tmp3 = bitcast void (...)** %weakLogNTimes1 to i8**
- %tmp4 = call i8* @objc_initWeak(i8** %tmp3, i8* null) nounwind
+ %tmp4 = call i8* @llvm.objc.initWeak(i8** %tmp3, i8* null) nounwind
%block.isa = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>, <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>* %block, i64 0, i32 0
store i8* null, i8** %block.isa, align 8
%block.flags = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>, <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>* %block, i64 0, i32 1
@@ -101,7 +101,7 @@ entry:
%tmp5 = bitcast %struct.__block_byref_weakLogNTimes* %weakLogNTimes to i8*
store i8* %tmp5, i8** %block.captured, align 8
%tmp6 = bitcast <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>* %block to i8*
- %tmp7 = call i8* @objc_retainBlock(i8* %tmp6) nounwind, !clang.arc.copy_on_escape !0
+ %tmp7 = call i8* @llvm.objc.retainBlock(i8* %tmp6) nounwind, !clang.arc.copy_on_escape !0
%tmp8 = load %struct.__block_byref_weakLogNTimes*, %struct.__block_byref_weakLogNTimes** %byref.forwarding, align 8
%weakLogNTimes3 = getelementptr inbounds %struct.__block_byref_weakLogNTimes, %struct.__block_byref_weakLogNTimes* %tmp8, i64 0, i32 6
%tmp9 = bitcast void (...)** %weakLogNTimes3 to i8**
@@ -111,22 +111,22 @@ entry:
%tmp13 = load i8*, i8** %tmp12, align 8
%tmp14 = bitcast i8* %tmp13 to void (i8*, i32)*
call void %tmp14(i8* %tmp7, i32 10) nounwind, !clang.arc.no_objc_arc_exceptions !0
- call void @objc_release(i8* %tmp7) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %tmp7) nounwind, !clang.imprecise_release !0
call void @_Block_object_dispose(i8* %tmp5, i32 8) nounwind
- call void @objc_destroyWeak(i8** %tmp3) nounwind
+ call void @llvm.objc.destroyWeak(i8** %tmp3) nounwind
ret void
}
declare void @__Block_byref_object_copy_(i8*, i8*) nounwind
declare void @__Block_byref_object_dispose_(i8*) nounwind
-declare void @objc_destroyWeak(i8**)
-declare i8* @objc_initWeak(i8**, i8*)
+declare void @llvm.objc.destroyWeak(i8**)
+declare i8* @llvm.objc.initWeak(i8**, i8*)
declare void @__main_block_invoke_0(i8* nocapture, i32) nounwind ssp
declare void @_Block_object_dispose(i8*, i32)
-declare i8* @objc_retainBlock(i8*)
-declare i8* @objc_storeWeak(i8**, i8*)
+declare i8* @llvm.objc.retainBlock(i8*)
+declare i8* @llvm.objc.storeWeak(i8**, i8*)
declare i8* @not_really_objc_storeWeak(i8**, i8*)
-declare void @objc_release(i8*)
+declare void @llvm.objc.release(i8*)
!0 = !{}
Modified: llvm/trunk/test/Transforms/ObjCARC/expand.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/expand.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/expand.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/expand.ll Tue Dec 18 12:32:49 2018
@@ -2,78 +2,78 @@
target datalayout = "e-p:64:64:64"
-declare i8* @objc_retain(i8*)
-declare i8* @objc_autorelease(i8*)
-declare i8* @objc_retainAutoreleasedReturnValue(i8*)
-declare i8* @objc_autoreleaseReturnValue(i8*)
-declare i8* @objc_retainAutorelease(i8*)
-declare i8* @objc_retainAutoreleaseReturnValue(i8*)
-declare i8* @objc_retainBlock(i8*)
+declare i8* @llvm.objc.retain(i8*)
+declare i8* @llvm.objc.autorelease(i8*)
+declare i8* @llvm.objc.retainAutoreleasedReturnValue(i8*)
+declare i8* @llvm.objc.autoreleaseReturnValue(i8*)
+declare i8* @llvm.objc.retainAutorelease(i8*)
+declare i8* @llvm.objc.retainAutoreleaseReturnValue(i8*)
+declare i8* @llvm.objc.retainBlock(i8*)
declare void @use_pointer(i8*)
; CHECK: define void @test_retain(i8* %x) [[NUW:#[0-9]+]] {
-; CHECK: call i8* @objc_retain(i8* %x)
+; CHECK: call i8* @llvm.objc.retain(i8* %x)
; CHECK: call void @use_pointer(i8* %x)
; CHECK: }
define void @test_retain(i8* %x) nounwind {
entry:
- %0 = call i8* @objc_retain(i8* %x) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %x) nounwind
call void @use_pointer(i8* %0)
ret void
}
; CHECK: define void @test_retainAutoreleasedReturnValue(i8* %x) [[NUW]] {
-; CHECK: call i8* @objc_retainAutoreleasedReturnValue(i8* %x)
+; CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %x)
; CHECK: call void @use_pointer(i8* %x)
; CHECK: }
define void @test_retainAutoreleasedReturnValue(i8* %x) nounwind {
entry:
- %0 = call i8* @objc_retainAutoreleasedReturnValue(i8* %x) nounwind
+ %0 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %x) nounwind
call void @use_pointer(i8* %0)
ret void
}
; CHECK: define void @test_retainAutorelease(i8* %x) [[NUW]] {
-; CHECK: call i8* @objc_retainAutorelease(i8* %x)
+; CHECK: call i8* @llvm.objc.retainAutorelease(i8* %x)
; CHECK: call void @use_pointer(i8* %x)
; CHECK: }
define void @test_retainAutorelease(i8* %x) nounwind {
entry:
- %0 = call i8* @objc_retainAutorelease(i8* %x) nounwind
+ %0 = call i8* @llvm.objc.retainAutorelease(i8* %x) nounwind
call void @use_pointer(i8* %0)
ret void
}
; CHECK: define void @test_retainAutoreleaseReturnValue(i8* %x) [[NUW]] {
-; CHECK: call i8* @objc_retainAutoreleaseReturnValue(i8* %x)
+; CHECK: call i8* @llvm.objc.retainAutoreleaseReturnValue(i8* %x)
; CHECK: call void @use_pointer(i8* %x)
; CHECK: }
define void @test_retainAutoreleaseReturnValue(i8* %x) nounwind {
entry:
- %0 = call i8* @objc_retainAutoreleaseReturnValue(i8* %x) nounwind
+ %0 = call i8* @llvm.objc.retainAutoreleaseReturnValue(i8* %x) nounwind
call void @use_pointer(i8* %0)
ret void
}
; CHECK: define void @test_autorelease(i8* %x) [[NUW]] {
-; CHECK: call i8* @objc_autorelease(i8* %x)
+; CHECK: call i8* @llvm.objc.autorelease(i8* %x)
; CHECK: call void @use_pointer(i8* %x)
; CHECK: }
define void @test_autorelease(i8* %x) nounwind {
entry:
- %0 = call i8* @objc_autorelease(i8* %x) nounwind
+ %0 = call i8* @llvm.objc.autorelease(i8* %x) nounwind
call void @use_pointer(i8* %0)
ret void
}
; CHECK: define void @test_autoreleaseReturnValue(i8* %x) [[NUW]] {
-; CHECK: call i8* @objc_autoreleaseReturnValue(i8* %x)
+; CHECK: call i8* @llvm.objc.autoreleaseReturnValue(i8* %x)
; CHECK: call void @use_pointer(i8* %x)
; CHECK: }
define void @test_autoreleaseReturnValue(i8* %x) nounwind {
entry:
- %0 = call i8* @objc_autoreleaseReturnValue(i8* %x) nounwind
+ %0 = call i8* @llvm.objc.autoreleaseReturnValue(i8* %x) nounwind
call void @use_pointer(i8* %0)
ret void
}
@@ -83,12 +83,12 @@ entry:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; CHECK: define void @test_retainBlock(i8* %x) [[NUW]] {
-; CHECK: call i8* @objc_retainBlock(i8* %x)
+; CHECK: call i8* @llvm.objc.retainBlock(i8* %x)
; CHECK: call void @use_pointer(i8* %0)
; CHECK: }
define void @test_retainBlock(i8* %x) nounwind {
entry:
- %0 = call i8* @objc_retainBlock(i8* %x) nounwind
+ %0 = call i8* @llvm.objc.retainBlock(i8* %x) nounwind
call void @use_pointer(i8* %0)
ret void
}
Modified: llvm/trunk/test/Transforms/ObjCARC/funclet.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/funclet.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/funclet.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/funclet.ll Tue Dec 18 12:32:49 2018
@@ -14,8 +14,8 @@
declare zeroext i1 @"\01?g@@YA_NXZ"() local_unnamed_addr
declare i8* @"\01?h@@YAPEAUobjc_object@@XZ"() local_unnamed_addr
-declare dllimport void @objc_release(i8*) local_unnamed_addr
-declare dllimport i8* @objc_retainAutoreleasedReturnValue(i8* returned) local_unnamed_addr
+declare dllimport void @llvm.objc.release(i8*) local_unnamed_addr
+declare dllimport i8* @llvm.objc.retainAutoreleasedReturnValue(i8* returned) local_unnamed_addr
declare i32 @__CxxFrameHandler3(...)
@@ -32,8 +32,8 @@ if.then:
to label %invoke.cont1 unwind label %ehcleanup6
invoke.cont1: ; preds = %if.then
- %0 = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %call2)
- tail call void @objc_release(i8* null), !clang.imprecise_release !1
+ %0 = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call2)
+ tail call void @llvm.objc.release(i8* null), !clang.imprecise_release !1
br label %if.end
if.end: ; preds = %invoke.cont1, %invoke.cont
@@ -42,25 +42,25 @@ if.end:
to label %invoke.cont3 unwind label %ehcleanup
invoke.cont3: ; preds = %if.end
- tail call void @objc_release(i8* null), !clang.imprecise_release !1
- tail call void @objc_release(i8* %a.0), !clang.imprecise_release !1
+ tail call void @llvm.objc.release(i8* null), !clang.imprecise_release !1
+ tail call void @llvm.objc.release(i8* %a.0), !clang.imprecise_release !1
ret void
ehcleanup: ; preds = %if.end
%1 = cleanuppad within none []
- call void @objc_release(i8* null) [ "funclet"(token %1) ], !clang.imprecise_release !1
+ call void @llvm.objc.release(i8* null) [ "funclet"(token %1) ], !clang.imprecise_release !1
cleanupret from %1 unwind label %ehcleanup6
ehcleanup6: ; preds = %ehcleanup, %if.then, %entry
%a.1 = phi i8* [ %a.0, %ehcleanup ], [ null, %if.then ], [ null, %entry ]
%2 = cleanuppad within none []
- call void @objc_release(i8* %a.1) [ "funclet"(token %2) ], !clang.imprecise_release !1
+ call void @llvm.objc.release(i8* %a.1) [ "funclet"(token %2) ], !clang.imprecise_release !1
cleanupret from %2 unwind to caller
}
; CHECK-LABEL: ?f@@YAXXZ
-; CHECK: call void @objc_release(i8* {{.*}}) {{.*}}[ "funclet"(token %1) ]
-; CHECK-NOT: call void @objc_release(i8* {{.*}}) {{.*}}[ "funclet"(token %2) ]
+; CHECK: call void @llvm.objc.release(i8* {{.*}}) {{.*}}[ "funclet"(token %1) ]
+; CHECK-NOT: call void @llvm.objc.release(i8* {{.*}}) {{.*}}[ "funclet"(token %2) ]
define void @"\01?i@@YAXXZ"() local_unnamed_addr personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) {
entry:
@@ -75,8 +75,8 @@ if.then:
to label %invoke.cont1 unwind label %ehcleanup6
invoke.cont1: ; preds = %if.then
- %0 = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %call2)
- tail call void @objc_release(i8* null), !clang.imprecise_release !1
+ %0 = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call2)
+ tail call void @llvm.objc.release(i8* null), !clang.imprecise_release !1
br label %if.end
if.end: ; preds = %invoke.cont1, %invoke.cont
@@ -85,13 +85,13 @@ if.end:
to label %invoke.cont3 unwind label %ehcleanup
invoke.cont3: ; preds = %if.end
- tail call void @objc_release(i8* null), !clang.imprecise_release !1
- tail call void @objc_release(i8* %a.0), !clang.imprecise_release !1
+ tail call void @llvm.objc.release(i8* null), !clang.imprecise_release !1
+ tail call void @llvm.objc.release(i8* %a.0), !clang.imprecise_release !1
ret void
ehcleanup: ; preds = %if.end
%1 = cleanuppad within none []
- call void @objc_release(i8* null) [ "funclet"(token %1) ], !clang.imprecise_release !1
+ call void @llvm.objc.release(i8* null) [ "funclet"(token %1) ], !clang.imprecise_release !1
br label %ehcleanup.1
ehcleanup.1:
@@ -100,13 +100,13 @@ ehcleanup.1:
ehcleanup6: ; preds = %ehcleanup, %if.then, %entry
%a.1 = phi i8* [ %a.0, %ehcleanup.1 ], [ null, %if.then ], [ null, %entry ]
%2 = cleanuppad within none []
- call void @objc_release(i8* %a.1) [ "funclet"(token %2) ], !clang.imprecise_release !1
+ call void @llvm.objc.release(i8* %a.1) [ "funclet"(token %2) ], !clang.imprecise_release !1
cleanupret from %2 unwind to caller
}
; CHECK-LABEL: ?i@@YAXXZ
-; CHECK: call void @objc_release(i8* {{.*}}) {{.*}}[ "funclet"(token %1) ]
-; CHECK-NOT: call void @objc_release(i8* {{.*}}) {{.*}}[ "funclet"(token %2) ]
+; CHECK: call void @llvm.objc.release(i8* {{.*}}) {{.*}}[ "funclet"(token %1) ]
+; CHECK-NOT: call void @llvm.objc.release(i8* {{.*}}) {{.*}}[ "funclet"(token %2) ]
!1 = !{}
Modified: llvm/trunk/test/Transforms/ObjCARC/gvn.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/gvn.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/gvn.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/gvn.ll Tue Dec 18 12:32:49 2018
@@ -2,9 +2,9 @@
@x = common global i8* null, align 8
-declare i8* @objc_retain(i8*)
-declare i32 @objc_sync_enter(i8*)
-declare i32 @objc_sync_exit(i8*)
+declare i8* @llvm.objc.retain(i8*)
+declare i32 @llvm.objc.sync.enter(i8*)
+declare i32 @llvm.objc.sync.exit(i8*)
; GVN should be able to eliminate this redundant load, with ARC-specific
; alias analysis.
@@ -18,7 +18,7 @@ declare i32 @objc_sync_exit(i8*)
define i8* @test0(i32 %n) nounwind {
entry:
%s = load i8*, i8** @x
- %0 = tail call i8* @objc_retain(i8* %s) nounwind
+ %0 = tail call i8* @llvm.objc.retain(i8* %s) nounwind
%t = load i8*, i8** @x
ret i8* %t
}
@@ -34,8 +34,8 @@ entry:
define i8* @test1(i32 %n) nounwind {
entry:
%s = load i8*, i8** @x
- %0 = call i32 @objc_sync_enter(i8* %s)
+ %0 = call i32 @llvm.objc.sync.enter(i8* %s)
%t = load i8*, i8** @x
- %1 = call i32 @objc_sync_exit(i8* %s)
+ %1 = call i32 @llvm.objc.sync.exit(i8* %s)
ret i8* %t
}
Modified: llvm/trunk/test/Transforms/ObjCARC/intrinsic-use-isolated.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/intrinsic-use-isolated.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/intrinsic-use-isolated.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/intrinsic-use-isolated.ll Tue Dec 18 12:32:49 2018
@@ -3,14 +3,14 @@
; This file makes sure that clang.arc.used is removed even if no other ARC
; interesting calls are in the module.
-declare void @clang.arc.use(...) nounwind
+declare void @llvm.objc.clang.arc.use(...) nounwind
-; Kill calls to @clang.arc.use(...)
+; Kill calls to @llvm.objc.clang.arc.use(...)
; CHECK-LABEL: define void @test0(
; CHECK-NOT: clang.arc.use
; CHECK: }
define void @test0(i8* %a, i8* %b) {
- call void (...) @clang.arc.use(i8* %a, i8* %b) nounwind
+ call void (...) @llvm.objc.clang.arc.use(i8* %a, i8* %b) nounwind
ret void
}
Modified: llvm/trunk/test/Transforms/ObjCARC/intrinsic-use.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/intrinsic-use.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/intrinsic-use.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/intrinsic-use.ll Tue Dec 18 12:32:49 2018
@@ -2,12 +2,12 @@
target datalayout = "e-p:64:64:64"
-declare i8* @objc_retain(i8*)
-declare i8* @objc_retainAutorelease(i8*)
-declare void @objc_release(i8*)
-declare i8* @objc_autorelease(i8*)
+declare i8* @llvm.objc.retain(i8*)
+declare i8* @llvm.objc.retainAutorelease(i8*)
+declare void @llvm.objc.release(i8*)
+declare i8* @llvm.objc.autorelease(i8*)
-declare void @clang.arc.use(...)
+declare void @llvm.objc.clang.arc.use(...)
declare void @test0_helper(i8*, i8**)
@@ -15,70 +15,70 @@ declare void @test0_helper(i8*, i8**)
; the reduced test case from <rdar://13195034>.
;
; CHECK-LABEL: define void @test0(
-; CHECK: @objc_retain(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
; CHECK-NEXT: store i8* %y, i8** %temp0
-; CHECK-NEXT: @objc_retain(i8* %y)
+; CHECK-NEXT: @llvm.objc.retain(i8* %y)
; CHECK-NEXT: call void @test0_helper
; CHECK-NEXT: [[VAL1:%.*]] = load i8*, i8** %temp0
-; CHECK-NEXT: @objc_retain(i8* [[VAL1]])
-; CHECK-NEXT: call void (...) @clang.arc.use(i8* %y)
-; CHECK-NEXT: @objc_release(i8* %y)
+; CHECK-NEXT: @llvm.objc.retain(i8* [[VAL1]])
+; CHECK-NEXT: call void (...) @llvm.objc.clang.arc.use(i8* %y)
+; CHECK-NEXT: @llvm.objc.release(i8* %y)
; CHECK-NEXT: store i8* [[VAL1]], i8** %temp1
; CHECK-NEXT: call void @test0_helper
; CHECK-NEXT: [[VAL2:%.*]] = load i8*, i8** %temp1
-; CHECK-NEXT: @objc_retain(i8* [[VAL2]])
-; CHECK-NEXT: call void (...) @clang.arc.use(i8* [[VAL1]])
-; CHECK-NEXT: @objc_release(i8* [[VAL1]])
-; CHECK-NEXT: @objc_autorelease(i8* %x)
+; CHECK-NEXT: @llvm.objc.retain(i8* [[VAL2]])
+; CHECK-NEXT: call void (...) @llvm.objc.clang.arc.use(i8* [[VAL1]])
+; CHECK-NEXT: @llvm.objc.release(i8* [[VAL1]])
+; CHECK-NEXT: @llvm.objc.autorelease(i8* %x)
; CHECK-NEXT: store i8* %x, i8** %out
-; CHECK-NEXT: @objc_retain(i8* %x)
-; CHECK-NEXT: @objc_release(i8* [[VAL2]])
-; CHECK-NEXT: @objc_release(i8* %x)
+; CHECK-NEXT: @llvm.objc.retain(i8* %x)
+; CHECK-NEXT: @llvm.objc.release(i8* [[VAL2]])
+; CHECK-NEXT: @llvm.objc.release(i8* %x)
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test0(i8** %out, i8* %x, i8* %y) {
entry:
%temp0 = alloca i8*, align 8
%temp1 = alloca i8*, align 8
- %0 = call i8* @objc_retain(i8* %x) nounwind
- %1 = call i8* @objc_retain(i8* %y) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %x) nounwind
+ %1 = call i8* @llvm.objc.retain(i8* %y) nounwind
store i8* %y, i8** %temp0
call void @test0_helper(i8* %x, i8** %temp0)
%val1 = load i8*, i8** %temp0
- %2 = call i8* @objc_retain(i8* %val1) nounwind
- call void (...) @clang.arc.use(i8* %y) nounwind
- call void @objc_release(i8* %y) nounwind
+ %2 = call i8* @llvm.objc.retain(i8* %val1) nounwind
+ call void (...) @llvm.objc.clang.arc.use(i8* %y) nounwind
+ call void @llvm.objc.release(i8* %y) nounwind
store i8* %val1, i8** %temp1
call void @test0_helper(i8* %x, i8** %temp1)
%val2 = load i8*, i8** %temp1
- %3 = call i8* @objc_retain(i8* %val2) nounwind
- call void (...) @clang.arc.use(i8* %val1) nounwind
- call void @objc_release(i8* %val1) nounwind
- %4 = call i8* @objc_retain(i8* %x) nounwind
- %5 = call i8* @objc_autorelease(i8* %x) nounwind
+ %3 = call i8* @llvm.objc.retain(i8* %val2) nounwind
+ call void (...) @llvm.objc.clang.arc.use(i8* %val1) nounwind
+ call void @llvm.objc.release(i8* %val1) nounwind
+ %4 = call i8* @llvm.objc.retain(i8* %x) nounwind
+ %5 = call i8* @llvm.objc.autorelease(i8* %x) nounwind
store i8* %x, i8** %out
- call void @objc_release(i8* %val2) nounwind
- call void @objc_release(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %val2) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
ret void
}
; CHECK-LABEL: define void @test0a(
-; CHECK: @objc_retain(i8* %x)
+; CHECK: @llvm.objc.retain(i8* %x)
; CHECK-NEXT: store i8* %y, i8** %temp0
-; CHECK-NEXT: @objc_retain(i8* %y)
+; CHECK-NEXT: @llvm.objc.retain(i8* %y)
; CHECK-NEXT: call void @test0_helper
; CHECK-NEXT: [[VAL1:%.*]] = load i8*, i8** %temp0
-; CHECK-NEXT: @objc_retain(i8* [[VAL1]])
-; CHECK-NEXT: call void (...) @clang.arc.use(i8* %y)
-; CHECK-NEXT: @objc_release(i8* %y)
+; CHECK-NEXT: @llvm.objc.retain(i8* [[VAL1]])
+; CHECK-NEXT: call void (...) @llvm.objc.clang.arc.use(i8* %y)
+; CHECK-NEXT: @llvm.objc.release(i8* %y)
; CHECK-NEXT: store i8* [[VAL1]], i8** %temp1
; CHECK-NEXT: call void @test0_helper
; CHECK-NEXT: [[VAL2:%.*]] = load i8*, i8** %temp1
-; CHECK-NEXT: @objc_retain(i8* [[VAL2]])
-; CHECK-NEXT: call void (...) @clang.arc.use(i8* [[VAL1]])
-; CHECK-NEXT: @objc_release(i8* [[VAL1]])
-; CHECK-NEXT: @objc_autorelease(i8* %x)
-; CHECK-NEXT: @objc_release(i8* [[VAL2]])
+; CHECK-NEXT: @llvm.objc.retain(i8* [[VAL2]])
+; CHECK-NEXT: call void (...) @llvm.objc.clang.arc.use(i8* [[VAL1]])
+; CHECK-NEXT: @llvm.objc.release(i8* [[VAL1]])
+; CHECK-NEXT: @llvm.objc.autorelease(i8* %x)
+; CHECK-NEXT: @llvm.objc.release(i8* [[VAL2]])
; CHECK-NEXT: store i8* %x, i8** %out
; CHECK-NEXT: ret void
; CHECK-NEXT: }
@@ -86,25 +86,25 @@ define void @test0a(i8** %out, i8* %x, i
entry:
%temp0 = alloca i8*, align 8
%temp1 = alloca i8*, align 8
- %0 = call i8* @objc_retain(i8* %x) nounwind
- %1 = call i8* @objc_retain(i8* %y) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %x) nounwind
+ %1 = call i8* @llvm.objc.retain(i8* %y) nounwind
store i8* %y, i8** %temp0
call void @test0_helper(i8* %x, i8** %temp0)
%val1 = load i8*, i8** %temp0
- %2 = call i8* @objc_retain(i8* %val1) nounwind
- call void (...) @clang.arc.use(i8* %y) nounwind
- call void @objc_release(i8* %y) nounwind, !clang.imprecise_release !0
+ %2 = call i8* @llvm.objc.retain(i8* %val1) nounwind
+ call void (...) @llvm.objc.clang.arc.use(i8* %y) nounwind
+ call void @llvm.objc.release(i8* %y) nounwind, !clang.imprecise_release !0
store i8* %val1, i8** %temp1
call void @test0_helper(i8* %x, i8** %temp1)
%val2 = load i8*, i8** %temp1
- %3 = call i8* @objc_retain(i8* %val2) nounwind
- call void (...) @clang.arc.use(i8* %val1) nounwind
- call void @objc_release(i8* %val1) nounwind, !clang.imprecise_release !0
- %4 = call i8* @objc_retain(i8* %x) nounwind
- %5 = call i8* @objc_autorelease(i8* %x) nounwind
+ %3 = call i8* @llvm.objc.retain(i8* %val2) nounwind
+ call void (...) @llvm.objc.clang.arc.use(i8* %val1) nounwind
+ call void @llvm.objc.release(i8* %val1) nounwind, !clang.imprecise_release !0
+ %4 = call i8* @llvm.objc.retain(i8* %x) nounwind
+ %5 = call i8* @llvm.objc.autorelease(i8* %x) nounwind
store i8* %x, i8** %out
- call void @objc_release(i8* %val2) nounwind, !clang.imprecise_release !0
- call void @objc_release(i8* %x) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %val2) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %x) nounwind, !clang.imprecise_release !0
ret void
}
Modified: llvm/trunk/test/Transforms/ObjCARC/invoke-2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/invoke-2.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/invoke-2.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/invoke-2.ll Tue Dec 18 12:32:49 2018
@@ -4,51 +4,51 @@ target triple = "x86_64-unknown-windows-
declare i32 @__CxxFrameHandler3(...)
-declare dllimport i8* @objc_msgSend(i8*, i8*, ...) local_unnamed_addr
+declare dllimport i8* @llvm.objc.msgSend(i8*, i8*, ...) local_unnamed_addr
-declare dllimport i8* @objc_retain(i8* returned) local_unnamed_addr
-declare dllimport void @objc_release(i8*) local_unnamed_addr
-declare dllimport i8* @objc_retainAutoreleasedReturnValue(i8* returned) local_unnamed_addr
+declare dllimport i8* @llvm.objc.retain(i8* returned) local_unnamed_addr
+declare dllimport void @llvm.objc.release(i8*) local_unnamed_addr
+declare dllimport i8* @llvm.objc.retainAutoreleasedReturnValue(i8* returned) local_unnamed_addr
-declare dllimport i8* @objc_begin_catch(i8*) local_unnamed_addr
-declare dllimport void @objc_end_catch() local_unnamed_addr
+declare dllimport i8* @llvm.objc.begin_catch(i8*) local_unnamed_addr
+declare dllimport void @llvm.objc.end_catch() local_unnamed_addr
- at OBJC_METH_VAR_NAME_ = private unnamed_addr constant [2 x i8] c"m\00", align 1
- at OBJC_SELECTOR_REFERENCES_ = private externally_initialized global i8* getelementptr inbounds ([2 x i8], [2 x i8]* @OBJC_METH_VAR_NAME_, i64 0, i64 0), section ".objc_selrefs$B", align 8
+ at llvm.objc.METH_VAR_NAME_ = private unnamed_addr constant [2 x i8] c"m\00", align 1
+ at llvm.objc.SELECTOR_REFERENCES_ = private externally_initialized global i8* getelementptr inbounds ([2 x i8], [2 x i8]* @llvm.objc.METH_VAR_NAME_, i64 0, i64 0), section ".objc_selrefs$B", align 8
define void @f(i8* %i) local_unnamed_addr personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) {
entry:
- %0 = tail call i8* @objc_retain(i8* %i)
- %1 = load i8*, i8** @OBJC_SELECTOR_REFERENCES_, align 8, !invariant.load !0
- %call = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* %0, i8* %1)
+ %0 = tail call i8* @llvm.objc.retain(i8* %i)
+ %1 = load i8*, i8** @llvm.objc.SELECTOR_REFERENCES_, align 8, !invariant.load !0
+ %call = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*)*)(i8* %0, i8* %1)
to label %invoke.cont unwind label %catch.dispatch, !clang.arc.no_objc_arc_exceptions !0
catch.dispatch: ; preds = %entry
%2 = catchswitch within none [label %catch] unwind to caller
invoke.cont: ; preds = %entry
- %3 = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %call)
- tail call void @objc_release(i8* %3) #0, !clang.imprecise_release !0
+ %3 = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call)
+ tail call void @llvm.objc.release(i8* %3) #0, !clang.imprecise_release !0
br label %eh.cont
eh.cont: ; preds = %invoke.cont, %catch
- tail call void @objc_release(i8* %0) #0, !clang.imprecise_release !0
+ tail call void @llvm.objc.release(i8* %0) #0, !clang.imprecise_release !0
ret void
catch: ; preds = %catch.dispatch
%4 = catchpad within %2 [i8* null, i32 0, i8* null]
- %exn.adjusted = tail call i8* @objc_begin_catch(i8* undef)
- tail call void @objc_end_catch(), !clang.arc.no_objc_arc_exceptions !0
+ %exn.adjusted = tail call i8* @llvm.objc.begin_catch(i8* undef)
+ tail call void @llvm.objc.end_catch(), !clang.arc.no_objc_arc_exceptions !0
br label %eh.cont
}
; CHECK-LABEL: @f
-; CHECK-NOT: tail call i8* @objc_retain(i8* %i)
-; CHECK: load i8*, i8** @OBJC_SELECTOR_REFERENCES_, align 8
+; CHECK-NOT: tail call i8* @llvm.objc.retain(i8* %i)
+; CHECK: load i8*, i8** @llvm.objc.SELECTOR_REFERENCES_, align 8
; CHECK: eh.cont:
-; CHECK-NOT: call void @objc_release(i8*
+; CHECK-NOT: call void @llvm.objc.release(i8*
; CHECK: ret void
attributes #0 = { nounwind }
Modified: llvm/trunk/test/Transforms/ObjCARC/invoke.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/invoke.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/invoke.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/invoke.ll Tue Dec 18 12:32:49 2018
@@ -1,9 +1,9 @@
; RUN: opt -S -objc-arc < %s | FileCheck %s
-declare i8* @objc_retain(i8*)
-declare void @objc_release(i8*)
-declare i8* @objc_retainAutoreleasedReturnValue(i8*)
-declare i8* @objc_msgSend(i8*, i8*, ...)
+declare i8* @llvm.objc.retain(i8*)
+declare void @llvm.objc.release(i8*)
+declare i8* @llvm.objc.retainAutoreleasedReturnValue(i8*)
+declare i8* @llvm.objc.msgSend(i8*, i8*, ...)
declare void @use_pointer(i8*)
declare void @callee()
declare i8* @returner()
@@ -12,27 +12,27 @@ declare i8* @returner()
; CHECK-LABEL: define void @test0(
; CHECK: invoke.cont:
-; CHECK: call void @objc_release(i8* %zipFile) [[NUW:#[0-9]+]], !clang.imprecise_release !0
+; CHECK: call void @llvm.objc.release(i8* %zipFile) [[NUW:#[0-9]+]], !clang.imprecise_release !0
; CHECK: ret void
; CHECK: lpad:
-; CHECK: call void @objc_release(i8* %zipFile) [[NUW]], !clang.imprecise_release !0
+; CHECK: call void @llvm.objc.release(i8* %zipFile) [[NUW]], !clang.imprecise_release !0
; CHECK: ret void
; CHECK-NEXT: }
define void @test0(i8* %zipFile) personality i32 (...)* @__gxx_personality_v0 {
entry:
- call i8* @objc_retain(i8* %zipFile) nounwind
+ call i8* @llvm.objc.retain(i8* %zipFile) nounwind
call void @use_pointer(i8* %zipFile)
- invoke void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*)*)(i8* %zipFile)
+ invoke void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*)*)(i8* %zipFile)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
- call void @objc_release(i8* %zipFile) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %zipFile) nounwind, !clang.imprecise_release !0
ret void
lpad: ; preds = %entry
%exn = landingpad {i8*, i32}
cleanup
- call void @objc_release(i8* %zipFile) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %zipFile) nounwind, !clang.imprecise_release !0
ret void
}
@@ -40,11 +40,11 @@ lpad:
; CHECK-LABEL: define void @test1(
; CHECK: invoke.cont:
-; CHECK: call void @objc_release(i8* %zipFile) [[NUW]], !clang.imprecise_release !0
+; CHECK: call void @llvm.objc.release(i8* %zipFile) [[NUW]], !clang.imprecise_release !0
; CHECK: call void @callee()
; CHECK: br label %done
; CHECK: lpad:
-; CHECK: call void @objc_release(i8* %zipFile) [[NUW]], !clang.imprecise_release !0
+; CHECK: call void @llvm.objc.release(i8* %zipFile) [[NUW]], !clang.imprecise_release !0
; CHECK: call void @callee()
; CHECK: br label %done
; CHECK: done:
@@ -52,9 +52,9 @@ lpad:
; CHECK-NEXT: }
define void @test1(i8* %zipFile) personality i32 (...)* @__gxx_personality_v0 {
entry:
- call i8* @objc_retain(i8* %zipFile) nounwind
+ call i8* @llvm.objc.retain(i8* %zipFile) nounwind
call void @use_pointer(i8* %zipFile)
- invoke void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*)*)(i8* %zipFile)
+ invoke void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*)*)(i8* %zipFile)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
@@ -68,7 +68,7 @@ lpad:
br label %done
done:
- call void @objc_release(i8* %zipFile) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %zipFile) nounwind, !clang.imprecise_release !0
ret void
}
@@ -77,27 +77,27 @@ done:
; CHECK: define void @test2() personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) {
; CHECK: invoke.cont:
-; CHECK-NEXT: call i8* @objc_retain
-; CHECK-NOT: @objc_r
+; CHECK-NEXT: call i8* @llvm.objc.retain
+; CHECK-NOT: @llvm.objc.r
; CHECK: finally.cont:
-; CHECK-NEXT: call void @objc_release
+; CHECK-NEXT: call void @llvm.objc.release
; CHECK-NOT: @objc
; CHECK: finally.rethrow:
; CHECK-NOT: @objc
; CHECK: }
define void @test2() personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) {
entry:
- %call = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* ()*)()
+ %call = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* ()*)()
to label %invoke.cont unwind label %finally.rethrow, !clang.arc.no_objc_arc_exceptions !0
invoke.cont: ; preds = %entry
- %tmp1 = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %call) nounwind
- call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void ()*)(), !clang.arc.no_objc_arc_exceptions !0
+ %tmp1 = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call) nounwind
+ call void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void ()*)(), !clang.arc.no_objc_arc_exceptions !0
invoke void @use_pointer(i8* %call)
to label %finally.cont unwind label %finally.rethrow, !clang.arc.no_objc_arc_exceptions !0
finally.cont: ; preds = %invoke.cont
- tail call void @objc_release(i8* %call) nounwind, !clang.imprecise_release !0
+ tail call void @llvm.objc.release(i8* %call) nounwind, !clang.imprecise_release !0
ret void
finally.rethrow: ; preds = %invoke.cont, %entry
@@ -110,12 +110,12 @@ finally.rethrow:
; CHECK-LABEL: define void @test3(
; CHECK: if.end:
-; CHECK-NEXT: call void @objc_release(i8* %p) [[NUW]]
+; CHECK-NEXT: call void @llvm.objc.release(i8* %p) [[NUW]]
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test3(i8* %p, i1 %b) personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) {
entry:
- %0 = call i8* @objc_retain(i8* %p)
+ %0 = call i8* @llvm.objc.retain(i8* %p)
call void @callee()
br i1 %b, label %if.else, label %if.then
@@ -133,7 +133,7 @@ lpad:
ret void
if.end:
- call void @objc_release(i8* %p)
+ call void @llvm.objc.release(i8* %p)
ret void
}
@@ -143,15 +143,15 @@ if.end:
; CHECK: lpad:
; CHECK-NEXT: %r = landingpad { i8*, i32 }
; CHECK-NEXT: cleanup
-; CHECK-NEXT: call void @objc_release(i8* %p) [[NUW]]
+; CHECK-NEXT: call void @llvm.objc.release(i8* %p) [[NUW]]
; CHECK-NEXT: ret void
; CHECK: if.end:
-; CHECK-NEXT: call void @objc_release(i8* %p) [[NUW]]
+; CHECK-NEXT: call void @llvm.objc.release(i8* %p) [[NUW]]
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test4(i8* %p, i1 %b) personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) {
entry:
- %0 = call i8* @objc_retain(i8* %p)
+ %0 = call i8* @llvm.objc.retain(i8* %p)
call void @callee()
br i1 %b, label %if.else, label %if.then
@@ -166,11 +166,11 @@ if.else:
lpad:
%r = landingpad { i8*, i32 }
cleanup
- call void @objc_release(i8* %p)
+ call void @llvm.objc.release(i8* %p)
ret void
if.end:
- call void @objc_release(i8* %p)
+ call void @llvm.objc.release(i8* %p)
ret void
}
@@ -178,7 +178,7 @@ if.end:
; for an invoke which we can assume codegen will put immediately prior.
; CHECK-LABEL: define void @test5(
-; CHECK: call i8* @objc_retainAutoreleasedReturnValue(i8* %z)
+; CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %z)
; CHECK: }
define void @test5() personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) {
entry:
@@ -191,14 +191,14 @@ lpad:
ret void
if.end:
- call i8* @objc_retainAutoreleasedReturnValue(i8* %z)
+ call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %z)
ret void
}
; Like test5, but there's intervening code.
; CHECK-LABEL: define void @test6(
-; CHECK: call i8* @objc_retain(i8* %z)
+; CHECK: call i8* @llvm.objc.retain(i8* %z)
; CHECK: }
define void @test6() personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) {
entry:
@@ -212,7 +212,7 @@ lpad:
if.end:
call void @callee()
- call i8* @objc_retainAutoreleasedReturnValue(i8* %z)
+ call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %z)
ret void
}
Modified: llvm/trunk/test/Transforms/ObjCARC/move-and-form-retain-autorelease.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/move-and-form-retain-autorelease.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/move-and-form-retain-autorelease.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/move-and-form-retain-autorelease.ll Tue Dec 18 12:32:49 2018
@@ -4,7 +4,7 @@
; and various scary looking things and fold it into an objc_retainAutorelease.
; CHECK: bb57:
-; CHECK: tail call i8* @objc_retainAutorelease(i8* %tmp71x) [[NUW:#[0-9]+]]
+; CHECK: tail call i8* @llvm.objc.retainAutorelease(i8* %tmp71x) [[NUW:#[0-9]+]]
; CHECK: bb99:
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
@@ -68,30 +68,30 @@ target triple = "x86_64-apple-darwin11.0
@"\01L_OBJC_SELECTOR_REFERENCES_413" = external hidden global i8*, section "__DATA, __objc_selrefs, literal_pointers, no_dead_strip"
@"\01L_OBJC_SELECTOR_REFERENCES_415" = external hidden global i8*, section "__DATA, __objc_selrefs, literal_pointers, no_dead_strip"
-declare i8* @objc_msgSend(i8*, i8*, ...)
+declare i8* @llvm.objc.msgSend(i8*, i8*, ...)
-declare i8* @objc_retain(i8*)
+declare i8* @llvm.objc.retain(i8*)
-declare void @objc_release(i8*)
+declare void @llvm.objc.release(i8*)
-declare i8* @objc_autorelease(i8*)
+declare i8* @llvm.objc.autorelease(i8*)
-declare i8* @objc_explicit_autorelease(i8*)
+declare i8* @llvm.objc.explicit_autorelease(i8*)
define hidden %14* @foo(%15* %arg, %16* %arg2) {
bb:
%tmp = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_3725", align 8
%tmp4 = bitcast %15* %arg to i8*
- %tmp5 = tail call %18* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to %18* (i8*, i8*)*)(i8* %tmp4, i8* %tmp)
+ %tmp5 = tail call %18* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to %18* (i8*, i8*)*)(i8* %tmp4, i8* %tmp)
%tmp6 = bitcast %18* %tmp5 to i8*
- %tmp7 = tail call i8* @objc_retain(i8* %tmp6) nounwind
+ %tmp7 = tail call i8* @llvm.objc.retain(i8* %tmp6) nounwind
%tmp8 = load %2*, %2** @"\01L_OBJC_CLASSLIST_REFERENCES_$_40", align 8
%tmp9 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_4227", align 8
%tmp10 = bitcast %2* %tmp8 to i8*
- %tmp11 = tail call %19* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to %19* (i8*, i8*)*)(i8* %tmp10, i8* %tmp9)
+ %tmp11 = tail call %19* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to %19* (i8*, i8*)*)(i8* %tmp10, i8* %tmp9)
%tmp12 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_4631", align 8
%tmp13 = bitcast %19* %tmp11 to i8*
- %tmp14 = tail call signext i8 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8 (i8*, i8*, %13*)*)(i8* %tmp13, i8* %tmp12, %13* bitcast (%12* @_unnamed_cfstring_386 to %13*))
+ %tmp14 = tail call signext i8 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8 (i8*, i8*, %13*)*)(i8* %tmp13, i8* %tmp12, %13* bitcast (%12* @_unnamed_cfstring_386 to %13*))
%tmp15 = bitcast %16* %arg2 to i8*
%tmp16 = load i8*, i8** bitcast (%0* @"\01l_objc_msgSend_fixup_count" to i8**), align 16
%tmp17 = bitcast i8* %tmp16 to i64 (i8*, %1*)*
@@ -111,35 +111,35 @@ bb22:
bb25: ; preds = %bb22, %bb20
%tmp26 = phi i1 [ %tmp21, %bb20 ], [ false, %bb22 ]
%tmp27 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_188", align 8
- %tmp28 = tail call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* %tmp7, i8* %tmp27)
- %tmp29 = tail call i8* @objc_explicit_autorelease(i8* %tmp28) nounwind
+ %tmp28 = tail call i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*)*)(i8* %tmp7, i8* %tmp27)
+ %tmp29 = tail call i8* @llvm.objc.explicit_autorelease(i8* %tmp28) nounwind
%tmp30 = bitcast i8* %tmp29 to %18*
- tail call void @objc_release(i8* %tmp7) nounwind
+ tail call void @llvm.objc.release(i8* %tmp7) nounwind
%tmp31 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_389", align 8
- %tmp32 = tail call %20* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to %20* (i8*, i8*)*)(i8* %tmp29, i8* %tmp31)
+ %tmp32 = tail call %20* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to %20* (i8*, i8*)*)(i8* %tmp29, i8* %tmp31)
%tmp33 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_391", align 8
%tmp34 = bitcast %20* %tmp32 to i8*
- tail call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, %16*)*)(i8* %tmp34, i8* %tmp33, %16* %arg2)
+ tail call void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*, %16*)*)(i8* %tmp34, i8* %tmp33, %16* %arg2)
br i1 %tmp26, label %bb46, label %bb35
bb35: ; preds = %bb25
%tmp36 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_389", align 8
- %tmp37 = tail call %20* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to %20* (i8*, i8*)*)(i8* %tmp29, i8* %tmp36)
+ %tmp37 = tail call %20* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to %20* (i8*, i8*)*)(i8* %tmp29, i8* %tmp36)
%tmp38 = load %2*, %2** @"\01L_OBJC_CLASSLIST_REFERENCES_$_70", align 8
%tmp39 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_393", align 8
%tmp40 = bitcast %2* %tmp38 to i8*
- %tmp41 = tail call %21* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to %21* (i8*, i8*, i8)*)(i8* %tmp40, i8* %tmp39, i8 signext 1)
+ %tmp41 = tail call %21* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to %21* (i8*, i8*, i8)*)(i8* %tmp40, i8* %tmp39, i8 signext 1)
%tmp42 = bitcast %21* %tmp41 to i8*
%tmp43 = load %13*, %13** @NSPrintHeaderAndFooter, align 8
%tmp44 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_159", align 8
%tmp45 = bitcast %20* %tmp37 to i8*
- tail call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i8*, %13*)*)(i8* %tmp45, i8* %tmp44, i8* %tmp42, %13* %tmp43)
+ tail call void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*, i8*, %13*)*)(i8* %tmp45, i8* %tmp44, i8* %tmp42, %13* %tmp43)
br label %bb46
bb46: ; preds = %bb35, %bb25, %bb22
%tmp47 = phi %18* [ %tmp30, %bb35 ], [ %tmp30, %bb25 ], [ %tmp23, %bb22 ]
%tmp48 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_328", align 8
- %tmp49 = tail call %22* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to %22* (i8*, i8*)*)(i8* %tmp4, i8* %tmp48)
+ %tmp49 = tail call %22* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to %22* (i8*, i8*)*)(i8* %tmp4, i8* %tmp48)
%tmp50 = bitcast %22* %tmp49 to i8*
%tmp51 = load i8*, i8** bitcast (%0* @"\01l_objc_msgSend_fixup_count" to i8**), align 16
%tmp52 = bitcast i8* %tmp51 to i64 (i8*, %1*)*
@@ -149,74 +149,74 @@ bb46:
bb55: ; preds = %bb46
%tmp56 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_395", align 8
- tail call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*)*)(i8* %tmp4, i8* %tmp56)
+ tail call void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*)*)(i8* %tmp4, i8* %tmp56)
br label %bb57
bb57: ; preds = %bb55, %bb46
%tmp58 = load %2*, %2** @"\01L_OBJC_CLASSLIST_REFERENCES_$_396", align 8
%tmp59 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_328", align 8
- %tmp60 = tail call %22* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to %22* (i8*, i8*)*)(i8* %tmp4, i8* %tmp59)
+ %tmp60 = tail call %22* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to %22* (i8*, i8*)*)(i8* %tmp4, i8* %tmp59)
%tmp61 = bitcast %22* %tmp60 to i8*
%tmp62 = load i8*, i8** bitcast (%0* @"\01l_objc_msgSend_fixup_objectAtIndex_" to i8**), align 16
%tmp63 = bitcast i8* %tmp62 to i8* (i8*, %1*, i64)*
%tmp64 = tail call i8* %tmp63(i8* %tmp61, %1* bitcast (%0* @"\01l_objc_msgSend_fixup_objectAtIndex_" to %1*), i64 0)
%tmp65 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_398", align 8
- %tmp66 = tail call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* %tmp64, i8* %tmp65)
+ %tmp66 = tail call i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*)*)(i8* %tmp64, i8* %tmp65)
%tmp67 = bitcast i8* %tmp66 to %23*
%tmp68 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_400", align 8
%tmp69 = bitcast %2* %tmp58 to i8*
- %tmp70 = tail call %14* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to %14* (i8*, i8*, %23*, %18*)*)(i8* %tmp69, i8* %tmp68, %23* %tmp67, %18* %tmp47)
+ %tmp70 = tail call %14* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to %14* (i8*, i8*, %23*, %18*)*)(i8* %tmp69, i8* %tmp68, %23* %tmp67, %18* %tmp47)
%tmp71 = bitcast %14* %tmp70 to i8*
; hack to prevent the optimize from using objc_retainAutoreleasedReturnValue.
%tmp71x = getelementptr i8, i8* %tmp71, i64 1
- %tmp72 = tail call i8* @objc_retain(i8* %tmp71x) nounwind
+ %tmp72 = tail call i8* @llvm.objc.retain(i8* %tmp71x) nounwind
%tmp73 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_402", align 8
- tail call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i8)*)(i8* %tmp72, i8* %tmp73, i8 signext 1)
+ tail call void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*, i8)*)(i8* %tmp72, i8* %tmp73, i8 signext 1)
%tmp74 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_404", align 8
- tail call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i8)*)(i8* %tmp72, i8* %tmp74, i8 signext 1)
+ tail call void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*, i8)*)(i8* %tmp72, i8* %tmp74, i8 signext 1)
%tmp75 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_328", align 8
- %tmp76 = tail call %22* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to %22* (i8*, i8*)*)(i8* %tmp4, i8* %tmp75)
+ %tmp76 = tail call %22* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to %22* (i8*, i8*)*)(i8* %tmp4, i8* %tmp75)
%tmp77 = bitcast %22* %tmp76 to i8*
%tmp78 = load i8*, i8** bitcast (%0* @"\01l_objc_msgSend_fixup_objectAtIndex_" to i8**), align 16
%tmp79 = bitcast i8* %tmp78 to i8* (i8*, %1*, i64)*
%tmp80 = tail call i8* %tmp79(i8* %tmp77, %1* bitcast (%0* @"\01l_objc_msgSend_fixup_objectAtIndex_" to %1*), i64 0)
%tmp81 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_406", align 8
- tail call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i64)*)(i8* %tmp80, i8* %tmp81, i64 9223372036854775807)
+ tail call void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*, i64)*)(i8* %tmp80, i8* %tmp81, i64 9223372036854775807)
%tmp82 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_408", align 8
- %tmp83 = tail call %24* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to %24* (i8*, i8*)*)(i8* %tmp72, i8* %tmp82)
+ %tmp83 = tail call %24* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to %24* (i8*, i8*)*)(i8* %tmp72, i8* %tmp82)
%tmp84 = bitcast %24* %tmp83 to i8*
- %tmp85 = tail call i8* @objc_retain(i8* %tmp84) nounwind
+ %tmp85 = tail call i8* @llvm.objc.retain(i8* %tmp84) nounwind
%tmp86 = load %2*, %2** @"\01L_OBJC_CLASSLIST_REFERENCES_$_409", align 8
%tmp87 = bitcast %2* %tmp86 to i8*
%tmp88 = load i8*, i8** bitcast (%0* @"\01l_objc_msgSend_fixup_alloc" to i8**), align 16
%tmp89 = bitcast i8* %tmp88 to i8* (i8*, %1*)*
%tmp90 = tail call i8* %tmp89(i8* %tmp87, %1* bitcast (%0* @"\01l_objc_msgSend_fixup_alloc" to %1*))
%tmp91 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_8", align 8
- %tmp92 = tail call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* %tmp90, i8* %tmp91)
- %tmp93 = tail call i8* @objc_explicit_autorelease(i8* %tmp92) nounwind
+ %tmp92 = tail call i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*)*)(i8* %tmp90, i8* %tmp91)
+ %tmp93 = tail call i8* @llvm.objc.explicit_autorelease(i8* %tmp92) nounwind
%tmp94 = bitcast i8* %tmp93 to %25*
%tmp95 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_411", align 8
- tail call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, %25*)*)(i8* %tmp85, i8* %tmp95, %25* %tmp94)
- tail call void @objc_release(i8* %tmp93) nounwind
+ tail call void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*, %25*)*)(i8* %tmp85, i8* %tmp95, %25* %tmp94)
+ tail call void @llvm.objc.release(i8* %tmp93) nounwind
%tmp96 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_148", align 8
- %tmp97 = tail call signext i8 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8 (i8*, i8*)*)(i8* %tmp4, i8* %tmp96)
+ %tmp97 = tail call signext i8 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8 (i8*, i8*)*)(i8* %tmp4, i8* %tmp96)
%tmp98 = icmp eq i8 %tmp97, 0
br i1 %tmp98, label %bb99, label %bb104
bb99: ; preds = %bb57
%tmp100 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_413", align 8
- %tmp101 = tail call i64 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i64 (i8*, i8*)*)(i8* %tmp85, i8* %tmp100)
+ %tmp101 = tail call i64 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i64 (i8*, i8*)*)(i8* %tmp85, i8* %tmp100)
%tmp102 = or i64 %tmp101, 12
%tmp103 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_415", align 8
- tail call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i64)*)(i8* %tmp85, i8* %tmp103, i64 %tmp102)
+ tail call void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*, i64)*)(i8* %tmp85, i8* %tmp103, i64 %tmp102)
br label %bb104
bb104: ; preds = %bb99, %bb57
- %tmp105 = call i8* @objc_autorelease(i8* %tmp72) nounwind
+ %tmp105 = call i8* @llvm.objc.autorelease(i8* %tmp72) nounwind
%tmp106 = bitcast i8* %tmp105 to %14*
- tail call void @objc_release(i8* %tmp85) nounwind
+ tail call void @llvm.objc.release(i8* %tmp85) nounwind
%tmp107 = bitcast %18* %tmp47 to i8*
- tail call void @objc_release(i8* %tmp107) nounwind
+ tail call void @llvm.objc.release(i8* %tmp107) nounwind
ret %14* %tmp106
}
Modified: llvm/trunk/test/Transforms/ObjCARC/move-and-merge-autorelease.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/move-and-merge-autorelease.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/move-and-merge-autorelease.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/move-and-merge-autorelease.ll Tue Dec 18 12:32:49 2018
@@ -4,7 +4,7 @@
; and fold it with the release in bb65.
; CHECK: bb65:
-; CHECK: call i8* @objc_retainAutorelease
+; CHECK: call i8* @llvm.objc.retainAutorelease
; CHECK: br label %bb76
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
@@ -25,24 +25,24 @@ target triple = "x86_64-apple-darwin11.0
@"\01L_OBJC_SELECTOR_REFERENCES_624" = external hidden global i8*, section "__DATA, __objc_selrefs, literal_pointers, no_dead_strip"
@"\01L_OBJC_SELECTOR_REFERENCES_626" = external hidden global i8*, section "__DATA, __objc_selrefs, literal_pointers, no_dead_strip"
-declare i8* @objc_msgSend(i8*, i8*, ...)
+declare i8* @llvm.objc.msgSend(i8*, i8*, ...)
-declare i8* @objc_retain(i8*)
+declare i8* @llvm.objc.retain(i8*)
-declare void @objc_release(i8*)
+declare void @llvm.objc.release(i8*)
-declare i8* @objc_autorelease(i8*)
+declare i8* @llvm.objc.autorelease(i8*)
define hidden %0* @foo(%1* %arg, %3* %arg3) {
bb:
%tmp16 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_620", align 8
%tmp17 = bitcast %3* %arg3 to i8*
- %tmp18 = call %4* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to %4* (i8*, i8*)*)(i8* %tmp17, i8* %tmp16)
+ %tmp18 = call %4* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to %4* (i8*, i8*)*)(i8* %tmp17, i8* %tmp16)
%tmp19 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_622", align 8
%tmp20 = bitcast %4* %tmp18 to i8*
- %tmp21 = call %5* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to %5* (i8*, i8*)*)(i8* %tmp20, i8* %tmp19)
+ %tmp21 = call %5* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to %5* (i8*, i8*)*)(i8* %tmp20, i8* %tmp19)
%tmp22 = bitcast %5* %tmp21 to i8*
- %tmp23 = call i8* @objc_retain(i8* %tmp22) nounwind
+ %tmp23 = call i8* @llvm.objc.retain(i8* %tmp22) nounwind
%tmp24 = bitcast i8* %tmp23 to %5*
%tmp26 = icmp eq i8* %tmp23, null
br i1 %tmp26, label %bb81, label %bb27
@@ -50,22 +50,22 @@ bb:
bb27: ; preds = %bb
%tmp29 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_11", align 8
%tmp30 = bitcast %1* %arg to i8*
- %tmp31 = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* %tmp30, i8* %tmp29)
- %tmp34 = call i8* @objc_retain(i8* %tmp31) nounwind
+ %tmp31 = call i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*)*)(i8* %tmp30, i8* %tmp29)
+ %tmp34 = call i8* @llvm.objc.retain(i8* %tmp31) nounwind
%tmp37 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_421455", align 8
- %tmp39 = call %0* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to %0* (i8*, i8*)*)(i8* %tmp34, i8* %tmp37)
+ %tmp39 = call %0* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to %0* (i8*, i8*)*)(i8* %tmp34, i8* %tmp37)
%tmp40 = bitcast %0* %tmp39 to i8*
- %tmp41 = call i8* @objc_retain(i8* %tmp40) nounwind
+ %tmp41 = call i8* @llvm.objc.retain(i8* %tmp40) nounwind
%tmp42 = bitcast i8* %tmp41 to %0*
%tmp44 = icmp eq i8* %tmp41, null
br i1 %tmp44, label %bb45, label %bb55
bb45: ; preds = %bb27
%tmp47 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_624", align 8
- %tmp49 = call %0* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to %0* (i8*, i8*)*)(i8* %tmp34, i8* %tmp47)
+ %tmp49 = call %0* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to %0* (i8*, i8*)*)(i8* %tmp34, i8* %tmp47)
%tmp51 = bitcast %0* %tmp49 to i8*
- %tmp52 = call i8* @objc_retain(i8* %tmp51) nounwind
- call void @objc_release(i8* %tmp41) nounwind
+ %tmp52 = call i8* @llvm.objc.retain(i8* %tmp51) nounwind
+ call void @llvm.objc.release(i8* %tmp41) nounwind
br label %bb55
bb55: ; preds = %bb27, %bb45
@@ -76,33 +76,33 @@ bb55:
bb58: ; preds = %bb55
%tmp60 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_598", align 8
%tmp61 = bitcast %0* %tmp13.0 to i8*
- %tmp62 = call signext i8 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8 (i8*, i8*)*)(i8* %tmp61, i8* %tmp60)
+ %tmp62 = call signext i8 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8 (i8*, i8*)*)(i8* %tmp61, i8* %tmp60)
%tmp64 = icmp eq i8 %tmp62, 0
br i1 %tmp64, label %bb76, label %bb65
bb65: ; preds = %bb58
%tmp68 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_626", align 8
%tmp69 = bitcast %0* %tmp13.0 to i8*
- %tmp70 = call %0* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to %0* (i8*, i8*, %5*)*)(i8* %tmp69, i8* %tmp68, %5* %tmp24)
+ %tmp70 = call %0* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to %0* (i8*, i8*, %5*)*)(i8* %tmp69, i8* %tmp68, %5* %tmp24)
%tmp72 = bitcast %0* %tmp70 to i8*
- %tmp73 = call i8* @objc_retain(i8* %tmp72) nounwind
+ %tmp73 = call i8* @llvm.objc.retain(i8* %tmp72) nounwind
br label %bb76
bb76: ; preds = %bb58, %bb55, %bb65
%tmp10.0 = phi %0* [ %tmp70, %bb65 ], [ null, %bb58 ], [ null, %bb55 ]
%tmp78 = bitcast %0* %tmp13.0 to i8*
- call void @objc_release(i8* %tmp78) nounwind
- call void @objc_release(i8* %tmp34) nounwind
+ call void @llvm.objc.release(i8* %tmp78) nounwind
+ call void @llvm.objc.release(i8* %tmp34) nounwind
br label %bb81
bb81: ; preds = %bb, %bb76
%tmp10.1 = phi %0* [ %tmp10.0, %bb76 ], [ null, %bb ]
%tmp83 = bitcast %0* %tmp10.1 to i8*
- %tmp84 = call i8* @objc_retain(i8* %tmp83) nounwind
- call void @objc_release(i8* %tmp23) nounwind
- %tmp87 = call i8* @objc_autorelease(i8* %tmp84) nounwind
+ %tmp84 = call i8* @llvm.objc.retain(i8* %tmp83) nounwind
+ call void @llvm.objc.release(i8* %tmp23) nounwind
+ %tmp87 = call i8* @llvm.objc.autorelease(i8* %tmp84) nounwind
%tmp88 = bitcast i8* %tmp87 to %0*
%tmp92 = bitcast %0* %tmp10.1 to i8*
- call void @objc_release(i8* %tmp92) nounwind
+ call void @llvm.objc.release(i8* %tmp92) nounwind
ret %0* %tmp88
}
Modified: llvm/trunk/test/Transforms/ObjCARC/nested.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/nested.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/nested.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/nested.ll Tue Dec 18 12:32:49 2018
@@ -9,16 +9,16 @@
declare void @callee()
declare i8* @returner()
-declare i8* @objc_retainAutoreleasedReturnValue(i8*)
-declare i8* @objc_retain(i8*)
-declare void @objc_enumerationMutation(i8*)
+declare i8* @llvm.objc.retainAutoreleasedReturnValue(i8*)
+declare i8* @llvm.objc.retain(i8*)
+declare void @llvm.objc.enumerationMutation(i8*)
declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i1) nounwind
-declare i8* @objc_msgSend(i8*, i8*, ...) nonlazybind
+declare i8* @llvm.objc.msgSend(i8*, i8*, ...) nonlazybind
declare void @use(i8*)
-declare void @objc_release(i8*)
+declare void @llvm.objc.release(i8*)
declare i8* @def()
declare void @__crasher_block_invoke(i8* nocapture)
-declare i8* @objc_retainBlock(i8*)
+declare i8* @llvm.objc.retainBlock(i8*)
declare void @__crasher_block_invoke1(i8* nocapture)
!0 = !{}
@@ -26,19 +26,19 @@ declare void @__crasher_block_invoke1(i8
; Delete a nested retain+release pair.
; CHECK-LABEL: define void @test0(
-; CHECK: call i8* @objc_retain
-; CHECK-NOT: @objc_retain
+; CHECK: call i8* @llvm.objc.retain
+; CHECK-NOT: @llvm.objc.retain
; CHECK: }
define void @test0(i8* %a) nounwind {
entry:
%state.ptr = alloca %struct.__objcFastEnumerationState, align 8
%items.ptr = alloca [16 x i8*], align 8
- %0 = call i8* @objc_retain(i8* %a) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %a) nounwind
%tmp = bitcast %struct.__objcFastEnumerationState* %state.ptr to i8*
call void @llvm.memset.p0i8.i64(i8* align 8 %tmp, i8 0, i64 64, i1 false)
- %1 = call i8* @objc_retain(i8* %0) nounwind
+ %1 = call i8* @llvm.objc.retain(i8* %0) nounwind
%tmp2 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8
- %call = call i64 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp2, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
+ %call = call i64 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp2, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
%iszero = icmp eq i64 %call, 0
br i1 %iszero, label %forcoll.empty, label %forcoll.loopinit
@@ -63,7 +63,7 @@ forcoll.loopbody:
br i1 %2, label %forcoll.notmutated, label %forcoll.mutated
forcoll.mutated:
- call void @objc_enumerationMutation(i8* %1)
+ call void @llvm.objc.enumerationMutation(i8* %1)
br label %forcoll.notmutated
forcoll.notmutated:
@@ -77,33 +77,33 @@ forcoll.notmutated:
forcoll.refetch:
%tmp5 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8
- %call6 = call i64 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp5, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
+ %call6 = call i64 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp5, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
%5 = icmp eq i64 %call6, 0
br i1 %5, label %forcoll.empty, label %forcoll.loopbody.outer
forcoll.empty:
- call void @objc_release(i8* %1) nounwind
- call void @objc_release(i8* %0) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %1) nounwind
+ call void @llvm.objc.release(i8* %0) nounwind, !clang.imprecise_release !0
ret void
}
; Delete a nested retain+release pair.
; CHECK-LABEL: define void @test2(
-; CHECK: call i8* @objc_retain
-; CHECK-NOT: @objc_retain
+; CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
+; CHECK-NOT: @llvm.objc.retain
; CHECK: }
define void @test2() nounwind {
entry:
%state.ptr = alloca %struct.__objcFastEnumerationState, align 8
%items.ptr = alloca [16 x i8*], align 8
%call = call i8* @returner()
- %0 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call) nounwind
+ %0 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call) nounwind
%tmp = bitcast %struct.__objcFastEnumerationState* %state.ptr to i8*
call void @llvm.memset.p0i8.i64(i8* align 8 %tmp, i8 0, i64 64, i1 false)
- %1 = call i8* @objc_retain(i8* %0) nounwind
+ %1 = call i8* @llvm.objc.retain(i8* %0) nounwind
%tmp2 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8
- %call3 = call i64 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp2, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
+ %call3 = call i64 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp2, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
%iszero = icmp eq i64 %call3, 0
br i1 %iszero, label %forcoll.empty, label %forcoll.loopinit
@@ -128,7 +128,7 @@ forcoll.loopbody:
br i1 %2, label %forcoll.notmutated, label %forcoll.mutated
forcoll.mutated:
- call void @objc_enumerationMutation(i8* %1)
+ call void @llvm.objc.enumerationMutation(i8* %1)
br label %forcoll.notmutated
forcoll.notmutated:
@@ -142,33 +142,33 @@ forcoll.notmutated:
forcoll.refetch:
%tmp6 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8
- %call7 = call i64 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp6, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
+ %call7 = call i64 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp6, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
%5 = icmp eq i64 %call7, 0
br i1 %5, label %forcoll.empty, label %forcoll.loopbody.outer
forcoll.empty:
- call void @objc_release(i8* %1) nounwind
- call void @objc_release(i8* %0) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %1) nounwind
+ call void @llvm.objc.release(i8* %0) nounwind, !clang.imprecise_release !0
ret void
}
; Delete a nested retain+release pair.
; CHECK-LABEL: define void @test4(
-; CHECK: call i8* @objc_retain
-; CHECK-NOT: @objc_retain
+; CHECK: call i8* @llvm.objc.retain
+; CHECK-NOT: @llvm.objc.retain
; CHECK: }
define void @test4() nounwind {
entry:
%state.ptr = alloca %struct.__objcFastEnumerationState, align 8
%items.ptr = alloca [16 x i8*], align 8
%tmp = load i8*, i8** @g, align 8
- %0 = call i8* @objc_retain(i8* %tmp) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %tmp) nounwind
%tmp2 = bitcast %struct.__objcFastEnumerationState* %state.ptr to i8*
call void @llvm.memset.p0i8.i64(i8* align 8 %tmp2, i8 0, i64 64, i1 false)
- %1 = call i8* @objc_retain(i8* %0) nounwind
+ %1 = call i8* @llvm.objc.retain(i8* %0) nounwind
%tmp4 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8
- %call = call i64 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp4, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
+ %call = call i64 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp4, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
%iszero = icmp eq i64 %call, 0
br i1 %iszero, label %forcoll.empty, label %forcoll.loopinit
@@ -193,7 +193,7 @@ forcoll.loopbody:
br i1 %2, label %forcoll.notmutated, label %forcoll.mutated
forcoll.mutated:
- call void @objc_enumerationMutation(i8* %1)
+ call void @llvm.objc.enumerationMutation(i8* %1)
br label %forcoll.notmutated
forcoll.notmutated:
@@ -207,33 +207,33 @@ forcoll.notmutated:
forcoll.refetch:
%tmp7 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8
- %call8 = call i64 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp7, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
+ %call8 = call i64 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp7, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
%5 = icmp eq i64 %call8, 0
br i1 %5, label %forcoll.empty, label %forcoll.loopbody.outer
forcoll.empty:
- call void @objc_release(i8* %1) nounwind
- call void @objc_release(i8* %0) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %1) nounwind
+ call void @llvm.objc.release(i8* %0) nounwind, !clang.imprecise_release !0
ret void
}
; Delete a nested retain+release pair.
; CHECK-LABEL: define void @test5(
-; CHECK: call i8* @objc_retain
-; CHECK-NOT: @objc_retain
+; CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
+; CHECK-NOT: @llvm.objc.retain
; CHECK: }
define void @test5() nounwind {
entry:
%state.ptr = alloca %struct.__objcFastEnumerationState, align 8
%items.ptr = alloca [16 x i8*], align 8
%call = call i8* @returner()
- %0 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call) nounwind
+ %0 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call) nounwind
%tmp = bitcast %struct.__objcFastEnumerationState* %state.ptr to i8*
call void @llvm.memset.p0i8.i64(i8* align 8 %tmp, i8 0, i64 64, i1 false)
- %1 = call i8* @objc_retain(i8* %0) nounwind
+ %1 = call i8* @llvm.objc.retain(i8* %0) nounwind
%tmp2 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8
- %call3 = call i64 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp2, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
+ %call3 = call i64 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp2, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
%iszero = icmp eq i64 %call3, 0
br i1 %iszero, label %forcoll.empty, label %forcoll.loopinit
@@ -258,7 +258,7 @@ forcoll.loopbody:
br i1 %2, label %forcoll.notmutated, label %forcoll.mutated
forcoll.mutated:
- call void @objc_enumerationMutation(i8* %1)
+ call void @llvm.objc.enumerationMutation(i8* %1)
br label %forcoll.notmutated
forcoll.notmutated:
@@ -272,13 +272,13 @@ forcoll.notmutated:
forcoll.refetch:
%tmp6 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8
- %call7 = call i64 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp6, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
+ %call7 = call i64 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp6, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
%5 = icmp eq i64 %call7, 0
br i1 %5, label %forcoll.empty, label %forcoll.loopbody.outer
forcoll.empty:
- call void @objc_release(i8* %1) nounwind
- call void @objc_release(i8* %0) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %1) nounwind
+ call void @llvm.objc.release(i8* %0) nounwind, !clang.imprecise_release !0
ret void
}
@@ -286,20 +286,20 @@ forcoll.empty:
; use.
;
; CHECK-LABEL: define void @test6(
-; CHECK: call i8* @objc_retain
-; CHECK-NOT: @objc_retain
+; CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
+; CHECK-NOT: @llvm.objc.retain
; CHECK: }
define void @test6() nounwind {
entry:
%state.ptr = alloca %struct.__objcFastEnumerationState, align 8
%items.ptr = alloca [16 x i8*], align 8
%call = call i8* @returner()
- %0 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call) nounwind
+ %0 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call) nounwind
%tmp = bitcast %struct.__objcFastEnumerationState* %state.ptr to i8*
call void @llvm.memset.p0i8.i64(i8* align 8 %tmp, i8 0, i64 64, i1 false)
- %1 = call i8* @objc_retain(i8* %0) nounwind
+ %1 = call i8* @llvm.objc.retain(i8* %0) nounwind
%tmp2 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8
- %call3 = call i64 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp2, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
+ %call3 = call i64 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp2, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
%iszero = icmp eq i64 %call3, 0
br i1 %iszero, label %forcoll.empty, label %forcoll.loopinit
@@ -324,7 +324,7 @@ forcoll.loopbody:
br i1 %2, label %forcoll.notmutated, label %forcoll.mutated
forcoll.mutated:
- call void @objc_enumerationMutation(i8* %1)
+ call void @llvm.objc.enumerationMutation(i8* %1)
br label %forcoll.notmutated
forcoll.notmutated:
@@ -338,14 +338,14 @@ forcoll.notmutated:
forcoll.refetch:
%tmp6 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8
- %call7 = call i64 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp6, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
+ %call7 = call i64 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp6, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
%5 = icmp eq i64 %call7, 0
br i1 %5, label %forcoll.empty, label %forcoll.loopbody.outer
forcoll.empty:
- call void @objc_release(i8* %1) nounwind
+ call void @llvm.objc.release(i8* %1) nounwind
call void @callee()
- call void @objc_release(i8* %0) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %0) nounwind, !clang.imprecise_release !0
ret void
}
@@ -354,21 +354,21 @@ forcoll.empty:
; reasnoning about nesting.
; CHECK-LABEL: define void @test7(
-; CHECK: call i8* @objc_retain
-; CHECK: @objc_retain
+; CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
+; CHECK: @llvm.objc.retain
; CHECK: }
define void @test7() nounwind {
entry:
%state.ptr = alloca %struct.__objcFastEnumerationState, align 8
%items.ptr = alloca [16 x i8*], align 8
%call = call i8* @returner()
- %0 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call) nounwind
+ %0 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call) nounwind
call void @callee()
%tmp = bitcast %struct.__objcFastEnumerationState* %state.ptr to i8*
call void @llvm.memset.p0i8.i64(i8* align 8 %tmp, i8 0, i64 64, i1 false)
- %1 = call i8* @objc_retain(i8* %0) nounwind
+ %1 = call i8* @llvm.objc.retain(i8* %0) nounwind
%tmp2 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8
- %call3 = call i64 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp2, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
+ %call3 = call i64 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp2, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
%iszero = icmp eq i64 %call3, 0
br i1 %iszero, label %forcoll.empty, label %forcoll.loopinit
@@ -393,7 +393,7 @@ forcoll.loopbody:
br i1 %2, label %forcoll.notmutated, label %forcoll.mutated
forcoll.mutated:
- call void @objc_enumerationMutation(i8* %1)
+ call void @llvm.objc.enumerationMutation(i8* %1)
br label %forcoll.notmutated
forcoll.notmutated:
@@ -407,34 +407,34 @@ forcoll.notmutated:
forcoll.refetch:
%tmp6 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8
- %call7 = call i64 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp6, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
+ %call7 = call i64 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp6, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
%5 = icmp eq i64 %call7, 0
br i1 %5, label %forcoll.empty, label %forcoll.loopbody.outer
forcoll.empty:
- call void @objc_release(i8* %1) nounwind
+ call void @llvm.objc.release(i8* %1) nounwind
call void @callee()
- call void @objc_release(i8* %0) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %0) nounwind, !clang.imprecise_release !0
ret void
}
; Delete a nested retain+release pair.
; CHECK-LABEL: define void @test8(
-; CHECK: call i8* @objc_retain
-; CHECK-NOT: @objc_retain
+; CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
+; CHECK-NOT: @llvm.objc.retain
; CHECK: }
define void @test8() nounwind {
entry:
%state.ptr = alloca %struct.__objcFastEnumerationState, align 8
%items.ptr = alloca [16 x i8*], align 8
%call = call i8* @returner()
- %0 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call) nounwind
+ %0 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call) nounwind
%tmp = bitcast %struct.__objcFastEnumerationState* %state.ptr to i8*
call void @llvm.memset.p0i8.i64(i8* align 8 %tmp, i8 0, i64 64, i1 false)
- %1 = call i8* @objc_retain(i8* %0) nounwind
+ %1 = call i8* @llvm.objc.retain(i8* %0) nounwind
%tmp2 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8
- %call3 = call i64 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp2, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
+ %call3 = call i64 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp2, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
%iszero = icmp eq i64 %call3, 0
br i1 %iszero, label %forcoll.empty, label %forcoll.loopinit
@@ -459,7 +459,7 @@ forcoll.loopbody:
br i1 %2, label %forcoll.notmutated, label %forcoll.mutated
forcoll.mutated:
- call void @objc_enumerationMutation(i8* %1)
+ call void @llvm.objc.enumerationMutation(i8* %1)
br label %forcoll.notmutated
forcoll.notmutated:
@@ -480,13 +480,13 @@ forcoll.next:
forcoll.refetch:
%tmp6 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8
- %call7 = call i64 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp6, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
+ %call7 = call i64 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %1, i8* %tmp6, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
%5 = icmp eq i64 %call7, 0
br i1 %5, label %forcoll.empty, label %forcoll.loopbody.outer
forcoll.empty:
- call void @objc_release(i8* %1) nounwind
- call void @objc_release(i8* %0) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %1) nounwind
+ call void @llvm.objc.release(i8* %0) nounwind, !clang.imprecise_release !0
ret void
}
@@ -495,23 +495,23 @@ forcoll.empty:
; See test9b for the same testcase without a split backedge.
; CHECK-LABEL: define void @test9(
-; CHECK: call i8* @objc_retain
-; CHECK: call i8* @objc_retain
-; CHECK: call i8* @objc_retain
+; CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
+; CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
+; CHECK: call i8* @llvm.objc.retain
; CHECK: }
define void @test9() nounwind {
entry:
%state.ptr = alloca %struct.__objcFastEnumerationState, align 8
%items.ptr = alloca [16 x i8*], align 8
%call = call i8* @returner()
- %0 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call) nounwind
+ %0 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call) nounwind
%call1 = call i8* @returner()
- %1 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call1) nounwind
+ %1 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call1) nounwind
%tmp = bitcast %struct.__objcFastEnumerationState* %state.ptr to i8*
call void @llvm.memset.p0i8.i64(i8* align 8 %tmp, i8 0, i64 64, i1 false)
- %2 = call i8* @objc_retain(i8* %0) nounwind
+ %2 = call i8* @llvm.objc.retain(i8* %0) nounwind
%tmp3 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8
- %call4 = call i64 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %2, i8* %tmp3, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
+ %call4 = call i64 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %2, i8* %tmp3, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
%iszero = icmp eq i64 %call4, 0
br i1 %iszero, label %forcoll.empty, label %forcoll.loopinit
@@ -535,7 +535,7 @@ forcoll.loopbody:
br i1 %3, label %forcoll.notmutated, label %forcoll.mutated
forcoll.mutated:
- call void @objc_enumerationMutation(i8* %2)
+ call void @llvm.objc.enumerationMutation(i8* %2)
br label %forcoll.notmutated
forcoll.notmutated:
@@ -548,37 +548,37 @@ forcoll.notmutated.forcoll.loopbody_crit
forcoll.refetch:
%tmp6 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8
- %call7 = call i64 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %2, i8* %tmp6, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
+ %call7 = call i64 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %2, i8* %tmp6, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
%4 = icmp eq i64 %call7, 0
br i1 %4, label %forcoll.empty, label %forcoll.loopbody.outer
forcoll.empty:
- call void @objc_release(i8* %2) nounwind
- call void @objc_release(i8* %1) nounwind, !clang.imprecise_release !0
- call void @objc_release(i8* %0) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %2) nounwind
+ call void @llvm.objc.release(i8* %1) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %0) nounwind, !clang.imprecise_release !0
ret void
}
; Like test9, but without a split backedge. TODO: optimize this.
; CHECK-LABEL: define void @test9b(
-; CHECK: call i8* @objc_retain
-; CHECK: call i8* @objc_retain
-; CHECK: @objc_retain
+; CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
+; CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
+; CHECK: @llvm.objc.retain
; CHECK: }
define void @test9b() nounwind {
entry:
%state.ptr = alloca %struct.__objcFastEnumerationState, align 8
%items.ptr = alloca [16 x i8*], align 8
%call = call i8* @returner()
- %0 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call) nounwind
+ %0 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call) nounwind
%call1 = call i8* @returner()
- %1 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call1) nounwind
+ %1 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call1) nounwind
%tmp = bitcast %struct.__objcFastEnumerationState* %state.ptr to i8*
call void @llvm.memset.p0i8.i64(i8* align 8 %tmp, i8 0, i64 64, i1 false)
- %2 = call i8* @objc_retain(i8* %0) nounwind
+ %2 = call i8* @llvm.objc.retain(i8* %0) nounwind
%tmp3 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8
- %call4 = call i64 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %2, i8* %tmp3, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
+ %call4 = call i64 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %2, i8* %tmp3, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
%iszero = icmp eq i64 %call4, 0
br i1 %iszero, label %forcoll.empty, label %forcoll.loopinit
@@ -602,7 +602,7 @@ forcoll.loopbody:
br i1 %3, label %forcoll.notmutated, label %forcoll.mutated
forcoll.mutated:
- call void @objc_enumerationMutation(i8* %2)
+ call void @llvm.objc.enumerationMutation(i8* %2)
br label %forcoll.notmutated
forcoll.notmutated:
@@ -612,14 +612,14 @@ forcoll.notmutated:
forcoll.refetch:
%tmp6 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8
- %call7 = call i64 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %2, i8* %tmp6, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
+ %call7 = call i64 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %2, i8* %tmp6, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
%4 = icmp eq i64 %call7, 0
br i1 %4, label %forcoll.empty, label %forcoll.loopbody.outer
forcoll.empty:
- call void @objc_release(i8* %2) nounwind
- call void @objc_release(i8* %1) nounwind, !clang.imprecise_release !0
- call void @objc_release(i8* %0) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %2) nounwind
+ call void @llvm.objc.release(i8* %1) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %0) nounwind, !clang.imprecise_release !0
ret void
}
@@ -628,24 +628,24 @@ forcoll.empty:
; See test10b for the same testcase without a split backedge.
; CHECK-LABEL: define void @test10(
-; CHECK: call i8* @objc_retain
-; CHECK: call i8* @objc_retain
-; CHECK: call i8* @objc_retain
+; CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
+; CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
+; CHECK: call i8* @llvm.objc.retain
; CHECK: }
define void @test10() nounwind {
entry:
%state.ptr = alloca %struct.__objcFastEnumerationState, align 8
%items.ptr = alloca [16 x i8*], align 8
%call = call i8* @returner()
- %0 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call) nounwind
+ %0 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call) nounwind
%call1 = call i8* @returner()
- %1 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call1) nounwind
+ %1 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call1) nounwind
call void @callee()
%tmp = bitcast %struct.__objcFastEnumerationState* %state.ptr to i8*
call void @llvm.memset.p0i8.i64(i8* align 8 %tmp, i8 0, i64 64, i1 false)
- %2 = call i8* @objc_retain(i8* %0) nounwind
+ %2 = call i8* @llvm.objc.retain(i8* %0) nounwind
%tmp3 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8
- %call4 = call i64 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %2, i8* %tmp3, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
+ %call4 = call i64 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %2, i8* %tmp3, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
%iszero = icmp eq i64 %call4, 0
br i1 %iszero, label %forcoll.empty, label %forcoll.loopinit
@@ -669,7 +669,7 @@ forcoll.loopbody:
br i1 %3, label %forcoll.notmutated, label %forcoll.mutated
forcoll.mutated:
- call void @objc_enumerationMutation(i8* %2)
+ call void @llvm.objc.enumerationMutation(i8* %2)
br label %forcoll.notmutated
forcoll.notmutated:
@@ -682,38 +682,38 @@ forcoll.notmutated.forcoll.loopbody_crit
forcoll.refetch:
%tmp6 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8
- %call7 = call i64 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %2, i8* %tmp6, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
+ %call7 = call i64 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %2, i8* %tmp6, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
%4 = icmp eq i64 %call7, 0
br i1 %4, label %forcoll.empty, label %forcoll.loopbody.outer
forcoll.empty:
- call void @objc_release(i8* %2) nounwind
- call void @objc_release(i8* %1) nounwind, !clang.imprecise_release !0
- call void @objc_release(i8* %0) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %2) nounwind
+ call void @llvm.objc.release(i8* %1) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %0) nounwind, !clang.imprecise_release !0
ret void
}
; Like test10, but without a split backedge. TODO: optimize this.
; CHECK-LABEL: define void @test10b(
-; CHECK: call i8* @objc_retain
-; CHECK: call i8* @objc_retain
-; CHECK: @objc_retain
+; CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
+; CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
+; CHECK: @llvm.objc.retain
; CHECK: }
define void @test10b() nounwind {
entry:
%state.ptr = alloca %struct.__objcFastEnumerationState, align 8
%items.ptr = alloca [16 x i8*], align 8
%call = call i8* @returner()
- %0 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call) nounwind
+ %0 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call) nounwind
%call1 = call i8* @returner()
- %1 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call1) nounwind
+ %1 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call1) nounwind
call void @callee()
%tmp = bitcast %struct.__objcFastEnumerationState* %state.ptr to i8*
call void @llvm.memset.p0i8.i64(i8* align 8 %tmp, i8 0, i64 64, i1 false)
- %2 = call i8* @objc_retain(i8* %0) nounwind
+ %2 = call i8* @llvm.objc.retain(i8* %0) nounwind
%tmp3 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8
- %call4 = call i64 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %2, i8* %tmp3, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
+ %call4 = call i64 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %2, i8* %tmp3, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
%iszero = icmp eq i64 %call4, 0
br i1 %iszero, label %forcoll.empty, label %forcoll.loopinit
@@ -737,7 +737,7 @@ forcoll.loopbody:
br i1 %3, label %forcoll.notmutated, label %forcoll.mutated
forcoll.mutated:
- call void @objc_enumerationMutation(i8* %2)
+ call void @llvm.objc.enumerationMutation(i8* %2)
br label %forcoll.notmutated
forcoll.notmutated:
@@ -747,14 +747,14 @@ forcoll.notmutated:
forcoll.refetch:
%tmp6 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8
- %call7 = call i64 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %2, i8* %tmp6, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
+ %call7 = call i64 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i64 (i8*, i8*, %struct.__objcFastEnumerationState*, [16 x i8*]*, i64)*)(i8* %2, i8* %tmp6, %struct.__objcFastEnumerationState* %state.ptr, [16 x i8*]* %items.ptr, i64 16)
%4 = icmp eq i64 %call7, 0
br i1 %4, label %forcoll.empty, label %forcoll.loopbody.outer
forcoll.empty:
- call void @objc_release(i8* %2) nounwind
- call void @objc_release(i8* %1) nounwind, !clang.imprecise_release !0
- call void @objc_release(i8* %0) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %2) nounwind
+ call void @llvm.objc.release(i8* %1) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %0) nounwind, !clang.imprecise_release !0
ret void
}
@@ -768,9 +768,9 @@ forcoll.empty:
@__block_d_tmp5 = external hidden constant { i64, i64, i8*, i8*, i8*, i8* }
; CHECK-LABEL: define void @test11(
-; CHECK: tail call i8* @objc_retain(i8* %call) [[NUW:#[0-9]+]]
-; CHECK: tail call i8* @objc_retain(i8* %call) [[NUW]]
-; CHECK: call void @objc_release(i8* %call) [[NUW]], !clang.imprecise_release !0
+; CHECK: tail call i8* @llvm.objc.retain(i8* %call) [[NUW:#[0-9]+]]
+; CHECK: tail call i8* @llvm.objc.retain(i8* %call) [[NUW]]
+; CHECK: call void @llvm.objc.release(i8* %call) [[NUW]], !clang.imprecise_release !0
; CHECK: }
define void @test11() {
entry:
@@ -788,14 +788,14 @@ entry:
store i8* bitcast (void (i8*)* @__crasher_block_invoke to i8*), i8** %block.invoke, align 8
%block.d = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_d*, i8* }>, <{ i8*, i32, i32, i8*, %struct.__block_d*, i8* }>* %block, i64 0, i32 4
store %struct.__block_d* bitcast ({ i64, i64, i8*, i8*, i8*, i8* }* @__block_d_tmp to %struct.__block_d*), %struct.__block_d** %block.d, align 8
- %foo2 = tail call i8* @objc_retain(i8* %call) nounwind
+ %foo2 = tail call i8* @llvm.objc.retain(i8* %call) nounwind
store i8* %foo2, i8** %foo, align 8
%foo4 = bitcast <{ i8*, i32, i32, i8*, %struct.__block_d*, i8* }>* %block to i8*
- %foo5 = call i8* @objc_retainBlock(i8* %foo4) nounwind
+ %foo5 = call i8* @llvm.objc.retainBlock(i8* %foo4) nounwind
call void @use(i8* %foo5), !clang.arc.no_objc_arc_exceptions !0
- call void @objc_release(i8* %foo5) nounwind
+ call void @llvm.objc.release(i8* %foo5) nounwind
%strongdestroy = load i8*, i8** %foo, align 8
- call void @objc_release(i8* %strongdestroy) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %strongdestroy) nounwind, !clang.imprecise_release !0
%foo10 = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_d*, i8* }>, <{ i8*, i32, i32, i8*, %struct.__block_d*, i8* }>* %block9, i64 0, i32 5
%block.isa11 = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_d*, i8* }>, <{ i8*, i32, i32, i8*, %struct.__block_d*, i8* }>* %block9, i64 0, i32 0
store i8* bitcast (i8** @_NSConcreteStackBlock to i8*), i8** %block.isa11, align 8
@@ -807,19 +807,19 @@ entry:
store i8* bitcast (void (i8*)* @__crasher_block_invoke1 to i8*), i8** %block.invoke14, align 8
%block.d15 = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_d*, i8* }>, <{ i8*, i32, i32, i8*, %struct.__block_d*, i8* }>* %block9, i64 0, i32 4
store %struct.__block_d* bitcast ({ i64, i64, i8*, i8*, i8*, i8* }* @__block_d_tmp5 to %struct.__block_d*), %struct.__block_d** %block.d15, align 8
- %foo18 = call i8* @objc_retain(i8* %call) nounwind
+ %foo18 = call i8* @llvm.objc.retain(i8* %call) nounwind
store i8* %call, i8** %foo10, align 8
%foo20 = bitcast <{ i8*, i32, i32, i8*, %struct.__block_d*, i8* }>* %block9 to i8*
- %foo21 = call i8* @objc_retainBlock(i8* %foo20) nounwind
+ %foo21 = call i8* @llvm.objc.retainBlock(i8* %foo20) nounwind
call void @use(i8* %foo21), !clang.arc.no_objc_arc_exceptions !0
- call void @objc_release(i8* %foo21) nounwind
+ call void @llvm.objc.release(i8* %foo21) nounwind
%strongdestroy25 = load i8*, i8** %foo10, align 8
- call void @objc_release(i8* %strongdestroy25) nounwind, !clang.imprecise_release !0
- call void @objc_release(i8* %call) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %strongdestroy25) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %call) nounwind, !clang.imprecise_release !0
ret void
}
-; CHECK: attributes #0 = { argmemonly nounwind }
-; CHECK: attributes #1 = { nonlazybind }
; CHECK: attributes [[NUW]] = { nounwind }
+; CHECK: attributes #1 = { argmemonly nounwind }
+; CHECK: attributes #2 = { nonlazybind }
Modified: llvm/trunk/test/Transforms/ObjCARC/opt-catchswitch.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/opt-catchswitch.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/opt-catchswitch.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/opt-catchswitch.ll Tue Dec 18 12:32:49 2018
@@ -7,15 +7,15 @@ declare i8* @f(i8*, i8*)
declare i32 @__CxxFrameHandler3(...)
-declare dllimport i8* @objc_autoreleaseReturnValue(i8* returned)
-declare dllimport i8* @objc_retain(i8* returned)
-declare dllimport i8* @objc_retainAutoreleasedReturnValue(i8* returned)
-declare dllimport void @objc_release(i8*)
+declare dllimport i8* @llvm.objc.autoreleaseReturnValue(i8* returned)
+declare dllimport i8* @llvm.objc.retain(i8* returned)
+declare dllimport i8* @llvm.objc.retainAutoreleasedReturnValue(i8* returned)
+declare dllimport void @llvm.objc.release(i8*)
define i8* @g(i8* %p, i8* %q) local_unnamed_addr personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) {
entry:
- %0 = tail call i8* @objc_retain(i8* %p) #0
- %1 = tail call i8* @objc_retain(i8* %q) #0
+ %0 = tail call i8* @llvm.objc.retain(i8* %p) #0
+ %1 = tail call i8* @llvm.objc.retain(i8* %q) #0
%call = invoke i8* @f(i8* %p, i8* %q)
to label %invoke.cont unwind label %catch.dispatch, !clang.arc.no_objc_arc_exceptions !0
@@ -27,19 +27,19 @@ catch:
catchret from %3 to label %cleanup
invoke.cont:
- %4 = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %call) #0
+ %4 = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call) #0
br label %cleanup
cleanup:
%retval.0 = phi i8* [ %call, %invoke.cont ], [ null, %catch ]
- tail call void @objc_release(i8* %q) #0, !clang.imprecise_release !0
- tail call void @objc_release(i8* %p) #0, !clang.imprecise_release !0
- %5 = tail call i8* @objc_autoreleaseReturnValue(i8* %retval.0) #0
+ tail call void @llvm.objc.release(i8* %q) #0, !clang.imprecise_release !0
+ tail call void @llvm.objc.release(i8* %p) #0, !clang.imprecise_release !0
+ %5 = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %retval.0) #0
ret i8* %retval.0
}
; CHECK-LABEL: entry:
-; CHECK-NEXT: %0 = tail call i8* @objc_retain(i8* %p) #0
+; CHECK-NEXT: %0 = tail call i8* @llvm.objc.retain(i8* %p) #0
; CHECK-NEXT: %call = invoke i8* @f(i8* %p, i8* %q)
; CHECK-NEXT: to label %invoke.cont unwind label %catch.dispatch
@@ -47,7 +47,7 @@ cleanup:
; CHECK-NEXT: %1 = catchswitch within none [label %catch] unwind to caller
; CHECK-LABEL: cleanup:
-; CHECK: tail call void @objc_release(i8* %p) #0
+; CHECK: tail call void @llvm.objc.release(i8* %p) #0
attributes #0 = { nounwind }
Modified: llvm/trunk/test/Transforms/ObjCARC/path-overflow.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/path-overflow.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/path-overflow.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/path-overflow.ll Tue Dec 18 12:32:49 2018
@@ -18,13 +18,13 @@ target triple = "thumbv7-apple-ios5.0.0"
@_unnamed_cfstring = external constant %struct.NSConstantString, section "__DATA,__cfstring"
@_unnamed_cfstring_2 = external constant %struct.NSConstantString, section "__DATA,__cfstring"
-declare i8* @objc_retain(i8*) nonlazybind
-declare i8* @objc_retainAutoreleasedReturnValue(i8*) nonlazybind
-declare void @objc_release(i8*) nonlazybind
+declare i8* @llvm.objc.retain(i8*) nonlazybind
+declare i8* @llvm.objc.retainAutoreleasedReturnValue(i8*) nonlazybind
+declare void @llvm.objc.release(i8*) nonlazybind
declare i8* @returner()
-declare i8* @objc_msgSend(i8*, i8*, ...) nonlazybind
+declare i8* @llvm.objc.msgSend(i8*, i8*, ...) nonlazybind
declare void @NSLog(i8*, ...)
-declare void @objc_msgSend_stret(i8*, i8*, ...)
+declare void @llvm.objc.msgSend_stret(i8*, i8*, ...)
declare i32 @__gxx_personality_sj0(...)
declare i32 @__objc_personality_v0(...)
@@ -41,7 +41,7 @@ msgSend.nullinit:
msgSend.cont: ; preds = %msgSend.nullinit, %msgSend.call
%0 = bitcast %struct.NSConstantString* @_unnamed_cfstring to i8*
- %1 = call i8* @objc_retain(i8* %0) nounwind
+ %1 = call i8* @llvm.objc.retain(i8* %0) nounwind
br i1 undef, label %msgSend.nullinit33, label %msgSend.call32
msgSend.call32: ; preds = %if.end10
@@ -336,7 +336,7 @@ msgSend.nullinit506:
br label %msgSend.cont507
msgSend.cont507: ; preds = %msgSend.nullinit506, %msgSend.call505
- call void @objc_release(i8* %0) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %0) nounwind, !clang.imprecise_release !0
ret void
}
@@ -779,9 +779,9 @@ bb184:
br i1 undef, label %bb186, label %bb195
bb186: ; preds = %bb184
- %tmp188 = call i8* @objc_retainAutoreleasedReturnValue(i8* %tmp185)
- %tmp189 = call i8* @objc_retain(i8* %tmp188)
- call void @objc_release(i8* %tmp189), !clang.imprecise_release !0
+ %tmp188 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %tmp185)
+ %tmp189 = call i8* @llvm.objc.retain(i8* %tmp188)
+ call void @llvm.objc.release(i8* %tmp189), !clang.imprecise_release !0
br i1 undef, label %bb197, label %bb190
bb190: ; preds = %bb186
@@ -866,18 +866,18 @@ bb222:
; Function Attrs: ssp
define void @test3() #1 personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) {
entry:
- %call2 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ %call2 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
- %call5 = invoke signext i8 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8 (i8*, i8*)*)(i8* undef, i8* undef)
+ %call5 = invoke signext i8 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8 (i8*, i8*)*)(i8* undef, i8* undef)
to label %invoke.cont4 unwind label %lpad3
invoke.cont4: ; preds = %invoke.cont
br i1 undef, label %land.end, label %land.rhs
land.rhs: ; preds = %invoke.cont4
- %call7 = invoke i32 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i32 (i8*, i8*)*)(i8* undef, i8* undef)
+ %call7 = invoke i32 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i32 (i8*, i8*)*)(i8* undef, i8* undef)
to label %land.end unwind label %lpad3
land.end: ; preds = %land.rhs, %invoke.cont4
@@ -896,11 +896,11 @@ lpad.i:
unreachable
invoke.cont8: ; preds = %if.then.i, %invoke.cont.i
- %call18 = invoke i8* (i8*, i8*, i8*, ...) bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*, ...)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef)
+ %call18 = invoke i8* (i8*, i8*, i8*, ...) bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8*, ...)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef)
to label %invoke.cont17 unwind label %lpad16
invoke.cont17: ; preds = %invoke.cont8
- %call22 = invoke signext i8 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8 (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ %call22 = invoke signext i8 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8 (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont21 unwind label %lpad20
invoke.cont21: ; preds = %invoke.cont17
@@ -919,14 +919,14 @@ lpad.i1982:
unreachable
invoke.cont24: ; preds = %if.then.i1981, %invoke.cont.i1980
- %call37 = invoke signext i8 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8 (i8*, i8*)*)(i8* undef, i8* undef)
+ %call37 = invoke signext i8 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8 (i8*, i8*)*)(i8* undef, i8* undef)
to label %invoke.cont36 unwind label %lpad35
invoke.cont36: ; preds = %invoke.cont24
br i1 undef, label %land.end43, label %land.rhs39
land.rhs39: ; preds = %invoke.cont36
- %call41 = invoke signext i8 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8 (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ %call41 = invoke signext i8 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8 (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %land.end43 unwind label %lpad35
land.end43: ; preds = %land.rhs39, %invoke.cont36
@@ -945,18 +945,18 @@ lpad.i1988:
unreachable
invoke.cont44: ; preds = %if.then.i1987, %invoke.cont.i1986
- %call53 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ %call53 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont52 unwind label %lpad51
invoke.cont52: ; preds = %invoke.cont44
br i1 undef, label %land.end70, label %land.rhs58
land.rhs58: ; preds = %invoke.cont52
- %call63 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 42)
+ %call63 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 42)
to label %invoke.cont62 unwind label %lpad61
invoke.cont62: ; preds = %land.rhs58
- %call68 = invoke signext i8 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8 (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef)
+ %call68 = invoke signext i8 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8 (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef)
to label %land.end70 unwind label %lpad66.body.thread
land.end70: ; preds = %invoke.cont62, %invoke.cont52
@@ -985,11 +985,11 @@ lpad.i2000:
br label %ehcleanup102
invoke.cont91: ; preds = %if.then.i1999, %invoke.cont.i1998
- %call96 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* undef, i8* undef)
+ %call96 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*)*)(i8* undef, i8* undef)
to label %invoke.cont95 unwind label %lpad94
invoke.cont95: ; preds = %invoke.cont91
- %call98 = invoke signext i8 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8 (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* %call96)
+ %call98 = invoke signext i8 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8 (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* %call96)
to label %invoke.cont97 unwind label %lpad94
invoke.cont97: ; preds = %invoke.cont95
@@ -1008,7 +1008,7 @@ lpad.i2006:
unreachable
invoke.cont100: ; preds = %if.then.i2005, %invoke.cont.i2004
- invoke void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ invoke void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont110 unwind label %lpad109
invoke.cont110: ; preds = %invoke.cont100
@@ -1111,11 +1111,11 @@ if.then.i2029:
br label %invoke.cont165
invoke.cont165: ; preds = %if.then.i2029, %invoke.cont.i2028
- invoke void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, void (i8*, i8*)*)*)(i8* undef, i8* undef, void (i8*, i8*)* undef)
+ invoke void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*, void (i8*, i8*)*)*)(i8* undef, i8* undef, void (i8*, i8*)* undef)
to label %invoke.cont184 unwind label %lpad183
invoke.cont184: ; preds = %invoke.cont165
- %call186 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ %call186 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont185 unwind label %lpad183
invoke.cont185: ; preds = %invoke.cont184
@@ -1134,15 +1134,15 @@ lpad.i2036:
br label %lpad183.body
invoke.cont190: ; preds = %if.then.i2035, %invoke.cont.i2034
- invoke void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ invoke void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont197 unwind label %lpad196
invoke.cont197: ; preds = %invoke.cont190
- %call202 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ %call202 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont201 unwind label %lpad200
invoke.cont201: ; preds = %invoke.cont197
- %call205 = invoke signext i8 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8 (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ %call205 = invoke signext i8 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8 (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont204 unwind label %lpad203
invoke.cont204: ; preds = %invoke.cont201
@@ -1161,7 +1161,7 @@ lpad.i2042:
unreachable
invoke.cont207: ; preds = %if.then.i2041, %invoke.cont.i2040
- %call209 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* undef, i8* undef)
+ %call209 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*)*)(i8* undef, i8* undef)
to label %invoke.cont208 unwind label %lpad203
invoke.cont208: ; preds = %invoke.cont207
@@ -1175,11 +1175,11 @@ if.then.i2047:
br label %invoke.cont213
invoke.cont213: ; preds = %if.then.i2047, %invoke.cont.i2046
- invoke void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ invoke void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont221 unwind label %lpad220
invoke.cont221: ; preds = %invoke.cont213
- %call229 = invoke signext i8 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8 (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ %call229 = invoke signext i8 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8 (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont228 unwind label %lpad227
invoke.cont228: ; preds = %invoke.cont221
@@ -1198,7 +1198,7 @@ lpad.i2054:
unreachable
invoke.cont231: ; preds = %if.then.i2053, %invoke.cont.i2052
- %call233 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* undef, i8* undef)
+ %call233 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*)*)(i8* undef, i8* undef)
to label %invoke.cont232 unwind label %lpad227
invoke.cont232: ; preds = %invoke.cont231
@@ -1212,39 +1212,39 @@ if.then.i2059:
br label %invoke.cont237
invoke.cont237: ; preds = %if.then.i2059, %invoke.cont.i2058
- %call246 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ %call246 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont245 unwind label %lpad244
invoke.cont245: ; preds = %invoke.cont237
- %call248 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 13)
+ %call248 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 13)
to label %invoke.cont247 unwind label %lpad244
invoke.cont247: ; preds = %invoke.cont245
- %call251 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 2)
+ %call251 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 2)
to label %invoke.cont250 unwind label %lpad249
invoke.cont250: ; preds = %invoke.cont247
- %call254 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 7)
+ %call254 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 7)
to label %invoke.cont253 unwind label %lpad252
invoke.cont253: ; preds = %invoke.cont250
- %call257 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8**, i32)*)(i8* undef, i8* undef, i8** undef, i32 3)
+ %call257 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8**, i32)*)(i8* undef, i8* undef, i8** undef, i32 3)
to label %invoke.cont256 unwind label %lpad255
invoke.cont256: ; preds = %invoke.cont253
- %call260 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef, i8* undef)
+ %call260 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef, i8* undef)
to label %invoke.cont259 unwind label %lpad258
invoke.cont259: ; preds = %invoke.cont256
- %call267 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ %call267 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont266 unwind label %lpad265
invoke.cont266: ; preds = %invoke.cont259
- %call275 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef)
+ %call275 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef)
to label %invoke.cont274 unwind label %lpad273
invoke.cont274: ; preds = %invoke.cont266
- %call279 = invoke i32 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i32 (i8*, i8*)*)(i8* undef, i8* undef)
+ %call279 = invoke i32 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i32 (i8*, i8*)*)(i8* undef, i8* undef)
to label %invoke.cont278 unwind label %lpad277
invoke.cont278: ; preds = %invoke.cont274
@@ -1263,34 +1263,34 @@ lpad.i2066:
unreachable
invoke.cont281: ; preds = %if.then.i2065, %invoke.cont.i2064
- %call291 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ %call291 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont290 unwind label %lpad289
invoke.cont290: ; preds = %invoke.cont281
- %call303 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 8)
+ %call303 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 8)
to label %invoke.cont302 unwind label %lpad301
invoke.cont302: ; preds = %invoke.cont290
- %call310 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, double)*)(i8* undef, i8* undef, double 5.000000e-01)
+ %call310 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, double)*)(i8* undef, i8* undef, double 5.000000e-01)
to label %invoke.cont309 unwind label %lpad308
invoke.cont309: ; preds = %invoke.cont302
- %call313 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 42)
+ %call313 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 42)
to label %invoke.cont312 unwind label %lpad311
invoke.cont312: ; preds = %invoke.cont309
- %call316 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8**, i8**, i32)*)(i8* undef, i8* undef, i8** undef, i8** undef, i32 2)
+ %call316 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8**, i8**, i32)*)(i8* undef, i8* undef, i8** undef, i8** undef, i32 2)
to label %invoke.cont315 unwind label %lpad314
invoke.cont315: ; preds = %invoke.cont312
- %call322 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef)
+ %call322 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef)
to label %invoke.cont321 unwind label %lpad320
invoke.cont321: ; preds = %invoke.cont315
br i1 undef, label %land.end344, label %land.rhs335
land.rhs335: ; preds = %invoke.cont321
- %call342 = invoke signext i8 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8 (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ %call342 = invoke signext i8 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8 (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %land.end344 unwind label %lpad340.body.thread
land.end344: ; preds = %land.rhs335, %invoke.cont321
@@ -1304,15 +1304,15 @@ if.then.i2071:
br label %invoke.cont345
invoke.cont345: ; preds = %if.then.i2071, %invoke.cont.i2070
- %call362 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef)
+ %call362 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef)
to label %invoke.cont361 unwind label %lpad360
invoke.cont361: ; preds = %invoke.cont345
- %call365 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ %call365 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont364 unwind label %lpad363
invoke.cont364: ; preds = %invoke.cont361
- %call371 = invoke i32 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i32 (i8*, i8*)*)(i8* undef, i8* undef)
+ %call371 = invoke i32 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i32 (i8*, i8*)*)(i8* undef, i8* undef)
to label %invoke.cont370 unwind label %lpad369
invoke.cont370: ; preds = %invoke.cont364
@@ -1331,15 +1331,15 @@ lpad.i2078:
unreachable
invoke.cont373: ; preds = %if.then.i2077, %invoke.cont.i2076
- %call377 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i32, i8*)*)(i8* undef, i8* undef, i32 42, i8* undef)
+ %call377 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i32, i8*)*)(i8* undef, i8* undef, i32 42, i8* undef)
to label %invoke.cont376 unwind label %lpad363
invoke.cont376: ; preds = %invoke.cont373
- invoke void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i8*, i32)*)(i8* undef, i8* undef, i8* undef, i32 5)
+ invoke void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*, i8*, i32)*)(i8* undef, i8* undef, i8* undef, i32 5)
to label %invoke.cont382 unwind label %lpad381
invoke.cont382: ; preds = %invoke.cont376
- %call384 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ %call384 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont383 unwind label %lpad381
invoke.cont383: ; preds = %invoke.cont382
@@ -1358,19 +1358,19 @@ lpad.i2084:
unreachable
invoke.cont392: ; preds = %if.then.i2083, %invoke.cont.i2082
- invoke void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i8*, i32)*)(i8* undef, i8* undef, i8* undef, i32 -2)
+ invoke void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*, i8*, i32)*)(i8* undef, i8* undef, i8* undef, i32 -2)
to label %invoke.cont395 unwind label %lpad381
invoke.cont395: ; preds = %invoke.cont392
- %call397 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ %call397 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont396 unwind label %lpad381
invoke.cont396: ; preds = %invoke.cont395
- %call400 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* undef, i8* undef)
+ %call400 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*)*)(i8* undef, i8* undef)
to label %invoke.cont399 unwind label %lpad398
invoke.cont399: ; preds = %invoke.cont396
- %call403 = invoke i32 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i32 (i8*, i8*)*)(i8* undef, i8* undef)
+ %call403 = invoke i32 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i32 (i8*, i8*)*)(i8* undef, i8* undef)
to label %invoke.cont402 unwind label %lpad401
invoke.cont402: ; preds = %invoke.cont399
@@ -1389,15 +1389,15 @@ lpad.i2090:
unreachable
invoke.cont405: ; preds = %if.then.i2089, %invoke.cont.i2088
- invoke void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i8*, i32)*)(i8* undef, i8* undef, i8* undef, i32 -1)
+ invoke void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*, i8*, i32)*)(i8* undef, i8* undef, i8* undef, i32 -1)
to label %invoke.cont408 unwind label %lpad381
invoke.cont408: ; preds = %invoke.cont405
- %call410 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ %call410 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont409 unwind label %lpad381
invoke.cont409: ; preds = %invoke.cont408
- %call413 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* undef, i8* undef)
+ %call413 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*)*)(i8* undef, i8* undef)
to label %invoke.cont412 unwind label %lpad411
invoke.cont412: ; preds = %invoke.cont409
@@ -1416,19 +1416,19 @@ lpad.i2096:
unreachable
invoke.cont418: ; preds = %if.then.i2095, %invoke.cont.i2094
- invoke void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i8*, i32)*)(i8* undef, i8* undef, i8* undef, i32 0)
+ invoke void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*, i8*, i32)*)(i8* undef, i8* undef, i8* undef, i32 0)
to label %invoke.cont422 unwind label %lpad381
invoke.cont422: ; preds = %invoke.cont418
- %call424 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ %call424 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont423 unwind label %lpad381
invoke.cont423: ; preds = %invoke.cont422
- %call427 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* undef, i8* undef)
+ %call427 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*)*)(i8* undef, i8* undef)
to label %invoke.cont426 unwind label %lpad425
invoke.cont426: ; preds = %invoke.cont423
- %call430 = invoke i32 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i32 (i8*, i8*)*)(i8* undef, i8* undef)
+ %call430 = invoke i32 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i32 (i8*, i8*)*)(i8* undef, i8* undef)
to label %invoke.cont429 unwind label %lpad428
invoke.cont429: ; preds = %invoke.cont426
@@ -1447,7 +1447,7 @@ lpad.i2102:
unreachable
invoke.cont432: ; preds = %if.then.i2101, %invoke.cont.i2100
- %call436 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 0)
+ %call436 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 0)
to label %invoke.cont435 unwind label %lpad381
invoke.cont435: ; preds = %invoke.cont432
@@ -1455,7 +1455,7 @@ invoke.cont435:
to label %invoke.cont.i2106 unwind label %lpad.i2108
invoke.cont.i2106: ; preds = %invoke.cont435
- %call444 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 5)
+ %call444 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 5)
to label %invoke.cont443 unwind label %lpad381
lpad.i2108: ; preds = %invoke.cont435
@@ -1479,11 +1479,11 @@ lpad.i2114:
unreachable
invoke.cont449: ; preds = %if.then.i2113, %invoke.cont.i2112
- %call453 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 -2)
+ %call453 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 -2)
to label %invoke.cont452 unwind label %lpad381
invoke.cont452: ; preds = %invoke.cont449
- %call456 = invoke i32 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i32 (i8*, i8*)*)(i8* undef, i8* undef)
+ %call456 = invoke i32 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i32 (i8*, i8*)*)(i8* undef, i8* undef)
to label %invoke.cont455 unwind label %lpad454
invoke.cont455: ; preds = %invoke.cont452
@@ -1502,7 +1502,7 @@ lpad.i2120:
unreachable
invoke.cont458: ; preds = %if.then.i2119, %invoke.cont.i2118
- %call461 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 -1)
+ %call461 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 -1)
to label %invoke.cont460 unwind label %lpad381
invoke.cont460: ; preds = %invoke.cont458
@@ -1521,7 +1521,7 @@ lpad.i2126:
br label %ehcleanup477
invoke.cont466: ; preds = %if.then.i2125, %invoke.cont.i2124
- %call470 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 0)
+ %call470 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 0)
to label %invoke.cont469 unwind label %lpad381
invoke.cont469: ; preds = %invoke.cont466
@@ -1540,34 +1540,34 @@ lpad.i2132:
br label %ehcleanup477
invoke.cont475: ; preds = %if.then.i2131, %invoke.cont.i2130
- %call491 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 1)
+ %call491 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 1)
to label %invoke.cont490 unwind label %lpad489
invoke.cont490: ; preds = %invoke.cont475
- invoke void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ invoke void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont499 unwind label %lpad498
invoke.cont499: ; preds = %invoke.cont490
- %call504 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ %call504 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont503 unwind label %lpad489
invoke.cont503: ; preds = %invoke.cont499
- %call507 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 3)
+ %call507 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i32)*)(i8* undef, i8* undef, i32 3)
to label %invoke.cont506 unwind label %lpad505
invoke.cont506: ; preds = %invoke.cont503
- invoke void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ invoke void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont509 unwind label %lpad508
invoke.cont509: ; preds = %invoke.cont506
- %call513 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ %call513 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont512 unwind label %lpad489
invoke.cont512: ; preds = %invoke.cont509
br i1 undef, label %msgSend.null-receiver, label %msgSend.call
msgSend.call: ; preds = %invoke.cont512
- invoke void bitcast (void (i8*, i8*, ...)* @objc_msgSend_stret to void (%struct.CGPoint*, i8*, i8*)*)(%struct.CGPoint* sret undef, i8* undef, i8* undef)
+ invoke void bitcast (void (i8*, i8*, ...)* @llvm.objc.msgSend_stret to void (%struct.CGPoint*, i8*, i8*)*)(%struct.CGPoint* sret undef, i8* undef, i8* undef)
to label %msgSend.cont unwind label %lpad514
msgSend.null-receiver: ; preds = %invoke.cont512
@@ -1589,15 +1589,15 @@ lpad.i2138:
unreachable
invoke.cont521: ; preds = %if.then.i2137, %invoke.cont.i2136
- invoke void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef)
+ invoke void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef)
to label %invoke.cont528 unwind label %lpad527
invoke.cont528: ; preds = %invoke.cont521
- %call532 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ %call532 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont531 unwind label %lpad489
invoke.cont531: ; preds = %invoke.cont528
- %call535 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* undef, i8* undef)
+ %call535 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*)*)(i8* undef, i8* undef)
to label %invoke.cont534 unwind label %lpad533
invoke.cont534: ; preds = %invoke.cont531
@@ -1616,43 +1616,43 @@ lpad.i2144:
unreachable
invoke.cont540: ; preds = %if.then.i2143, %invoke.cont.i2142
- %call544 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i32)*)(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i32 3)
+ %call544 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i32)*)(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef, i32 3)
to label %invoke.cont543 unwind label %lpad489
invoke.cont543: ; preds = %invoke.cont540
- invoke void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef)
+ invoke void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* undef)
to label %invoke.cont546 unwind label %lpad545
invoke.cont546: ; preds = %invoke.cont543
- %call549 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ %call549 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont548 unwind label %lpad489
invoke.cont548: ; preds = %invoke.cont546
- %call555 = invoke signext i8 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8 (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ %call555 = invoke signext i8 bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8 (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont554 unwind label %lpad553
invoke.cont554: ; preds = %invoke.cont548
- %tmp499 = call i8* @objc_retain(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*)) #3
+ %tmp499 = call i8* @llvm.objc.retain(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*)) #3
invoke void (i8*, ...) @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i8* %tmp499, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont.i2148 unwind label %lpad.i2150
invoke.cont.i2148: ; preds = %invoke.cont554
- call void @objc_release(i8* %tmp499) #3, !clang.imprecise_release !0
- invoke void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ call void @llvm.objc.release(i8* %tmp499) #3, !clang.imprecise_release !0
+ invoke void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont566 unwind label %lpad565
lpad.i2150: ; preds = %invoke.cont554
%tmp500 = landingpad { i8*, i32 }
cleanup
- call void @objc_release(i8* %tmp499) #3, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %tmp499) #3, !clang.imprecise_release !0
unreachable
invoke.cont566: ; preds = %invoke.cont.i2148
- invoke void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
+ invoke void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*))
to label %invoke.cont572 unwind label %lpad571
invoke.cont572: ; preds = %invoke.cont566
- %call582 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* undef, i8* undef)
+ %call582 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*)*)(i8* undef, i8* undef)
to label %invoke.cont581 unwind label %lpad580
invoke.cont581: ; preds = %invoke.cont572
@@ -1927,7 +1927,7 @@ if.then10:
br label %if.end13
if.end13: ; preds = %if.then10, %entry
- %0 = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*, i64, i8*, i8)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i64 2, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring_2 to i8*), i8 signext 0), !clang.arc.no_objc_arc_exceptions !0
+ %0 = call i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*, i8*, i8*, i64, i8*, i8)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*), i64 2, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring_2 to i8*), i8 signext 0), !clang.arc.no_objc_arc_exceptions !0
br i1 undef, label %if.then17, label %if.end18
if.then17: ; preds = %if.end13
@@ -2162,14 +2162,14 @@ if.then398:
br label %if.end399
if.end399: ; preds = %if.then398, %if.end392
- invoke void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*)*)(i8* undef, i8* undef)
+ invoke void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*, i8*)*)(i8* undef, i8* undef)
to label %eh.cont unwind label %lpad, !clang.arc.no_objc_arc_exceptions !0
eh.cont: ; preds = %if.end399
br i1 undef, label %if.then430, label %if.end439.critedge
if.then430: ; preds = %eh.cont
- %1 = call i8* @objc_retain(i8* %0)
+ %1 = call i8* @llvm.objc.retain(i8* %0)
br label %if.end439
lpad: ; preds = %if.end399
@@ -2178,11 +2178,11 @@ lpad:
unreachable
if.end439.critedge: ; preds = %eh.cont
- %3 = call i8* @objc_retain(i8* %0)
+ %3 = call i8* @llvm.objc.retain(i8* %0)
br label %if.end439
if.end439: ; preds = %if.end439.critedge, %if.then430
- call void @objc_release(i8* %0), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %0), !clang.imprecise_release !0
unreachable
return: ; No predecessors!
Modified: llvm/trunk/test/Transforms/ObjCARC/pointer-types.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/pointer-types.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/pointer-types.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/pointer-types.ll Tue Dec 18 12:32:49 2018
@@ -1,6 +1,6 @@
; RUN: opt -objc-arc -S < %s | FileCheck %s
-; Don't hoist @objc_release past a use of its pointer, even
+; Don't hoist @llvm.objc.release past a use of its pointer, even
; if the use has function type, because clang uses function types
; in dubious ways.
; rdar://10551239
@@ -9,7 +9,7 @@
; CHECK: %otherBlock = phi void ()* [ %b1, %if.then ], [ null, %entry ]
; CHECK-NEXT: call void @use_fptr(void ()* %otherBlock)
; CHECK-NEXT: %tmp11 = bitcast void ()* %otherBlock to i8*
-; CHECK-NEXT: call void @objc_release(i8* %tmp11)
+; CHECK-NEXT: call void @llvm.objc.release(i8* %tmp11)
define void @test0(i1 %tobool, void ()* %b1) {
entry:
@@ -22,10 +22,10 @@ if.end:
%otherBlock = phi void ()* [ %b1, %if.then ], [ null, %entry ]
call void @use_fptr(void ()* %otherBlock)
%tmp11 = bitcast void ()* %otherBlock to i8*
- call void @objc_release(i8* %tmp11) nounwind
+ call void @llvm.objc.release(i8* %tmp11) nounwind
ret void
}
declare void @use_fptr(void ()*)
-declare void @objc_release(i8*)
+declare void @llvm.objc.release(i8*)
Modified: llvm/trunk/test/Transforms/ObjCARC/post-inlining.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/post-inlining.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/post-inlining.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/post-inlining.ll Tue Dec 18 12:32:49 2018
@@ -2,9 +2,9 @@
declare void @use_pointer(i8*)
declare i8* @returner()
-declare i8* @objc_retain(i8*)
-declare i8* @objc_autoreleaseReturnValue(i8*)
-declare i8* @objc_retainAutoreleasedReturnValue(i8*)
+declare i8* @llvm.objc.retain(i8*)
+declare i8* @llvm.objc.autoreleaseReturnValue(i8*)
+declare i8* @llvm.objc.retainAutoreleasedReturnValue(i8*)
; Clean up residue left behind after inlining.
@@ -14,8 +14,8 @@ declare i8* @objc_retainAutoreleasedRetu
; CHECK-NEXT: }
define void @test0(i8* %call.i) {
entry:
- %0 = tail call i8* @objc_retain(i8* %call.i) nounwind
- %1 = tail call i8* @objc_autoreleaseReturnValue(i8* %0) nounwind
+ %0 = tail call i8* @llvm.objc.retain(i8* %call.i) nounwind
+ %1 = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %0) nounwind
ret void
}
@@ -27,8 +27,8 @@ entry:
; CHECK-NEXT: }
define void @test1(i8* %call.i) {
entry:
- %0 = tail call i8* @objc_retain(i8* %call.i) nounwind
- %1 = tail call i8* @objc_autoreleaseReturnValue(i8* %call.i) nounwind
+ %0 = tail call i8* @llvm.objc.retain(i8* %call.i) nounwind
+ %1 = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %call.i) nounwind
ret void
}
@@ -41,8 +41,8 @@ entry:
; CHECK-NEXT: }
define void @test24(i8* %p) {
entry:
- call i8* @objc_autoreleaseReturnValue(i8* %p) nounwind
- call i8* @objc_retainAutoreleasedReturnValue(i8* %p) nounwind
+ call i8* @llvm.objc.autoreleaseReturnValue(i8* %p) nounwind
+ call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %p) nounwind
call void @use_pointer(i8* %p)
ret void
}
Modified: llvm/trunk/test/Transforms/ObjCARC/pr12270.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/pr12270.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/pr12270.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/pr12270.ll Tue Dec 18 12:32:49 2018
@@ -8,14 +8,14 @@ entry:
return: ; No predecessors!
%bar = bitcast %2* %x to i8*
- %foo = call i8* @objc_autoreleaseReturnValue(i8* %bar) nounwind
+ %foo = call i8* @llvm.objc.autoreleaseReturnValue(i8* %bar) nounwind
call void @callee()
call void @use_pointer(i8* %foo)
- call void @objc_release(i8* %foo) nounwind
+ call void @llvm.objc.release(i8* %foo) nounwind
ret void
}
-declare i8* @objc_autoreleaseReturnValue(i8*)
-declare void @objc_release(i8*)
+declare i8* @llvm.objc.autoreleaseReturnValue(i8*)
+declare void @llvm.objc.release(i8*)
declare void @callee()
declare void @use_pointer(i8*)
Modified: llvm/trunk/test/Transforms/ObjCARC/retain-block-side-effects.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/retain-block-side-effects.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/retain-block-side-effects.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/retain-block-side-effects.ll Tue Dec 18 12:32:49 2018
@@ -4,7 +4,7 @@
; objc_retainBlock stores into %repeater so the load from after the
; call isn't forwardable from the store before the call.
-; CHECK: %tmp16 = call i8* @objc_retainBlock(i8* %tmp15) [[NUW:#[0-9]+]]
+; CHECK: %tmp16 = call i8* @llvm.objc.retainBlock(i8* %tmp15) [[NUW:#[0-9]+]]
; CHECK: %tmp17 = bitcast i8* %tmp16 to void ()*
; CHECK: %tmp18 = load %struct.__block_byref_repeater*, %struct.__block_byref_repeater** %byref.forwarding, align 8
; CHECK: %repeater12 = getelementptr inbounds %struct.__block_byref_repeater, %struct.__block_byref_repeater* %tmp18, i64 0, i32 6
@@ -27,7 +27,7 @@ entry:
%tmp14 = bitcast %struct.__block_byref_repeater* %repeater to i8*
store i8* %tmp14, i8** %block.captured11, align 8
%tmp15 = bitcast <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, %0*, i8* }>* %block to i8*
- %tmp16 = call i8* @objc_retainBlock(i8* %tmp15) nounwind
+ %tmp16 = call i8* @llvm.objc.retainBlock(i8* %tmp15) nounwind
%tmp17 = bitcast i8* %tmp16 to void ()*
%tmp18 = load %struct.__block_byref_repeater*, %struct.__block_byref_repeater** %byref.forwarding, align 8
%repeater12 = getelementptr inbounds %struct.__block_byref_repeater, %struct.__block_byref_repeater* %tmp18, i64 0, i32 6
@@ -36,7 +36,7 @@ entry:
ret void
}
-declare i8* @objc_retainBlock(i8*)
+declare i8* @llvm.objc.retainBlock(i8*)
; CHECK: attributes #0 = { noreturn }
; CHECK: attributes [[NUW]] = { nounwind }
Modified: llvm/trunk/test/Transforms/ObjCARC/retain-not-declared.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/retain-not-declared.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/retain-not-declared.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/retain-not-declared.ll Tue Dec 18 12:32:49 2018
@@ -1,11 +1,11 @@
; RUN: opt -S -objc-arc -objc-arc-contract < %s | FileCheck %s
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
-declare i8* @objc_unretainedObject(i8*)
-declare i8* @objc_retainAutoreleasedReturnValue(i8*)
-declare i8* @objc_autoreleaseReturnValue(i8*)
-declare i8* @objc_msgSend(i8*, i8*, ...)
-declare void @objc_release(i8*)
+declare i8* @llvm.objc.unretainedObject(i8*)
+declare i8* @llvm.objc.retainAutoreleasedReturnValue(i8*)
+declare i8* @llvm.objc.autoreleaseReturnValue(i8*)
+declare i8* @llvm.objc.msgSend(i8*, i8*, ...)
+declare void @llvm.objc.release(i8*)
; Test that the optimizer can create an objc_retainAutoreleaseReturnValue
; declaration even if no objc_retain declaration exists.
@@ -13,41 +13,41 @@ declare void @objc_release(i8*)
; CHECK: define i8* @test0(i8* %p) {
; CHECK-NEXT: entry:
-; CHECK-NEXT: %0 = tail call i8* @objc_retainAutoreleaseReturnValue(i8* %p) [[NUW:#[0-9]+]]
+; CHECK-NEXT: %0 = tail call i8* @llvm.objc.retainAutoreleaseReturnValue(i8* %p) [[NUW:#[0-9]+]]
; CHECK-NEXT: ret i8* %0
; CHECK-NEXT: }
define i8* @test0(i8* %p) {
entry:
- %call = tail call i8* @objc_unretainedObject(i8* %p)
- %0 = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %call) nounwind
- %1 = tail call i8* @objc_autoreleaseReturnValue(i8* %call) nounwind
+ %call = tail call i8* @llvm.objc.unretainedObject(i8* %p)
+ %0 = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call) nounwind
+ %1 = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %call) nounwind
ret i8* %call
}
-; Properly create the @objc_retain declaration when it doesn't already exist.
+; Properly create the @llvm.objc.retain declaration when it doesn't already exist.
; rdar://9825114
; CHECK-LABEL: @test1(
-; CHECK: @objc_retain(
-; CHECK: @objc_retainAutoreleasedReturnValue(
-; CHECK: @objc_release(
-; CHECK: @objc_release(
+; CHECK: @llvm.objc.retain
+; CHECK: @llvm.objc.retainAutoreleasedReturnValue(
+; CHECK: @llvm.objc.release
+; CHECK: @llvm.objc.release
; CHECK: }
define void @test1(i8* %call88) nounwind personality i32 (...)* @__gxx_personality_v0 {
entry:
- %tmp1 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call88) nounwind
- %call94 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*)*)(i8* %tmp1)
+ %tmp1 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call88) nounwind
+ %call94 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to i8* (i8*)*)(i8* %tmp1)
to label %invoke.cont93 unwind label %lpad91
invoke.cont93: ; preds = %entry
- %tmp2 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call94) nounwind
- call void @objc_release(i8* %tmp1) nounwind
- invoke void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*)*)(i8* %tmp2)
+ %tmp2 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call94) nounwind
+ call void @llvm.objc.release(i8* %tmp1) nounwind
+ invoke void bitcast (i8* (i8*, i8*, ...)* @llvm.objc.msgSend to void (i8*)*)(i8* %tmp2)
to label %invoke.cont102 unwind label %lpad100
invoke.cont102: ; preds = %invoke.cont93
- call void @objc_release(i8* %tmp2) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %tmp2) nounwind, !clang.imprecise_release !0
unreachable
lpad91: ; preds = %entry
@@ -58,7 +58,7 @@ lpad91:
lpad100: ; preds = %invoke.cont93
%exn100 = landingpad {i8*, i32}
cleanup
- call void @objc_release(i8* %tmp2) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %tmp2) nounwind, !clang.imprecise_release !0
unreachable
}
Modified: llvm/trunk/test/Transforms/ObjCARC/rle-s2l.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/rle-s2l.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/rle-s2l.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/rle-s2l.ll Tue Dec 18 12:32:49 2018
@@ -1,71 +1,71 @@
; RUN: opt -S -basicaa -objc-arc < %s | FileCheck %s
-declare i8* @objc_loadWeak(i8**)
-declare i8* @objc_loadWeakRetained(i8**)
-declare i8* @objc_storeWeak(i8**, i8*)
-declare i8* @objc_initWeak(i8**, i8*)
+declare i8* @llvm.objc.loadWeak(i8**)
+declare i8* @llvm.objc.loadWeakRetained(i8**)
+declare i8* @llvm.objc.storeWeak(i8**, i8*)
+declare i8* @llvm.objc.initWeak(i8**, i8*)
declare void @use_pointer(i8*)
declare void @callee()
-; Basic redundant @objc_loadWeak elimination.
+; Basic redundant @llvm.objc.loadWeak elimination.
; CHECK: define void @test0(i8** %p) {
-; CHECK-NEXT: %y = call i8* @objc_loadWeak(i8** %p)
+; CHECK-NEXT: %y = call i8* @llvm.objc.loadWeak(i8** %p)
; CHECK-NEXT: call void @use_pointer(i8* %y)
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test0(i8** %p) {
- %x = call i8* @objc_loadWeak(i8** %p)
- %y = call i8* @objc_loadWeak(i8** %p)
+ %x = call i8* @llvm.objc.loadWeak(i8** %p)
+ %y = call i8* @llvm.objc.loadWeak(i8** %p)
call void @use_pointer(i8* %y)
ret void
}
-; DCE the @objc_loadWeak.
+; DCE the @llvm.objc.loadWeak.
; CHECK: define void @test1(i8** %p) {
-; CHECK-NEXT: %y = call i8* @objc_loadWeakRetained(i8** %p)
+; CHECK-NEXT: %y = call i8* @llvm.objc.loadWeakRetained(i8** %p)
; CHECK-NEXT: call void @use_pointer(i8* %y)
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test1(i8** %p) {
- %x = call i8* @objc_loadWeak(i8** %p)
- %y = call i8* @objc_loadWeakRetained(i8** %p)
+ %x = call i8* @llvm.objc.loadWeak(i8** %p)
+ %y = call i8* @llvm.objc.loadWeakRetained(i8** %p)
call void @use_pointer(i8* %y)
ret void
}
-; Basic redundant @objc_loadWeakRetained elimination.
+; Basic redundant @llvm.objc.loadWeakRetained elimination.
; CHECK: define void @test2(i8** %p) {
-; CHECK-NEXT: %x = call i8* @objc_loadWeak(i8** %p)
+; CHECK-NEXT: %x = call i8* @llvm.objc.loadWeak(i8** %p)
; CHECK-NEXT: store i8 3, i8* %x
-; CHECK-NEXT: %1 = tail call i8* @objc_retain(i8* %x)
+; CHECK-NEXT: %1 = tail call i8* @llvm.objc.retain(i8* %x)
; CHECK-NEXT: call void @use_pointer(i8* %x)
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test2(i8** %p) {
- %x = call i8* @objc_loadWeak(i8** %p)
+ %x = call i8* @llvm.objc.loadWeak(i8** %p)
store i8 3, i8* %x
- %y = call i8* @objc_loadWeakRetained(i8** %p)
+ %y = call i8* @llvm.objc.loadWeakRetained(i8** %p)
call void @use_pointer(i8* %y)
ret void
}
-; Basic redundant @objc_loadWeakRetained elimination, this time
+; Basic redundant @llvm.objc.loadWeakRetained elimination, this time
; with a readonly call instead of a store.
; CHECK: define void @test3(i8** %p) {
-; CHECK-NEXT: %x = call i8* @objc_loadWeak(i8** %p)
+; CHECK-NEXT: %x = call i8* @llvm.objc.loadWeak(i8** %p)
; CHECK-NEXT: call void @use_pointer(i8* %x) [[RO:#[0-9]+]]
-; CHECK-NEXT: %1 = tail call i8* @objc_retain(i8* %x)
+; CHECK-NEXT: %1 = tail call i8* @llvm.objc.retain(i8* %x)
; CHECK-NEXT: call void @use_pointer(i8* %x)
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test3(i8** %p) {
- %x = call i8* @objc_loadWeak(i8** %p)
+ %x = call i8* @llvm.objc.loadWeak(i8** %p)
call void @use_pointer(i8* %x) readonly
- %y = call i8* @objc_loadWeakRetained(i8** %p)
+ %y = call i8* @llvm.objc.loadWeakRetained(i8** %p)
call void @use_pointer(i8* %y)
ret void
}
@@ -73,18 +73,18 @@ define void @test3(i8** %p) {
; A regular call blocks redundant weak load elimination.
; CHECK: define void @test4(i8** %p) {
-; CHECK-NEXT: %x = call i8* @objc_loadWeak(i8** %p)
+; CHECK-NEXT: %x = call i8* @llvm.objc.loadWeak(i8** %p)
; CHECK-NEXT: call void @use_pointer(i8* %x) [[RO]]
; CHECK-NEXT: call void @callee()
-; CHECK-NEXT: %y = call i8* @objc_loadWeak(i8** %p)
+; CHECK-NEXT: %y = call i8* @llvm.objc.loadWeak(i8** %p)
; CHECK-NEXT: call void @use_pointer(i8* %y)
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test4(i8** %p) {
- %x = call i8* @objc_loadWeak(i8** %p)
+ %x = call i8* @llvm.objc.loadWeak(i8** %p)
call void @use_pointer(i8* %x) readonly
call void @callee()
- %y = call i8* @objc_loadWeak(i8** %p)
+ %y = call i8* @llvm.objc.loadWeak(i8** %p)
call void @use_pointer(i8* %y)
ret void
}
@@ -92,13 +92,13 @@ define void @test4(i8** %p) {
; Store to load forwarding.
; CHECK: define void @test5(i8** %p, i8* %n) {
-; CHECK-NEXT: %1 = call i8* @objc_storeWeak(i8** %p, i8* %n)
+; CHECK-NEXT: %1 = call i8* @llvm.objc.storeWeak(i8** %p, i8* %n)
; CHECK-NEXT: call void @use_pointer(i8* %n)
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test5(i8** %p, i8* %n) {
- call i8* @objc_storeWeak(i8** %p, i8* %n)
- %y = call i8* @objc_loadWeak(i8** %p)
+ call i8* @llvm.objc.storeWeak(i8** %p, i8* %n)
+ %y = call i8* @llvm.objc.loadWeak(i8** %p)
call void @use_pointer(i8* %y)
ret void
}
@@ -106,13 +106,13 @@ define void @test5(i8** %p, i8* %n) {
; Store to load forwarding with objc_initWeak.
; CHECK: define void @test6(i8** %p, i8* %n) {
-; CHECK-NEXT: %1 = call i8* @objc_initWeak(i8** %p, i8* %n)
+; CHECK-NEXT: %1 = call i8* @llvm.objc.initWeak(i8** %p, i8* %n)
; CHECK-NEXT: call void @use_pointer(i8* %n)
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test6(i8** %p, i8* %n) {
- call i8* @objc_initWeak(i8** %p, i8* %n)
- %y = call i8* @objc_loadWeak(i8** %p)
+ call i8* @llvm.objc.initWeak(i8** %p, i8* %n)
+ %y = call i8* @llvm.objc.loadWeak(i8** %p)
call void @use_pointer(i8* %y)
ret void
}
@@ -120,16 +120,16 @@ define void @test6(i8** %p, i8* %n) {
; Don't forward if there's a may-alias store in the way.
; CHECK: define void @test7(i8** %p, i8* %n, i8** %q, i8* %m) {
-; CHECK-NEXT: call i8* @objc_initWeak(i8** %p, i8* %n)
-; CHECK-NEXT: call i8* @objc_storeWeak(i8** %q, i8* %m)
-; CHECK-NEXT: %y = call i8* @objc_loadWeak(i8** %p)
+; CHECK-NEXT: call i8* @llvm.objc.initWeak(i8** %p, i8* %n)
+; CHECK-NEXT: call i8* @llvm.objc.storeWeak(i8** %q, i8* %m)
+; CHECK-NEXT: %y = call i8* @llvm.objc.loadWeak(i8** %p)
; CHECK-NEXT: call void @use_pointer(i8* %y)
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test7(i8** %p, i8* %n, i8** %q, i8* %m) {
- call i8* @objc_initWeak(i8** %p, i8* %n)
- call i8* @objc_storeWeak(i8** %q, i8* %m)
- %y = call i8* @objc_loadWeak(i8** %p)
+ call i8* @llvm.objc.initWeak(i8** %p, i8* %n)
+ call i8* @llvm.objc.storeWeak(i8** %q, i8* %m)
+ %y = call i8* @llvm.objc.loadWeak(i8** %p)
call void @use_pointer(i8* %y)
ret void
}
Modified: llvm/trunk/test/Transforms/ObjCARC/rv.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/rv.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/rv.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/rv.ll Tue Dec 18 12:32:49 2018
@@ -2,15 +2,15 @@
target datalayout = "e-p:64:64:64"
-declare i8* @objc_retain(i8*)
-declare i8* @objc_retainAutoreleasedReturnValue(i8*)
-declare void @objc_release(i8*)
-declare i8* @objc_autorelease(i8*)
-declare i8* @objc_autoreleaseReturnValue(i8*)
-declare i8* @objc_retainAutoreleaseReturnValue(i8*)
-declare void @objc_autoreleasePoolPop(i8*)
-declare void @objc_autoreleasePoolPush()
-declare i8* @objc_retainBlock(i8*)
+declare i8* @llvm.objc.retain(i8*)
+declare i8* @llvm.objc.retainAutoreleasedReturnValue(i8*)
+declare void @llvm.objc.release(i8*)
+declare i8* @llvm.objc.autorelease(i8*)
+declare i8* @llvm.objc.autoreleaseReturnValue(i8*)
+declare i8* @llvm.objc.retainAutoreleaseReturnValue(i8*)
+declare void @llvm.objc.autoreleasePoolPop(i8*)
+declare void @llvm.objc.autoreleasePoolPush()
+declare i8* @llvm.objc.retainBlock(i8*)
declare i8* @objc_retainedObject(i8*)
declare i8* @objc_unretainedObject(i8*)
@@ -29,17 +29,17 @@ declare i8* @returner()
; CHECK-LABEL: define void @test0(
; CHECK-NEXT: entry:
; CHECK-NEXT: %x = call i8* @returner
-; CHECK-NEXT: %0 = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %x) [[NUW:#[0-9]+]]
+; CHECK-NEXT: %0 = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %x) [[NUW:#[0-9]+]]
; CHECK: t:
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: return:
-; CHECK-NEXT: call void @objc_release(i8* %x)
+; CHECK-NEXT: call void @llvm.objc.release(i8* %x)
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @test0(i1 %p) nounwind {
entry:
%x = call i8* @returner()
- %0 = call i8* @objc_retainAutoreleasedReturnValue(i8* %x)
+ %0 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %x)
br i1 %p, label %t, label %return
t:
@@ -48,19 +48,19 @@ t:
br label %return
return:
- call void @objc_release(i8* %x) nounwind
+ call void @llvm.objc.release(i8* %x) nounwind
ret void
}
; Delete no-ops.
; CHECK-LABEL: define void @test2(
-; CHECK-NOT: @objc_
+; CHECK-NOT: @llvm.objc.
; CHECK: }
define void @test2() {
- call i8* @objc_retainAutoreleasedReturnValue(i8* null)
- call i8* @objc_autoreleaseReturnValue(i8* null)
- ; call i8* @objc_retainAutoreleaseReturnValue(i8* null) ; TODO
+ call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* null)
+ call i8* @llvm.objc.autoreleaseReturnValue(i8* null)
+ ; call i8* @llvm.objc.retainAutoreleaseReturnValue(i8* null) ; TODO
ret void
}
@@ -73,8 +73,8 @@ define void @test2() {
define i8* @test3() {
entry:
%call = call i8* @returner()
- %0 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call) nounwind
- %1 = call i8* @objc_autoreleaseReturnValue(i8* %0) nounwind
+ %0 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %call) nounwind
+ %1 = call i8* @llvm.objc.autoreleaseReturnValue(i8* %0) nounwind
ret i8* %1
}
@@ -87,8 +87,8 @@ entry:
define i8* @test4() {
entry:
%call = call i8* @returner()
- %0 = call i8* @objc_retain(i8* %call) nounwind
- %1 = call i8* @objc_autoreleaseReturnValue(i8* %0) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %call) nounwind
+ %1 = call i8* @llvm.objc.autoreleaseReturnValue(i8* %0) nounwind
ret i8* %1
}
@@ -102,7 +102,7 @@ entry:
;define i8* @test5() {
;entry:
; %call = call i8* @returner()
-; %0 = call i8* @objc_retainAutoreleaseReturnValue(i8* %call) nounwind
+; %0 = call i8* @llvm.objc.retainAutoreleaseReturnValue(i8* %call) nounwind
; ret i8* %0
;}
@@ -115,45 +115,45 @@ entry:
; Those entrypoints don't exist yet though.
; CHECK-LABEL: define i8* @test7(
-; CHECK: call i8* @objc_retainAutoreleasedReturnValue(i8* %p)
-; CHECK: %t = tail call i8* @objc_autoreleaseReturnValue(i8* %p)
+; CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %p)
+; CHECK: %t = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %p)
define i8* @test7() {
%p = call i8* @returner()
- call i8* @objc_retainAutoreleasedReturnValue(i8* %p)
- %t = call i8* @objc_autoreleaseReturnValue(i8* %p)
+ call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %p)
+ %t = call i8* @llvm.objc.autoreleaseReturnValue(i8* %p)
call void @use_pointer(i8* %p)
ret i8* %t
}
; CHECK-LABEL: define i8* @test7b(
-; CHECK: call i8* @objc_retain(i8* %p)
-; CHECK: %t = tail call i8* @objc_autoreleaseReturnValue(i8* %p)
+; CHECK: call i8* @llvm.objc.retain(i8* %p)
+; CHECK: %t = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %p)
define i8* @test7b() {
%p = call i8* @returner()
call void @use_pointer(i8* %p)
- call i8* @objc_retainAutoreleasedReturnValue(i8* %p)
- %t = call i8* @objc_autoreleaseReturnValue(i8* %p)
+ call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %p)
+ %t = call i8* @llvm.objc.autoreleaseReturnValue(i8* %p)
ret i8* %p
}
; Don't apply the RV optimization to autorelease if there's no retain.
; CHECK: define i8* @test9(i8* %p)
-; CHECK: call i8* @objc_autorelease(i8* %p)
+; CHECK: call i8* @llvm.objc.autorelease(i8* %p)
define i8* @test9(i8* %p) {
- call i8* @objc_autorelease(i8* %p)
+ call i8* @llvm.objc.autorelease(i8* %p)
ret i8* %p
}
; Do not apply the RV optimization.
; CHECK: define i8* @test10(i8* %p)
-; CHECK: tail call i8* @objc_retain(i8* %p) [[NUW]]
-; CHECK: call i8* @objc_autorelease(i8* %p) [[NUW]]
+; CHECK: tail call i8* @llvm.objc.retain(i8* %p) [[NUW]]
+; CHECK: call i8* @llvm.objc.autorelease(i8* %p) [[NUW]]
; CHECK-NEXT: ret i8* %p
define i8* @test10(i8* %p) {
- %1 = call i8* @objc_retain(i8* %p)
- %2 = call i8* @objc_autorelease(i8* %p)
+ %1 = call i8* @llvm.objc.retain(i8* %p)
+ %2 = call i8* @llvm.objc.autorelease(i8* %p)
ret i8* %p
}
@@ -161,42 +161,42 @@ define i8* @test10(i8* %p) {
; could undo the retain.
; CHECK: define i8* @test11(i8* %p)
-; CHECK: tail call i8* @objc_retain(i8* %p)
+; CHECK: tail call i8* @llvm.objc.retain(i8* %p)
; CHECK-NEXT: call void @use_pointer(i8* %p)
-; CHECK: call i8* @objc_autorelease(i8* %p)
+; CHECK: call i8* @llvm.objc.autorelease(i8* %p)
; CHECK-NEXT: ret i8* %p
define i8* @test11(i8* %p) {
- %1 = call i8* @objc_retain(i8* %p)
+ %1 = call i8* @llvm.objc.retain(i8* %p)
call void @use_pointer(i8* %p)
- %2 = call i8* @objc_autorelease(i8* %p)
+ %2 = call i8* @llvm.objc.autorelease(i8* %p)
ret i8* %p
}
; Don't spoil the RV optimization.
; CHECK: define i8* @test12(i8* %p)
-; CHECK: tail call i8* @objc_retain(i8* %p)
+; CHECK: tail call i8* @llvm.objc.retain(i8* %p)
; CHECK: call void @use_pointer(i8* %p)
-; CHECK: tail call i8* @objc_autoreleaseReturnValue(i8* %p)
+; CHECK: tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %p)
; CHECK: ret i8* %p
define i8* @test12(i8* %p) {
- %1 = call i8* @objc_retain(i8* %p)
+ %1 = call i8* @llvm.objc.retain(i8* %p)
call void @use_pointer(i8* %p)
- %2 = call i8* @objc_autoreleaseReturnValue(i8* %p)
+ %2 = call i8* @llvm.objc.autoreleaseReturnValue(i8* %p)
ret i8* %p
}
; Don't zap the objc_retainAutoreleasedReturnValue.
; CHECK-LABEL: define i8* @test13(
-; CHECK: tail call i8* @objc_retainAutoreleasedReturnValue(i8* %p)
-; CHECK: call i8* @objc_autorelease(i8* %p)
+; CHECK: tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %p)
+; CHECK: call i8* @llvm.objc.autorelease(i8* %p)
; CHECK: ret i8* %p
define i8* @test13() {
%p = call i8* @returner()
- %1 = call i8* @objc_retainAutoreleasedReturnValue(i8* %p)
+ %1 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %p)
call void @callee()
- %2 = call i8* @objc_autorelease(i8* %p)
+ %2 = call i8* @llvm.objc.autorelease(i8* %p)
ret i8* %p
}
@@ -204,10 +204,10 @@ define i8* @test13() {
; argument is not a return value.
; CHECK-LABEL: define void @test14(
-; CHECK-NEXT: tail call i8* @objc_retain(i8* %p) [[NUW]]
+; CHECK-NEXT: tail call i8* @llvm.objc.retain(i8* %p) [[NUW]]
; CHECK-NEXT: ret void
define void @test14(i8* %p) {
- call i8* @objc_retainAutoreleasedReturnValue(i8* %p)
+ call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %p)
ret void
}
@@ -216,11 +216,11 @@ define void @test14(i8* %p) {
; CHECK-LABEL: define void @test15(
; CHECK-NEXT: %y = call i8* @returner()
-; CHECK-NEXT: tail call i8* @objc_retainAutoreleasedReturnValue(i8* %y) [[NUW]]
+; CHECK-NEXT: tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %y) [[NUW]]
; CHECK-NEXT: ret void
define void @test15() {
%y = call i8* @returner()
- call i8* @objc_retainAutoreleasedReturnValue(i8* %y)
+ call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %y)
ret void
}
@@ -229,54 +229,54 @@ define void @test15() {
; CHECK: define i8* @test19(i8* %p) {
; CHECK-NEXT: ret i8* %p
define i8* @test19(i8* %p) {
- call i8* @objc_autoreleaseReturnValue(i8* %p)
- call i8* @objc_retainAutoreleasedReturnValue(i8* %p)
+ call i8* @llvm.objc.autoreleaseReturnValue(i8* %p)
+ call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %p)
ret i8* %p
}
; Like test19 but with plain autorelease.
; CHECK: define i8* @test20(i8* %p) {
-; CHECK-NEXT: call i8* @objc_autorelease(i8* %p)
-; CHECK-NEXT: call i8* @objc_retain(i8* %p)
+; CHECK-NEXT: call i8* @llvm.objc.autorelease(i8* %p)
+; CHECK-NEXT: call i8* @llvm.objc.retain(i8* %p)
; CHECK-NEXT: ret i8* %p
define i8* @test20(i8* %p) {
- call i8* @objc_autorelease(i8* %p)
- call i8* @objc_retainAutoreleasedReturnValue(i8* %p)
+ call i8* @llvm.objc.autorelease(i8* %p)
+ call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %p)
ret i8* %p
}
; Like test19 but with plain retain.
; CHECK: define i8* @test21(i8* %p) {
-; CHECK-NEXT: call i8* @objc_autoreleaseReturnValue(i8* %p)
-; CHECK-NEXT: call i8* @objc_retain(i8* %p)
+; CHECK-NEXT: call i8* @llvm.objc.autoreleaseReturnValue(i8* %p)
+; CHECK-NEXT: call i8* @llvm.objc.retain(i8* %p)
; CHECK-NEXT: ret i8* %p
define i8* @test21(i8* %p) {
- call i8* @objc_autoreleaseReturnValue(i8* %p)
- call i8* @objc_retain(i8* %p)
+ call i8* @llvm.objc.autoreleaseReturnValue(i8* %p)
+ call i8* @llvm.objc.retain(i8* %p)
ret i8* %p
}
; Like test19 but with plain retain and autorelease.
; CHECK: define i8* @test22(i8* %p) {
-; CHECK-NEXT: call i8* @objc_autorelease(i8* %p)
-; CHECK-NEXT: call i8* @objc_retain(i8* %p)
+; CHECK-NEXT: call i8* @llvm.objc.autorelease(i8* %p)
+; CHECK-NEXT: call i8* @llvm.objc.retain(i8* %p)
; CHECK-NEXT: ret i8* %p
define i8* @test22(i8* %p) {
- call i8* @objc_autorelease(i8* %p)
- call i8* @objc_retain(i8* %p)
+ call i8* @llvm.objc.autorelease(i8* %p)
+ call i8* @llvm.objc.retain(i8* %p)
ret i8* %p
}
; Convert autoreleaseRV to autorelease.
; CHECK-LABEL: define void @test23(
-; CHECK: call i8* @objc_autorelease(i8* %p) [[NUW]]
+; CHECK: call i8* @llvm.objc.autorelease(i8* %p) [[NUW]]
define void @test23(i8* %p) {
store i8 0, i8* %p
- call i8* @objc_autoreleaseReturnValue(i8* %p)
+ call i8* @llvm.objc.autoreleaseReturnValue(i8* %p)
ret void
}
@@ -284,9 +284,9 @@ define void @test23(i8* %p) {
; even through a bitcast.
; CHECK-LABEL: define {}* @test24(
-; CHECK: tail call i8* @objc_autoreleaseReturnValue(i8* %p)
+; CHECK: tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %p)
define {}* @test24(i8* %p) {
- %t = call i8* @objc_autoreleaseReturnValue(i8* %p)
+ %t = call i8* @llvm.objc.autoreleaseReturnValue(i8* %p)
%s = bitcast i8* %p to {}*
ret {}* %s
}
@@ -301,16 +301,16 @@ declare void @somecall_test25();
; CHECK-LABEL: define void @test25(
; CHECK: %[[CALL1:.*]] = call i8* @second_test25(
-; CHECK-NEXT: tail call i8* @objc_retainAutoreleasedReturnValue(i8* %[[CALL1]])
+; CHECK-NEXT: tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %[[CALL1]])
define void @test25() {
%first = call i8* @first_test25()
- %v0 = call i8* @objc_retain(i8* %first)
+ %v0 = call i8* @llvm.objc.retain(i8* %first)
call void @somecall_test25()
%second = call i8* @second_test25(i8* %first)
- %call2 = call i8* @objc_retainAutoreleasedReturnValue(i8* %second)
- call void @objc_release(i8* %second), !clang.imprecise_release !0
- call void @objc_release(i8* %first), !clang.imprecise_release !0
+ %call2 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %second)
+ call void @llvm.objc.release(i8* %second), !clang.imprecise_release !0
+ call void @llvm.objc.release(i8* %first), !clang.imprecise_release !0
ret void
}
@@ -324,10 +324,10 @@ define void @test25() {
define i8* @test26() {
bb0:
%v0 = call i8* @returner()
- %v1 = tail call i8* @objc_retain(i8* %v0)
+ %v1 = tail call i8* @llvm.objc.retain(i8* %v0)
br label %bb1
bb1:
- %v2 = tail call i8* @objc_autoreleaseReturnValue(i8* %v1)
+ %v2 = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %v1)
br label %bb2
bb2:
ret i8* %v2
@@ -336,14 +336,14 @@ bb2:
declare i32* @func27(i32);
; Check that ObjCARCOpt::OptimizeAutoreleaseRVCall doesn't turn a call to
-; @objc_autoreleaseReturnValue into a call to @objc_autorelease when a return
-; instruction uses a value equivalent to @objc_autoreleaseReturnValue's operand.
+; @llvm.objc.autoreleaseReturnValue into a call to @llvm.objc.autorelease when a return
+; instruction uses a value equivalent to @llvm.objc.autoreleaseReturnValue's operand.
; In the code below, %phival and %retval are considered equivalent.
; CHECK-LABEL: define i32* @test27(
; CHECK: %[[PHIVAL:.*]] = phi i8* [ %{{.*}}, %bb1 ], [ %{{.*}}, %bb2 ]
; CHECK: %[[RETVAL:.*]] = phi i32* [ %{{.*}}, %bb1 ], [ %{{.*}}, %bb2 ]
-; CHECK: tail call i8* @objc_autoreleaseReturnValue(i8* %[[PHIVAL]])
+; CHECK: tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %[[PHIVAL]])
; CHECK: ret i32* %[[RETVAL]]
define i32* @test27(i1 %cond) {
@@ -360,7 +360,7 @@ bb2:
bb3:
%phival = phi i8* [ %v1, %bb1 ], [ %v3, %bb2 ]
%retval = phi i32* [ %v0, %bb1 ], [ %v2, %bb2 ]
- %v4 = tail call i8* @objc_autoreleaseReturnValue(i8* %phival)
+ %v4 = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %phival)
ret i32* %retval
}
Modified: llvm/trunk/test/Transforms/ObjCARC/split-backedge.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/split-backedge.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/split-backedge.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/split-backedge.ll Tue Dec 18 12:32:49 2018
@@ -4,12 +4,12 @@
; rdar://11256239
; CHECK-LABEL: define void @test0(
-; CHECK: call i8* @objc_retain(i8* %call) [[NUW:#[0-9]+]]
-; CHECK: call i8* @objc_retain(i8* %call) [[NUW]]
-; CHECK: call i8* @objc_retain(i8* %cond) [[NUW]]
-; CHECK: call void @objc_release(i8* %call) [[NUW]]
-; CHECK: call void @objc_release(i8* %call) [[NUW]]
-; CHECK: call void @objc_release(i8* %cond) [[NUW]]
+; CHECK: call i8* @llvm.objc.retain(i8* %call) [[NUW:#[0-9]+]]
+; CHECK: call i8* @llvm.objc.retain(i8* %call) [[NUW]]
+; CHECK: call i8* @llvm.objc.retain(i8* %cond) [[NUW]]
+; CHECK: call void @llvm.objc.release(i8* %call) [[NUW]]
+; CHECK: call void @llvm.objc.release(i8* %call) [[NUW]]
+; CHECK: call void @llvm.objc.release(i8* %cond) [[NUW]]
define void @test0() personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) {
entry:
br label %while.body
@@ -19,18 +19,18 @@ while.body:
to label %invoke.cont unwind label %lpad, !clang.arc.no_objc_arc_exceptions !0
invoke.cont: ; preds = %while.body
- %t0 = call i8* @objc_retain(i8* %call) nounwind
- %t1 = call i8* @objc_retain(i8* %call) nounwind
+ %t0 = call i8* @llvm.objc.retain(i8* %call) nounwind
+ %t1 = call i8* @llvm.objc.retain(i8* %call) nounwind
%call.i1 = invoke i8* @returner()
to label %invoke.cont1 unwind label %lpad
invoke.cont1: ; preds = %invoke.cont
%cond = select i1 undef, i8* null, i8* %call
- %t2 = call i8* @objc_retain(i8* %cond) nounwind
- call void @objc_release(i8* %call) nounwind
- call void @objc_release(i8* %call) nounwind
+ %t2 = call i8* @llvm.objc.retain(i8* %cond) nounwind
+ call void @llvm.objc.release(i8* %call) nounwind
+ call void @llvm.objc.release(i8* %call) nounwind
call void @use_pointer(i8* %cond)
- call void @objc_release(i8* %cond) nounwind
+ call void @llvm.objc.release(i8* %cond) nounwind
br label %while.body
lpad: ; preds = %invoke.cont, %while.body
@@ -41,8 +41,8 @@ lpad:
declare i8* @returner()
declare i32 @__objc_personality_v0(...)
-declare void @objc_release(i8*)
-declare i8* @objc_retain(i8*)
+declare void @llvm.objc.release(i8*)
+declare i8* @llvm.objc.retain(i8*)
declare void @use_pointer(i8*)
!0 = !{}
Modified: llvm/trunk/test/Transforms/ObjCARC/tail-call-invariant-enforcement.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/tail-call-invariant-enforcement.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/tail-call-invariant-enforcement.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/tail-call-invariant-enforcement.ll Tue Dec 18 12:32:49 2018
@@ -1,23 +1,23 @@
; RUN: opt -objc-arc -S < %s | FileCheck %s
-declare void @objc_release(i8* %x)
-declare i8* @objc_retain(i8* %x)
-declare i8* @objc_autorelease(i8* %x)
-declare i8* @objc_autoreleaseReturnValue(i8* %x)
-declare i8* @objc_retainAutoreleasedReturnValue(i8* %x)
-declare i8* @objc_unsafeClaimAutoreleasedReturnValue(i8* %x)
+declare void @llvm.objc.release(i8* %x)
+declare i8* @llvm.objc.retain(i8* %x)
+declare i8* @llvm.objc.autorelease(i8* %x)
+declare i8* @llvm.objc.autoreleaseReturnValue(i8* %x)
+declare i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %x)
+declare i8* @llvm.objc.unsafeClaimAutoreleasedReturnValue(i8* %x)
declare i8* @tmp(i8*)
; Never tail call objc_autorelease.
; CHECK: define i8* @test0(i8* %x) [[NUW:#[0-9]+]] {
-; CHECK: %tmp0 = call i8* @objc_autorelease(i8* %x) [[NUW]]
-; CHECK: %tmp1 = call i8* @objc_autorelease(i8* %x) [[NUW]]
+; CHECK: %tmp0 = call i8* @llvm.objc.autorelease(i8* %x) [[NUW]]
+; CHECK: %tmp1 = call i8* @llvm.objc.autorelease(i8* %x) [[NUW]]
; CHECK: }
define i8* @test0(i8* %x) nounwind {
entry:
- %tmp0 = call i8* @objc_autorelease(i8* %x)
- %tmp1 = tail call i8* @objc_autorelease(i8* %x)
+ %tmp0 = call i8* @llvm.objc.autorelease(i8* %x)
+ %tmp1 = tail call i8* @llvm.objc.autorelease(i8* %x)
ret i8* %x
}
@@ -25,78 +25,78 @@ entry:
; Always tail call autoreleaseReturnValue.
; CHECK: define i8* @test1(i8* %x) [[NUW]] {
-; CHECK: %tmp0 = tail call i8* @objc_autoreleaseReturnValue(i8* %x) [[NUW]]
-; CHECK: %tmp1 = tail call i8* @objc_autoreleaseReturnValue(i8* %x) [[NUW]]
+; CHECK: %tmp0 = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %x) [[NUW]]
+; CHECK: %tmp1 = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %x) [[NUW]]
; CHECK: }
define i8* @test1(i8* %x) nounwind {
entry:
- %tmp0 = call i8* @objc_autoreleaseReturnValue(i8* %x)
- %tmp1 = tail call i8* @objc_autoreleaseReturnValue(i8* %x)
+ %tmp0 = call i8* @llvm.objc.autoreleaseReturnValue(i8* %x)
+ %tmp1 = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %x)
ret i8* %x
}
; Always tail call objc_retain.
; CHECK: define i8* @test2(i8* %x) [[NUW]] {
-; CHECK: %tmp0 = tail call i8* @objc_retain(i8* %x) [[NUW]]
-; CHECK: %tmp1 = tail call i8* @objc_retain(i8* %x) [[NUW]]
+; CHECK: %tmp0 = tail call i8* @llvm.objc.retain(i8* %x) [[NUW]]
+; CHECK: %tmp1 = tail call i8* @llvm.objc.retain(i8* %x) [[NUW]]
; CHECK: }
define i8* @test2(i8* %x) nounwind {
entry:
- %tmp0 = call i8* @objc_retain(i8* %x)
- %tmp1 = tail call i8* @objc_retain(i8* %x)
+ %tmp0 = call i8* @llvm.objc.retain(i8* %x)
+ %tmp1 = tail call i8* @llvm.objc.retain(i8* %x)
ret i8* %x
}
; Always tail call objc_retainAutoreleasedReturnValue.
; CHECK: define i8* @test3(i8* %x) [[NUW]] {
-; CHECK: %tmp0 = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %y) [[NUW]]
-; CHECK: %tmp1 = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %z) [[NUW]]
+; CHECK: %tmp0 = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %y) [[NUW]]
+; CHECK: %tmp1 = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %z) [[NUW]]
; CHECK: }
define i8* @test3(i8* %x) nounwind {
entry:
%y = call i8* @tmp(i8* %x)
- %tmp0 = call i8* @objc_retainAutoreleasedReturnValue(i8* %y)
+ %tmp0 = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %y)
%z = call i8* @tmp(i8* %x)
- %tmp1 = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %z)
+ %tmp1 = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %z)
ret i8* %x
}
; By itself, we should never change whether or not objc_release is tail called.
; CHECK: define void @test4(i8* %x) [[NUW]] {
-; CHECK: call void @objc_release(i8* %x) [[NUW]]
-; CHECK: tail call void @objc_release(i8* %x) [[NUW]]
+; CHECK: call void @llvm.objc.release(i8* %x) [[NUW]]
+; CHECK: tail call void @llvm.objc.release(i8* %x) [[NUW]]
; CHECK: }
define void @test4(i8* %x) nounwind {
entry:
- call void @objc_release(i8* %x)
- tail call void @objc_release(i8* %x)
+ call void @llvm.objc.release(i8* %x)
+ tail call void @llvm.objc.release(i8* %x)
ret void
}
-; If we convert a tail called @objc_autoreleaseReturnValue to an
-; @objc_autorelease, ensure that the tail call is removed.
+; If we convert a tail called @llvm.objc.autoreleaseReturnValue to an
+; @llvm.objc.autorelease, ensure that the tail call is removed.
; CHECK: define i8* @test5(i8* %x) [[NUW]] {
-; CHECK: %tmp0 = call i8* @objc_autorelease(i8* %x) [[NUW]]
+; CHECK: %tmp0 = call i8* @llvm.objc.autorelease(i8* %x) [[NUW]]
; CHECK: }
define i8* @test5(i8* %x) nounwind {
entry:
- %tmp0 = tail call i8* @objc_autoreleaseReturnValue(i8* %x)
+ %tmp0 = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %x)
ret i8* %tmp0
}
-; Always tail call objc_unsafeClaimAutoreleasedReturnValue.
+; Always tail call llvm.objc.unsafeClaimAutoreleasedReturnValue.
; CHECK: define i8* @test6(i8* %x) [[NUW]] {
-; CHECK: %tmp0 = tail call i8* @objc_unsafeClaimAutoreleasedReturnValue(i8* %y) [[NUW]]
-; CHECK: %tmp1 = tail call i8* @objc_unsafeClaimAutoreleasedReturnValue(i8* %z) [[NUW]]
+; CHECK: %tmp0 = tail call i8* @llvm.objc.unsafeClaimAutoreleasedReturnValue(i8* %y) [[NUW]]
+; CHECK: %tmp1 = tail call i8* @llvm.objc.unsafeClaimAutoreleasedReturnValue(i8* %z) [[NUW]]
; CHECK: }
define i8* @test6(i8* %x) nounwind {
entry:
%y = call i8* @tmp(i8* %x)
- %tmp0 = call i8* @objc_unsafeClaimAutoreleasedReturnValue(i8* %y)
+ %tmp0 = call i8* @llvm.objc.unsafeClaimAutoreleasedReturnValue(i8* %y)
%z = call i8* @tmp(i8* %x)
- %tmp1 = tail call i8* @objc_unsafeClaimAutoreleasedReturnValue(i8* %z)
+ %tmp1 = tail call i8* @llvm.objc.unsafeClaimAutoreleasedReturnValue(i8* %z)
ret i8* %x
}
Modified: llvm/trunk/test/Transforms/ObjCARC/unsafe-claim-rv.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/unsafe-claim-rv.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/unsafe-claim-rv.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/unsafe-claim-rv.ll Tue Dec 18 12:32:49 2018
@@ -15,33 +15,33 @@
;
; And then hand-reduced further.
-declare i8* @objc_autoreleaseReturnValue(i8*)
-declare i8* @objc_unsafeClaimAutoreleasedReturnValue(i8*)
-declare i8* @objc_retain(i8*)
-declare void @objc_release(i8*)
+declare i8* @llvm.objc.autoreleaseReturnValue(i8*)
+declare i8* @llvm.objc.unsafeClaimAutoreleasedReturnValue(i8*)
+declare i8* @llvm.objc.retain(i8*)
+declare void @llvm.objc.release(i8*)
define void @foo(i8* %X) {
entry:
- %0 = tail call i8* @objc_retain(i8* %X)
+ %0 = tail call i8* @llvm.objc.retain(i8* %X)
%tobool = icmp eq i8* %0, null
br i1 %tobool, label %if.end, label %if.then
if.then: ; preds = %entry
- %1 = tail call i8* @objc_retain(i8* nonnull %0)
+ %1 = tail call i8* @llvm.objc.retain(i8* nonnull %0)
br label %if.end
if.end: ; preds = %if.then, %entry
%Y.0 = phi i8* [ %1, %if.then ], [ null, %entry ]
- %2 = tail call i8* @objc_autoreleaseReturnValue(i8* %Y.0)
- %3 = tail call i8* @objc_unsafeClaimAutoreleasedReturnValue(i8* %2)
- tail call void @objc_release(i8* %0)
+ %2 = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* %Y.0)
+ %3 = tail call i8* @llvm.objc.unsafeClaimAutoreleasedReturnValue(i8* %2)
+ tail call void @llvm.objc.release(i8* %0)
ret void
}
; CHECK: if.then
-; CHECK: tail call i8* @objc_retain
-; CHECK-NEXT: call i8* @objc_autorelease
+; CHECK: tail call i8* @llvm.objc.retain
+; CHECK-NEXT: call i8* @llvm.objc.autorelease
; CHECK: %Y.0 = phi
-; CHECK-NEXT: tail call i8* @objc_unsafeClaimAutoreleasedReturnValue(i8* %Y.0)
-; CHECK-NEXT: tail call void @objc_release
+; CHECK-NEXT: tail call i8* @llvm.objc.unsafeClaimAutoreleasedReturnValue(i8* %Y.0)
+; CHECK-NEXT: tail call void @llvm.objc.release
Modified: llvm/trunk/test/Transforms/ObjCARC/weak-contract.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/weak-contract.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/weak-contract.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/weak-contract.ll Tue Dec 18 12:32:49 2018
@@ -1,6 +1,6 @@
; RUN: opt -objc-arc-contract -S < %s | FileCheck %s
-declare i8* @objc_initWeak(i8**, i8*)
+declare i8* @llvm.objc.initWeak(i8**, i8*)
; Convert objc_initWeak(p, null) to *p = null.
@@ -9,6 +9,6 @@ declare i8* @objc_initWeak(i8**, i8*)
; CHECK-NEXT: ret i8* null
; CHECK-NEXT: }
define i8* @test0(i8** %p) {
- %t = call i8* @objc_initWeak(i8** %p, i8* null)
+ %t = call i8* @llvm.objc.initWeak(i8** %p, i8* null)
ret i8* %t
}
Modified: llvm/trunk/test/Transforms/ObjCARC/weak-copies.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/weak-copies.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/weak-copies.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/weak-copies.ll Tue Dec 18 12:32:49 2018
@@ -27,13 +27,13 @@ entry:
%w = alloca i8*, align 8
%x = alloca i8*, align 8
%call = call i8* @bar()
- %0 = call i8* @objc_initWeak(i8** %w, i8* %call) nounwind
- %1 = call i8* @objc_loadWeak(i8** %w) nounwind
- %2 = call i8* @objc_initWeak(i8** %x, i8* %1) nounwind
- %3 = call i8* @objc_loadWeak(i8** %x) nounwind
+ %0 = call i8* @llvm.objc.initWeak(i8** %w, i8* %call) nounwind
+ %1 = call i8* @llvm.objc.loadWeak(i8** %w) nounwind
+ %2 = call i8* @llvm.objc.initWeak(i8** %x, i8* %1) nounwind
+ %3 = call i8* @llvm.objc.loadWeak(i8** %x) nounwind
call void @use(i8* %3) nounwind
- call void @objc_destroyWeak(i8** %x) nounwind
- call void @objc_destroyWeak(i8** %w) nounwind
+ call void @llvm.objc.destroyWeak(i8** %x) nounwind
+ call void @llvm.objc.destroyWeak(i8** %w) nounwind
ret void
}
@@ -48,8 +48,8 @@ define void @qux(i8* %me) nounwind {
entry:
%w = alloca i8*, align 8
%block = alloca %1, align 8
- %0 = call i8* @objc_retain(i8* %me) nounwind
- %1 = call i8* @objc_initWeak(i8** %w, i8* %0) nounwind
+ %0 = call i8* @llvm.objc.retain(i8* %me) nounwind
+ %1 = call i8* @llvm.objc.initWeak(i8** %w, i8* %0) nounwind
%block.isa = getelementptr inbounds %1, %1* %block, i64 0, i32 0
store i8* bitcast (i8** @_NSConcreteStackBlock to i8*), i8** %block.isa, align 8
%block.flags = getelementptr inbounds %1, %1* %block, i64 0, i32 1
@@ -61,28 +61,28 @@ entry:
%block.descriptor = getelementptr inbounds %1, %1* %block, i64 0, i32 4
store %struct.__block_descriptor* bitcast (%0* @__block_descriptor_tmp to %struct.__block_descriptor*), %struct.__block_descriptor** %block.descriptor, align 8
%block.captured = getelementptr inbounds %1, %1* %block, i64 0, i32 5
- %2 = call i8* @objc_loadWeak(i8** %w) nounwind
- %3 = call i8* @objc_initWeak(i8** %block.captured, i8* %2) nounwind
+ %2 = call i8* @llvm.objc.loadWeak(i8** %w) nounwind
+ %3 = call i8* @llvm.objc.initWeak(i8** %block.captured, i8* %2) nounwind
%4 = bitcast %1* %block to void ()*
call void @use_block(void ()* %4) nounwind
- call void @objc_destroyWeak(i8** %block.captured) nounwind
- call void @objc_destroyWeak(i8** %w) nounwind
- call void @objc_release(i8* %0) nounwind, !clang.imprecise_release !0
+ call void @llvm.objc.destroyWeak(i8** %block.captured) nounwind
+ call void @llvm.objc.destroyWeak(i8** %w) nounwind
+ call void @llvm.objc.release(i8* %0) nounwind, !clang.imprecise_release !0
ret void
}
-declare i8* @objc_retain(i8*)
+declare i8* @llvm.objc.retain(i8*)
declare void @use_block(void ()*) nounwind
declare void @__qux_block_invoke_0(i8* %.block_descriptor) nounwind
declare void @__copy_helper_block_(i8*, i8*) nounwind
-declare void @objc_copyWeak(i8**, i8**)
+declare void @llvm.objc.copyWeak(i8**, i8**)
declare void @__destroy_helper_block_(i8*) nounwind
-declare void @objc_release(i8*)
+declare void @llvm.objc.release(i8*)
declare i8* @bar()
-declare i8* @objc_initWeak(i8**, i8*)
-declare i8* @objc_loadWeak(i8**)
+declare i8* @llvm.objc.initWeak(i8**, i8*)
+declare i8* @llvm.objc.loadWeak(i8**)
declare void @use(i8*) nounwind
-declare void @objc_destroyWeak(i8**)
+declare void @llvm.objc.destroyWeak(i8**)
; CHECK: attributes [[NUW]] = { nounwind }
Modified: llvm/trunk/test/Transforms/ObjCARC/weak-dce.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/weak-dce.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/weak-dce.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/weak-dce.ll Tue Dec 18 12:32:49 2018
@@ -4,43 +4,43 @@
; Delete the weak calls and replace them with just the net retain.
; CHECK: define void @test0(i8* %p) {
-; CHECK-NEXT: call i8* @objc_retain(i8* %p)
+; CHECK-NEXT: call i8* @llvm.objc.retain(i8* %p)
; CHECK-NEXT: ret void
define void @test0(i8* %p) {
%weakBlock = alloca i8*, align 8
- %tmp7 = call i8* @objc_initWeak(i8** %weakBlock, i8* %p) nounwind
- %tmp26 = call i8* @objc_loadWeakRetained(i8** %weakBlock) nounwind
- call void @objc_destroyWeak(i8** %weakBlock) nounwind
+ %tmp7 = call i8* @llvm.objc.initWeak(i8** %weakBlock, i8* %p) nounwind
+ %tmp26 = call i8* @llvm.objc.loadWeakRetained(i8** %weakBlock) nounwind
+ call void @llvm.objc.destroyWeak(i8** %weakBlock) nounwind
ret void
}
; CHECK: define i8* @test1(i8* %p) {
-; CHECK-NEXT: call i8* @objc_retain(i8* %p)
+; CHECK-NEXT: call i8* @llvm.objc.retain(i8* %p)
; CHECK-NEXT: ret i8* %p
define i8* @test1(i8* %p) {
%weakBlock = alloca i8*, align 8
- %tmp7 = call i8* @objc_initWeak(i8** %weakBlock, i8* %p) nounwind
- %tmp26 = call i8* @objc_loadWeakRetained(i8** %weakBlock) nounwind
- call void @objc_destroyWeak(i8** %weakBlock) nounwind
+ %tmp7 = call i8* @llvm.objc.initWeak(i8** %weakBlock, i8* %p) nounwind
+ %tmp26 = call i8* @llvm.objc.loadWeakRetained(i8** %weakBlock) nounwind
+ call void @llvm.objc.destroyWeak(i8** %weakBlock) nounwind
ret i8* %tmp26
}
; CHECK: define i8* @test2(i8* %p, i8* %q) {
-; CHECK-NEXT: call i8* @objc_retain(i8* %q)
+; CHECK-NEXT: call i8* @llvm.objc.retain(i8* %q)
; CHECK-NEXT: ret i8* %q
define i8* @test2(i8* %p, i8* %q) {
%weakBlock = alloca i8*, align 8
- %tmp7 = call i8* @objc_initWeak(i8** %weakBlock, i8* %p) nounwind
- %tmp19 = call i8* @objc_storeWeak(i8** %weakBlock, i8* %q) nounwind
- %tmp26 = call i8* @objc_loadWeakRetained(i8** %weakBlock) nounwind
- call void @objc_destroyWeak(i8** %weakBlock) nounwind
+ %tmp7 = call i8* @llvm.objc.initWeak(i8** %weakBlock, i8* %p) nounwind
+ %tmp19 = call i8* @llvm.objc.storeWeak(i8** %weakBlock, i8* %q) nounwind
+ %tmp26 = call i8* @llvm.objc.loadWeakRetained(i8** %weakBlock) nounwind
+ call void @llvm.objc.destroyWeak(i8** %weakBlock) nounwind
ret i8* %tmp26
}
-declare i8* @objc_initWeak(i8**, i8*)
-declare void @objc_destroyWeak(i8**)
-declare i8* @objc_loadWeakRetained(i8**)
-declare i8* @objc_storeWeak(i8** %weakBlock, i8* %q)
+declare i8* @llvm.objc.initWeak(i8**, i8*)
+declare void @llvm.objc.destroyWeak(i8**)
+declare i8* @llvm.objc.loadWeakRetained(i8**)
+declare i8* @llvm.objc.storeWeak(i8** %weakBlock, i8* %q)
Modified: llvm/trunk/test/Transforms/ObjCARC/weak.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/weak.ll?rev=349534&r1=349533&r2=349534&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/weak.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/weak.ll Tue Dec 18 12:32:49 2018
@@ -1,12 +1,12 @@
; RUN: opt -objc-arc -S < %s | FileCheck %s
-declare i8* @objc_initWeak(i8**, i8*)
-declare i8* @objc_storeWeak(i8**, i8*)
-declare i8* @objc_loadWeak(i8**)
-declare void @objc_destroyWeak(i8**)
-declare i8* @objc_loadWeakRetained(i8**)
-declare void @objc_moveWeak(i8**, i8**)
-declare void @objc_copyWeak(i8**, i8**)
+declare i8* @llvm.objc.initWeak(i8**, i8*)
+declare i8* @llvm.objc.storeWeak(i8**, i8*)
+declare i8* @llvm.objc.loadWeak(i8**)
+declare void @llvm.objc.destroyWeak(i8**)
+declare i8* @llvm.objc.loadWeakRetained(i8**)
+declare void @llvm.objc.moveWeak(i8**, i8**)
+declare void @llvm.objc.copyWeak(i8**, i8**)
; If the pointer-to-weak-pointer is null, it's undefined behavior.
@@ -32,26 +32,26 @@ declare void @objc_copyWeak(i8**, i8**)
; CHECK: ret void
define void @test0(i8* %p, i8** %q) {
entry:
- call i8* @objc_storeWeak(i8** null, i8* %p)
- call i8* @objc_storeWeak(i8** undef, i8* %p)
- call i8* @objc_loadWeakRetained(i8** null)
- call i8* @objc_loadWeakRetained(i8** undef)
- call i8* @objc_loadWeak(i8** null)
- call i8* @objc_loadWeak(i8** undef)
- call i8* @objc_initWeak(i8** null, i8* %p)
- call i8* @objc_initWeak(i8** undef, i8* %p)
- call void @objc_destroyWeak(i8** null)
- call void @objc_destroyWeak(i8** undef)
-
- call void @objc_copyWeak(i8** null, i8** %q)
- call void @objc_copyWeak(i8** undef, i8** %q)
- call void @objc_copyWeak(i8** %q, i8** null)
- call void @objc_copyWeak(i8** %q, i8** undef)
-
- call void @objc_moveWeak(i8** null, i8** %q)
- call void @objc_moveWeak(i8** undef, i8** %q)
- call void @objc_moveWeak(i8** %q, i8** null)
- call void @objc_moveWeak(i8** %q, i8** undef)
+ call i8* @llvm.objc.storeWeak(i8** null, i8* %p)
+ call i8* @llvm.objc.storeWeak(i8** undef, i8* %p)
+ call i8* @llvm.objc.loadWeakRetained(i8** null)
+ call i8* @llvm.objc.loadWeakRetained(i8** undef)
+ call i8* @llvm.objc.loadWeak(i8** null)
+ call i8* @llvm.objc.loadWeak(i8** undef)
+ call i8* @llvm.objc.initWeak(i8** null, i8* %p)
+ call i8* @llvm.objc.initWeak(i8** undef, i8* %p)
+ call void @llvm.objc.destroyWeak(i8** null)
+ call void @llvm.objc.destroyWeak(i8** undef)
+
+ call void @llvm.objc.copyWeak(i8** null, i8** %q)
+ call void @llvm.objc.copyWeak(i8** undef, i8** %q)
+ call void @llvm.objc.copyWeak(i8** %q, i8** null)
+ call void @llvm.objc.copyWeak(i8** %q, i8** undef)
+
+ call void @llvm.objc.moveWeak(i8** null, i8** %q)
+ call void @llvm.objc.moveWeak(i8** undef, i8** %q)
+ call void @llvm.objc.moveWeak(i8** %q, i8** null)
+ call void @llvm.objc.moveWeak(i8** %q, i8** undef)
ret void
}
More information about the llvm-commits
mailing list