{"action":"created","issue":{"url":"https://api.github.com/repos/LuaJIT/LuaJIT/issues/37","repository_url":"https://api.github.com/repos/LuaJIT/LuaJIT","labels_url":"https://api.github.com/repos/LuaJIT/LuaJIT/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/LuaJIT/LuaJIT/issues/37/comments","events_url":"https://api.github.com/repos/LuaJIT/LuaJIT/issues/37/events","html_url":"https://github.com/LuaJIT/LuaJIT/issues/37","id":101743845,"number":37,"title":"Add Hyperblock Scheduling","user":{"login":"MikePall","id":496664,"avatar_url":"https://avatars.githubusercontent.com/u/496664?v=3","gravatar_id":"","url":"https://api.github.com/users/MikePall","html_url":"https://github.com/MikePall","followers_url":"https://api.github.com/users/MikePall/followers","following_url":"https://api.github.com/users/MikePall/following{/other_user}","gists_url":"https://api.github.com/users/MikePall/gists{/gist_id}","starred_url":"https://api.github.com/users/MikePall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikePall/subscriptions","organizations_url":"https://api.github.com/users/MikePall/orgs","repos_url":"https://api.github.com/users/MikePall/repos","events_url":"https://api.github.com/users/MikePall/events{/privacy}","received_events_url":"https://api.github.com/users/MikePall/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/LuaJIT/LuaJIT/labels/difficult","name":"difficult","color":"eb6420"},{"url":"https://api.github.com/repos/LuaJIT/LuaJIT/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-08-18T20:40:25Z","updated_at":"2016-06-05T15:36:27Z","closed_at":null,"body":"Producing good code for unbiased branches is a key problem for trace compilers. This is the main cause for \"trace explosion\" and bad performance with certain types of branchy code.\r\n\r\nHyperblock scheduling promises to solve this nicely at the price of a major redesign of the compiler: selected traces are woven together to a single hyper-trace. This would also pave the way for emitting predicated instructions, which benefits some CPUs (e.g. ARM) and is a prerequisite for efficient vectorization.\r\n\r\nBe warned: this is heavy stuff! Something for a thesis, not for an afternoon.\r\n\r\nProbably needs a major reorganization of the compiler. Requires an (adjunct) predicated IR. Selecting a profitable region for this optimization is the first hurdle. The merge phase for the predicated IR is tough.\r\n\r\nAsk me, if you need a motivating example of how a predicated IR would look like and what this would enable. But don't hold your breath, this requires a long explanation."},"comment":{"url":"https://api.github.com/repos/LuaJIT/LuaJIT/issues/comments/223819875","html_url":"https://github.com/LuaJIT/LuaJIT/issues/37#issuecomment-223819875","issue_url":"https://api.github.com/repos/LuaJIT/LuaJIT/issues/37","id":223819875,"user":{"login":"lukego","id":13791,"avatar_url":"https://avatars.githubusercontent.com/u/13791?v=3","gravatar_id":"","url":"https://api.github.com/users/lukego","html_url":"https://github.com/lukego","followers_url":"https://api.github.com/users/lukego/followers","following_url":"https://api.github.com/users/lukego/following{/other_user}","gists_url":"https://api.github.com/users/lukego/gists{/gist_id}","starred_url":"https://api.github.com/users/lukego/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukego/subscriptions","organizations_url":"https://api.github.com/users/lukego/orgs","repos_url":"https://api.github.com/users/lukego/repos","events_url":"https://api.github.com/users/lukego/events{/privacy}","received_events_url":"https://api.github.com/users/lukego/received_events","type":"User","site_admin":false},"created_at":"2016-06-05T15:36:27Z","updated_at":"2016-06-05T15:36:27Z","body":"I am becoming interested in a related problem: How about if a branch is heavily biased but the bias changes over time?\r\n\r\nThis seems to be a problematic case for Snabb applications recently. Specifically, the workload changes and performance degrades and a `jit.flush()` is required to recover performance. It would be wonderful if the JIT could detect this situation much more quickly and adapt the traces before application behavior is impacted.\r\n\r\nIs this perhaps a simpler problem that could be solved within the current framework? (For example, might one detect when a branch becomes biased towards a side-trace rather than the root trace and then re-record? In my own naive mental model this seems similar to how CPU branch prediction works.)"}}
{"actor":{"display_login":"lukego"}}