LLVM: lib/Analysis/ObjCARCAliasAnalysis.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

34

35#define DEBUG_TYPE "objc-arc-aa"

36

37using namespace llvm;

39

45

46

47

54 return Result;

55

56

57

60 if (UA != SA || UB != SB) {

63 nullptr);

64

65

68 }

69

70

71

73}

74

77 bool IgnoreLocals) {

80

81

82

87

88

89

91 if (U != S)

93 AAQI, IgnoreLocals);

94

95

96

98}

99

103

107 default:

108 break;

109 }

110

112}

113

119

129

130

131

133 default:

134 break;

135 }

136

138}

139

141

This file declares a simple ARC-aware AliasAnalysis using special knowledge of Objective C to enhance...

This file defines common analysis utilities used by the ObjC ARC Optimizer.

This class stores info we want to provide to or retain within an alias query.

MemoryEffects getMemoryEffects(const CallBase *Call, AAQueryInfo &AAQI)

ModRefInfo getModRefInfoMask(const MemoryLocation &Loc, AAQueryInfo &AAQI, bool IgnoreLocals)

ModRefInfo getModRefInfo(const CallBase *Call, const MemoryLocation &Loc, AAQueryInfo &AAQI)

AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB, AAQueryInfo &AAQI, const Instruction *I)

The possible results of an alias query.

@ MayAlias

The two locations may or may not alias.

@ NoAlias

The two locations do not alias at all.

Base class for all callable instructions (InvokeInst and CallInst) Holds everything related to callin...

static MemoryEffectsBase none()

Representation for a specific memory location.

LocationSize Size

The maximum size of the location, in address-units, or UnknownSize if the size is not known.

static MemoryLocation getBeforeOrAfter(const Value *Ptr, const AAMDNodes &AATags=AAMDNodes())

Return a location that may access any location before or after Ptr, while remaining within the underl...

AAMDNodes AATags

The metadata nodes which describes the aliasing of the location (each member is null if that kind of ...

const Value * Ptr

The address of the start of the location.

LLVM Value Representation.

This is a simple alias analysis implementation that uses knowledge of ARC constructs to answer querie...

MemoryEffects getMemoryEffects(const Function *F)

Definition ObjCARCAliasAnalysis.cpp:100

ModRefInfo getModRefInfoMask(const MemoryLocation &Loc, AAQueryInfo &AAQI, bool IgnoreLocals)

Definition ObjCARCAliasAnalysis.cpp:75

ModRefInfo getModRefInfo(const CallBase *Call, const MemoryLocation &Loc, AAQueryInfo &AAQI)

Definition ObjCARCAliasAnalysis.cpp:114

AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB, AAQueryInfo &AAQI, const Instruction *CtxI)

Definition ObjCARCAliasAnalysis.cpp:40

ObjCARCAAResult run(Function &F, FunctionAnalysisManager &AM)

Definition ObjCARCAliasAnalysis.cpp:142

@ FusedRetainAutorelease

objc_retainAutorelease

@ AutoreleasepoolPush

objc_autoreleasePoolPush

@ Autorelease

objc_autorelease

@ RetainRV

objc_retainAutoreleasedReturnValue

@ FusedRetainAutoreleaseRV

objc_retainAutoreleaseReturnValue

@ AutoreleaseRV

objc_autoreleaseReturnValue

@ Call

could call objc_release

@ NoopCast

objc_retainedObject, etc.

ARCInstKind GetFunctionClass(const Function *F)

Determine if F is one of the special known Functions.

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.

const Value * GetUnderlyingObjCPtr(const Value *V)

This is a wrapper around getUnderlyingObject which also knows how to look through objc_retain and obj...

const Value * GetRCIdentityRoot(const Value *V)

The RCIdentity root of a value V is a dominating value U for which retaining or releasing U is equiva...

This is an optimization pass for GlobalISel generic memory operations.

MemoryEffectsBase< IRMemLocation > MemoryEffects

Summary of how a function affects memory in the program.

ModRefInfo

Flags indicating whether a memory access modifies or references memory.

@ ModRef

The access may reference and may modify the value stored in memory.

@ NoModRef

The access neither references nor modifies the value stored in memory.

AnalysisManager< Function > FunctionAnalysisManager

Convenience typedef for the Function analysis manager.

bool isNoModRef(const ModRefInfo MRI)

A special type used by analysis passes to provide an address that identifies that particular analysis...