mirror of
https://github.com/golang/go
synced 2024-11-19 09:24:39 -07:00
6643abb26c
Suggested reading order: - doc.go - api.go, analysis.go, callgraph.go, labels.go - print.go, util.go - gen.go - solve.go - pointer_test.go, testdata/* - intrinsics.go (none are implemented yet) R=dannyb, gri, crawshaw, 0xjnml CC=golang-dev https://golang.org/cl/10618043
32 lines
1.2 KiB
Plaintext
32 lines
1.2 KiB
Plaintext
-*- text -*-
|
|
|
|
Pointer analysis to-do list
|
|
===========================
|
|
|
|
CONSTRAINT GENERATION:
|
|
- reflection intrinsics
|
|
- unsafe.Pointer conversions. Three options:
|
|
1) unsoundly (but type-safely) treat p=unsafe.Pointer(x) conversions as
|
|
allocations, losing aliases. This is what's currently implemented.
|
|
2) unsoundly (but type-safely) treat p=unsafe.Pointer(x) and T(p)
|
|
conversions as interface boxing and unboxing operations.
|
|
This may preserve some aliasing relations at little cost.
|
|
3) soundly track physical field offsets. (Summarise dannyb's email here.)
|
|
A downside is that we can't keep the identity field of struct
|
|
allocations that identifies the object.
|
|
|
|
PRESOLVER OPTIMISATIONS
|
|
- use HVN, HRU, LE, PE, HCD, LCD.
|
|
|
|
SOLVER:
|
|
- use BDDs and/or sparse bitvectors for ptsets
|
|
- use sparse bitvectors for graph edges
|
|
- use BDD-based relational composition for e.g. offset computations.
|
|
- experiment with different worklist algorithms:
|
|
priority queue (solver visit-time order)
|
|
red-black tree (node id order)
|
|
double-ended queue (insertion order)
|
|
fast doubly-linked list (See Zhanh et al PLDI'13)
|
|
(insertion order with fast membership test)
|
|
dannyb recommends sparse bitmap.
|