{"action":"created","comment":{"url":"https://api.github.com/repos/CraneStation/cranelift/pulls/comments/224125306","pull_request_review_id":163414036,"id":224125306,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNDEyNTMwNg==","diff_hunk":"@@ -801,37 +803,50 @@ def valid_scale(iform):\n \n # XX /r register-indirect store with no offset.\n st = TailRecipe(\n-        'st', Store, size=1, ins=(GPR, GPR_ZERO_DEREF_SAFE), outs=(),\n+        'st', Store, base_size=1, ins=(GPR, GPR), outs=(),\n         instp=IsEqual(Store.offset, 0),\n         clobbers_flags=False,\n+        compute_size=\"size_plus_maybe_offset_1\",","path":"lib/codegen/meta-python/isa/x86/recipes.py","position":557,"original_position":557,"commit_id":"913fbd1ddca9d885a4cbfd9f8e8f3fb6326ac901","original_commit_id":"913fbd1ddca9d885a4cbfd9f8e8f3fb6326ac901","user":{"login":"sunfishcode","id":4503403,"node_id":"MDQ6VXNlcjQ1MDM0MDM=","avatar_url":"https://avatars1.githubusercontent.com/u/4503403?v=4","gravatar_id":"","url":"https://api.github.com/users/sunfishcode","html_url":"https://github.com/sunfishcode","followers_url":"https://api.github.com/users/sunfishcode/followers","following_url":"https://api.github.com/users/sunfishcode/following{/other_user}","gists_url":"https://api.github.com/users/sunfishcode/gists{/gist_id}","starred_url":"https://api.github.com/users/sunfishcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunfishcode/subscriptions","organizations_url":"https://api.github.com/users/sunfishcode/orgs","repos_url":"https://api.github.com/users/sunfishcode/repos","events_url":"https://api.github.com/users/sunfishcode/events{/privacy}","received_events_url":"https://api.github.com/users/sunfishcode/received_events","type":"User","site_admin":false},"body":"When I first read this, it wasn't obvious that the `_1` referred to `in_reg1`. Could we name it something like `size_plus_maybe_offset_for_in_reg1`?","created_at":"2018-10-10T15:22:36Z","updated_at":"2018-10-10T15:40:31Z","html_url":"https://github.com/CraneStation/cranelift/pull/552#discussion_r224125306","pull_request_url":"https://api.github.com/repos/CraneStation/cranelift/pulls/552","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/CraneStation/cranelift/pulls/comments/224125306"},"html":{"href":"https://github.com/CraneStation/cranelift/pull/552#discussion_r224125306"},"pull_request":{"href":"https://api.github.com/repos/CraneStation/cranelift/pulls/552"}}},"pull_request":{"url":"https://api.github.com/repos/CraneStation/cranelift/pulls/552","id":221144590,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxMTQ0NTkw","html_url":"https://github.com/CraneStation/cranelift/pull/552","diff_url":"https://github.com/CraneStation/cranelift/pull/552.diff","patch_url":"https://github.com/CraneStation/cranelift/pull/552.patch","issue_url":"https://api.github.com/repos/CraneStation/cranelift/issues/552","number":552,"state":"open","locked":false,"title":"Fix #335: Introduce variable size recipes and remove GPR_SAFE reg classes","user":{"login":"bnjbvr","id":1180019,"node_id":"MDQ6VXNlcjExODAwMTk=","avatar_url":"https://avatars1.githubusercontent.com/u/1180019?v=4","gravatar_id":"","url":"https://api.github.com/users/bnjbvr","html_url":"https://github.com/bnjbvr","followers_url":"https://api.github.com/users/bnjbvr/followers","following_url":"https://api.github.com/users/bnjbvr/following{/other_user}","gists_url":"https://api.github.com/users/bnjbvr/gists{/gist_id}","starred_url":"https://api.github.com/users/bnjbvr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnjbvr/subscriptions","organizations_url":"https://api.github.com/users/bnjbvr/orgs","repos_url":"https://api.github.com/users/bnjbvr/repos","events_url":"https://api.github.com/users/bnjbvr/events{/privacy}","received_events_url":"https://api.github.com/users/bnjbvr/received_events","type":"User","site_admin":false},"body":"This removes the GPR_SAFE_DEREF and GPR_ZERO_SAFE_DEREF register classes on x86, relaxing constraints for the solver. Each recipe (sizing) now gets an optional function pointer field `compute_size` that computes the size of the instruction given register inputs; this allows the generated code size to be variable, and thus to insert SIB bytes for r12/rsp when needed, and a zero offset for r13/rbp when needed. Then, we don't need the special register classes anymore.\r\n\r\nIt happens that a few of the register class constraints were incorrect in the first place, i.e., a recipe would say it needs GPR_SAFE_DEREF while it always emits a SIB byte. These recipes just have a fixed size in this case.\r\n\r\nI've tried to split my work into meaningful commits, to make review easier. I'd like to test this more, to make sure the generated code actually runs. Note that with this and #551, we can compile AngryBots and many other big wasm demos with Cranelift again.","created_at":"2018-10-08T14:47:28Z","updated_at":"2018-10-10T15:40:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"203ffd06695b011e2d56c4d97bef6eb33f1bc1f2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/CraneStation/cranelift/pulls/552/commits","review_comments_url":"https://api.github.com/repos/CraneStation/cranelift/pulls/552/comments","review_comment_url":"https://api.github.com/repos/CraneStation/cranelift/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CraneStation/cranelift/issues/552/comments","statuses_url":"https://api.github.com/repos/CraneStation/cranelift/statuses/913fbd1ddca9d885a4cbfd9f8e8f3fb6326ac901","head":{"label":"bnjbvr:fix-335","ref":"fix-335","sha":"913fbd1ddca9d885a4cbfd9f8e8f3fb6326ac901","user":{"login":"bnjbvr","id":1180019,"node_id":"MDQ6VXNlcjExODAwMTk=","avatar_url":"https://avatars1.githubusercontent.com/u/1180019?v=4","gravatar_id":"","url":"https://api.github.com/users/bnjbvr","html_url":"https://github.com/bnjbvr","followers_url":"https://api.github.com/users/bnjbvr/followers","following_url":"https://api.github.com/users/bnjbvr/following{/other_user}","gists_url":"https://api.github.com/users/bnjbvr/gists{/gist_id}","starred_url":"https://api.github.com/users/bnjbvr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnjbvr/subscriptions","organizations_url":"https://api.github.com/users/bnjbvr/orgs","repos_url":"https://api.github.com/users/bnjbvr/repos","events_url":"https://api.github.com/users/bnjbvr/events{/privacy}","received_events_url":"https://api.github.com/users/bnjbvr/received_events","type":"User","site_admin":false},"repo":{"id":72210049,"node_id":"MDEwOlJlcG9zaXRvcnk3MjIxMDA0OQ==","name":"cranelift","full_name":"bnjbvr/cranelift","private":false,"owner":{"login":"bnjbvr","id":1180019,"node_id":"MDQ6VXNlcjExODAwMTk=","avatar_url":"https://avatars1.githubusercontent.com/u/1180019?v=4","gravatar_id":"","url":"https://api.github.com/users/bnjbvr","html_url":"https://github.com/bnjbvr","followers_url":"https://api.github.com/users/bnjbvr/followers","following_url":"https://api.github.com/users/bnjbvr/following{/other_user}","gists_url":"https://api.github.com/users/bnjbvr/gists{/gist_id}","starred_url":"https://api.github.com/users/bnjbvr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnjbvr/subscriptions","organizations_url":"https://api.github.com/users/bnjbvr/orgs","repos_url":"https://api.github.com/users/bnjbvr/repos","events_url":"https://api.github.com/users/bnjbvr/events{/privacy}","received_events_url":"https://api.github.com/users/bnjbvr/received_events","type":"User","site_admin":false},"html_url":"https://github.com/bnjbvr/cranelift","description":"Cranelift code generator","fork":true,"url":"https://api.github.com/repos/bnjbvr/cranelift","forks_url":"https://api.github.com/repos/bnjbvr/cranelift/forks","keys_url":"https://api.github.com/repos/bnjbvr/cranelift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bnjbvr/cranelift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bnjbvr/cranelift/teams","hooks_url":"https://api.github.com/repos/bnjbvr/cranelift/hooks","issue_events_url":"https://api.github.com/repos/bnjbvr/cranelift/issues/events{/number}","events_url":"https://api.github.com/repos/bnjbvr/cranelift/events","assignees_url":"https://api.github.com/repos/bnjbvr/cranelift/assignees{/user}","branches_url":"https://api.github.com/repos/bnjbvr/cranelift/branches{/branch}","tags_url":"https://api.github.com/repos/bnjbvr/cranelift/tags","blobs_url":"https://api.github.com/repos/bnjbvr/cranelift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bnjbvr/cranelift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bnjbvr/cranelift/git/refs{/sha}","trees_url":"https://api.github.com/repos/bnjbvr/cranelift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bnjbvr/cranelift/statuses/{sha}","languages_url":"https://api.github.com/repos/bnjbvr/cranelift/languages","stargazers_url":"https://api.github.com/repos/bnjbvr/cranelift/stargazers","contributors_url":"https://api.github.com/repos/bnjbvr/cranelift/contributors","subscribers_url":"https://api.github.com/repos/bnjbvr/cranelift/subscribers","subscription_url":"https://api.github.com/repos/bnjbvr/cranelift/subscription","commits_url":"https://api.github.com/repos/bnjbvr/cranelift/commits{/sha}","git_commits_url":"https://api.github.com/repos/bnjbvr/cranelift/git/commits{/sha}","comments_url":"https://api.github.com/repos/bnjbvr/cranelift/comments{/number}","issue_comment_url":"https://api.github.com/repos/bnjbvr/cranelift/issues/comments{/number}","contents_url":"https://api.github.com/repos/bnjbvr/cranelift/contents/{+path}","compare_url":"https://api.github.com/repos/bnjbvr/cranelift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bnjbvr/cranelift/merges","archive_url":"https://api.github.com/repos/bnjbvr/cranelift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bnjbvr/cranelift/downloads","issues_url":"https://api.github.com/repos/bnjbvr/cranelift/issues{/number}","pulls_url":"https://api.github.com/repos/bnjbvr/cranelift/pulls{/number}","milestones_url":"https://api.github.com/repos/bnjbvr/cranelift/milestones{/number}","notifications_url":"https://api.github.com/repos/bnjbvr/cranelift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bnjbvr/cranelift/labels{/name}","releases_url":"https://api.github.com/repos/bnjbvr/cranelift/releases{/id}","deployments_url":"https://api.github.com/repos/bnjbvr/cranelift/deployments","created_at":"2016-10-28T13:32:25Z","updated_at":"2018-07-13T15:48:52Z","pushed_at":"2018-10-08T14:53:19Z","git_url":"git://github.com/bnjbvr/cranelift.git","ssh_url":"git@github.com:bnjbvr/cranelift.git","clone_url":"https://github.com/bnjbvr/cranelift.git","svn_url":"https://github.com/bnjbvr/cranelift","homepage":"","size":6640,"stargazers_count":0,"watchers_count":0,"language":"Rust","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":"CraneStation:master","ref":"master","sha":"50380806582a2d55ef92569223ea52346b93b097","user":{"login":"CraneStation","id":11573910,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNTczOTEw","avatar_url":"https://avatars3.githubusercontent.com/u/11573910?v=4","gravatar_id":"","url":"https://api.github.com/users/CraneStation","html_url":"https://github.com/CraneStation","followers_url":"https://api.github.com/users/CraneStation/followers","following_url":"https://api.github.com/users/CraneStation/following{/other_user}","gists_url":"https://api.github.com/users/CraneStation/gists{/gist_id}","starred_url":"https://api.github.com/users/CraneStation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CraneStation/subscriptions","organizations_url":"https://api.github.com/users/CraneStation/orgs","repos_url":"https://api.github.com/users/CraneStation/repos","events_url":"https://api.github.com/users/CraneStation/events{/privacy}","received_events_url":"https://api.github.com/users/CraneStation/received_events","type":"Organization","site_admin":false},"repo":{"id":50268165,"node_id":"MDEwOlJlcG9zaXRvcnk1MDI2ODE2NQ==","name":"cranelift","full_name":"CraneStation/cranelift","private":false,"owner":{"login":"CraneStation","id":11573910,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNTczOTEw","avatar_url":"https://avatars3.githubusercontent.com/u/11573910?v=4","gravatar_id":"","url":"https://api.github.com/users/CraneStation","html_url":"https://github.com/CraneStation","followers_url":"https://api.github.com/users/CraneStation/followers","following_url":"https://api.github.com/users/CraneStation/following{/other_user}","gists_url":"https://api.github.com/users/CraneStation/gists{/gist_id}","starred_url":"https://api.github.com/users/CraneStation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CraneStation/subscriptions","organizations_url":"https://api.github.com/users/CraneStation/orgs","repos_url":"https://api.github.com/users/CraneStation/repos","events_url":"https://api.github.com/users/CraneStation/events{/privacy}","received_events_url":"https://api.github.com/users/CraneStation/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/CraneStation/cranelift","description":"Cranelift code generator (formerly, Cretonne)","fork":false,"url":"https://api.github.com/repos/CraneStation/cranelift","forks_url":"https://api.github.com/repos/CraneStation/cranelift/forks","keys_url":"https://api.github.com/repos/CraneStation/cranelift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CraneStation/cranelift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CraneStation/cranelift/teams","hooks_url":"https://api.github.com/repos/CraneStation/cranelift/hooks","issue_events_url":"https://api.github.com/repos/CraneStation/cranelift/issues/events{/number}","events_url":"https://api.github.com/repos/CraneStation/cranelift/events","assignees_url":"https://api.github.com/repos/CraneStation/cranelift/assignees{/user}","branches_url":"https://api.github.com/repos/CraneStation/cranelift/branches{/branch}","tags_url":"https://api.github.com/repos/CraneStation/cranelift/tags","blobs_url":"https://api.github.com/repos/CraneStation/cranelift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CraneStation/cranelift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CraneStation/cranelift/git/refs{/sha}","trees_url":"https://api.github.com/repos/CraneStation/cranelift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CraneStation/cranelift/statuses/{sha}","languages_url":"https://api.github.com/repos/CraneStation/cranelift/languages","stargazers_url":"https://api.github.com/repos/CraneStation/cranelift/stargazers","contributors_url":"https://api.github.com/repos/CraneStation/cranelift/contributors","subscribers_url":"https://api.github.com/repos/CraneStation/cranelift/subscribers","subscription_url":"https://api.github.com/repos/CraneStation/cranelift/subscription","commits_url":"https://api.github.com/repos/CraneStation/cranelift/commits{/sha}","git_commits_url":"https://api.github.com/repos/CraneStation/cranelift/git/commits{/sha}","comments_url":"https://api.github.com/repos/CraneStation/cranelift/comments{/number}","issue_comment_url":"https://api.github.com/repos/CraneStation/cranelift/issues/comments{/number}","contents_url":"https://api.github.com/repos/CraneStation/cranelift/contents/{+path}","compare_url":"https://api.github.com/repos/CraneStation/cranelift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CraneStation/cranelift/merges","archive_url":"https://api.github.com/repos/CraneStation/cranelift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CraneStation/cranelift/downloads","issues_url":"https://api.github.com/repos/CraneStation/cranelift/issues{/number}","pulls_url":"https://api.github.com/repos/CraneStation/cranelift/pulls{/number}","milestones_url":"https://api.github.com/repos/CraneStation/cranelift/milestones{/number}","notifications_url":"https://api.github.com/repos/CraneStation/cranelift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CraneStation/cranelift/labels{/name}","releases_url":"https://api.github.com/repos/CraneStation/cranelift/releases{/id}","deployments_url":"https://api.github.com/repos/CraneStation/cranelift/deployments","created_at":"2016-01-24T02:04:11Z","updated_at":"2018-10-10T15:40:17Z","pushed_at":"2018-10-10T03:21:20Z","git_url":"git://github.com/CraneStation/cranelift.git","ssh_url":"git@github.com:CraneStation/cranelift.git","clone_url":"https://github.com/CraneStation/cranelift.git","svn_url":"https://github.com/CraneStation/cranelift","homepage":"https://cranelift.readthedocs.io/","size":6659,"stargazers_count":976,"watchers_count":976,"language":"Rust","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":90,"mirror_url":null,"archived":false,"open_issues_count":76,"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":90,"open_issues":76,"watchers":976,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CraneStation/cranelift/pulls/552"},"html":{"href":"https://github.com/CraneStation/cranelift/pull/552"},"issue":{"href":"https://api.github.com/repos/CraneStation/cranelift/issues/552"},"comments":{"href":"https://api.github.com/repos/CraneStation/cranelift/issues/552/comments"},"review_comments":{"href":"https://api.github.com/repos/CraneStation/cranelift/pulls/552/comments"},"review_comment":{"href":"https://api.github.com/repos/CraneStation/cranelift/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CraneStation/cranelift/pulls/552/commits"},"statuses":{"href":"https://api.github.com/repos/CraneStation/cranelift/statuses/913fbd1ddca9d885a4cbfd9f8e8f3fb6326ac901"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"sunfishcode"}}