{"action":"created","comment":{"url":"https://api.github.com/repos/viktormalik/diffkemp/pulls/comments/240603178","pull_request_review_id":183658444,"id":240603178,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MDYwMzE3OA==","diff_hunk":"@@ -7,6 +7,67 @@\n \n from diffkemp.semdiff.function_diff import functions_diff, Result, Statistics\n from diffkemp.semdiff.function_coupling import FunctionCouplings\n+from llvmcpy.llvm import *\n+\n+\n+def _indices_correspond(gep, indices):\n+    indices_correspond = True\n+    for i in range(1, gep.get_num_operands()):\n+        if (i - 1) >= len(indices):\n+            break\n+        if (gep.get_operand(i).const_int_get_z_ext() !=\n+                indices[i - 1]):\n+            indices_correspond = False\n+    return indices_correspond\n+\n+\n+def _corresponding_index_unused(module, function, param):\n+    can_skip = True\n+    value = module.get_named_global(param.name)\n+\n+    for use in value.iter_uses():\n+        user = use.get_user()\n+        if user.is_a_instruction():\n+            if (user.get_instruction_parent().get_parent().in_ptr() !=\n+                    function.in_ptr()):\n+                # The user is in a different function\n+                continue\n+            if user.is_a_get_element_ptr_inst():\n+                # Look whether the GEP references the desired index or not\n+                if _indices_correspond(user, param.indices):\n+                    can_skip = False","path":"diffkemp/semdiff/module_diff.py","position":32,"original_position":32,"commit_id":"d58d119dc96d4e5e465042dd3df8ba64aa0edaa8","original_commit_id":"d58d119dc96d4e5e465042dd3df8ba64aa0edaa8","user":{"login":"viktormalik","id":7603704,"node_id":"MDQ6VXNlcjc2MDM3MDQ=","avatar_url":"https://avatars2.githubusercontent.com/u/7603704?v=4","gravatar_id":"","url":"https://api.github.com/users/viktormalik","html_url":"https://github.com/viktormalik","followers_url":"https://api.github.com/users/viktormalik/followers","following_url":"https://api.github.com/users/viktormalik/following{/other_user}","gists_url":"https://api.github.com/users/viktormalik/gists{/gist_id}","starred_url":"https://api.github.com/users/viktormalik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viktormalik/subscriptions","organizations_url":"https://api.github.com/users/viktormalik/orgs","repos_url":"https://api.github.com/users/viktormalik/repos","events_url":"https://api.github.com/users/viktormalik/events{/privacy}","received_events_url":"https://api.github.com/users/viktormalik/received_events","type":"User","site_admin":false},"body":"return False","created_at":"2018-12-11T13:11:45Z","updated_at":"2018-12-11T13:13:45Z","html_url":"https://github.com/viktormalik/diffkemp/pull/19#discussion_r240603178","pull_request_url":"https://api.github.com/repos/viktormalik/diffkemp/pulls/19","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/viktormalik/diffkemp/pulls/comments/240603178"},"html":{"href":"https://github.com/viktormalik/diffkemp/pull/19#discussion_r240603178"},"pull_request":{"href":"https://api.github.com/repos/viktormalik/diffkemp/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/viktormalik/diffkemp/pulls/19","id":237664389,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3NjY0Mzg5","html_url":"https://github.com/viktormalik/diffkemp/pull/19","diff_url":"https://github.com/viktormalik/diffkemp/pull/19.diff","patch_url":"https://github.com/viktormalik/diffkemp/pull/19.patch","issue_url":"https://api.github.com/repos/viktormalik/diffkemp/issues/19","number":19,"state":"open","locked":false,"title":"diffsysctl: Finding data variable by GEPs","user":{"login":"lenticularis39","id":1266171,"node_id":"MDQ6VXNlcjEyNjYxNzE=","avatar_url":"https://avatars3.githubusercontent.com/u/1266171?v=4","gravatar_id":"","url":"https://api.github.com/users/lenticularis39","html_url":"https://github.com/lenticularis39","followers_url":"https://api.github.com/users/lenticularis39/followers","following_url":"https://api.github.com/users/lenticularis39/following{/other_user}","gists_url":"https://api.github.com/users/lenticularis39/gists{/gist_id}","starred_url":"https://api.github.com/users/lenticularis39/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lenticularis39/subscriptions","organizations_url":"https://api.github.com/users/lenticularis39/orgs","repos_url":"https://api.github.com/users/lenticularis39/repos","events_url":"https://api.github.com/users/lenticularis39/events{/privacy}","received_events_url":"https://api.github.com/users/lenticularis39/received_events","type":"User","site_admin":false},"body":"Includes an improvement of modules_diff - now it can use a parameter with attached indices.","created_at":"2018-12-11T12:39:59Z","updated_at":"2018-12-11T13:13:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"170fa676ad8c247dd0223e48d151db8dc0365371","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/viktormalik/diffkemp/pulls/19/commits","review_comments_url":"https://api.github.com/repos/viktormalik/diffkemp/pulls/19/comments","review_comment_url":"https://api.github.com/repos/viktormalik/diffkemp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/viktormalik/diffkemp/issues/19/comments","statuses_url":"https://api.github.com/repos/viktormalik/diffkemp/statuses/d58d119dc96d4e5e465042dd3df8ba64aa0edaa8","head":{"label":"lenticularis39:diffsysctl-geps","ref":"diffsysctl-geps","sha":"d58d119dc96d4e5e465042dd3df8ba64aa0edaa8","user":{"login":"lenticularis39","id":1266171,"node_id":"MDQ6VXNlcjEyNjYxNzE=","avatar_url":"https://avatars3.githubusercontent.com/u/1266171?v=4","gravatar_id":"","url":"https://api.github.com/users/lenticularis39","html_url":"https://github.com/lenticularis39","followers_url":"https://api.github.com/users/lenticularis39/followers","following_url":"https://api.github.com/users/lenticularis39/following{/other_user}","gists_url":"https://api.github.com/users/lenticularis39/gists{/gist_id}","starred_url":"https://api.github.com/users/lenticularis39/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lenticularis39/subscriptions","organizations_url":"https://api.github.com/users/lenticularis39/orgs","repos_url":"https://api.github.com/users/lenticularis39/repos","events_url":"https://api.github.com/users/lenticularis39/events{/privacy}","received_events_url":"https://api.github.com/users/lenticularis39/received_events","type":"User","site_admin":false},"repo":{"id":141128335,"node_id":"MDEwOlJlcG9zaXRvcnkxNDExMjgzMzU=","name":"diffkemp","full_name":"lenticularis39/diffkemp","private":false,"owner":{"login":"lenticularis39","id":1266171,"node_id":"MDQ6VXNlcjEyNjYxNzE=","avatar_url":"https://avatars3.githubusercontent.com/u/1266171?v=4","gravatar_id":"","url":"https://api.github.com/users/lenticularis39","html_url":"https://github.com/lenticularis39","followers_url":"https://api.github.com/users/lenticularis39/followers","following_url":"https://api.github.com/users/lenticularis39/following{/other_user}","gists_url":"https://api.github.com/users/lenticularis39/gists{/gist_id}","starred_url":"https://api.github.com/users/lenticularis39/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lenticularis39/subscriptions","organizations_url":"https://api.github.com/users/lenticularis39/orgs","repos_url":"https://api.github.com/users/lenticularis39/repos","events_url":"https://api.github.com/users/lenticularis39/events{/privacy}","received_events_url":"https://api.github.com/users/lenticularis39/received_events","type":"User","site_admin":false},"html_url":"https://github.com/lenticularis39/diffkemp","description":"Automatic static analysis of semantic difference of kernel module parameters.","fork":true,"url":"https://api.github.com/repos/lenticularis39/diffkemp","forks_url":"https://api.github.com/repos/lenticularis39/diffkemp/forks","keys_url":"https://api.github.com/repos/lenticularis39/diffkemp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lenticularis39/diffkemp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lenticularis39/diffkemp/teams","hooks_url":"https://api.github.com/repos/lenticularis39/diffkemp/hooks","issue_events_url":"https://api.github.com/repos/lenticularis39/diffkemp/issues/events{/number}","events_url":"https://api.github.com/repos/lenticularis39/diffkemp/events","assignees_url":"https://api.github.com/repos/lenticularis39/diffkemp/assignees{/user}","branches_url":"https://api.github.com/repos/lenticularis39/diffkemp/branches{/branch}","tags_url":"https://api.github.com/repos/lenticularis39/diffkemp/tags","blobs_url":"https://api.github.com/repos/lenticularis39/diffkemp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lenticularis39/diffkemp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lenticularis39/diffkemp/git/refs{/sha}","trees_url":"https://api.github.com/repos/lenticularis39/diffkemp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lenticularis39/diffkemp/statuses/{sha}","languages_url":"https://api.github.com/repos/lenticularis39/diffkemp/languages","stargazers_url":"https://api.github.com/repos/lenticularis39/diffkemp/stargazers","contributors_url":"https://api.github.com/repos/lenticularis39/diffkemp/contributors","subscribers_url":"https://api.github.com/repos/lenticularis39/diffkemp/subscribers","subscription_url":"https://api.github.com/repos/lenticularis39/diffkemp/subscription","commits_url":"https://api.github.com/repos/lenticularis39/diffkemp/commits{/sha}","git_commits_url":"https://api.github.com/repos/lenticularis39/diffkemp/git/commits{/sha}","comments_url":"https://api.github.com/repos/lenticularis39/diffkemp/comments{/number}","issue_comment_url":"https://api.github.com/repos/lenticularis39/diffkemp/issues/comments{/number}","contents_url":"https://api.github.com/repos/lenticularis39/diffkemp/contents/{+path}","compare_url":"https://api.github.com/repos/lenticularis39/diffkemp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lenticularis39/diffkemp/merges","archive_url":"https://api.github.com/repos/lenticularis39/diffkemp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lenticularis39/diffkemp/downloads","issues_url":"https://api.github.com/repos/lenticularis39/diffkemp/issues{/number}","pulls_url":"https://api.github.com/repos/lenticularis39/diffkemp/pulls{/number}","milestones_url":"https://api.github.com/repos/lenticularis39/diffkemp/milestones{/number}","notifications_url":"https://api.github.com/repos/lenticularis39/diffkemp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lenticularis39/diffkemp/labels{/name}","releases_url":"https://api.github.com/repos/lenticularis39/diffkemp/releases{/id}","deployments_url":"https://api.github.com/repos/lenticularis39/diffkemp/deployments","created_at":"2018-07-16T11:15:41Z","updated_at":"2018-12-11T12:44:44Z","pushed_at":"2018-12-11T12:44:42Z","git_url":"git://github.com/lenticularis39/diffkemp.git","ssh_url":"git@github.com:lenticularis39/diffkemp.git","clone_url":"https://github.com/lenticularis39/diffkemp.git","svn_url":"https://github.com/lenticularis39/diffkemp","homepage":"","size":46932,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"viktormalik:master","ref":"master","sha":"87345d88c99f7d7bbf1b17ce687ac1b305ba25fe","user":{"login":"viktormalik","id":7603704,"node_id":"MDQ6VXNlcjc2MDM3MDQ=","avatar_url":"https://avatars2.githubusercontent.com/u/7603704?v=4","gravatar_id":"","url":"https://api.github.com/users/viktormalik","html_url":"https://github.com/viktormalik","followers_url":"https://api.github.com/users/viktormalik/followers","following_url":"https://api.github.com/users/viktormalik/following{/other_user}","gists_url":"https://api.github.com/users/viktormalik/gists{/gist_id}","starred_url":"https://api.github.com/users/viktormalik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viktormalik/subscriptions","organizations_url":"https://api.github.com/users/viktormalik/orgs","repos_url":"https://api.github.com/users/viktormalik/repos","events_url":"https://api.github.com/users/viktormalik/events{/privacy}","received_events_url":"https://api.github.com/users/viktormalik/received_events","type":"User","site_admin":false},"repo":{"id":114360782,"node_id":"MDEwOlJlcG9zaXRvcnkxMTQzNjA3ODI=","name":"diffkemp","full_name":"viktormalik/diffkemp","private":false,"owner":{"login":"viktormalik","id":7603704,"node_id":"MDQ6VXNlcjc2MDM3MDQ=","avatar_url":"https://avatars2.githubusercontent.com/u/7603704?v=4","gravatar_id":"","url":"https://api.github.com/users/viktormalik","html_url":"https://github.com/viktormalik","followers_url":"https://api.github.com/users/viktormalik/followers","following_url":"https://api.github.com/users/viktormalik/following{/other_user}","gists_url":"https://api.github.com/users/viktormalik/gists{/gist_id}","starred_url":"https://api.github.com/users/viktormalik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viktormalik/subscriptions","organizations_url":"https://api.github.com/users/viktormalik/orgs","repos_url":"https://api.github.com/users/viktormalik/repos","events_url":"https://api.github.com/users/viktormalik/events{/privacy}","received_events_url":"https://api.github.com/users/viktormalik/received_events","type":"User","site_admin":false},"html_url":"https://github.com/viktormalik/diffkemp","description":"Automatic static analysis of semantic difference of kernel configuration options","fork":false,"url":"https://api.github.com/repos/viktormalik/diffkemp","forks_url":"https://api.github.com/repos/viktormalik/diffkemp/forks","keys_url":"https://api.github.com/repos/viktormalik/diffkemp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/viktormalik/diffkemp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/viktormalik/diffkemp/teams","hooks_url":"https://api.github.com/repos/viktormalik/diffkemp/hooks","issue_events_url":"https://api.github.com/repos/viktormalik/diffkemp/issues/events{/number}","events_url":"https://api.github.com/repos/viktormalik/diffkemp/events","assignees_url":"https://api.github.com/repos/viktormalik/diffkemp/assignees{/user}","branches_url":"https://api.github.com/repos/viktormalik/diffkemp/branches{/branch}","tags_url":"https://api.github.com/repos/viktormalik/diffkemp/tags","blobs_url":"https://api.github.com/repos/viktormalik/diffkemp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/viktormalik/diffkemp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/viktormalik/diffkemp/git/refs{/sha}","trees_url":"https://api.github.com/repos/viktormalik/diffkemp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/viktormalik/diffkemp/statuses/{sha}","languages_url":"https://api.github.com/repos/viktormalik/diffkemp/languages","stargazers_url":"https://api.github.com/repos/viktormalik/diffkemp/stargazers","contributors_url":"https://api.github.com/repos/viktormalik/diffkemp/contributors","subscribers_url":"https://api.github.com/repos/viktormalik/diffkemp/subscribers","subscription_url":"https://api.github.com/repos/viktormalik/diffkemp/subscription","commits_url":"https://api.github.com/repos/viktormalik/diffkemp/commits{/sha}","git_commits_url":"https://api.github.com/repos/viktormalik/diffkemp/git/commits{/sha}","comments_url":"https://api.github.com/repos/viktormalik/diffkemp/comments{/number}","issue_comment_url":"https://api.github.com/repos/viktormalik/diffkemp/issues/comments{/number}","contents_url":"https://api.github.com/repos/viktormalik/diffkemp/contents/{+path}","compare_url":"https://api.github.com/repos/viktormalik/diffkemp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/viktormalik/diffkemp/merges","archive_url":"https://api.github.com/repos/viktormalik/diffkemp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/viktormalik/diffkemp/downloads","issues_url":"https://api.github.com/repos/viktormalik/diffkemp/issues{/number}","pulls_url":"https://api.github.com/repos/viktormalik/diffkemp/pulls{/number}","milestones_url":"https://api.github.com/repos/viktormalik/diffkemp/milestones{/number}","notifications_url":"https://api.github.com/repos/viktormalik/diffkemp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/viktormalik/diffkemp/labels{/name}","releases_url":"https://api.github.com/repos/viktormalik/diffkemp/releases{/id}","deployments_url":"https://api.github.com/repos/viktormalik/diffkemp/deployments","created_at":"2017-12-15T10:53:40Z","updated_at":"2018-12-07T07:59:11Z","pushed_at":"2018-12-11T12:39:59Z","git_url":"git://github.com/viktormalik/diffkemp.git","ssh_url":"git@github.com:viktormalik/diffkemp.git","clone_url":"https://github.com/viktormalik/diffkemp.git","svn_url":"https://github.com/viktormalik/diffkemp","homepage":"","size":46930,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"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":2,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/viktormalik/diffkemp/pulls/19"},"html":{"href":"https://github.com/viktormalik/diffkemp/pull/19"},"issue":{"href":"https://api.github.com/repos/viktormalik/diffkemp/issues/19"},"comments":{"href":"https://api.github.com/repos/viktormalik/diffkemp/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/viktormalik/diffkemp/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/viktormalik/diffkemp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/viktormalik/diffkemp/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/viktormalik/diffkemp/statuses/d58d119dc96d4e5e465042dd3df8ba64aa0edaa8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"viktormalik"}}