points-to graph simplification (#16605)
authorMichael Suo <suo@fb.com>
Tue, 5 Feb 2019 06:01:12 +0000 (22:01 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 5 Feb 2019 06:04:25 +0000 (22:04 -0800)
commitb1822966ee32b0f8a2de49f51280fdbcf40cc38c
tree36a4a52cc925f683135f8e429147ace490309e02
parent6c04224cd84385910021580176413a98839cec72
points-to graph simplification (#16605)

Summary:
This PR reworks the mutability API to be simpler (updates passes to use "mayAlias" calls) and improves the caching logic.

The difference is that we now directly express the idea of a "memory location." Leaves in the alias trackers points-to graph are considered unique memory locations, and mayAlias questions can be boiled down whether two values share a leaf.

To speed up queries, some basic path compression has been added.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16605

Differential Revision: D13952738

Pulled By: suo

fbshipit-source-id: cfc7fb2b23369f1dc425d1d8ca2c753c193d95dd
test/cpp/jit/gtest.cpp
test/cpp/jit/no-gtest.cpp
test/cpp/jit/test_alias_analysis.h
torch/csrc/jit/ir.h
torch/csrc/jit/passes/alias_analysis.cpp
torch/csrc/jit/passes/alias_analysis.h
torch/csrc/jit/passes/dead_code_elimination.cpp
torch/csrc/jit/passes/shape_analysis.cpp
torch/csrc/jit/passes/utils/alias_tracker.cpp
torch/csrc/jit/passes/utils/alias_tracker.h