{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/47828","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/47828/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/47828/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/47828/events","html_url":"https://github.com/rust-lang/rust/pull/47828","id":292229998,"number":47828,"title":"rustc: Upgrade to LLVM 6","user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars1.githubusercontent.com/u/64996?v=4","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"labels":[{"id":583436937,"url":"https://api.github.com/repos/rust-lang/rust/labels/S-waiting-on-author","name":"S-waiting-on-author","color":"d3dddd","default":false},{"id":211668100,"url":"https://api.github.com/repos/rust-lang/rust/labels/T-compiler","name":"T-compiler","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars0.githubusercontent.com/u/155238?v=4","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false},"assignees":[{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars0.githubusercontent.com/u/155238?v=4","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false}],"milestone":null,"comments":47,"created_at":"2018-01-28T19:15:22Z","updated_at":"2018-02-02T15:42:20Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/47828","html_url":"https://github.com/rust-lang/rust/pull/47828","diff_url":"https://github.com/rust-lang/rust/pull/47828.diff","patch_url":"https://github.com/rust-lang/rust/pull/47828.patch"},"body":"The following submodules have been updated for a new version of LLVM:\r\n\r\n- `src/llvm`\r\n- `src/libcompiler_builtins` - transitively contains compiler-rt\r\n- `src/dlmalloc`\r\n\r\nThis also updates the docker container for dist-i686-freebsd as the old 16.04\r\ncontainer is no longer capable of building LLVM. The\r\ncompiler-rt/compiler-builtins and dlmalloc updates are pretty routine without\r\nmuch interesting happening, but the LLVM update here is of particular note.\r\nUnlike previous updates I haven't cherry-picked all existing patches we had on\r\ntop of our LLVM branch as we have a [huge amount][patches4] and have at this\r\npoint forgotten what most of them are for. Instead I started from the current\r\n`release_60` branch in LLVM and only applied patches that were necessary to get\r\nour tests working and building.\r\n\r\nThe [current set of custom rustc-specific patches](https://github.com/rust-lang/llvm/compare/f1286127b73c0d81ced8595af62e78ed703ced8b...rust-llvm-release-6-0-0) included in this LLVM update are:\r\n\r\n* rust-lang/llvm@1187443 - this is how we actually implement\r\n  `cfg(target_feature)` for now and continues to not be upstreamed. While a\r\n  hazard for SIMD stabilization this commit is otherwise keeping the status\r\n  quo of a small rustc-specific feature.\r\n* rust-lang/llvm@013f2ec - this is a rustc-specific optimization that we haven't\r\n  upstreamed, notably teaching LLVM about our allocation-related routines (which\r\n  aren't malloc/free). Once we stabilize the global allocator routines we will\r\n  likely want to upstream this patch, but for now it seems reasonable to keep it\r\n  on our fork.\r\n* rust-lang/llvm@a65bbfd - I found this necessary to fix compilation of LLVM in\r\n  our 32-bit linux container. I'm not really sure why it's necessary but my\r\n  guess is that it's because of the absolutely ancient glibc that we're using.\r\n  In any case it's only updating pieces we're not actually using in LLVM so I'm\r\n  hoping it'll turn out alright. This doesn't seem like something we'll want to\r\n  upstream.c\r\n* rust-lang/llvm@77ab1f0 - this is what's actually enabling LLVM to build in our\r\n  i686-freebsd container, I'm not really sure what's going on but we for sure\r\n  probably don't want to upstream this and otherwise it seems not too bad for\r\n  now at least.\r\n* rust-lang/llvm@9eb9267 - we currently suffer on MSVC from an [upstream bug]\r\n  which although diagnosed to a particular revision isn't currently fixed\r\n  upstream (and the bug itself doesn't seem too active). This commit is a\r\n  partial revert of the suspected cause of this regression (found via a\r\n  bisection). I'm sort of hoping that this eventually gets fixed upstream with a\r\n  similar fix (which we can replace in our branch), but for now I'm also hoping\r\n  it's a relatively harmless change to have.\r\n\r\nAfter applying these patches (plus one [backport] which should be [backported\r\nupstream][llvm-back]) I believe we should have all tests working on all\r\nplatforms in our current test suite. I'm like 99% sure that we'll need some more\r\nbackports as issues are reported for LLVM 6 when this propagates through\r\nnightlies, but that's sort of just par for the course nowadays!\r\n\r\nIn any case though some extra scrutiny of the patches here would definitely be\r\nwelcome, along with scrutiny of the \"missing patches\" like a [change to pass\r\nmanager order](rust-lang/llvm@2717444), [another change to pass manager\r\norder](rust-lang/llvm@c782feb), some [compile fixes for\r\nsparc](rust-lang/llvm@1a83de6), and some [fixes for\r\nsolaris](rust-lang/llvm@c2bfe0a).\r\n\r\n[patches4]: rust-lang/llvm@5401fdf...rust-llvm-release-4-0-1\r\n[backport]: rust-lang/llvm@5c54c25\r\n[llvm-back]: https://bugs.llvm.org/show_bug.cgi?id=36114\r\n[upstream bug]: https://bugs.llvm.org/show_bug.cgi?id=36096\r\n\r\n---\r\n\r\nThe update to LLVM 6 is desirable for a number of reasons, notably:\r\n\r\n* This'll allow us to keep up with the upstream wasm backend, picking up new\r\n  features as they start landing.\r\n* Upstream LLVM has fixed a number of SIMD-related compilation errors,\r\n  especially around AVX-512 and such.\r\n* There's a few assorted known bugs which are fixed in LLVM 5 and aren't fixed\r\n  in the LLVM 4 branch we're using.\r\n* Overall it's not a great idea to stagnate with our codegen backend!\r\n\r\nThis update is mostly powered by #47730 which is allowing us to update LLVM\r\n*independent* of the version of LLVM that Emscripten is locked to. This means\r\nthat when compiling code for Emscripten we'll still be using the old LLVM 4\r\nbackend, but when compiling code for any other target we'll be using the new\r\nLLVM 6 target. Once Emscripten updates we may no longer need this distinction,\r\nbut we're not sure when that will happen!\r\n\r\nCloses #43370\r\nCloses #43418\r\nCloses #47015\r\nCloses #47683\r\nCloses rust-lang-nursery/stdsimd#157\r\nCloses rust-lang-nursery/rust-wasm#3"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/362621243","html_url":"https://github.com/rust-lang/rust/pull/47828#issuecomment-362621243","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/47828","id":362621243,"user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars1.githubusercontent.com/u/64996?v=4","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"created_at":"2018-02-02T15:42:20Z","updated_at":"2018-02-02T15:42:20Z","author_association":"OWNER","body":"@PaulGrandperrin unfortunately that may be an existing bug, it looks unrelated to this branch :("}}
{"actor":{"display_login":"alexcrichton"}}