37#define DEBUG_TYPE "objc-arc-expand"
53 LLVM_DEBUG(
dbgs() <<
"ObjCARCExpand: Visiting Function: " <<
F.getName()
60 case ARCInstKind::Retain:
61 case ARCInstKind::RetainRV:
62 case ARCInstKind::Autorelease:
63 case ARCInstKind::AutoreleaseRV:
64 case ARCInstKind::FusedRetainAutorelease:
65 case ARCInstKind::FusedRetainAutoreleaseRV: {
71 Value *
Value = cast<CallInst>(&Inst)->getArgOperand(0);
76 Inst.replaceAllUsesWith(
Value);
static bool runImpl(Function &F, const TargetLowering &TLI)
print must be executed print the must be executed context for all instructions
This file defines common analysis utilities used by the ObjC ARC Optimizer.
This header defines various interfaces for pass management in LLVM.
A container for analyses that lazily runs them and caches their results.
Represents analyses that only rely on functions' control flow.
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
void preserveSet()
Mark an analysis set as preserved.
LLVM Value Representation.
bool ModuleHasARC(const Module &M)
Test if the given module looks interesting to run ARC optimization on.
bool EnableARCOpts
A handy option to enable/disable all ARC Optimizations.
ARCInstKind GetBasicARCInstKind(const Value *V)
Determine which objc runtime call instruction class V belongs to.
This is an optimization pass for GlobalISel generic memory operations.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
PreservedAnalyses run(Function &M, FunctionAnalysisManager &AM)