{"action":"created","issue":{"url":"https://api.github.com/repos/ocaml/ocaml/issues/367","labels_url":"https://api.github.com/repos/ocaml/ocaml/issues/367/labels{/name}","comments_url":"https://api.github.com/repos/ocaml/ocaml/issues/367/comments","events_url":"https://api.github.com/repos/ocaml/ocaml/issues/367/events","html_url":"https://github.com/ocaml/ocaml/pull/367","id":123502313,"number":367,"title":"Allow more CSE of loads from immutable blocks","user":{"login":"mshinwell","id":1315488,"avatar_url":"https://avatars.githubusercontent.com/u/1315488?v=3","gravatar_id":"","url":"https://api.github.com/users/mshinwell","html_url":"https://github.com/mshinwell","followers_url":"https://api.github.com/users/mshinwell/followers","following_url":"https://api.github.com/users/mshinwell/following{/other_user}","gists_url":"https://api.github.com/users/mshinwell/gists{/gist_id}","starred_url":"https://api.github.com/users/mshinwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshinwell/subscriptions","organizations_url":"https://api.github.com/users/mshinwell/orgs","repos_url":"https://api.github.com/users/mshinwell/repos","events_url":"https://api.github.com/users/mshinwell/events{/privacy}","received_events_url":"https://api.github.com/users/mshinwell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-22T15:33:44Z","updated_at":"2015-12-22T17:12:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ocaml/ocaml/pulls/367","html_url":"https://github.com/ocaml/ocaml/pull/367","diff_url":"https://github.com/ocaml/ocaml/pull/367.diff","patch_url":"https://github.com/ocaml/ocaml/pull/367.patch"},"body":"Morally speaking, this patch is small: it changes CSEgen so that values computed by loading from an immutable place are not killed by stores.\r\n\r\nThe specific near-term aim is to permit accesses to closure environments to be subject to CSE.\r\n\r\nWith flambda I measure this patch giving a 2.5% speedup on Knuth-Bendix, which is quite significant for a small change.\r\n\r\n@lpw25 has a more complete implementation of the front-end portion of this patch on the multicore branch that, instead of adding Pimmutable_field, alters Pfield to always carry such information (together with a flag saying whether the value is always immediate).  This could have fairly wide applicability, e.g. in reading from record fields, which more often than not are immutable.  I would like to consider merging that patch in the future---I haven't got time right now---but I think this one is a reasonable step along the way.\r\n\r\n(I will adjust the code for the other backends if this is accepted.)"},"comment":{"url":"https://api.github.com/repos/ocaml/ocaml/issues/comments/166677364","html_url":"https://github.com/ocaml/ocaml/pull/367#issuecomment-166677364","issue_url":"https://api.github.com/repos/ocaml/ocaml/issues/367","id":166677364,"user":{"login":"mshinwell","id":1315488,"avatar_url":"https://avatars.githubusercontent.com/u/1315488?v=3","gravatar_id":"","url":"https://api.github.com/users/mshinwell","html_url":"https://github.com/mshinwell","followers_url":"https://api.github.com/users/mshinwell/followers","following_url":"https://api.github.com/users/mshinwell/following{/other_user}","gists_url":"https://api.github.com/users/mshinwell/gists{/gist_id}","starred_url":"https://api.github.com/users/mshinwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshinwell/subscriptions","organizations_url":"https://api.github.com/users/mshinwell/orgs","repos_url":"https://api.github.com/users/mshinwell/repos","events_url":"https://api.github.com/users/mshinwell/events{/privacy}","received_events_url":"https://api.github.com/users/mshinwell/received_events","type":"User","site_admin":false},"created_at":"2015-12-22T17:12:07Z","updated_at":"2015-12-22T17:12:07Z","body":"Oh, and as regards header words---I thought we couldn't assume that in the compiler due to Obj.truncate."}}