-
Notifications
You must be signed in to change notification settings - Fork 0
Design
If ptr is passed through arguments: Ptr is is either not captured, or is captured exactly once and original reference is no longer used. If capture causes ptr to escape, then is not upgraded. Returning the ptr does not count as escape
If ptr is created inside method: Ptr is is either not captured, or is captured exactly once and original reference is no longer used. If capture causes ptr to escape, then is not upgraded. Returning the ptr counts as escape and disqualifies ptr from being unique due to unknown amounts of calling contexts it could be used it.
to be decided
Ideally, create an abstraction such that escape/capture information can be summarized for each function/method, and so can be cached. This means that the same computed information can be used in different calling contexts.
To follow LLVM design, we might want to design the tool such, that the LLVM IR handling and escape algorithm that uses it, can be packaged up as a library, to be potentially used by other LLVM frontends
Start from intra-procedural, to module-level interprocedural, to perhaps analysis across modules, using llvm-link