{"action":"created","issue":{"url":"https://api.github.com/repos/reactorlabs/sourir/issues/37","repository_url":"https://api.github.com/repos/reactorlabs/sourir","labels_url":"https://api.github.com/repos/reactorlabs/sourir/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/reactorlabs/sourir/issues/37/comments","events_url":"https://api.github.com/repos/reactorlabs/sourir/issues/37/events","html_url":"https://github.com/reactorlabs/sourir/pull/37","id":201886457,"number":37,"title":"Codemotion and fixes","user":{"login":"o-","id":710933,"avatar_url":"https://avatars.githubusercontent.com/u/710933?v=3","gravatar_id":"","url":"https://api.github.com/users/o-","html_url":"https://github.com/o-","followers_url":"https://api.github.com/users/o-/followers","following_url":"https://api.github.com/users/o-/following{/other_user}","gists_url":"https://api.github.com/users/o-/gists{/gist_id}","starred_url":"https://api.github.com/users/o-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/o-/subscriptions","organizations_url":"https://api.github.com/users/o-/orgs","repos_url":"https://api.github.com/users/o-/repos","events_url":"https://api.github.com/users/o-/events{/privacy}","received_events_url":"https://api.github.com/users/o-/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-01-19T15:11:01Z","updated_at":"2017-01-31T17:13:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/reactorlabs/sourir/pulls/37","html_url":"https://github.com/reactorlabs/sourir/pull/37","diff_url":"https://github.com/reactorlabs/sourir/pull/37.diff","patch_url":"https://github.com/reactorlabs/sourir/pull/37.patch"},"body":"sorry for this crazy big PR! I think it would be hard to entangle it. I can walk you through the changes though...\r\n\r\n1. needs cfg. therefore its based on #34 \r\n2. deals with the fact that we might have an already optimized program as input. we do not want to revisit the deopt targets (first of all pruning this code was our initial goal. secondly the invalidate is not symmetric in both branches (ie. the scope in the deopt case is different)) See commit ff00ac9 for the details.\r\n3. fixes the scope of landing pads: this was horribly broken, see a5d5772 for the details\r\n4. finally implements codemotion. for correct codemotion we need to be able to rename variables. since we want to be able to do this in the main program only and not in the deopt code I extended invalidate to support different in- and out- scopes"},"comment":{"url":"https://api.github.com/repos/reactorlabs/sourir/issues/comments/276427885","html_url":"https://github.com/reactorlabs/sourir/pull/37#issuecomment-276427885","issue_url":"https://api.github.com/repos/reactorlabs/sourir/issues/37","id":276427885,"user":{"login":"o-","id":710933,"avatar_url":"https://avatars.githubusercontent.com/u/710933?v=3","gravatar_id":"","url":"https://api.github.com/users/o-","html_url":"https://github.com/o-","followers_url":"https://api.github.com/users/o-/followers","following_url":"https://api.github.com/users/o-/following{/other_user}","gists_url":"https://api.github.com/users/o-/gists{/gist_id}","starred_url":"https://api.github.com/users/o-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/o-/subscriptions","organizations_url":"https://api.github.com/users/o-/orgs","repos_url":"https://api.github.com/users/o-/repos","events_url":"https://api.github.com/users/o-/events{/privacy}","received_events_url":"https://api.github.com/users/o-/received_events","type":"User","site_admin":false},"created_at":"2017-01-31T17:13:57Z","updated_at":"2017-01-31T17:13:57Z","body":"Can we maybe take a step back? We are not converging. I would propose to start from the requirements and how our discussions stem from them.\r\n\r\n## Variables\r\n\r\nWe have two types of variables in RIR. const and mut.\r\n\r\n1. The idea with const was to capture runtime constants. Therefore you can only assign once to it.\r\n2. Mut are the normal assignable variables.\r\n\r\nRegarding 1) How exactly are we planning to use the const variables? Should they have an ssa like property such that we can always point to their unique definition or do we accept conflicting definitions, ie do we accept:\r\n\r\n    if exp then const a = 2 else const a = 3; print a\r\n\r\nIs this relaxed version strong enough? My intuition is that it's probably ok but it does not buy us anything. Because you can rewrite to\r\n\r\n    mut a'; if exp then a' <- 2 else a' <- 3; const a <- a'; print a\r\n\r\nTherefore I think we should disallow it.\r\n\r\nRegarding 2) For mutable variables its always safe to maximize the scope (ie. start the program and start the landing pads with all the required declarations). In this case we do not have to worry about any scopes when doing transformations.\r\n\r\n## Scopes\r\n\r\nWe see scopes as our model of the frame of the function.\r\n\r\n1. In the optimized output the scopes have to be as tight as possible (ie. correspond with the liveness intervals)\r\n2. All incoming control flow must agree on a scope because otherwise you cannot map it to a static frame.\r\n3. In the invalidate case there must be a well defined mapping between optimized scope and unoptimized scope. Whether that mapping is just a filter operation or potentially something more powerful is an open question"}}
{"actor":{"display_login":"o-"}}