This is an archive of the discontinued LLVM Phabricator instance.

[LAA] Dynamically allocate RuntimeCheckingPtrGroup (NFC).
Needs ReviewPublic

Authored by fhahn on Jul 23 2020, 7:30 AM.

Details

Summary

Currently parts in RuntimePointerChecking owns
RuntimeCheckingPtrGroup directly, which is reference from other
datastructures in RuntimePointerChecking. This prevents copying of
RuntimePointerChecking and couples things tightly.

This patch allows sharing, which will be used in a follow-on patch. It
use shared_ptr, but alternatively LAI could own the groups, but that
might couple LAI and RuntimePointerChecking unnecessarily.

Diff Detail

Event Timeline

fhahn created this revision.Jul 23 2020, 7:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 23 2020, 7:30 AM
Herald added a subscriber: hiraditya. · View Herald Transcript

Ignoring the question of direction, the code change itself seems ok to me.

llvm/include/llvm/Analysis/LoopAccessAnalysis.h
22–24

I don't recall seeing such separation between llvm and STD headers with newline elsewhere in llvm.

fhahn updated this revision to Diff 292181.Sep 16 2020, 4:17 AM

rebase & ping

I don't understand the motivation. Sharing RuntimeCheckingPtrGroup between multiple objects will increase coupling between them.

Summary:

Currently parts in RuntimePointerChecking owns RuntimeCheckingPtrGroup directly, which is reference from other datastructures in RuntimePointerChecking.

The grammar of this sentence seems off.

llvm/include/llvm/Analysis/LoopAccessAnalysis.h
21–23
llvm/lib/Analysis/LoopAccessAnalysis.cpp
66–68