[Static Runtime] Enable RemoveListMutation (#63536)
authorMike Iovine <mikeiovine@fb.com>
Fri, 20 Aug 2021 13:14:13 +0000 (06:14 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 20 Aug 2021 13:15:41 +0000 (06:15 -0700)
commitae901e372e7b05fe1802e44fe2f1f6aa015710af
tree4145c0d5fadf0c4df3ec232b66e8e13b5f5bfe50
parent913c1f83f49f9e1e2a494186cc0069d780cee852
[Static Runtime] Enable RemoveListMutation (#63536)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/63536

Enable a pass that transforms sequences like this:
```
li = []
li.append(1)
li.append(2)
```
into this:
```
li = [1, 2]
```
Initially I implemented this pass myself (D30387213), but I discovered that there is an existing pass that does the same thing.

Reviewed By: hlu1

Differential Revision: D30412970

fbshipit-source-id: 0810ef03480878d5039bd800a40f5fd31c2652ec
torch/csrc/jit/passes/freeze_module.cpp