{"action":"created","comment":{"url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/comments/151564123","pull_request_review_id":77169248,"id":151564123,"diff_hunk":"@@ -0,0 +1,45 @@\n+// Copyright (c) 2017 Google Inc.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//     http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+#ifndef LIBSPIRV_OPT_LOCAL_REDUNDANCY_ELIMINATION_H_\n+#define LIBSPIRV_OPT_LOCAL_REDUNDANCY_ELIMINATION_H_\n+\n+#include \"ir_context.h\"\n+#include \"pass.h\"\n+#include \"value_number_table.h\"\n+\n+namespace spvtools {\n+namespace opt {\n+\n+// See optimizer.hpp for documentation.\n+class LocalRedundancyEliminationPass : public Pass {\n+ public:\n+  const char* name() const override { return \"local-redundancy-elimination\"; }\n+  Status Process(ir::IRContext*) override;\n+\n+ private:\n+  // Deletes instructions in |block| whose value is in |vnTable| or is computed\n+  // earlier in |block|.  The values computed in |block| are added to |vnTable|.","path":"source/opt/local_redundancy_elimination.h","position":33,"original_position":33,"commit_id":"a1af2b66238caf847c4f43d02ad19741adc869ac","original_commit_id":"a1af2b66238caf847c4f43d02ad19741adc869ac","user":{"login":"dnovillo","id":7295335,"avatar_url":"https://avatars1.githubusercontent.com/u/7295335?v=4","gravatar_id":"","url":"https://api.github.com/users/dnovillo","html_url":"https://github.com/dnovillo","followers_url":"https://api.github.com/users/dnovillo/followers","following_url":"https://api.github.com/users/dnovillo/following{/other_user}","gists_url":"https://api.github.com/users/dnovillo/gists{/gist_id}","starred_url":"https://api.github.com/users/dnovillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnovillo/subscriptions","organizations_url":"https://api.github.com/users/dnovillo/orgs","repos_url":"https://api.github.com/users/dnovillo/repos","events_url":"https://api.github.com/users/dnovillo/events{/privacy}","received_events_url":"https://api.github.com/users/dnovillo/received_events","type":"User","site_admin":false},"body":"But if it's already in |vnTable|, it's no longer a local CSE.  Or are you thinking of using this same mechanism for global CSE?","created_at":"2017-11-16T23:11:37Z","updated_at":"2017-11-16T23:29:47Z","html_url":"https://github.com/KhronosGroup/SPIRV-Tools/pull/971#discussion_r151564123","pull_request_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/971","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/comments/151564123"},"html":{"href":"https://github.com/KhronosGroup/SPIRV-Tools/pull/971#discussion_r151564123"},"pull_request":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/971"}}},"pull_request":{"url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/971","id":153068914,"html_url":"https://github.com/KhronosGroup/SPIRV-Tools/pull/971","diff_url":"https://github.com/KhronosGroup/SPIRV-Tools/pull/971.diff","patch_url":"https://github.com/KhronosGroup/SPIRV-Tools/pull/971.patch","issue_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/971","number":971,"state":"open","locked":false,"title":"Create a local redundancy elimination pass","user":{"login":"s-perron","id":31666470,"avatar_url":"https://avatars1.githubusercontent.com/u/31666470?v=4","gravatar_id":"","url":"https://api.github.com/users/s-perron","html_url":"https://github.com/s-perron","followers_url":"https://api.github.com/users/s-perron/followers","following_url":"https://api.github.com/users/s-perron/following{/other_user}","gists_url":"https://api.github.com/users/s-perron/gists{/gist_id}","starred_url":"https://api.github.com/users/s-perron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-perron/subscriptions","organizations_url":"https://api.github.com/users/s-perron/orgs","repos_url":"https://api.github.com/users/s-perron/repos","events_url":"https://api.github.com/users/s-perron/events{/privacy}","received_events_url":"https://api.github.com/users/s-perron/received_events","type":"User","site_admin":false},"body":"Creates a pass that removes redundant instructions within the same basic\r\nblock.  This will be implemented using a hash based value numbering\r\nalgorithm.  This is the first part of the fix for #960.","created_at":"2017-11-16T15:20:41Z","updated_at":"2017-11-16T23:29:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"08d629c80885d67e383e0239a382bf1dcb70fbe7","assignee":null,"assignees":[],"requested_reviewers":[{"login":"dneto0","id":13054574,"avatar_url":"https://avatars0.githubusercontent.com/u/13054574?v=4","gravatar_id":"","url":"https://api.github.com/users/dneto0","html_url":"https://github.com/dneto0","followers_url":"https://api.github.com/users/dneto0/followers","following_url":"https://api.github.com/users/dneto0/following{/other_user}","gists_url":"https://api.github.com/users/dneto0/gists{/gist_id}","starred_url":"https://api.github.com/users/dneto0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dneto0/subscriptions","organizations_url":"https://api.github.com/users/dneto0/orgs","repos_url":"https://api.github.com/users/dneto0/repos","events_url":"https://api.github.com/users/dneto0/events{/privacy}","received_events_url":"https://api.github.com/users/dneto0/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/971/commits","review_comments_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/971/comments","review_comment_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/971/comments","statuses_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/statuses/a1af2b66238caf847c4f43d02ad19741adc869ac","head":{"label":"s-perron:vn","ref":"vn","sha":"a1af2b66238caf847c4f43d02ad19741adc869ac","user":{"login":"s-perron","id":31666470,"avatar_url":"https://avatars1.githubusercontent.com/u/31666470?v=4","gravatar_id":"","url":"https://api.github.com/users/s-perron","html_url":"https://github.com/s-perron","followers_url":"https://api.github.com/users/s-perron/followers","following_url":"https://api.github.com/users/s-perron/following{/other_user}","gists_url":"https://api.github.com/users/s-perron/gists{/gist_id}","starred_url":"https://api.github.com/users/s-perron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-perron/subscriptions","organizations_url":"https://api.github.com/users/s-perron/orgs","repos_url":"https://api.github.com/users/s-perron/repos","events_url":"https://api.github.com/users/s-perron/events{/privacy}","received_events_url":"https://api.github.com/users/s-perron/received_events","type":"User","site_admin":false},"repo":{"id":102877047,"name":"SPIRV-Tools","full_name":"s-perron/SPIRV-Tools","owner":{"login":"s-perron","id":31666470,"avatar_url":"https://avatars1.githubusercontent.com/u/31666470?v=4","gravatar_id":"","url":"https://api.github.com/users/s-perron","html_url":"https://github.com/s-perron","followers_url":"https://api.github.com/users/s-perron/followers","following_url":"https://api.github.com/users/s-perron/following{/other_user}","gists_url":"https://api.github.com/users/s-perron/gists{/gist_id}","starred_url":"https://api.github.com/users/s-perron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-perron/subscriptions","organizations_url":"https://api.github.com/users/s-perron/orgs","repos_url":"https://api.github.com/users/s-perron/repos","events_url":"https://api.github.com/users/s-perron/events{/privacy}","received_events_url":"https://api.github.com/users/s-perron/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/s-perron/SPIRV-Tools","description":null,"fork":true,"url":"https://api.github.com/repos/s-perron/SPIRV-Tools","forks_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/forks","keys_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/teams","hooks_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/hooks","issue_events_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/issues/events{/number}","events_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/events","assignees_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/assignees{/user}","branches_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/branches{/branch}","tags_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/tags","blobs_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/statuses/{sha}","languages_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/languages","stargazers_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/stargazers","contributors_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/contributors","subscribers_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/subscribers","subscription_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/subscription","commits_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/contents/{+path}","compare_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/merges","archive_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/downloads","issues_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/issues{/number}","pulls_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/pulls{/number}","milestones_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/milestones{/number}","notifications_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/labels{/name}","releases_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/releases{/id}","deployments_url":"https://api.github.com/repos/s-perron/SPIRV-Tools/deployments","created_at":"2017-09-08T15:37:23Z","updated_at":"2017-10-08T20:52:50Z","pushed_at":"2017-11-16T17:46:40Z","git_url":"git://github.com/s-perron/SPIRV-Tools.git","ssh_url":"git@github.com:s-perron/SPIRV-Tools.git","clone_url":"https://github.com/s-perron/SPIRV-Tools.git","svn_url":"https://github.com/s-perron/SPIRV-Tools","homepage":null,"size":4384,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"KhronosGroup:master","ref":"master","sha":"dbf9b3762cd485d05387b495495e1a359da8ee37","user":{"login":"KhronosGroup","id":1608701,"avatar_url":"https://avatars3.githubusercontent.com/u/1608701?v=4","gravatar_id":"","url":"https://api.github.com/users/KhronosGroup","html_url":"https://github.com/KhronosGroup","followers_url":"https://api.github.com/users/KhronosGroup/followers","following_url":"https://api.github.com/users/KhronosGroup/following{/other_user}","gists_url":"https://api.github.com/users/KhronosGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/KhronosGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KhronosGroup/subscriptions","organizations_url":"https://api.github.com/users/KhronosGroup/orgs","repos_url":"https://api.github.com/users/KhronosGroup/repos","events_url":"https://api.github.com/users/KhronosGroup/events{/privacy}","received_events_url":"https://api.github.com/users/KhronosGroup/received_events","type":"Organization","site_admin":false},"repo":{"id":45981801,"name":"SPIRV-Tools","full_name":"KhronosGroup/SPIRV-Tools","owner":{"login":"KhronosGroup","id":1608701,"avatar_url":"https://avatars3.githubusercontent.com/u/1608701?v=4","gravatar_id":"","url":"https://api.github.com/users/KhronosGroup","html_url":"https://github.com/KhronosGroup","followers_url":"https://api.github.com/users/KhronosGroup/followers","following_url":"https://api.github.com/users/KhronosGroup/following{/other_user}","gists_url":"https://api.github.com/users/KhronosGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/KhronosGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KhronosGroup/subscriptions","organizations_url":"https://api.github.com/users/KhronosGroup/orgs","repos_url":"https://api.github.com/users/KhronosGroup/repos","events_url":"https://api.github.com/users/KhronosGroup/events{/privacy}","received_events_url":"https://api.github.com/users/KhronosGroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/KhronosGroup/SPIRV-Tools","description":null,"fork":false,"url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools","forks_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/forks","keys_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/teams","hooks_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/hooks","issue_events_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/events{/number}","events_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/events","assignees_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/assignees{/user}","branches_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/branches{/branch}","tags_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/tags","blobs_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/statuses/{sha}","languages_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/languages","stargazers_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/stargazers","contributors_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/contributors","subscribers_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/subscribers","subscription_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/subscription","commits_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/contents/{+path}","compare_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/merges","archive_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/downloads","issues_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues{/number}","pulls_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls{/number}","milestones_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/milestones{/number}","notifications_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/labels{/name}","releases_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/releases{/id}","deployments_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/deployments","created_at":"2015-11-11T12:56:25Z","updated_at":"2017-11-16T04:04:52Z","pushed_at":"2017-11-16T20:00:55Z","git_url":"git://github.com/KhronosGroup/SPIRV-Tools.git","ssh_url":"git@github.com:KhronosGroup/SPIRV-Tools.git","clone_url":"https://github.com/KhronosGroup/SPIRV-Tools.git","svn_url":"https://github.com/KhronosGroup/SPIRV-Tools","homepage":null,"size":4330,"stargazers_count":215,"watchers_count":215,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":92,"mirror_url":null,"archived":false,"open_issues_count":153,"forks":92,"open_issues":153,"watchers":215,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/971"},"html":{"href":"https://github.com/KhronosGroup/SPIRV-Tools/pull/971"},"issue":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/971"},"comments":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/971/comments"},"review_comments":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/971/comments"},"review_comment":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/971/commits"},"statuses":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/statuses/a1af2b66238caf847c4f43d02ad19741adc869ac"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dnovillo"}}