LLVM  14.0.0git
Macros | Functions
DependencyAnalysis.cpp File Reference
#include "DependencyAnalysis.h"
#include "ObjCARC.h"
#include "ProvenanceAnalysis.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/IR/CFG.h"
Include dependency graph for DependencyAnalysis.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "objc-arc-dependency"
 

Functions

static bool findDependencies (DependenceKind Flavor, const Value *Arg, BasicBlock *StartBB, Instruction *StartInst, SmallPtrSetImpl< Instruction * > &DependingInsts, ProvenanceAnalysis &PA)
 Walk up the CFG from StartPos (which is in StartBB) and find local and non-local dependencies on Arg. More...
 

Detailed Description

This file defines special dependency analysis routines used in Objective C ARC Optimizations.

WARNING: This file knows about certain library functions. It recognizes them by name, and hardwires knowledge of their semantics.

WARNING: This file knows about how certain Objective-C library functions are used. Naive LLVM IR transformations which would otherwise be behavior-preserving may break these assumptions.

Definition in file DependencyAnalysis.cpp.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "objc-arc-dependency"

Definition at line 31 of file DependencyAnalysis.cpp.

Function Documentation

◆ findDependencies()

static bool findDependencies ( DependenceKind  Flavor,
const Value Arg,
BasicBlock StartBB,
Instruction StartInst,
SmallPtrSetImpl< Instruction * > &  DependingInsts,
ProvenanceAnalysis PA 
)
static

Walk up the CFG from StartPos (which is in StartBB) and find local and non-local dependencies on Arg.

TODO: Cache results?

Definition at line 209 of file DependencyAnalysis.cpp.

References Arg, BB, llvm::BasicBlock::begin(), llvm::objcarc::Depends(), llvm::BasicBlock::end(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::SmallVectorImpl< T >::pop_back_val(), and llvm::successors().

Referenced by llvm::objcarc::findSingleDependency().