Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM 7.0 tracking issue #50543

Closed
12 of 13 tasks
alexcrichton opened this issue May 8, 2018 · 2 comments
Closed
12 of 13 tasks

LLVM 7.0 tracking issue #50543

alexcrichton opened this issue May 8, 2018 · 2 comments
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature.

Comments

@alexcrichton
Copy link
Member

alexcrichton commented May 8, 2018

I'm opening this to track upgrading to LLVM 7.0. This version of LLVM has not been release and is currently in development on the master branch of LLVM itself, but I'd like to track possible regressions over time and otherwise try to routinely build rustc with LLVM 7 and make sure it keeps working

Reasons to upgrade to LLVM 7

... and likely more coming soon!

Changes required

  • Track down and fix rustdoc panic on x86_64 (and maybe i686?)
  • Track down, report, and pull in fix for codegen failure on Thumb platform
  • fs::tests::realpath_works_tricky is failing on x86_64 MSVC
  • PGO run-make-fulldeps tests failing on x86_64 MSVC
  • Update LLD's @-syntax to always use GNU quoting
  • Serialize custom sections to LLVM IR for wasm instead of manually handling them
  • IR syntax for memcpy/memmove has changed with argument alignments
  • getelementptr syntax has changed with argument alignment
  • Pass --gc-sections to wasm-ld
  • Leverage LLVM for wasm custom sections instead of implementing custom support
  • Pass the --stack-first option to wasm-ld by default
  • The wasm target is now named wasm32-unknown-unkonwn (no trailing -wasm)
  • Pass -O2 to LLD on wasm

Changes hoped for

@alexcrichton alexcrichton added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. labels May 8, 2018
@fitzgen
Copy link
Member

fitzgen commented May 8, 2018

I will try and land https://reviews.llvm.org/D46417 before we update LLVM too :)

Edit: this landed.

bors added a commit that referenced this issue Jul 3, 2018
Upgrade to LLVM's master branch (LLVM 7)

This commit upgrades the main LLVM submodule to LLVM's current master branch.
The LLD submodule is updated in tandem as well as compiler-builtins.

Along the way support was also added for LLVM 7's new features. This primarily
includes the support for custom section concatenation natively in LLD so we now
add wasm custom sections in LLVM IR rather than having custom support in rustc
itself for doing so.

Some other miscellaneous changes are:

* We now pass `--gc-sections` to `wasm-ld`
* The optimization level is now passed to `wasm-ld`
* A `--stack-first` option is passed to LLD to have stack overflow always cause
  a trap instead of corrupting static data
* The wasm target for LLVM switched to `wasm32-unknown-unknown`.
* The syntax for aligned pointers has changed in LLVM IR and tests are updated
  to reflect this.
* ~~The `thumbv6m-none-eabi` target is disabled due to an [LLVM bug][llbug]~~

Nowadays we've been mostly only upgrading whenever there's a major release of
LLVM but enough changes have been happening on the wasm target that there's been
growing motivation for quite some time now to upgrade out version of LLD. To
upgrade LLD, however, we need to upgrade LLVM to avoid needing to build yet
another version of LLVM on the builders.

The revision of LLVM in use here is arbitrarily chosen. We will likely need to
continue to update it over time if and when we discover bugs. Once LLVM 7 is
fully released we can switch to that channel as well.

[llbug]: https://bugs.llvm.org/show_bug.cgi?id=37382

cc #50543
bors added a commit that referenced this issue Jul 5, 2018
Upgrade to LLVM's master branch (LLVM 7)

### Current status

Blocked on a [performance regression](#51966 (comment)). The performance regression has an [upstream LLVM issue](https://bugs.llvm.org/show_bug.cgi?id=38047) and has also [been bisected](https://reviews.llvm.org/D44282) to an LLVM revision.

---

This commit upgrades the main LLVM submodule to LLVM's current master branch.
The LLD submodule is updated in tandem as well as compiler-builtins.

Along the way support was also added for LLVM 7's new features. This primarily
includes the support for custom section concatenation natively in LLD so we now
add wasm custom sections in LLVM IR rather than having custom support in rustc
itself for doing so.

Some other miscellaneous changes are:

* We now pass `--gc-sections` to `wasm-ld`
* The optimization level is now passed to `wasm-ld`
* A `--stack-first` option is passed to LLD to have stack overflow always cause
  a trap instead of corrupting static data
* The wasm target for LLVM switched to `wasm32-unknown-unknown`.
* The syntax for aligned pointers has changed in LLVM IR and tests are updated
  to reflect this.
* ~~The `thumbv6m-none-eabi` target is disabled due to an [LLVM bug][llbug]~~

Nowadays we've been mostly only upgrading whenever there's a major release of
LLVM but enough changes have been happening on the wasm target that there's been
growing motivation for quite some time now to upgrade out version of LLD. To
upgrade LLD, however, we need to upgrade LLVM to avoid needing to build yet
another version of LLVM on the builders.

The revision of LLVM in use here is arbitrarily chosen. We will likely need to
continue to update it over time if and when we discover bugs. Once LLVM 7 is
fully released we can switch to that channel as well.

[llbug]: https://bugs.llvm.org/show_bug.cgi?id=37382

cc #50543
bors added a commit that referenced this issue Jul 11, 2018
Upgrade to LLVM's master branch (LLVM 7)

### Current status

~~Blocked on a [performance regression](#51966 (comment)). The performance regression has an [upstream LLVM issue](https://bugs.llvm.org/show_bug.cgi?id=38047) and has also [been bisected](https://reviews.llvm.org/D44282) to an LLVM revision.~~

Ready to merge!

---

This commit upgrades the main LLVM submodule to LLVM's current master branch.
The LLD submodule is updated in tandem as well as compiler-builtins.

Along the way support was also added for LLVM 7's new features. This primarily
includes the support for custom section concatenation natively in LLD so we now
add wasm custom sections in LLVM IR rather than having custom support in rustc
itself for doing so.

Some other miscellaneous changes are:

* We now pass `--gc-sections` to `wasm-ld`
* The optimization level is now passed to `wasm-ld`
* A `--stack-first` option is passed to LLD to have stack overflow always cause
  a trap instead of corrupting static data
* The wasm target for LLVM switched to `wasm32-unknown-unknown`.
* The syntax for aligned pointers has changed in LLVM IR and tests are updated
  to reflect this.
* ~~The `thumbv6m-none-eabi` target is disabled due to an [LLVM bug][llbug]~~

Nowadays we've been mostly only upgrading whenever there's a major release of
LLVM but enough changes have been happening on the wasm target that there's been
growing motivation for quite some time now to upgrade out version of LLD. To
upgrade LLD, however, we need to upgrade LLVM to avoid needing to build yet
another version of LLVM on the builders.

The revision of LLVM in use here is arbitrarily chosen. We will likely need to
continue to update it over time if and when we discover bugs. Once LLVM 7 is
fully released we can switch to that channel as well.

[llbug]: https://bugs.llvm.org/show_bug.cgi?id=37382

cc #50543
@alexcrichton
Copy link
Member Author

Upgraded in #51966

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature.
Projects
None yet
Development

No branches or pull requests

2 participants