34 return OS <<
"ARCInstKind::Retain";
36 return OS <<
"ARCInstKind::RetainRV";
38 return OS <<
"ARCInstKind::ClaimRV";
40 return OS <<
"ARCInstKind::RetainBlock";
42 return OS <<
"ARCInstKind::Release";
44 return OS <<
"ARCInstKind::Autorelease";
46 return OS <<
"ARCInstKind::AutoreleaseRV";
48 return OS <<
"ARCInstKind::AutoreleasepoolPush";
50 return OS <<
"ARCInstKind::AutoreleasepoolPop";
52 return OS <<
"ARCInstKind::NoopCast";
54 return OS <<
"ARCInstKind::FusedRetainAutorelease";
56 return OS <<
"ARCInstKind::FusedRetainAutoreleaseRV";
58 return OS <<
"ARCInstKind::LoadWeakRetained";
60 return OS <<
"ARCInstKind::StoreWeak";
62 return OS <<
"ARCInstKind::InitWeak";
64 return OS <<
"ARCInstKind::LoadWeak";
66 return OS <<
"ARCInstKind::MoveWeak";
68 return OS <<
"ARCInstKind::CopyWeak";
70 return OS <<
"ARCInstKind::DestroyWeak";
72 return OS <<
"ARCInstKind::StoreStrong";
74 return OS <<
"ARCInstKind::CallOrUser";
76 return OS <<
"ARCInstKind::Call";
78 return OS <<
"ARCInstKind::User";
80 return OS <<
"ARCInstKind::IntrinsicUser";
82 return OS <<
"ARCInstKind::None";
222 switch (
I->getOpcode()) {
240 case Instruction::Invoke:
243 case Instruction::BitCast:
244 case Instruction::GetElementPtr:
246 case Instruction::PHI:
248 case Instruction::Br:
249 case Instruction::Switch:
250 case Instruction::IndirectBr:
251 case Instruction::Alloca:
252 case Instruction::VAArg:
254 case Instruction::FAdd:
255 case Instruction::Sub:
256 case Instruction::FSub:
257 case Instruction::Mul:
258 case Instruction::FMul:
259 case Instruction::SDiv:
260 case Instruction::UDiv:
261 case Instruction::FDiv:
262 case Instruction::SRem:
263 case Instruction::URem:
264 case Instruction::FRem:
265 case Instruction::Shl:
266 case Instruction::LShr:
267 case Instruction::AShr:
268 case Instruction::And:
269 case Instruction::Or:
270 case Instruction::Xor:
271 case Instruction::SExt:
272 case Instruction::ZExt:
273 case Instruction::Trunc:
274 case Instruction::IntToPtr:
275 case Instruction::FCmp:
276 case Instruction::FPTrunc:
277 case Instruction::FPExt:
278 case Instruction::FPToUI:
279 case Instruction::FPToSI:
280 case Instruction::UIToFP:
281 case Instruction::SIToFP:
282 case Instruction::InsertElement:
283 case Instruction::ExtractElement:
284 case Instruction::ShuffleVector:
285 case Instruction::ExtractValue:
287 case Instruction::ICmp:
ARCInstKind GetARCInstKind(const Value *V)
Map V to its ARCInstKind equivalence class.
objc_destroyWeak (derived)
bool IsUser(ARCInstKind Class)
Test if the given class is a kind of user.
This class represents lattice values for constants.
objc_loadWeakRetained (primitive)
could call objc_release and/or "use" pointers
This class represents a function call, abstracting a target machine's calling convention.
objc_retainedObject, etc.
bool IsNoopOnNull(ARCInstKind Class)
Test if the given class represents instructions which do nothing if passed a null pointer...
bool IsForwarding(ARCInstKind Class)
Test if the given class represents instructions which return their argument verbatim.
objc_autoreleaseReturnValue
A Use represents the edge between a Value definition and its users.
objc_retainAutoreleasedReturnValue
bool IsPotentialRetainableObjPtr(const Value *Op)
Test whether the given value is possible a retainable object pointer.
bool IsAlwaysTail(ARCInstKind Class)
Test if the given class represents instructions which are always safe to mark with the "tail" keyword...
raw_ostream & operator<<(raw_ostream &OS, const ARCInstKind Class)
ARCInstKind GetFunctionClass(const Function *F)
Determine if F is one of the special known Functions.
This file defines common analysis utilities used by the ObjC ARC Optimizer.
anything that is inert from an ARC perspective.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
bool CanDecrementRefCount(ARCInstKind Kind)
Returns false if conservatively we can prove that any instruction mapped to this kind can not decreme...
static bool isInertIntrinsic(unsigned ID)
ARCInstKind
Equivalence classes of instructions in the ARC Model.
bool IsNoThrow(ARCInstKind Class)
Test if the given class represents instructions which are always safe to mark with the nounwind attri...
objc_unsafeClaimAutoreleasedReturnValue
Intrinsic::ID getIntrinsicID() const LLVM_READONLY
getIntrinsicID - This method returns the ID number of the specified function, or Intrinsic::not_intri...
objc_storeStrong (derived)
bool IsRetain(ARCInstKind Class)
Test if the given class is objc_retain or equivalent.
static bool isUseOnlyIntrinsic(unsigned ID)
Function * getCalledFunction() const
Returns the function called, or null if this is an indirect function invocation.
objc_storeWeak (primitive)
ARCInstKind GetCallSiteClass(ImmutableCallSite CS)
Helper for GetARCInstKind.
objc_retainAutoreleaseReturnValue
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream...
bool CanInterruptRV(ARCInstKind Class)
Test whether the given instruction can autorelease any pointer or cause an autoreleasepool pop...
bool IsNeverTail(ARCInstKind Class)
Test if the given class represents instructions which are never safe to mark with the "tail" keyword...
bool IsAutorelease(ARCInstKind Class)
Test if the given class is objc_autorelease or equivalent.