{"action":"created","comment":{"url":"https://api.github.com/repos/gabi-250/llvm-playground/pulls/comments/168148346","pull_request_review_id":96466468,"id":168148346,"diff_hunk":"@@ -0,0 +1,350 @@\n+#define UNW_LOCAL_ONLY","path":"src/stackmap_checker/guard.c","position":1,"original_position":1,"commit_id":"2c4be3a0009e533c02ab72b0a618100ddac3e681","original_commit_id":"2c4be3a0009e533c02ab72b0a618100ddac3e681","user":{"login":"gabi-250","id":15640520,"avatar_url":"https://avatars2.githubusercontent.com/u/15640520?v=4","gravatar_id":"","url":"https://api.github.com/users/gabi-250","html_url":"https://github.com/gabi-250","followers_url":"https://api.github.com/users/gabi-250/followers","following_url":"https://api.github.com/users/gabi-250/following{/other_user}","gists_url":"https://api.github.com/users/gabi-250/gists{/gist_id}","starred_url":"https://api.github.com/users/gabi-250/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabi-250/subscriptions","organizations_url":"https://api.github.com/users/gabi-250/orgs","repos_url":"https://api.github.com/users/gabi-250/repos","events_url":"https://api.github.com/users/gabi-250/events{/privacy}","received_events_url":"https://api.github.com/users/gabi-250/received_events","type":"User","site_admin":false},"body":"It is supposed to run an optimized version of `libunwind`:\r\n\r\n```\r\nHowever, if you tell libunwind that your program only needs local unwinding, then a special implementation can be selected which may run much faster than the generic implementation which supports both kinds of unwinding. To select this optimized version, simply define the macro UNW_LOCAL_ONLY before including the headerfile <libunwind.h>.\r\n```","created_at":"2018-02-14T11:36:47Z","updated_at":"2018-02-14T11:36:47Z","html_url":"https://github.com/gabi-250/llvm-playground/pull/9#discussion_r168148346","pull_request_url":"https://api.github.com/repos/gabi-250/llvm-playground/pulls/9","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/gabi-250/llvm-playground/pulls/comments/168148346"},"html":{"href":"https://github.com/gabi-250/llvm-playground/pull/9#discussion_r168148346"},"pull_request":{"href":"https://api.github.com/repos/gabi-250/llvm-playground/pulls/9"}},"in_reply_to_id":168128570},"pull_request":{"url":"https://api.github.com/repos/gabi-250/llvm-playground/pulls/9","id":169002171,"html_url":"https://github.com/gabi-250/llvm-playground/pull/9","diff_url":"https://github.com/gabi-250/llvm-playground/pull/9.diff","patch_url":"https://github.com/gabi-250/llvm-playground/pull/9.patch","issue_url":"https://api.github.com/repos/gabi-250/llvm-playground/issues/9","number":9,"state":"open","locked":false,"title":"Restore call stack","user":{"login":"gabi-250","id":15640520,"avatar_url":"https://avatars2.githubusercontent.com/u/15640520?v=4","gravatar_id":"","url":"https://api.github.com/users/gabi-250","html_url":"https://github.com/gabi-250","followers_url":"https://api.github.com/users/gabi-250/followers","following_url":"https://api.github.com/users/gabi-250/following{/other_user}","gists_url":"https://api.github.com/users/gabi-250/gists{/gist_id}","starred_url":"https://api.github.com/users/gabi-250/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabi-250/subscriptions","organizations_url":"https://api.github.com/users/gabi-250/orgs","repos_url":"https://api.github.com/users/gabi-250/repos","events_url":"https://api.github.com/users/gabi-250/events{/privacy}","received_events_url":"https://api.github.com/users/gabi-250/received_events","type":"User","site_admin":false},"body":"This introduces the code necessary to restore the state of each frame whenever a guard fails. This should also restore the register state.\r\n\r\nTo implement this, it was also necessary to:\r\n* remove the `MachineFunctionPass` I'd implemented and modify the `emitPrologue` and `emitEpilogue` code in `lib/Target/X86/X86FrameLowering.cpp` to ensure each optimized function has the same stack size as its unoptimized version\r\n* implement a crude version of live variable analysis in `CheckPointPass.cpp` (closes #2)\r\n* insert a `stackmap` call after each call to a function defined in the module being processed (also implemented in `CheckPointPass`). This allows the runtime to obtain a record of all the locations that are live at each call site. The address of the stackmap is automatically recorded, which allows the runtime to work out the return addresses of the 'unoptimized' functions. (closes #4)\r\n\r\nI've done my best to document my code, but I am aware it may not always be obvious what it does. Please let me know which parts are unclear/should be reimplemented.\r\n\r\n(Also closes #6 as far as I can tell)","created_at":"2018-02-14T01:35:05Z","updated_at":"2018-02-14T11:36:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0a60ebc8e76d0a43e3d106239c627baf6c37c194","assignee":{"login":"vext01","id":604955,"avatar_url":"https://avatars2.githubusercontent.com/u/604955?v=4","gravatar_id":"","url":"https://api.github.com/users/vext01","html_url":"https://github.com/vext01","followers_url":"https://api.github.com/users/vext01/followers","following_url":"https://api.github.com/users/vext01/following{/other_user}","gists_url":"https://api.github.com/users/vext01/gists{/gist_id}","starred_url":"https://api.github.com/users/vext01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vext01/subscriptions","organizations_url":"https://api.github.com/users/vext01/orgs","repos_url":"https://api.github.com/users/vext01/repos","events_url":"https://api.github.com/users/vext01/events{/privacy}","received_events_url":"https://api.github.com/users/vext01/received_events","type":"User","site_admin":false},"assignees":[{"login":"vext01","id":604955,"avatar_url":"https://avatars2.githubusercontent.com/u/604955?v=4","gravatar_id":"","url":"https://api.github.com/users/vext01","html_url":"https://github.com/vext01","followers_url":"https://api.github.com/users/vext01/followers","following_url":"https://api.github.com/users/vext01/following{/other_user}","gists_url":"https://api.github.com/users/vext01/gists{/gist_id}","starred_url":"https://api.github.com/users/vext01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vext01/subscriptions","organizations_url":"https://api.github.com/users/vext01/orgs","repos_url":"https://api.github.com/users/vext01/repos","events_url":"https://api.github.com/users/vext01/events{/privacy}","received_events_url":"https://api.github.com/users/vext01/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/gabi-250/llvm-playground/pulls/9/commits","review_comments_url":"https://api.github.com/repos/gabi-250/llvm-playground/pulls/9/comments","review_comment_url":"https://api.github.com/repos/gabi-250/llvm-playground/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gabi-250/llvm-playground/issues/9/comments","statuses_url":"https://api.github.com/repos/gabi-250/llvm-playground/statuses/2c4be3a0009e533c02ab72b0a618100ddac3e681","head":{"label":"gabi-250:restore-call-stack","ref":"restore-call-stack","sha":"2c4be3a0009e533c02ab72b0a618100ddac3e681","user":{"login":"gabi-250","id":15640520,"avatar_url":"https://avatars2.githubusercontent.com/u/15640520?v=4","gravatar_id":"","url":"https://api.github.com/users/gabi-250","html_url":"https://github.com/gabi-250","followers_url":"https://api.github.com/users/gabi-250/followers","following_url":"https://api.github.com/users/gabi-250/following{/other_user}","gists_url":"https://api.github.com/users/gabi-250/gists{/gist_id}","starred_url":"https://api.github.com/users/gabi-250/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabi-250/subscriptions","organizations_url":"https://api.github.com/users/gabi-250/orgs","repos_url":"https://api.github.com/users/gabi-250/repos","events_url":"https://api.github.com/users/gabi-250/events{/privacy}","received_events_url":"https://api.github.com/users/gabi-250/received_events","type":"User","site_admin":false},"repo":{"id":110292568,"name":"llvm-playground","full_name":"gabi-250/llvm-playground","owner":{"login":"gabi-250","id":15640520,"avatar_url":"https://avatars2.githubusercontent.com/u/15640520?v=4","gravatar_id":"","url":"https://api.github.com/users/gabi-250","html_url":"https://github.com/gabi-250","followers_url":"https://api.github.com/users/gabi-250/followers","following_url":"https://api.github.com/users/gabi-250/following{/other_user}","gists_url":"https://api.github.com/users/gabi-250/gists{/gist_id}","starred_url":"https://api.github.com/users/gabi-250/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabi-250/subscriptions","organizations_url":"https://api.github.com/users/gabi-250/orgs","repos_url":"https://api.github.com/users/gabi-250/repos","events_url":"https://api.github.com/users/gabi-250/events{/privacy}","received_events_url":"https://api.github.com/users/gabi-250/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gabi-250/llvm-playground","description":"Experimenting with LLVM","fork":false,"url":"https://api.github.com/repos/gabi-250/llvm-playground","forks_url":"https://api.github.com/repos/gabi-250/llvm-playground/forks","keys_url":"https://api.github.com/repos/gabi-250/llvm-playground/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gabi-250/llvm-playground/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gabi-250/llvm-playground/teams","hooks_url":"https://api.github.com/repos/gabi-250/llvm-playground/hooks","issue_events_url":"https://api.github.com/repos/gabi-250/llvm-playground/issues/events{/number}","events_url":"https://api.github.com/repos/gabi-250/llvm-playground/events","assignees_url":"https://api.github.com/repos/gabi-250/llvm-playground/assignees{/user}","branches_url":"https://api.github.com/repos/gabi-250/llvm-playground/branches{/branch}","tags_url":"https://api.github.com/repos/gabi-250/llvm-playground/tags","blobs_url":"https://api.github.com/repos/gabi-250/llvm-playground/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gabi-250/llvm-playground/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gabi-250/llvm-playground/git/refs{/sha}","trees_url":"https://api.github.com/repos/gabi-250/llvm-playground/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gabi-250/llvm-playground/statuses/{sha}","languages_url":"https://api.github.com/repos/gabi-250/llvm-playground/languages","stargazers_url":"https://api.github.com/repos/gabi-250/llvm-playground/stargazers","contributors_url":"https://api.github.com/repos/gabi-250/llvm-playground/contributors","subscribers_url":"https://api.github.com/repos/gabi-250/llvm-playground/subscribers","subscription_url":"https://api.github.com/repos/gabi-250/llvm-playground/subscription","commits_url":"https://api.github.com/repos/gabi-250/llvm-playground/commits{/sha}","git_commits_url":"https://api.github.com/repos/gabi-250/llvm-playground/git/commits{/sha}","comments_url":"https://api.github.com/repos/gabi-250/llvm-playground/comments{/number}","issue_comment_url":"https://api.github.com/repos/gabi-250/llvm-playground/issues/comments{/number}","contents_url":"https://api.github.com/repos/gabi-250/llvm-playground/contents/{+path}","compare_url":"https://api.github.com/repos/gabi-250/llvm-playground/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gabi-250/llvm-playground/merges","archive_url":"https://api.github.com/repos/gabi-250/llvm-playground/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gabi-250/llvm-playground/downloads","issues_url":"https://api.github.com/repos/gabi-250/llvm-playground/issues{/number}","pulls_url":"https://api.github.com/repos/gabi-250/llvm-playground/pulls{/number}","milestones_url":"https://api.github.com/repos/gabi-250/llvm-playground/milestones{/number}","notifications_url":"https://api.github.com/repos/gabi-250/llvm-playground/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gabi-250/llvm-playground/labels{/name}","releases_url":"https://api.github.com/repos/gabi-250/llvm-playground/releases{/id}","deployments_url":"https://api.github.com/repos/gabi-250/llvm-playground/deployments","created_at":"2017-11-10T21:05:25Z","updated_at":"2018-01-25T12:31:45Z","pushed_at":"2018-02-14T01:46:14Z","git_url":"git://github.com/gabi-250/llvm-playground.git","ssh_url":"git@github.com:gabi-250/llvm-playground.git","clone_url":"https://github.com/gabi-250/llvm-playground.git","svn_url":"https://github.com/gabi-250/llvm-playground","homepage":null,"size":91,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"gabi-250:master","ref":"master","sha":"f0e471ec109abb9f013eef47dd641c1d61182de0","user":{"login":"gabi-250","id":15640520,"avatar_url":"https://avatars2.githubusercontent.com/u/15640520?v=4","gravatar_id":"","url":"https://api.github.com/users/gabi-250","html_url":"https://github.com/gabi-250","followers_url":"https://api.github.com/users/gabi-250/followers","following_url":"https://api.github.com/users/gabi-250/following{/other_user}","gists_url":"https://api.github.com/users/gabi-250/gists{/gist_id}","starred_url":"https://api.github.com/users/gabi-250/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabi-250/subscriptions","organizations_url":"https://api.github.com/users/gabi-250/orgs","repos_url":"https://api.github.com/users/gabi-250/repos","events_url":"https://api.github.com/users/gabi-250/events{/privacy}","received_events_url":"https://api.github.com/users/gabi-250/received_events","type":"User","site_admin":false},"repo":{"id":110292568,"name":"llvm-playground","full_name":"gabi-250/llvm-playground","owner":{"login":"gabi-250","id":15640520,"avatar_url":"https://avatars2.githubusercontent.com/u/15640520?v=4","gravatar_id":"","url":"https://api.github.com/users/gabi-250","html_url":"https://github.com/gabi-250","followers_url":"https://api.github.com/users/gabi-250/followers","following_url":"https://api.github.com/users/gabi-250/following{/other_user}","gists_url":"https://api.github.com/users/gabi-250/gists{/gist_id}","starred_url":"https://api.github.com/users/gabi-250/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabi-250/subscriptions","organizations_url":"https://api.github.com/users/gabi-250/orgs","repos_url":"https://api.github.com/users/gabi-250/repos","events_url":"https://api.github.com/users/gabi-250/events{/privacy}","received_events_url":"https://api.github.com/users/gabi-250/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gabi-250/llvm-playground","description":"Experimenting with LLVM","fork":false,"url":"https://api.github.com/repos/gabi-250/llvm-playground","forks_url":"https://api.github.com/repos/gabi-250/llvm-playground/forks","keys_url":"https://api.github.com/repos/gabi-250/llvm-playground/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gabi-250/llvm-playground/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gabi-250/llvm-playground/teams","hooks_url":"https://api.github.com/repos/gabi-250/llvm-playground/hooks","issue_events_url":"https://api.github.com/repos/gabi-250/llvm-playground/issues/events{/number}","events_url":"https://api.github.com/repos/gabi-250/llvm-playground/events","assignees_url":"https://api.github.com/repos/gabi-250/llvm-playground/assignees{/user}","branches_url":"https://api.github.com/repos/gabi-250/llvm-playground/branches{/branch}","tags_url":"https://api.github.com/repos/gabi-250/llvm-playground/tags","blobs_url":"https://api.github.com/repos/gabi-250/llvm-playground/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gabi-250/llvm-playground/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gabi-250/llvm-playground/git/refs{/sha}","trees_url":"https://api.github.com/repos/gabi-250/llvm-playground/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gabi-250/llvm-playground/statuses/{sha}","languages_url":"https://api.github.com/repos/gabi-250/llvm-playground/languages","stargazers_url":"https://api.github.com/repos/gabi-250/llvm-playground/stargazers","contributors_url":"https://api.github.com/repos/gabi-250/llvm-playground/contributors","subscribers_url":"https://api.github.com/repos/gabi-250/llvm-playground/subscribers","subscription_url":"https://api.github.com/repos/gabi-250/llvm-playground/subscription","commits_url":"https://api.github.com/repos/gabi-250/llvm-playground/commits{/sha}","git_commits_url":"https://api.github.com/repos/gabi-250/llvm-playground/git/commits{/sha}","comments_url":"https://api.github.com/repos/gabi-250/llvm-playground/comments{/number}","issue_comment_url":"https://api.github.com/repos/gabi-250/llvm-playground/issues/comments{/number}","contents_url":"https://api.github.com/repos/gabi-250/llvm-playground/contents/{+path}","compare_url":"https://api.github.com/repos/gabi-250/llvm-playground/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gabi-250/llvm-playground/merges","archive_url":"https://api.github.com/repos/gabi-250/llvm-playground/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gabi-250/llvm-playground/downloads","issues_url":"https://api.github.com/repos/gabi-250/llvm-playground/issues{/number}","pulls_url":"https://api.github.com/repos/gabi-250/llvm-playground/pulls{/number}","milestones_url":"https://api.github.com/repos/gabi-250/llvm-playground/milestones{/number}","notifications_url":"https://api.github.com/repos/gabi-250/llvm-playground/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gabi-250/llvm-playground/labels{/name}","releases_url":"https://api.github.com/repos/gabi-250/llvm-playground/releases{/id}","deployments_url":"https://api.github.com/repos/gabi-250/llvm-playground/deployments","created_at":"2017-11-10T21:05:25Z","updated_at":"2018-01-25T12:31:45Z","pushed_at":"2018-02-14T01:46:14Z","git_url":"git://github.com/gabi-250/llvm-playground.git","ssh_url":"git@github.com:gabi-250/llvm-playground.git","clone_url":"https://github.com/gabi-250/llvm-playground.git","svn_url":"https://github.com/gabi-250/llvm-playground","homepage":null,"size":91,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gabi-250/llvm-playground/pulls/9"},"html":{"href":"https://github.com/gabi-250/llvm-playground/pull/9"},"issue":{"href":"https://api.github.com/repos/gabi-250/llvm-playground/issues/9"},"comments":{"href":"https://api.github.com/repos/gabi-250/llvm-playground/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/gabi-250/llvm-playground/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/gabi-250/llvm-playground/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gabi-250/llvm-playground/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/gabi-250/llvm-playground/statuses/2c4be3a0009e533c02ab72b0a618100ddac3e681"}},"author_association":"OWNER"}}
{"actor":{"display_login":"gabi-250"}}