{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/llilc/pulls/comments/30624653","id":30624653,"diff_hunk":"@@ -3675,6 +3746,16 @@ IRNode *GenIR::addressOfValue(IRNode *Leaf) {\n     StoreInst *Store = LLVMBuilder->CreateStore(Leaf, Alloc);\n     return (IRNode *)Alloc;\n   }\n+  case Type::TypeID::PointerTyID: {\n+    assert(doesValueRepresentStruct(Leaf));\n+\n+    // Create a new pointer to the struct. The new pointer will point to the\n+    // same struct as the original pointer but doesValueRepresentStruct will\n+    // return false for the new pointer.\n+    Instruction *Alloc = createTemporary(LeafTy);\n+    StoreInst *Store = LLVMBuilder->CreateStore(Leaf, Alloc);\n+    return (IRNode *)LLVMBuilder->CreateLoad(Alloc);\n+  }","path":"lib/Reader/readerir.cpp","position":254,"original_position":254,"commit_id":"288311d1ce19fb43b5c6fbd75d0d012c47f6c3f4","original_commit_id":"288311d1ce19fb43b5c6fbd75d0d012c47f6c3f4","user":{"login":"AndyAyersMS","id":10121823,"avatar_url":"https://avatars.githubusercontent.com/u/10121823?v=3","gravatar_id":"","url":"https://api.github.com/users/AndyAyersMS","html_url":"https://github.com/AndyAyersMS","followers_url":"https://api.github.com/users/AndyAyersMS/followers","following_url":"https://api.github.com/users/AndyAyersMS/following{/other_user}","gists_url":"https://api.github.com/users/AndyAyersMS/gists{/gist_id}","starred_url":"https://api.github.com/users/AndyAyersMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndyAyersMS/subscriptions","organizations_url":"https://api.github.com/users/AndyAyersMS/orgs","repos_url":"https://api.github.com/users/AndyAyersMS/repos","events_url":"https://api.github.com/users/AndyAyersMS/events{/privacy}","received_events_url":"https://api.github.com/users/AndyAyersMS/received_events","type":"User","site_admin":false},"body":"I don't understand why we can't just return the existing pointer.","created_at":"2015-05-19T17:34:05Z","updated_at":"2015-05-19T17:34:05Z","html_url":"https://github.com/dotnet/llilc/pull/580#discussion_r30624653","pull_request_url":"https://api.github.com/repos/dotnet/llilc/pulls/580","_links":{"self":{"href":"https://api.github.com/repos/dotnet/llilc/pulls/comments/30624653"},"html":{"href":"https://github.com/dotnet/llilc/pull/580#discussion_r30624653"},"pull_request":{"href":"https://api.github.com/repos/dotnet/llilc/pulls/580"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/llilc/pulls/580","id":35694490,"html_url":"https://github.com/dotnet/llilc/pull/580","diff_url":"https://github.com/dotnet/llilc/pull/580.diff","patch_url":"https://github.com/dotnet/llilc/pull/580.patch","issue_url":"https://api.github.com/repos/dotnet/llilc/issues/580","number":580,"state":"open","locked":false,"title":"Disallow first-class aggregates in LLVM IR we are generating.","user":{"login":"erozenfeld","id":10624223,"avatar_url":"https://avatars.githubusercontent.com/u/10624223?v=3","gravatar_id":"","url":"https://api.github.com/users/erozenfeld","html_url":"https://github.com/erozenfeld","followers_url":"https://api.github.com/users/erozenfeld/followers","following_url":"https://api.github.com/users/erozenfeld/following{/other_user}","gists_url":"https://api.github.com/users/erozenfeld/gists{/gist_id}","starred_url":"https://api.github.com/users/erozenfeld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erozenfeld/subscriptions","organizations_url":"https://api.github.com/users/erozenfeld/orgs","repos_url":"https://api.github.com/users/erozenfeld/repos","events_url":"https://api.github.com/users/erozenfeld/events{/privacy}","received_events_url":"https://api.github.com/users/erozenfeld/received_events","type":"User","site_admin":false},"body":"They were causing struct type mismatches due to generic sharing\r\nand also had potential optimization issues.\r\n\r\nNo values of StructType are allowed on the operand stack.\r\nInstead pointers to structs are pushed to the stack and\r\nrecorded in StructPointers set.\r\n\r\nWhen a struct needs to be loaded we make a copy of the struct\r\nand return a pointer to the copy.\r\n\r\naddressOfValue doesn't need to copy the struct. Instead a pointer\r\nto the struct is copied.\r\n\r\nStruct type mismatches on the stack and at PHI joins\r\nare handled by casting the pointers representing the structs.\r\n\r\nCloses #407.\r\nCloses #441.","created_at":"2015-05-19T04:04:43Z","updated_at":"2015-05-19T17:34:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fc7c7378e12a74c90364f3ae16952a8f41409feb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/llilc/pulls/580/commits","review_comments_url":"https://api.github.com/repos/dotnet/llilc/pulls/580/comments","review_comment_url":"https://api.github.com/repos/dotnet/llilc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/llilc/issues/580/comments","statuses_url":"https://api.github.com/repos/dotnet/llilc/statuses/288311d1ce19fb43b5c6fbd75d0d012c47f6c3f4","head":{"label":"erozenfeld:StructTypeMismatch","ref":"StructTypeMismatch","sha":"288311d1ce19fb43b5c6fbd75d0d012c47f6c3f4","user":{"login":"erozenfeld","id":10624223,"avatar_url":"https://avatars.githubusercontent.com/u/10624223?v=3","gravatar_id":"","url":"https://api.github.com/users/erozenfeld","html_url":"https://github.com/erozenfeld","followers_url":"https://api.github.com/users/erozenfeld/followers","following_url":"https://api.github.com/users/erozenfeld/following{/other_user}","gists_url":"https://api.github.com/users/erozenfeld/gists{/gist_id}","starred_url":"https://api.github.com/users/erozenfeld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erozenfeld/subscriptions","organizations_url":"https://api.github.com/users/erozenfeld/orgs","repos_url":"https://api.github.com/users/erozenfeld/repos","events_url":"https://api.github.com/users/erozenfeld/events{/privacy}","received_events_url":"https://api.github.com/users/erozenfeld/received_events","type":"User","site_admin":false},"repo":{"id":33960070,"name":"llilc","full_name":"erozenfeld/llilc","owner":{"login":"erozenfeld","id":10624223,"avatar_url":"https://avatars.githubusercontent.com/u/10624223?v=3","gravatar_id":"","url":"https://api.github.com/users/erozenfeld","html_url":"https://github.com/erozenfeld","followers_url":"https://api.github.com/users/erozenfeld/followers","following_url":"https://api.github.com/users/erozenfeld/following{/other_user}","gists_url":"https://api.github.com/users/erozenfeld/gists{/gist_id}","starred_url":"https://api.github.com/users/erozenfeld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erozenfeld/subscriptions","organizations_url":"https://api.github.com/users/erozenfeld/orgs","repos_url":"https://api.github.com/users/erozenfeld/repos","events_url":"https://api.github.com/users/erozenfeld/events{/privacy}","received_events_url":"https://api.github.com/users/erozenfeld/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/erozenfeld/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/erozenfeld/llilc","forks_url":"https://api.github.com/repos/erozenfeld/llilc/forks","keys_url":"https://api.github.com/repos/erozenfeld/llilc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erozenfeld/llilc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erozenfeld/llilc/teams","hooks_url":"https://api.github.com/repos/erozenfeld/llilc/hooks","issue_events_url":"https://api.github.com/repos/erozenfeld/llilc/issues/events{/number}","events_url":"https://api.github.com/repos/erozenfeld/llilc/events","assignees_url":"https://api.github.com/repos/erozenfeld/llilc/assignees{/user}","branches_url":"https://api.github.com/repos/erozenfeld/llilc/branches{/branch}","tags_url":"https://api.github.com/repos/erozenfeld/llilc/tags","blobs_url":"https://api.github.com/repos/erozenfeld/llilc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erozenfeld/llilc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erozenfeld/llilc/git/refs{/sha}","trees_url":"https://api.github.com/repos/erozenfeld/llilc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erozenfeld/llilc/statuses/{sha}","languages_url":"https://api.github.com/repos/erozenfeld/llilc/languages","stargazers_url":"https://api.github.com/repos/erozenfeld/llilc/stargazers","contributors_url":"https://api.github.com/repos/erozenfeld/llilc/contributors","subscribers_url":"https://api.github.com/repos/erozenfeld/llilc/subscribers","subscription_url":"https://api.github.com/repos/erozenfeld/llilc/subscription","commits_url":"https://api.github.com/repos/erozenfeld/llilc/commits{/sha}","git_commits_url":"https://api.github.com/repos/erozenfeld/llilc/git/commits{/sha}","comments_url":"https://api.github.com/repos/erozenfeld/llilc/comments{/number}","issue_comment_url":"https://api.github.com/repos/erozenfeld/llilc/issues/comments{/number}","contents_url":"https://api.github.com/repos/erozenfeld/llilc/contents/{+path}","compare_url":"https://api.github.com/repos/erozenfeld/llilc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erozenfeld/llilc/merges","archive_url":"https://api.github.com/repos/erozenfeld/llilc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erozenfeld/llilc/downloads","issues_url":"https://api.github.com/repos/erozenfeld/llilc/issues{/number}","pulls_url":"https://api.github.com/repos/erozenfeld/llilc/pulls{/number}","milestones_url":"https://api.github.com/repos/erozenfeld/llilc/milestones{/number}","notifications_url":"https://api.github.com/repos/erozenfeld/llilc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erozenfeld/llilc/labels{/name}","releases_url":"https://api.github.com/repos/erozenfeld/llilc/releases{/id}","created_at":"2015-04-14T22:21:16Z","updated_at":"2015-04-14T22:21:17Z","pushed_at":"2015-05-19T04:03:25Z","git_url":"git://github.com/erozenfeld/llilc.git","ssh_url":"git@github.com:erozenfeld/llilc.git","clone_url":"https://github.com/erozenfeld/llilc.git","svn_url":"https://github.com/erozenfeld/llilc","homepage":"","size":5203,"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":"70d34029f80ecffc0fec43d1b55f81edb0fcabdf","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-05-18T00:11:08Z","pushed_at":"2015-05-19T04:56:05Z","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":12773,"stargazers_count":710,"watchers_count":710,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":127,"forks":56,"open_issues":127,"watchers":710,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/llilc/pulls/580"},"html":{"href":"https://github.com/dotnet/llilc/pull/580"},"issue":{"href":"https://api.github.com/repos/dotnet/llilc/issues/580"},"comments":{"href":"https://api.github.com/repos/dotnet/llilc/issues/580/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/llilc/pulls/580/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/llilc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/llilc/pulls/580/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/llilc/statuses/288311d1ce19fb43b5c6fbd75d0d012c47f6c3f4"}}}}