{"action":"created","comment":{"url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/comments/218589561","pull_request_review_id":156562482,"id":218589561,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODU4OTU2MQ==","diff_hunk":"@@ -842,19 +851,21 @@ void LoopUnrollerUtilsImpl::AssignNewResultIds(BasicBlock* basic_block) {\n   }\n }\n \n-// For all instructions in |basic_block| check if the operands used are from a\n-// copied instruction and if so swap out the operand for the copy of it.\n-void LoopUnrollerUtilsImpl::RemapOperands(BasicBlock* basic_block) {\n-  for (Instruction& inst : *basic_block) {\n-    auto remap_operands_to_new_ids = [this](uint32_t* id) {\n-      auto itr = state_.new_inst.find(*id);\n+void LoopUnrollerUtilsImpl::RemapOperands(Instruction* inst) {","path":"source/opt/loop_unroller.cpp","position":33,"original_position":33,"commit_id":"44aeadb8c0931302709dad3c50a53c10bc0bec8b","original_commit_id":"44aeadb8c0931302709dad3c50a53c10bc0bec8b","user":{"login":"dnovillo","id":7295335,"node_id":"MDQ6VXNlcjcyOTUzMzU=","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":"Can you keep a variant of the original comment?  The new version doesn't have any documentation.","created_at":"2018-09-18T20:48:53Z","updated_at":"2018-09-18T20:51:31Z","html_url":"https://github.com/KhronosGroup/SPIRV-Tools/pull/1903#discussion_r218589561","pull_request_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/1903","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/comments/218589561"},"html":{"href":"https://github.com/KhronosGroup/SPIRV-Tools/pull/1903#discussion_r218589561"},"pull_request":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/1903"}}},"pull_request":{"url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/1903","id":216438199,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2NDM4MTk5","html_url":"https://github.com/KhronosGroup/SPIRV-Tools/pull/1903","diff_url":"https://github.com/KhronosGroup/SPIRV-Tools/pull/1903.diff","patch_url":"https://github.com/KhronosGroup/SPIRV-Tools/pull/1903.patch","issue_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/1903","number":1903,"state":"open","locked":false,"title":"Add unrolling to the legalization passes","user":{"login":"s-perron","id":31666470,"node_id":"MDQ6VXNlcjMxNjY2NDcw","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":"Adds unrolling to the legalization passes.\r\n\r\nAfter enabling unrolling I found a bug when there is a self-referencing\r\nphi node.  That has been fixed.\r\n\r\nThe test that checks for that the order of optimizations is correct also\r\nneeded to be updated.","created_at":"2018-09-18T20:44:08Z","updated_at":"2018-09-18T20:51:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5f759baedc66fa3d5f12aa3464c22e76dd8d62d6","assignee":{"login":"s-perron","id":31666470,"node_id":"MDQ6VXNlcjMxNjY2NDcw","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},"assignees":[{"login":"s-perron","id":31666470,"node_id":"MDQ6VXNlcjMxNjY2NDcw","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}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/1903/commits","review_comments_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/1903/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/1903/comments","statuses_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/statuses/44aeadb8c0931302709dad3c50a53c10bc0bec8b","head":{"label":"s-perron:unroll_legal","ref":"unroll_legal","sha":"44aeadb8c0931302709dad3c50a53c10bc0bec8b","user":{"login":"s-perron","id":31666470,"node_id":"MDQ6VXNlcjMxNjY2NDcw","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,"node_id":"MDEwOlJlcG9zaXRvcnkxMDI4NzcwNDc=","name":"SPIRV-Tools","full_name":"s-perron/SPIRV-Tools","private":false,"owner":{"login":"s-perron","id":31666470,"node_id":"MDQ6VXNlcjMxNjY2NDcw","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},"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":"2018-05-18T15:17:14Z","pushed_at":"2018-09-18T20:43:42Z","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":9062,"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,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"KhronosGroup:master","ref":"master","sha":"9e99d8b6912b6f855c4f4df290b3844c46306964","user":{"login":"KhronosGroup","id":1608701,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDg3MDE=","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,"node_id":"MDEwOlJlcG9zaXRvcnk0NTk4MTgwMQ==","name":"SPIRV-Tools","full_name":"KhronosGroup/SPIRV-Tools","private":false,"owner":{"login":"KhronosGroup","id":1608701,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDg3MDE=","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},"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":"2018-09-18T14:35:48Z","pushed_at":"2018-09-18T20:44:09Z","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":9036,"stargazers_count":315,"watchers_count":315,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":124,"mirror_url":null,"archived":false,"open_issues_count":203,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":124,"open_issues":203,"watchers":315,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/1903"},"html":{"href":"https://github.com/KhronosGroup/SPIRV-Tools/pull/1903"},"issue":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/1903"},"comments":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/1903/comments"},"review_comments":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/1903/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/1903/commits"},"statuses":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/statuses/44aeadb8c0931302709dad3c50a53c10bc0bec8b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dnovillo"}}