Go to the documentation of this file.
40 #define DEBUG_TYPE "objc-arc-expand"
56 LLVM_DEBUG(
dbgs() <<
"ObjCARCExpand: Visiting Function: " <<
F.getName()
74 Value *
Value = cast<CallInst>(&Inst)->getArgOperand(0);
79 Inst.replaceAllUsesWith(
Value);
111 void ObjCARCExpand::getAnalysisUsage(
AnalysisUsage &AU)
const {
ARCInstKind GetBasicARCInstKind(const Value *V)
Determine which objc runtime call instruction class V belongs to.
A set of analyses that are preserved following a run of a transformation pass.
This is an optimization pass for GlobalISel generic memory operations.
@ Autorelease
objc_autorelease
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
Pass * createObjCARCExpandPass()
Represent the analysis usage information of a pass.
static bool runImpl(const TargetLibraryInfo &TLI, Function &F)
@ RetainRV
objc_retainAutoreleasedReturnValue
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
inst_range instructions(Function *F)
@ FusedRetainAutorelease
objc_retainAutorelease
INITIALIZE_PASS(ObjCARCExpand, "objc-arc-expand", "ObjC ARC expansion", false, false) Pass *llvm
bool EnableARCOpts
A handy option to enable/disable all ARC Optimizations.
PreservedAnalyses run(Function &M, FunctionAnalysisManager &AM)
void setPreservesCFG()
This function should be called by the pass, iff they do not:
void initializeObjCARCExpandPass(PassRegistry &)
Represents analyses that only rely on functions' control flow.
static bool runOnFunction(Function &F, bool PostInlining)
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
@ FusedRetainAutoreleaseRV
objc_retainAutoreleaseReturnValue
bool ModuleHasARC(const Module &M)
Test if the given module looks interesting to run ARC optimization on.
Pass interface - Implemented by all 'passes'.
void preserveSet()
Mark an analysis set as preserved.
A container for analyses that lazily runs them and caches their results.
FunctionPass class - This class is used to implement most global optimizations.
LLVM Value Representation.
@ AutoreleaseRV
objc_autoreleaseReturnValue