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

Prepare for LLVM 10 upgrade #67900

Merged
merged 18 commits into from Jan 13, 2020
Merged

Prepare for LLVM 10 upgrade #67900

merged 18 commits into from Jan 13, 2020

Conversation

@nikic
Copy link
Contributor

nikic commented Jan 5, 2020

Split off from #67759, this just adds the necessary compatibility bits and updates codegen tests, without performing the actual LLVM upgrade.

r? @alexcrichton

@nikic nikic mentioned this pull request Jan 5, 2020
5 of 8 tasks complete
Copy link
Contributor

nagisa left a comment

This PR removes debug info tests for LLVM 5/6, but this PR does not explicitly appear to remove any code that would otherwise break those tests (even though LLVM 6 is no longer supported AFAIK)?

Either way r=me once we flesh out the data layout string story.

@@ -156,6 +172,13 @@ pub unsafe fn create_module(
if llvm_util::get_major_version() < 9 {
target_data_layout = strip_function_ptr_alignment(target_data_layout);
}
if sess.target.target.arch == "x86" || sess.target.target.arch == "x86_64" {

This comment has been minimized.

Copy link
@nagisa

nagisa Jan 5, 2020

Contributor

We should do either one or the other, not both, if either one at all. i.e. we ought to pick whether our target data layouts strings are llvm10 (which IMO they should be) or something else. Then we don’t need code that can both "upgrade" and "downgrade" the string.

This comment has been minimized.

Copy link
@nikic

nikic Jan 6, 2020

Author Contributor

There's three parts here:

  • Data layout in our own target definitions: I agree that we should update those to use the LLVM 10 data layouts.
  • Downgrade support: If we use LLVM 10 data layout, then we must have downgrade support, otherwise older LLVM versions cannot be used anymore.
  • Upgrade support: Upgrade support is needed if we want to keep 3rd party target definitions (for x86 based targets) working. If we're okay with breaking these and have no stability guarantees in this area, then we can drop the upgrade support.

This comment has been minimized.

Copy link
@nagisa

nagisa Jan 6, 2020

Contributor

I don’t believe we have any stability guarantees for external target files. Going in that direction would necessitate removing at least some fields from target specs and data layout would be one of those fields -- we dont want to be on the hook for ensuring stability of LLVM's interfaces.

With that in mind I'd be happy with this if we only kept the downgrade code.

This comment has been minimized.

Copy link
@nikic

nikic Jan 7, 2020

Author Contributor

I've dropped the upgrade code and updated all the in-tree targets ... hopefully without typos ;)

@nikic

This comment has been minimized.

Copy link
Contributor Author

nikic commented Jan 6, 2020

This PR removes debug info tests for LLVM 5/6, but this PR does not explicitly appear to remove any code that would otherwise break those tests (even though LLVM 6 is no longer supported AFAIK)?

Right, these tests should have been dropped when LLVM 6 support was dropped (I can't find the relevant PR, because searching for LLVM in PRs is impossible...) The tests fail under LLVM 10 because LLVM 10 is not included in the ignore line, but it seemed to make little sense to extend the ignore if there aren't any non-ignored versions left anymore...

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jan 6, 2020

Oh wow that's a good number of changes! I feel the same way as @nagisa, so I defer to ...

r? @nagisa

@rust-highfive rust-highfive assigned nagisa and unassigned alexcrichton Jan 6, 2020
@nikic nikic force-pushed the nikic:prepare-llvm-10 branch from c508b96 to c9e996f Jan 7, 2020
@nagisa

This comment has been minimized.

Copy link
Contributor

nagisa commented Jan 8, 2020

@bors r+ rollup=never

@nagisa nagisa closed this Jan 8, 2020
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 8, 2020

📌 Commit c9e996f has been approved by nagisa

@nagisa nagisa reopened this Jan 8, 2020
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 13, 2020

⌛️ Testing commit c9e996f with merge e82febc...

bors added a commit that referenced this pull request Jan 13, 2020
Prepare for LLVM 10 upgrade

Split off from #67759, this just adds the necessary compatibility bits and updates codegen tests, without performing the actual LLVM upgrade.

r? @alexcrichton
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 13, 2020

☀️ Test successful - checks-azure
Approved by: nagisa
Pushing e82febc to master...

@bors bors added the merged-by-bors label Jan 13, 2020
@bors bors merged commit c9e996f into rust-lang:master Jan 13, 2020
5 checks passed
5 checks passed
homu Test successful
Details
pr Build #20200108.4 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-7) Linux x86_64-gnu-llvm-7 succeeded
Details
pr (Linux x86_64-gnu-tools) Linux x86_64-gnu-tools succeeded
Details
@MabezDev MabezDev mentioned this pull request Jan 17, 2020
bors added a commit that referenced this pull request Jan 19, 2020
[WIP] Update to LLVM 10

LLVM 10 is going to be branched soon, so it's a good time to start finding all those tasty new miscompiles and performance regressions ;)

Status:

 * Preparation split off into #67900.
 * Optimization regressions:
   * [x] https://bugs.llvm.org/show_bug.cgi?id=44419 => https://reviews.llvm.org/D72048 has landed.
   * [x] https://bugs.llvm.org/show_bug.cgi?id=44423 => https://reviews.llvm.org/D72060 has landed.
   * [ ] https://reviews.llvm.org/D72169 submitted.
   * [ ] https://bugs.llvm.org/show_bug.cgi?id=44461 reported. https://reviews.llvm.org/D72420 under review.
 * Compile-time regressions:
   * [x] GlobalOpt regression identified. ~~fhahn proposed https://reviews.llvm.org/D72214.~~ fhahn has [reverted](llvm/llvm-project@192cce1) the patch.
   * [ ] Even with the revert, there are [large regressions](https://perf.rust-lang.org/compare.html?start=760ce94c69ca510d44087291c311296f6d9ccdf5&end=4e84f97d76e694bb9f59039f5bdeb6d8bca46d14)

r? @ghost
bors added a commit that referenced this pull request Jan 30, 2020
[WIP] Update to LLVM 10

LLVM 10 is going to be branched soon, so it's a good time to start finding all those tasty new miscompiles and performance regressions ;)

Status:

 * Preparation split off into #67900.
 * Optimization regressions:
   * [x] https://bugs.llvm.org/show_bug.cgi?id=44419 => https://reviews.llvm.org/D72048 has landed.
   * [x] https://bugs.llvm.org/show_bug.cgi?id=44423 => https://reviews.llvm.org/D72060 has landed.
   * [ ] https://reviews.llvm.org/D72169 submitted.
   * [ ] https://bugs.llvm.org/show_bug.cgi?id=44461 reported. https://reviews.llvm.org/D72420 under review.
 * Compile-time regressions:
   * [x] GlobalOpt regression identified. ~~fhahn proposed https://reviews.llvm.org/D72214.~~ fhahn has [reverted](llvm/llvm-project@192cce1) the patch.
   * [ ] Even with the revert, there are [large regressions](https://perf.rust-lang.org/compare.html?start=760ce94c69ca510d44087291c311296f6d9ccdf5&end=4e84f97d76e694bb9f59039f5bdeb6d8bca46d14)
 * Assertion failures:
   * [ ] https://bugs.llvm.org/show_bug.cgi?id=44600

r? @ghost
bors added a commit that referenced this pull request Feb 4, 2020
[WIP] Update to LLVM 10

LLVM 10 is going to be branched soon, so it's a good time to start finding all those tasty new miscompiles and performance regressions ;)

Status:

 * Preparation split off into #67900.
 * Optimization regressions:
   * [x] https://bugs.llvm.org/show_bug.cgi?id=44419 => https://reviews.llvm.org/D72048 has landed.
   * [x] https://bugs.llvm.org/show_bug.cgi?id=44423 => https://reviews.llvm.org/D72060 has landed.
   * [ ] https://reviews.llvm.org/D72169 submitted.
   * [ ] https://bugs.llvm.org/show_bug.cgi?id=44461 reported. https://reviews.llvm.org/D72420 under review.
 * Compile-time regressions:
   * [x] GlobalOpt regression identified. ~~fhahn proposed https://reviews.llvm.org/D72214.~~ fhahn has [reverted](llvm/llvm-project@192cce1) the patch.
   * [ ] Even with the revert, there are [large regressions](https://perf.rust-lang.org/compare.html?start=760ce94c69ca510d44087291c311296f6d9ccdf5&end=4e84f97d76e694bb9f59039f5bdeb6d8bca46d14)
 * Assertion failures:
   * [ ] https://bugs.llvm.org/show_bug.cgi?id=44600 => https://reviews.llvm.org/D73135 has landed. Pending cherry-pick to 10.x branch.

r? @ghost
bors added a commit that referenced this pull request Feb 4, 2020
[WIP] Update to LLVM 10

LLVM 10 is going to be branched soon, so it's a good time to start finding all those tasty new miscompiles and performance regressions ;)

Status:

 * Preparation split off into #67900.
 * Optimization regressions:
   * [x] https://bugs.llvm.org/show_bug.cgi?id=44419 => https://reviews.llvm.org/D72048 has landed.
   * [x] https://bugs.llvm.org/show_bug.cgi?id=44423 => https://reviews.llvm.org/D72060 has landed.
   * [ ] https://reviews.llvm.org/D72169 submitted.
   * [ ] https://bugs.llvm.org/show_bug.cgi?id=44461 reported. https://reviews.llvm.org/D72420 under review.
 * Compile-time regressions:
   * [x] GlobalOpt regression identified. ~~fhahn proposed https://reviews.llvm.org/D72214.~~ fhahn has [reverted](llvm/llvm-project@192cce1) the patch.
   * [ ] Even with the revert, there are [large regressions](https://perf.rust-lang.org/compare.html?start=760ce94c69ca510d44087291c311296f6d9ccdf5&end=4e84f97d76e694bb9f59039f5bdeb6d8bca46d14)
 * Assertion failures:
   * [ ] https://bugs.llvm.org/show_bug.cgi?id=44600 => https://reviews.llvm.org/D73135, https://reviews.llvm.org/D73854 and https://reviews.llvm.org/D73908 have landed. Pending cherry-pick to 10.x branch.

r? @ghost
bors added a commit that referenced this pull request Feb 5, 2020
Update to LLVM 10

LLVM 10 is going to be branched soon, so it's a good time to start finding all those tasty new miscompiles and performance regressions ;)

Status:

 * Preparation split off into #67900.
 * Optimization regressions:
   * [x] https://bugs.llvm.org/show_bug.cgi?id=44419 => https://reviews.llvm.org/D72048 has landed.
   * [x] https://bugs.llvm.org/show_bug.cgi?id=44423 => https://reviews.llvm.org/D72060 has landed.
   * [ ] https://reviews.llvm.org/D72169 submitted.
   * [ ] https://bugs.llvm.org/show_bug.cgi?id=44461 reported. https://reviews.llvm.org/D72420 submitted, but unlikely eligible for LLVM 10.
 * Compile-time regressions:
   * [x] GlobalOpt regression identified. ~~fhahn proposed https://reviews.llvm.org/D72214.~~ fhahn has [reverted](llvm/llvm-project@192cce1) the patch.
   * [ ] Even with the revert, there are [large regressions](https://perf.rust-lang.org/compare.html?start=760ce94c69ca510d44087291c311296f6d9ccdf5&end=4e84f97d76e694bb9f59039f5bdeb6d8bca46d14).
 * Assertion failures:
   * [x] https://bugs.llvm.org/show_bug.cgi?id=44600 => https://reviews.llvm.org/D73135, https://reviews.llvm.org/D73854 and https://reviews.llvm.org/D73908 have landed and been cherry-picked to the 10.x branch.

r? @ghost
bors added a commit that referenced this pull request Feb 10, 2020
Update to LLVM 10

LLVM 10 is going to be branched soon, so it's a good time to start finding all those tasty new miscompiles and performance regressions ;)

Status:

 * Preparation split off into #67900.
 * Optimization regressions:
   * [x] https://bugs.llvm.org/show_bug.cgi?id=44419 => https://reviews.llvm.org/D72048 has landed.
   * [x] https://bugs.llvm.org/show_bug.cgi?id=44423 => https://reviews.llvm.org/D72060 has landed.
   * [ ] https://reviews.llvm.org/D72169 submitted.
   * [ ] https://bugs.llvm.org/show_bug.cgi?id=44461 reported. https://reviews.llvm.org/D72420 submitted, but unlikely eligible for LLVM 10.
 * Compile-time regressions:
   * [x] GlobalOpt regression identified. ~~fhahn proposed https://reviews.llvm.org/D72214.~~ fhahn has [reverted](llvm/llvm-project@192cce1) the patch.
   * [ ] Even with the revert, there are [large regressions](https://perf.rust-lang.org/compare.html?start=760ce94c69ca510d44087291c311296f6d9ccdf5&end=4e84f97d76e694bb9f59039f5bdeb6d8bca46d14).
 * Assertion failures / infinite loops:
   * [x] https://bugs.llvm.org/show_bug.cgi?id=44600 => https://reviews.llvm.org/D73135, https://reviews.llvm.org/D73854 and https://reviews.llvm.org/D73908 have landed and been cherry-picked to the 10.x branch.
   * [x] https://bugs.llvm.org/show_bug.cgi?id=44835 => https://reviews.llvm.org/D74278 has landed and been cherry-picked.

r? @ghost
bors added a commit that referenced this pull request Feb 11, 2020
Update to LLVM 10

LLVM 10 is going to be branched soon, so it's a good time to start finding all those tasty new miscompiles and performance regressions ;)

Status:

 * Preparation split off into #67900.
 * Optimization regressions:
   * [x] https://bugs.llvm.org/show_bug.cgi?id=44419 => https://reviews.llvm.org/D72048 has landed.
   * [x] https://bugs.llvm.org/show_bug.cgi?id=44423 => https://reviews.llvm.org/D72060 has landed.
   * [ ] https://reviews.llvm.org/D72169 submitted.
   * [ ] https://bugs.llvm.org/show_bug.cgi?id=44461 reported. https://reviews.llvm.org/D72420 submitted, but unlikely eligible for LLVM 10.
 * Compile-time regressions:
   * [x] GlobalOpt regression identified. ~~fhahn proposed https://reviews.llvm.org/D72214.~~ fhahn has [reverted](llvm/llvm-project@192cce1) the patch.
   * [ ] Even with the revert, there are [large regressions](https://perf.rust-lang.org/compare.html?start=760ce94c69ca510d44087291c311296f6d9ccdf5&end=4e84f97d76e694bb9f59039f5bdeb6d8bca46d14).
 * Assertion failures / infinite loops:
   * [x] https://bugs.llvm.org/show_bug.cgi?id=44600 => https://reviews.llvm.org/D73135, https://reviews.llvm.org/D73854 and https://reviews.llvm.org/D73908 have landed and been cherry-picked to the 10.x branch.
   * [x] https://bugs.llvm.org/show_bug.cgi?id=44835 => https://reviews.llvm.org/D74278 has landed and been cherry-picked.

r? @ghost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.