-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
bump minimum LLVM version to 5.0 #51899
Changes from all commits
4ff90c7
52d7740
23dfb42
fe75f61
3b36ce6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ use builder::Builder; | |
use common::{CodegenCx, Funclet}; | ||
use debuginfo::{self, declare_local, VariableAccess, VariableKind, FunctionDebugContext}; | ||
use monomorphize::Instance; | ||
use abi::{ArgAttribute, ArgTypeExt, FnType, FnTypeExt, PassMode}; | ||
use abi::{ArgTypeExt, FnType, FnTypeExt, PassMode}; | ||
use type_::Type; | ||
|
||
use syntax_pos::{DUMMY_SP, NO_EXPANSION, BytePos, Span}; | ||
|
@@ -430,10 +430,6 @@ fn arg_local_refs<'a, 'tcx>(bx: &Builder<'a, 'tcx>, | |
None | ||
}; | ||
|
||
let deref_op = unsafe { | ||
[llvm::LLVMRustDIBuilderCreateOpDeref()] | ||
}; | ||
|
||
mir.args_iter().enumerate().map(|(arg_index, local)| { | ||
let arg_decl = &mir.local_decls[local]; | ||
|
||
|
@@ -543,21 +539,11 @@ fn arg_local_refs<'a, 'tcx>(bx: &Builder<'a, 'tcx>, | |
if arg_index > 0 || mir.upvar_decls.is_empty() { | ||
// The Rust ABI passes indirect variables using a pointer and a manual copy, so we | ||
// need to insert a deref here, but the C ABI uses a pointer and a copy using the | ||
// byval attribute, for which LLVM does the deref itself, so we must not add it. | ||
// Starting with D31439 in LLVM 5, it *always* does the deref itself. | ||
let mut variable_access = VariableAccess::DirectVariable { | ||
// byval attribute, for which LLVM always does the deref itself, | ||
// so we must not add it. | ||
let variable_access = VariableAccess::DirectVariable { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, this sort of change is why I pointed out that llvm-emscripten is still on LLVM 4. Won't it be broken by this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If Emscripten had working debuginfo it might be broken yeah but I don't think it has debuginfo to nearly this level of fidelity for it to matter too much |
||
alloca: place.llval | ||
}; | ||
if unsafe { llvm::LLVMRustVersionMajor() < 5 } { | ||
if let PassMode::Indirect(ref attrs) = arg.mode { | ||
if !attrs.contains(ArgAttribute::ByVal) { | ||
variable_access = VariableAccess::IndirectVariable { | ||
alloca: place.llval, | ||
address_operations: &deref_op, | ||
}; | ||
} | ||
} | ||
} | ||
|
||
declare_local( | ||
bx, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
// ignore-tidy-linelength | ||
// ignore-windows | ||
// ignore-macos | ||
// min-system-llvm-version 5.1 | ||
// min-llvm-version 6.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oops, I don't know if I messed this up. Like LLVM 5.1 does not exist, are we sure whatever change was needed was not part of LLVM 6.0 and that the patch will be backported to LLVM 5.1 if it is ever released (which seems unlikely) ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That was part of #45897, which included rust-lang/llvm#97 with D39503. That patch is indeed included in LLVM 6.0, and I don't think there's any point tagging this for a hypothetical 5.1. |
||
|
||
// compile-flags: -g -C no-prepopulate-passes | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,9 +8,6 @@ | |
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
// asmjs can't even pass i128 as arguments or return values, so ignore it. | ||
// this will hopefully be fixed by the LLVM 5 upgrade (#43370) | ||
// ignore-asmjs | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The issue is closed, we'll se if this works, but if it doesn't, it might need a new issue. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since asmjs isn't upgraded here this is probably still an issue but I'm fine waiting for bors too! |
||
// ignore-emscripten | ||
|
||
// compile-flags: -Z lower_128bit_ops=yes -C debug_assertions=no | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
# min-llvm-version 4.0 | ||
# ignore-msvc | ||
|
||
-include ../tools.mk | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ | |
// except according to those terms. | ||
|
||
// aux-build:dylib.rs | ||
// min-llvm-version 4.0 | ||
|
||
extern crate dylib; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @nox