@@ -144,9 +144,9 @@ static_assert(sizeof(AliasResult) == 4,
144144// / << operator for AliasResult.
145145raw_ostream &operator <<(raw_ostream &OS, AliasResult AR);
146146
147- // / Virtual base class for providers of capture information .
148- struct CaptureInfo {
149- virtual ~CaptureInfo () = 0 ;
147+ // / Virtual base class for providers of capture analysis .
148+ struct CaptureAnalysis {
149+ virtual ~CaptureAnalysis () = 0 ;
150150
151151 // / Check whether Object is not captured before instruction I. If OrAt is
152152 // / true, captures by instruction I itself are also considered.
@@ -156,21 +156,21 @@ struct CaptureInfo {
156156 bool OrAt) = 0;
157157};
158158
159- // / Context-free CaptureInfo provider, which computes and caches whether an
159+ // / Context-free CaptureAnalysis provider, which computes and caches whether an
160160// / object is captured in the function at all, but does not distinguish whether
161161// / it was captured before or after the context instruction.
162- class SimpleCaptureInfo final : public CaptureInfo {
162+ class SimpleCaptureAnalysis final : public CaptureAnalysis {
163163 SmallDenseMap<const Value *, bool , 8 > IsCapturedCache;
164164
165165public:
166166 bool isNotCapturedBefore (const Value *Object, const Instruction *I,
167167 bool OrAt) override ;
168168};
169169
170- // / Context-sensitive CaptureInfo provider, which computes and caches the
170+ // / Context-sensitive CaptureAnalysis provider, which computes and caches the
171171// / earliest common dominator closure of all captures. It provides a good
172172// / approximation to a precise "captures before" analysis.
173- class EarliestEscapeInfo final : public CaptureInfo {
173+ class EarliestEscapeAnalysis final : public CaptureAnalysis {
174174 DominatorTree &DT;
175175 const LoopInfo *LI;
176176
@@ -185,7 +185,7 @@ class EarliestEscapeInfo final : public CaptureInfo {
185185 DenseMap<Instruction *, TinyPtrVector<const Value *>> Inst2Obj;
186186
187187public:
188- EarliestEscapeInfo (DominatorTree &DT, const LoopInfo *LI = nullptr )
188+ EarliestEscapeAnalysis (DominatorTree &DT, const LoopInfo *LI = nullptr )
189189 : DT(DT), LI(LI) {}
190190
191191 bool isNotCapturedBefore (const Value *Object, const Instruction *I,
@@ -265,7 +265,7 @@ class AAQueryInfo {
265265 using AliasCacheT = SmallDenseMap<LocPair, CacheEntry, 8 >;
266266 AliasCacheT AliasCache;
267267
268- CaptureInfo *CI ;
268+ CaptureAnalysis *CA ;
269269
270270 // / Query depth used to distinguish recursive queries.
271271 unsigned Depth = 0 ;
@@ -298,15 +298,15 @@ class AAQueryInfo {
298298 // / passes that lazily update the DT while performing AA queries.
299299 bool UseDominatorTree = true ;
300300
301- AAQueryInfo (AAResults &AAR, CaptureInfo *CI ) : AAR(AAR), CI(CI ) {}
301+ AAQueryInfo (AAResults &AAR, CaptureAnalysis *CA ) : AAR(AAR), CA(CA ) {}
302302};
303303
304- // / AAQueryInfo that uses SimpleCaptureInfo .
304+ // / AAQueryInfo that uses SimpleCaptureAnalysis .
305305class SimpleAAQueryInfo : public AAQueryInfo {
306- SimpleCaptureInfo CI ;
306+ SimpleCaptureAnalysis CA ;
307307
308308public:
309- SimpleAAQueryInfo (AAResults &AAR) : AAQueryInfo(AAR, &CI ) {}
309+ SimpleAAQueryInfo (AAResults &AAR) : AAQueryInfo(AAR, &CA ) {}
310310};
311311
312312class BatchAAResults ;
@@ -630,11 +630,12 @@ class AAResults {
630630class BatchAAResults {
631631 AAResults &AA;
632632 AAQueryInfo AAQI;
633- SimpleCaptureInfo SimpleCI ;
633+ SimpleCaptureAnalysis SimpleCA ;
634634
635635public:
636- BatchAAResults (AAResults &AAR) : AA(AAR), AAQI(AAR, &SimpleCI) {}
637- BatchAAResults (AAResults &AAR, CaptureInfo *CI) : AA(AAR), AAQI(AAR, CI) {}
636+ BatchAAResults (AAResults &AAR) : AA(AAR), AAQI(AAR, &SimpleCA) {}
637+ BatchAAResults (AAResults &AAR, CaptureAnalysis *CA)
638+ : AA(AAR), AAQI(AAR, CA) {}
638639
639640 AliasResult alias (const MemoryLocation &LocA, const MemoryLocation &LocB) {
640641 return AA.alias (LocA, LocB, AAQI);
0 commit comments