{"action":"created","issue":{"url":"https://api.github.com/repos/google/closure-compiler/issues/1539","repository_url":"https://api.github.com/repos/google/closure-compiler","labels_url":"https://api.github.com/repos/google/closure-compiler/issues/1539/labels{/name}","comments_url":"https://api.github.com/repos/google/closure-compiler/issues/1539/comments","events_url":"https://api.github.com/repos/google/closure-compiler/issues/1539/events","html_url":"https://github.com/google/closure-compiler/pull/1539","id":133456832,"number":1539,"title":"Use a better heuristic when backing off in FlowSensitiveInlineVariables","user":{"login":"Dominator008","id":1403453,"avatar_url":"https://avatars.githubusercontent.com/u/1403453?v=3","gravatar_id":"","url":"https://api.github.com/users/Dominator008","html_url":"https://github.com/Dominator008","followers_url":"https://api.github.com/users/Dominator008/followers","following_url":"https://api.github.com/users/Dominator008/following{/other_user}","gists_url":"https://api.github.com/users/Dominator008/gists{/gist_id}","starred_url":"https://api.github.com/users/Dominator008/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dominator008/subscriptions","organizations_url":"https://api.github.com/users/Dominator008/orgs","repos_url":"https://api.github.com/users/Dominator008/repos","events_url":"https://api.github.com/users/Dominator008/events{/privacy}","received_events_url":"https://api.github.com/users/Dominator008/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/google/closure-compiler/labels/cla:%20yes","name":"cla: yes","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"dimvar","id":286890,"avatar_url":"https://avatars.githubusercontent.com/u/286890?v=3","gravatar_id":"","url":"https://api.github.com/users/dimvar","html_url":"https://github.com/dimvar","followers_url":"https://api.github.com/users/dimvar/followers","following_url":"https://api.github.com/users/dimvar/following{/other_user}","gists_url":"https://api.github.com/users/dimvar/gists{/gist_id}","starred_url":"https://api.github.com/users/dimvar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimvar/subscriptions","organizations_url":"https://api.github.com/users/dimvar/orgs","repos_url":"https://api.github.com/users/dimvar/repos","events_url":"https://api.github.com/users/dimvar/events{/privacy}","received_events_url":"https://api.github.com/users/dimvar/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2016-02-13T18:30:59Z","updated_at":"2016-03-14T23:37:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/google/closure-compiler/pulls/1539","html_url":"https://github.com/google/closure-compiler/pull/1539","diff_url":"https://github.com/google/closure-compiler/pull/1539.diff","patch_url":"https://github.com/google/closure-compiler/pull/1539.patch"},"body":"bc3e3a494c406098064ee63487f9bfafcf3354f3 caused\r\nFlowSensitiveInlineVariables to back off in some cases like the one\r\nreported in #250. In retrospect, the back off strategy was being too\r\nconservative.\r\n\r\nIf candidate \"c\" has dependencies, then inlining it may have introduced\r\nnew dependencies for our other inlining candidates.\r\nMustBeReachingVariableDef uses a dependency graph in its analysis.\r\nGenerating a new dependency graph will need another CFG computation.\r\nIdeally we should iterate to a fixed point, but that can be costly.\r\nTherefore, we use a conservative heuristic here: For each candidate\r\n\"other\", we back off if its set of dependencies cannot contain all of\r\n\"c\"'s dependencies.\r\n\r\nThis should fix #250 with a much smaller potential performance impact\r\nthan iterating to a fixed point.\r\n\r\nFixes #250.\r\n\r\n<!-- Reviewable:start -->\r\n[<img src=\"https://reviewable.io/review_button.svg\" height=\"40\" alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/google/closure-compiler/1539)\r\n<!-- Reviewable:end -->\r\n"},"comment":{"url":"https://api.github.com/repos/google/closure-compiler/issues/comments/196570487","html_url":"https://github.com/google/closure-compiler/pull/1539#issuecomment-196570487","issue_url":"https://api.github.com/repos/google/closure-compiler/issues/1539","id":196570487,"user":{"login":"Dominator008","id":1403453,"avatar_url":"https://avatars.githubusercontent.com/u/1403453?v=3","gravatar_id":"","url":"https://api.github.com/users/Dominator008","html_url":"https://github.com/Dominator008","followers_url":"https://api.github.com/users/Dominator008/followers","following_url":"https://api.github.com/users/Dominator008/following{/other_user}","gists_url":"https://api.github.com/users/Dominator008/gists{/gist_id}","starred_url":"https://api.github.com/users/Dominator008/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dominator008/subscriptions","organizations_url":"https://api.github.com/users/Dominator008/orgs","repos_url":"https://api.github.com/users/Dominator008/repos","events_url":"https://api.github.com/users/Dominator008/events{/privacy}","received_events_url":"https://api.github.com/users/Dominator008/received_events","type":"User","site_admin":false},"created_at":"2016-03-14T23:37:14Z","updated_at":"2016-03-14T23:37:14Z","body":"Sample run of https://github.com/google/closure-library/blob/master/scripts/ci/compile_closure.sh on my laptop.\r\nBefore this PR:\r\nreal\t0m58.772s\r\nuser\t2m18.932s\r\nsys\t0m0.912s\r\n\r\nAfter this PR:\r\nreal\t0m57.278s\r\nuser\t2m14.936s\r\nsys\t0m1.308s\r\n\r\nI didn't see a significant difference across multiple trials."}}