{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/llilc/pulls/comments/32361420","id":32361420,"diff_hunk":"@@ -6994,6 +7001,7 @@ void ReaderBase::readBytesForFlowGraphNodeHelper(\n     case ReaderBaseNS::CEE_LDC_I4_8:\n     case ReaderBaseNS::CEE_LDC_I4_M1:\n     LOAD_CONSTANT:\n+      nop();","path":"lib/Reader/reader.cpp","position":47,"original_position":47,"commit_id":"746e2531b972af9a553a8f29cf621bd4aa432ed1","original_commit_id":"746e2531b972af9a553a8f29cf621bd4aa432ed1","user":{"login":"adiaaida","id":9666644,"avatar_url":"https://avatars.githubusercontent.com/u/9666644?v=3","gravatar_id":"","url":"https://api.github.com/users/adiaaida","html_url":"https://github.com/adiaaida","followers_url":"https://api.github.com/users/adiaaida/followers","following_url":"https://api.github.com/users/adiaaida/following{/other_user}","gists_url":"https://api.github.com/users/adiaaida/gists{/gist_id}","starred_url":"https://api.github.com/users/adiaaida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adiaaida/subscriptions","organizations_url":"https://api.github.com/users/adiaaida/orgs","repos_url":"https://api.github.com/users/adiaaida/repos","events_url":"https://api.github.com/users/adiaaida/events{/privacy}","received_events_url":"https://api.github.com/users/adiaaida/received_events","type":"User","site_admin":false},"body":"I saw this with breaks too, which is where that nop for branches came from. I'm not sure how I would go about doing the check of if the last instruction in the current block doesn't have the stack empty debug info.","created_at":"2015-06-12T22:41:24Z","updated_at":"2015-06-12T22:41:24Z","html_url":"https://github.com/dotnet/llilc/pull/647#discussion_r32361420","pull_request_url":"https://api.github.com/repos/dotnet/llilc/pulls/647","_links":{"self":{"href":"https://api.github.com/repos/dotnet/llilc/pulls/comments/32361420"},"html":{"href":"https://github.com/dotnet/llilc/pull/647#discussion_r32361420"},"pull_request":{"href":"https://api.github.com/repos/dotnet/llilc/pulls/647"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/llilc/pulls/647","id":37604316,"html_url":"https://github.com/dotnet/llilc/pull/647","diff_url":"https://github.com/dotnet/llilc/pull/647.diff","patch_url":"https://github.com/dotnet/llilc/pull/647.patch","issue_url":"https://api.github.com/repos/dotnet/llilc/issues/647","number":647,"state":"open","locked":false,"title":"Add Debug Line Information Support to LLILC","user":{"login":"adiaaida","id":9666644,"avatar_url":"https://avatars.githubusercontent.com/u/9666644?v=3","gravatar_id":"","url":"https://api.github.com/users/adiaaida","html_url":"https://github.com/adiaaida","followers_url":"https://api.github.com/users/adiaaida/followers","following_url":"https://api.github.com/users/adiaaida/following{/other_user}","gists_url":"https://api.github.com/users/adiaaida/gists{/gist_id}","starred_url":"https://api.github.com/users/adiaaida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adiaaida/subscriptions","organizations_url":"https://api.github.com/users/adiaaida/orgs","repos_url":"https://api.github.com/users/adiaaida/repos","events_url":"https://api.github.com/users/adiaaida/events{/privacy}","received_events_url":"https://api.github.com/users/adiaaida/received_events","type":"User","site_admin":false},"body":"This change adds support to LLILC to send source line information to\r\nLLVM and then on to the CLR EE to be used in debugging. This change\r\nadds:\r\n\r\n* Support to the Reader to capture IL offsets and set them as debug\r\n  locations for instructions. To do so, this change adds calls to the\r\n  DIBuilder to create debug information for functions, and then to set\r\n  the DebugLoc information for each instruction. The debugger expects\r\n  offsets for the following: the start of a function, when the stack is\r\n  empty, and when we have a call instruction. To get this all piped\r\n  through LLVM properly, we had to insert extra nops for instances where\r\n  the stack is empty, but we were looking at a store for a local (this\r\n  gets swallowed by the following instruction). We also required extra\r\n  nops around branches to get information about breaks piped through\r\n  correctly. Finally, the debugger expects a location of where the\r\n  return MSIL instruction was, but it expects the actual return logic to\r\n  be considered part of the epilog. This is handled by the CoreCLR jit\r\n  by inserting a nop with the IL offset of the return instruction, and\r\n  everything after the nop has IL offset of -3 (epilog). Additionally,\r\n  we had to change the logic for creating nops. The logic we previously\r\n  had created a DoNothing intrinsic, which LLVM throws away. We needed\r\n  these nops to make it all the way through to the AsmPrinter, so we\r\n  changed nop creation to insert an inline asm nop, which LLVM preserves.\r\n* Adds an object loaded layer to capture native and IL offsets and send\r\n  them to the EE.","created_at":"2015-06-12T21:05:44Z","updated_at":"2015-06-12T22:41:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"03c76ed85329e164414ed7933a16b3c174aa5cf0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/llilc/pulls/647/commits","review_comments_url":"https://api.github.com/repos/dotnet/llilc/pulls/647/comments","review_comment_url":"https://api.github.com/repos/dotnet/llilc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/llilc/issues/647/comments","statuses_url":"https://api.github.com/repos/dotnet/llilc/statuses/746e2531b972af9a553a8f29cf621bd4aa432ed1","head":{"label":"adiaaida:debugOrc","ref":"debugOrc","sha":"746e2531b972af9a553a8f29cf621bd4aa432ed1","user":{"login":"adiaaida","id":9666644,"avatar_url":"https://avatars.githubusercontent.com/u/9666644?v=3","gravatar_id":"","url":"https://api.github.com/users/adiaaida","html_url":"https://github.com/adiaaida","followers_url":"https://api.github.com/users/adiaaida/followers","following_url":"https://api.github.com/users/adiaaida/following{/other_user}","gists_url":"https://api.github.com/users/adiaaida/gists{/gist_id}","starred_url":"https://api.github.com/users/adiaaida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adiaaida/subscriptions","organizations_url":"https://api.github.com/users/adiaaida/orgs","repos_url":"https://api.github.com/users/adiaaida/repos","events_url":"https://api.github.com/users/adiaaida/events{/privacy}","received_events_url":"https://api.github.com/users/adiaaida/received_events","type":"User","site_admin":false},"repo":{"id":33897060,"name":"llilc","full_name":"adiaaida/llilc","owner":{"login":"adiaaida","id":9666644,"avatar_url":"https://avatars.githubusercontent.com/u/9666644?v=3","gravatar_id":"","url":"https://api.github.com/users/adiaaida","html_url":"https://github.com/adiaaida","followers_url":"https://api.github.com/users/adiaaida/followers","following_url":"https://api.github.com/users/adiaaida/following{/other_user}","gists_url":"https://api.github.com/users/adiaaida/gists{/gist_id}","starred_url":"https://api.github.com/users/adiaaida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adiaaida/subscriptions","organizations_url":"https://api.github.com/users/adiaaida/orgs","repos_url":"https://api.github.com/users/adiaaida/repos","events_url":"https://api.github.com/users/adiaaida/events{/privacy}","received_events_url":"https://api.github.com/users/adiaaida/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adiaaida/llilc","description":"This repo contains LLILC, an LLVM based compiler for .NET Core. It includes a set of cross-platform .NET code generation tools that enables compilation of MSIL byte code to LLVM supported platforms.","fork":true,"url":"https://api.github.com/repos/adiaaida/llilc","forks_url":"https://api.github.com/repos/adiaaida/llilc/forks","keys_url":"https://api.github.com/repos/adiaaida/llilc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adiaaida/llilc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adiaaida/llilc/teams","hooks_url":"https://api.github.com/repos/adiaaida/llilc/hooks","issue_events_url":"https://api.github.com/repos/adiaaida/llilc/issues/events{/number}","events_url":"https://api.github.com/repos/adiaaida/llilc/events","assignees_url":"https://api.github.com/repos/adiaaida/llilc/assignees{/user}","branches_url":"https://api.github.com/repos/adiaaida/llilc/branches{/branch}","tags_url":"https://api.github.com/repos/adiaaida/llilc/tags","blobs_url":"https://api.github.com/repos/adiaaida/llilc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adiaaida/llilc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adiaaida/llilc/git/refs{/sha}","trees_url":"https://api.github.com/repos/adiaaida/llilc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adiaaida/llilc/statuses/{sha}","languages_url":"https://api.github.com/repos/adiaaida/llilc/languages","stargazers_url":"https://api.github.com/repos/adiaaida/llilc/stargazers","contributors_url":"https://api.github.com/repos/adiaaida/llilc/contributors","subscribers_url":"https://api.github.com/repos/adiaaida/llilc/subscribers","subscription_url":"https://api.github.com/repos/adiaaida/llilc/subscription","commits_url":"https://api.github.com/repos/adiaaida/llilc/commits{/sha}","git_commits_url":"https://api.github.com/repos/adiaaida/llilc/git/commits{/sha}","comments_url":"https://api.github.com/repos/adiaaida/llilc/comments{/number}","issue_comment_url":"https://api.github.com/repos/adiaaida/llilc/issues/comments{/number}","contents_url":"https://api.github.com/repos/adiaaida/llilc/contents/{+path}","compare_url":"https://api.github.com/repos/adiaaida/llilc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adiaaida/llilc/merges","archive_url":"https://api.github.com/repos/adiaaida/llilc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adiaaida/llilc/downloads","issues_url":"https://api.github.com/repos/adiaaida/llilc/issues{/number}","pulls_url":"https://api.github.com/repos/adiaaida/llilc/pulls{/number}","milestones_url":"https://api.github.com/repos/adiaaida/llilc/milestones{/number}","notifications_url":"https://api.github.com/repos/adiaaida/llilc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adiaaida/llilc/labels{/name}","releases_url":"https://api.github.com/repos/adiaaida/llilc/releases{/id}","created_at":"2015-04-13T22:17:23Z","updated_at":"2015-04-13T22:17:24Z","pushed_at":"2015-06-12T21:04:56Z","git_url":"git://github.com/adiaaida/llilc.git","ssh_url":"git@github.com:adiaaida/llilc.git","clone_url":"https://github.com/adiaaida/llilc.git","svn_url":"https://github.com/adiaaida/llilc","homepage":"","size":5907,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"e138b34d64edefa8f96b96591ea47a91d861db5c","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":30043131,"name":"llilc","full_name":"dotnet/llilc","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/llilc","description":"This repo contains LLILC, an LLVM based compiler for .NET Core. It includes a set of cross-platform .NET code generation tools that enables compilation of MSIL byte code to LLVM supported platforms.","fork":false,"url":"https://api.github.com/repos/dotnet/llilc","forks_url":"https://api.github.com/repos/dotnet/llilc/forks","keys_url":"https://api.github.com/repos/dotnet/llilc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/llilc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/llilc/teams","hooks_url":"https://api.github.com/repos/dotnet/llilc/hooks","issue_events_url":"https://api.github.com/repos/dotnet/llilc/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/llilc/events","assignees_url":"https://api.github.com/repos/dotnet/llilc/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/llilc/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/llilc/tags","blobs_url":"https://api.github.com/repos/dotnet/llilc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/llilc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/llilc/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/llilc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/llilc/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/llilc/languages","stargazers_url":"https://api.github.com/repos/dotnet/llilc/stargazers","contributors_url":"https://api.github.com/repos/dotnet/llilc/contributors","subscribers_url":"https://api.github.com/repos/dotnet/llilc/subscribers","subscription_url":"https://api.github.com/repos/dotnet/llilc/subscription","commits_url":"https://api.github.com/repos/dotnet/llilc/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/llilc/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/llilc/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/llilc/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/llilc/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/llilc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/llilc/merges","archive_url":"https://api.github.com/repos/dotnet/llilc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/llilc/downloads","issues_url":"https://api.github.com/repos/dotnet/llilc/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/llilc/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/llilc/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/llilc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/llilc/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/llilc/releases{/id}","created_at":"2015-01-29T21:52:01Z","updated_at":"2015-06-12T13:57:04Z","pushed_at":"2015-06-12T21:05:44Z","git_url":"git://github.com/dotnet/llilc.git","ssh_url":"git@github.com:dotnet/llilc.git","clone_url":"https://github.com/dotnet/llilc.git","svn_url":"https://github.com/dotnet/llilc","homepage":"","size":10511,"stargazers_count":748,"watchers_count":748,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":60,"mirror_url":null,"open_issues_count":148,"forks":60,"open_issues":148,"watchers":748,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/llilc/pulls/647"},"html":{"href":"https://github.com/dotnet/llilc/pull/647"},"issue":{"href":"https://api.github.com/repos/dotnet/llilc/issues/647"},"comments":{"href":"https://api.github.com/repos/dotnet/llilc/issues/647/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/llilc/pulls/647/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/llilc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/llilc/pulls/647/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/llilc/statuses/746e2531b972af9a553a8f29cf621bd4aa432ed1"}}}}