Update the minimum external LLVM to 11

This commit is contained in:
Josh Stone 2021-10-19 10:24:26 -07:00
parent 68a698baf6
commit 65150af1b4
47 changed files with 40 additions and 189 deletions

View file

@ -43,7 +43,7 @@ jobs:
- name: mingw-check - name: mingw-check
os: ubuntu-latest-xl os: ubuntu-latest-xl
env: {} env: {}
- name: x86_64-gnu-llvm-10 - name: x86_64-gnu-llvm-11
os: ubuntu-latest-xl os: ubuntu-latest-xl
env: {} env: {}
- name: x86_64-gnu-tools - name: x86_64-gnu-tools
@ -274,7 +274,7 @@ jobs:
- name: x86_64-gnu-distcheck - name: x86_64-gnu-distcheck
os: ubuntu-latest-xl os: ubuntu-latest-xl
env: {} env: {}
- name: x86_64-gnu-llvm-10 - name: x86_64-gnu-llvm-11
env: env:
RUST_BACKTRACE: 1 RUST_BACKTRACE: 1
os: ubuntu-latest-xl os: ubuntu-latest-xl

View file

@ -95,8 +95,7 @@ fn llvm_arg_to_arg_name(full_arg: &str) -> &str {
// Ref: // Ref:
// - https://github.com/rust-lang/rust/issues/85351 // - https://github.com/rust-lang/rust/issues/85351
// - https://reviews.llvm.org/D103167 // - https://reviews.llvm.org/D103167
let llvm_version = llvm_util::get_version(); if llvm_util::get_version() < (13, 0, 0) {
if llvm_version >= (11, 0, 0) && llvm_version < (13, 0, 0) {
add("-enable-machine-outliner=never", false); add("-enable-machine-outliner=never", false);
} }

View file

@ -98,10 +98,7 @@ extern "C" void LLVMRustCoverageWriteMapSectionNameToString(LLVMModuleRef M,
extern "C" void LLVMRustCoverageWriteFuncSectionNameToString(LLVMModuleRef M, extern "C" void LLVMRustCoverageWriteFuncSectionNameToString(LLVMModuleRef M,
RustStringRef Str) { RustStringRef Str) {
#if LLVM_VERSION_GE(11, 0)
WriteSectionNameToString(M, IPSK_covfun, Str); WriteSectionNameToString(M, IPSK_covfun, Str);
// else do nothing; the `Version` check will abort codegen on the Rust side
#endif
} }
extern "C" void LLVMRustCoverageWriteMappingVarNameToString(RustStringRef Str) { extern "C" void LLVMRustCoverageWriteMappingVarNameToString(RustStringRef Str) {
@ -111,9 +108,5 @@ extern "C" void LLVMRustCoverageWriteMappingVarNameToString(RustStringRef Str) {
} }
extern "C" uint32_t LLVMRustCoverageMappingVersion() { extern "C" uint32_t LLVMRustCoverageMappingVersion() {
#if LLVM_VERSION_GE(11, 0)
return coverage::CovMapVersion::Version4; return coverage::CovMapVersion::Version4;
#else
return coverage::CovMapVersion::Version3;
#endif
} }

View file

@ -54,10 +54,6 @@ typedef struct LLVMOpaqueTargetMachine *LLVMTargetMachineRef;
DEFINE_STDCXX_CONVERSION_FUNCTIONS(Pass, LLVMPassRef) DEFINE_STDCXX_CONVERSION_FUNCTIONS(Pass, LLVMPassRef)
DEFINE_STDCXX_CONVERSION_FUNCTIONS(TargetMachine, LLVMTargetMachineRef) DEFINE_STDCXX_CONVERSION_FUNCTIONS(TargetMachine, LLVMTargetMachineRef)
#if LLVM_VERSION_LT(11, 0)
DEFINE_STDCXX_CONVERSION_FUNCTIONS(PassManagerBuilder,
LLVMPassManagerBuilderRef)
#endif
extern "C" void LLVMInitializePasses() { extern "C" void LLVMInitializePasses() {
PassRegistry &Registry = *PassRegistry::getPassRegistry(); PassRegistry &Registry = *PassRegistry::getPassRegistry();
@ -857,13 +853,8 @@ LLVMRustOptimizeWithNewPassManager(
// PassBuilder does not create a pipeline. // PassBuilder does not create a pipeline.
std::vector<std::function<void(ModulePassManager &, OptimizationLevel)>> std::vector<std::function<void(ModulePassManager &, OptimizationLevel)>>
PipelineStartEPCallbacks; PipelineStartEPCallbacks;
#if LLVM_VERSION_GE(11, 0)
std::vector<std::function<void(ModulePassManager &, OptimizationLevel)>> std::vector<std::function<void(ModulePassManager &, OptimizationLevel)>>
OptimizerLastEPCallbacks; OptimizerLastEPCallbacks;
#else
std::vector<std::function<void(FunctionPassManager &, OptimizationLevel)>>
OptimizerLastEPCallbacks;
#endif
if (VerifyIR) { if (VerifyIR) {
PipelineStartEPCallbacks.push_back( PipelineStartEPCallbacks.push_back(
@ -896,7 +887,6 @@ LLVMRustOptimizeWithNewPassManager(
SanitizerOptions->SanitizeMemoryTrackOrigins, SanitizerOptions->SanitizeMemoryTrackOrigins,
SanitizerOptions->SanitizeMemoryRecover, SanitizerOptions->SanitizeMemoryRecover,
/*CompileKernel=*/false); /*CompileKernel=*/false);
#if LLVM_VERSION_GE(11, 0)
OptimizerLastEPCallbacks.push_back( OptimizerLastEPCallbacks.push_back(
[Options](ModulePassManager &MPM, OptimizationLevel Level) { [Options](ModulePassManager &MPM, OptimizationLevel Level) {
#if LLVM_VERSION_GE(14, 0) #if LLVM_VERSION_GE(14, 0)
@ -907,22 +897,9 @@ LLVMRustOptimizeWithNewPassManager(
MPM.addPass(createModuleToFunctionPassAdaptor(MemorySanitizerPass(Options))); MPM.addPass(createModuleToFunctionPassAdaptor(MemorySanitizerPass(Options)));
} }
); );
#else
PipelineStartEPCallbacks.push_back(
[Options](ModulePassManager &MPM, OptimizationLevel Level) {
MPM.addPass(MemorySanitizerPass(Options));
}
);
OptimizerLastEPCallbacks.push_back(
[Options](FunctionPassManager &FPM, OptimizationLevel Level) {
FPM.addPass(MemorySanitizerPass(Options));
}
);
#endif
} }
if (SanitizerOptions->SanitizeThread) { if (SanitizerOptions->SanitizeThread) {
#if LLVM_VERSION_GE(11, 0)
OptimizerLastEPCallbacks.push_back( OptimizerLastEPCallbacks.push_back(
[](ModulePassManager &MPM, OptimizationLevel Level) { [](ModulePassManager &MPM, OptimizationLevel Level) {
#if LLVM_VERSION_GE(14, 0) #if LLVM_VERSION_GE(14, 0)
@ -933,22 +910,9 @@ LLVMRustOptimizeWithNewPassManager(
MPM.addPass(createModuleToFunctionPassAdaptor(ThreadSanitizerPass())); MPM.addPass(createModuleToFunctionPassAdaptor(ThreadSanitizerPass()));
} }
); );
#else
PipelineStartEPCallbacks.push_back(
[](ModulePassManager &MPM, OptimizationLevel Level) {
MPM.addPass(ThreadSanitizerPass());
}
);
OptimizerLastEPCallbacks.push_back(
[](FunctionPassManager &FPM, OptimizationLevel Level) {
FPM.addPass(ThreadSanitizerPass());
}
);
#endif
} }
if (SanitizerOptions->SanitizeAddress) { if (SanitizerOptions->SanitizeAddress) {
#if LLVM_VERSION_GE(11, 0)
OptimizerLastEPCallbacks.push_back( OptimizerLastEPCallbacks.push_back(
[SanitizerOptions](ModulePassManager &MPM, OptimizationLevel Level) { [SanitizerOptions](ModulePassManager &MPM, OptimizationLevel Level) {
MPM.addPass(RequireAnalysisPass<ASanGlobalsMetadataAnalysis, Module>()); MPM.addPass(RequireAnalysisPass<ASanGlobalsMetadataAnalysis, Module>());
@ -967,29 +931,8 @@ LLVMRustOptimizeWithNewPassManager(
#endif #endif
} }
); );
#else
PipelineStartEPCallbacks.push_back(
[&](ModulePassManager &MPM, OptimizationLevel Level) {
MPM.addPass(RequireAnalysisPass<ASanGlobalsMetadataAnalysis, Module>());
}
);
OptimizerLastEPCallbacks.push_back(
[SanitizerOptions](FunctionPassManager &FPM, OptimizationLevel Level) {
FPM.addPass(AddressSanitizerPass(
/*CompileKernel=*/false, SanitizerOptions->SanitizeAddressRecover,
/*UseAfterScope=*/true));
}
);
PipelineStartEPCallbacks.push_back(
[SanitizerOptions](ModulePassManager &MPM, OptimizationLevel Level) {
MPM.addPass(ModuleAddressSanitizerPass(
/*CompileKernel=*/false, SanitizerOptions->SanitizeAddressRecover));
}
);
#endif
} }
if (SanitizerOptions->SanitizeHWAddress) { if (SanitizerOptions->SanitizeHWAddress) {
#if LLVM_VERSION_GE(11, 0)
OptimizerLastEPCallbacks.push_back( OptimizerLastEPCallbacks.push_back(
[SanitizerOptions](ModulePassManager &MPM, OptimizationLevel Level) { [SanitizerOptions](ModulePassManager &MPM, OptimizationLevel Level) {
#if LLVM_VERSION_GE(14, 0) #if LLVM_VERSION_GE(14, 0)
@ -1003,14 +946,6 @@ LLVMRustOptimizeWithNewPassManager(
#endif #endif
} }
); );
#else
PipelineStartEPCallbacks.push_back(
[SanitizerOptions](ModulePassManager &MPM, OptimizationLevel Level) {
MPM.addPass(HWAddressSanitizerPass(
/*CompileKernel=*/false, SanitizerOptions->SanitizeHWAddressRecover));
}
);
#endif
} }
} }
@ -1037,17 +972,8 @@ LLVMRustOptimizeWithNewPassManager(
for (const auto &C : PipelineStartEPCallbacks) for (const auto &C : PipelineStartEPCallbacks)
C(MPM, OptLevel); C(MPM, OptLevel);
# if LLVM_VERSION_GE(11, 0)
for (const auto &C : OptimizerLastEPCallbacks) for (const auto &C : OptimizerLastEPCallbacks)
C(MPM, OptLevel); C(MPM, OptLevel);
# else
if (!OptimizerLastEPCallbacks.empty()) {
FunctionPassManager FPM(DebugPassManager);
for (const auto &C : OptimizerLastEPCallbacks)
C(FPM, OptLevel);
MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM)));
}
# endif
MPM.addPass(AlwaysInlinerPass(EmitLifetimeMarkers)); MPM.addPass(AlwaysInlinerPass(EmitLifetimeMarkers));
@ -1088,17 +1014,8 @@ LLVMRustOptimizeWithNewPassManager(
#else #else
MPM = PB.buildThinLTOPreLinkDefaultPipeline(OptLevel, DebugPassManager); MPM = PB.buildThinLTOPreLinkDefaultPipeline(OptLevel, DebugPassManager);
#endif #endif
#if LLVM_VERSION_GE(11, 0)
for (const auto &C : OptimizerLastEPCallbacks) for (const auto &C : OptimizerLastEPCallbacks)
C(MPM, OptLevel); C(MPM, OptLevel);
#else
if (!OptimizerLastEPCallbacks.empty()) {
FunctionPassManager FPM(DebugPassManager);
for (const auto &C : OptimizerLastEPCallbacks)
C(FPM, OptLevel);
MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM)));
}
#endif
break; break;
case LLVMRustOptStage::PreLinkFatLTO: case LLVMRustOptStage::PreLinkFatLTO:
#if LLVM_VERSION_GE(12, 0) #if LLVM_VERSION_GE(12, 0)
@ -1552,7 +1469,6 @@ LLVMRustFreeThinLTOData(LLVMRustThinLTOData *Data) {
// `ProcessThinLTOModule` function. Here they're split up into separate steps // `ProcessThinLTOModule` function. Here they're split up into separate steps
// so rustc can save off the intermediate bytecode between each step. // so rustc can save off the intermediate bytecode between each step.
#if LLVM_VERSION_GE(11, 0)
static bool static bool
clearDSOLocalOnDeclarations(Module &Mod, TargetMachine &TM) { clearDSOLocalOnDeclarations(Module &Mod, TargetMachine &TM) {
// When linking an ELF shared object, dso_local should be dropped. We // When linking an ELF shared object, dso_local should be dropped. We
@ -1563,7 +1479,6 @@ clearDSOLocalOnDeclarations(Module &Mod, TargetMachine &TM) {
Mod.getPIELevel() == PIELevel::Default; Mod.getPIELevel() == PIELevel::Default;
return ClearDSOLocalOnDeclarations; return ClearDSOLocalOnDeclarations;
} }
#endif
extern "C" bool extern "C" bool
LLVMRustPrepareThinLTORename(const LLVMRustThinLTOData *Data, LLVMModuleRef M, LLVMRustPrepareThinLTORename(const LLVMRustThinLTOData *Data, LLVMModuleRef M,
@ -1571,12 +1486,8 @@ LLVMRustPrepareThinLTORename(const LLVMRustThinLTOData *Data, LLVMModuleRef M,
Module &Mod = *unwrap(M); Module &Mod = *unwrap(M);
TargetMachine &Target = *unwrap(TM); TargetMachine &Target = *unwrap(TM);
#if LLVM_VERSION_GE(11, 0)
bool ClearDSOLocal = clearDSOLocalOnDeclarations(Mod, Target); bool ClearDSOLocal = clearDSOLocalOnDeclarations(Mod, Target);
bool error = renameModuleForThinLTO(Mod, Data->Index, ClearDSOLocal); bool error = renameModuleForThinLTO(Mod, Data->Index, ClearDSOLocal);
#else
bool error = renameModuleForThinLTO(Mod, Data->Index);
#endif
if (error) { if (error) {
LLVMRustSetLastError("renameModuleForThinLTO failed"); LLVMRustSetLastError("renameModuleForThinLTO failed");
@ -1645,12 +1556,8 @@ LLVMRustPrepareThinLTOImport(const LLVMRustThinLTOData *Data, LLVMModuleRef M,
return MOrErr; return MOrErr;
}; };
#if LLVM_VERSION_GE(11, 0)
bool ClearDSOLocal = clearDSOLocalOnDeclarations(Mod, Target); bool ClearDSOLocal = clearDSOLocalOnDeclarations(Mod, Target);
FunctionImporter Importer(Data->Index, Loader, ClearDSOLocal); FunctionImporter Importer(Data->Index, Loader, ClearDSOLocal);
#else
FunctionImporter Importer(Data->Index, Loader);
#endif
Expected<bool> Result = Importer.importFunctions(Mod, ImportList); Expected<bool> Result = Importer.importFunctions(Mod, ImportList);
if (!Result) { if (!Result) {
LLVMRustSetLastError(toString(Result.takeError()).c_str()); LLVMRustSetLastError(toString(Result.takeError()).c_str());

View file

@ -681,10 +681,8 @@ static Optional<DIFile::ChecksumKind> fromRust(LLVMRustChecksumKind Kind) {
return DIFile::ChecksumKind::CSK_MD5; return DIFile::ChecksumKind::CSK_MD5;
case LLVMRustChecksumKind::SHA1: case LLVMRustChecksumKind::SHA1:
return DIFile::ChecksumKind::CSK_SHA1; return DIFile::ChecksumKind::CSK_SHA1;
#if (LLVM_VERSION_MAJOR >= 11)
case LLVMRustChecksumKind::SHA256: case LLVMRustChecksumKind::SHA256:
return DIFile::ChecksumKind::CSK_SHA256; return DIFile::ChecksumKind::CSK_SHA256;
#endif
default: default:
report_fatal_error("bad ChecksumKind."); report_fatal_error("bad ChecksumKind.");
} }
@ -999,14 +997,9 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateUnionType(
extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateTemplateTypeParameter( extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateTemplateTypeParameter(
LLVMRustDIBuilderRef Builder, LLVMMetadataRef Scope, LLVMRustDIBuilderRef Builder, LLVMMetadataRef Scope,
const char *Name, size_t NameLen, LLVMMetadataRef Ty) { const char *Name, size_t NameLen, LLVMMetadataRef Ty) {
#if LLVM_VERSION_GE(11, 0)
bool IsDefault = false; // FIXME: should we ever set this true? bool IsDefault = false; // FIXME: should we ever set this true?
return wrap(Builder->createTemplateTypeParameter( return wrap(Builder->createTemplateTypeParameter(
unwrapDI<DIDescriptor>(Scope), StringRef(Name, NameLen), unwrapDI<DIType>(Ty), IsDefault)); unwrapDI<DIDescriptor>(Scope), StringRef(Name, NameLen), unwrapDI<DIType>(Ty), IsDefault));
#else
return wrap(Builder->createTemplateTypeParameter(
unwrapDI<DIDescriptor>(Scope), StringRef(Name, NameLen), unwrapDI<DIType>(Ty)));
#endif
} }
extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateNameSpace( extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateNameSpace(
@ -1246,23 +1239,16 @@ extern "C" LLVMTypeKind LLVMRustGetTypeKind(LLVMTypeRef Ty) {
return LLVMArrayTypeKind; return LLVMArrayTypeKind;
case Type::PointerTyID: case Type::PointerTyID:
return LLVMPointerTypeKind; return LLVMPointerTypeKind;
#if LLVM_VERSION_GE(11, 0)
case Type::FixedVectorTyID: case Type::FixedVectorTyID:
return LLVMVectorTypeKind; return LLVMVectorTypeKind;
#else
case Type::VectorTyID:
return LLVMVectorTypeKind;
#endif
case Type::X86_MMXTyID: case Type::X86_MMXTyID:
return LLVMX86_MMXTypeKind; return LLVMX86_MMXTypeKind;
case Type::TokenTyID: case Type::TokenTyID:
return LLVMTokenTypeKind; return LLVMTokenTypeKind;
#if LLVM_VERSION_GE(11, 0)
case Type::ScalableVectorTyID: case Type::ScalableVectorTyID:
return LLVMScalableVectorTypeKind; return LLVMScalableVectorTypeKind;
case Type::BFloatTyID: case Type::BFloatTyID:
return LLVMBFloatTypeKind; return LLVMBFloatTypeKind;
#endif
#if LLVM_VERSION_GE(12, 0) #if LLVM_VERSION_GE(12, 0)
case Type::X86_AMXTyID: case Type::X86_AMXTyID:
return LLVMX86_AMXTypeKind; return LLVMX86_AMXTypeKind;

View file

@ -378,11 +378,11 @@ fn check_llvm_version(builder: &Builder<'_>, llvm_config: &Path) {
let version = output(cmd.arg("--version")); let version = output(cmd.arg("--version"));
let mut parts = version.split('.').take(2).filter_map(|s| s.parse::<u32>().ok()); let mut parts = version.split('.').take(2).filter_map(|s| s.parse::<u32>().ok());
if let (Some(major), Some(_minor)) = (parts.next(), parts.next()) { if let (Some(major), Some(_minor)) = (parts.next(), parts.next()) {
if major >= 10 { if major >= 11 {
return; return;
} }
} }
panic!("\n\nbad LLVM version: {}, need >=10.0\n\n", version) panic!("\n\nbad LLVM version: {}, need >=11.0\n\n", version)
} }
fn configure_cmake( fn configure_cmake(

View file

@ -1,5 +1,6 @@
FROM ubuntu:18.04 FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \ g++ \
gcc-multilib \ gcc-multilib \
@ -13,8 +14,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \ cmake \
sudo \ sudo \
gdb \ gdb \
llvm-10-tools \ llvm-11-tools \
llvm-10-dev \ llvm-11-dev \
libedit-dev \ libedit-dev \
libssl-dev \ libssl-dev \
pkg-config \ pkg-config \
@ -28,7 +29,7 @@ RUN sh /scripts/sccache.sh
# using llvm-link-shared due to libffi issues -- see #34486 # using llvm-link-shared due to libffi issues -- see #34486
ENV RUST_CONFIGURE_ARGS \ ENV RUST_CONFIGURE_ARGS \
--build=x86_64-unknown-linux-gnu \ --build=x86_64-unknown-linux-gnu \
--llvm-root=/usr/lib/llvm-10 \ --llvm-root=/usr/lib/llvm-11 \
--enable-llvm-link-shared \ --enable-llvm-link-shared \
--set rust.thin-lto-import-instr-limit=10 --set rust.thin-lto-import-instr-limit=10

View file

@ -284,7 +284,7 @@ jobs:
- name: mingw-check - name: mingw-check
<<: *job-linux-xl <<: *job-linux-xl
- name: x86_64-gnu-llvm-10 - name: x86_64-gnu-llvm-11
<<: *job-linux-xl <<: *job-linux-xl
- name: x86_64-gnu-tools - name: x86_64-gnu-tools
@ -431,7 +431,7 @@ jobs:
- name: x86_64-gnu-distcheck - name: x86_64-gnu-distcheck
<<: *job-linux-xl <<: *job-linux-xl
- name: x86_64-gnu-llvm-10 - name: x86_64-gnu-llvm-11
env: env:
RUST_BACKTRACE: 1 RUST_BACKTRACE: 1
<<: *job-linux-xl <<: *job-linux-xl

View file

@ -1,4 +1,3 @@
// min-llvm-version: 10.0.1
// assembly-output: emit-asm // assembly-output: emit-asm
// compile-flags: -O // compile-flags: -O
// compile-flags: --target aarch64-unknown-linux-gnu // compile-flags: --target aarch64-unknown-linux-gnu

View file

@ -1,4 +1,3 @@
// min-llvm-version: 10.0.1
// assembly-output: emit-asm // assembly-output: emit-asm
// compile-flags: --target aarch64-unknown-linux-gnu // compile-flags: --target aarch64-unknown-linux-gnu
// needs-llvm-components: aarch64 // needs-llvm-components: aarch64

View file

@ -1,4 +1,3 @@
// min-llvm-version: 10.0.1
// assembly-output: emit-asm // assembly-output: emit-asm
// compile-flags: -O // compile-flags: -O
// compile-flags: --target armv7-unknown-linux-gnueabihf // compile-flags: --target armv7-unknown-linux-gnueabihf

View file

@ -1,4 +1,3 @@
// min-llvm-version: 10.0.1
// assembly-output: emit-asm // assembly-output: emit-asm
// compile-flags: --target armv7-unknown-linux-gnueabihf // compile-flags: --target armv7-unknown-linux-gnueabihf
// compile-flags: -C target-feature=+neon // compile-flags: -C target-feature=+neon

View file

@ -1,4 +1,3 @@
// min-llvm-version: 10.0.1
// only-x86_64 // only-x86_64
// assembly-output: emit-asm // assembly-output: emit-asm
// compile-flags: -C llvm-args=--x86-asm-syntax=intel // compile-flags: -C llvm-args=--x86-asm-syntax=intel

View file

@ -1,4 +1,3 @@
// min-llvm-version: 10.0.1
// assembly-output: emit-asm // assembly-output: emit-asm
// compile-flags: --target hexagon-unknown-linux-musl // compile-flags: --target hexagon-unknown-linux-musl
// needs-llvm-components: hexagon // needs-llvm-components: hexagon

View file

@ -1,4 +1,3 @@
// min-llvm-version: 10.0.1
// revisions: mips32 mips64 // revisions: mips32 mips64
// assembly-output: emit-asm // assembly-output: emit-asm
//[mips32] compile-flags: --target mips-unknown-linux-gnu //[mips32] compile-flags: --target mips-unknown-linux-gnu

View file

@ -1,4 +1,3 @@
// min-llvm-version: 10.0.1
// assembly-output: emit-asm // assembly-output: emit-asm
// compile-flags: --target nvptx64-nvidia-cuda // compile-flags: --target nvptx64-nvidia-cuda
// compile-flags: --crate-type cdylib // compile-flags: --crate-type cdylib

View file

@ -1,4 +1,4 @@
// min-llvm-version: 10.0.1 // min-llvm-version: 12.0.0
// revisions: powerpc powerpc64 // revisions: powerpc powerpc64
// assembly-output: emit-asm // assembly-output: emit-asm
//[powerpc] compile-flags: --target powerpc-unknown-linux-gnu //[powerpc] compile-flags: --target powerpc-unknown-linux-gnu

View file

@ -1,4 +1,3 @@
// min-llvm-version: 10.0.1
// revisions: riscv64 riscv32 // revisions: riscv64 riscv32
// assembly-output: emit-asm // assembly-output: emit-asm
//[riscv64] compile-flags: --target riscv64imac-unknown-none-elf //[riscv64] compile-flags: --target riscv64imac-unknown-none-elf

View file

@ -1,4 +1,3 @@
// min-llvm-version: 10.0.1
// revisions: s390x // revisions: s390x
// assembly-output: emit-asm // assembly-output: emit-asm
//[s390x] compile-flags: --target s390x-unknown-linux-gnu //[s390x] compile-flags: --target s390x-unknown-linux-gnu

View file

@ -1,4 +1,4 @@
// min-llvm-version: 10.0.1 // min-llvm-version: 12.0.0
// assembly-output: emit-asm // assembly-output: emit-asm
// compile-flags: --target wasm32-unknown-unknown // compile-flags: --target wasm32-unknown-unknown
// compile-flags: --crate-type cdylib // compile-flags: --crate-type cdylib

View file

@ -1,4 +1,3 @@
// min-llvm-version: 10.0.1
// revisions: x86_64 i686 // revisions: x86_64 i686
// assembly-output: emit-asm // assembly-output: emit-asm
// compile-flags: -O // compile-flags: -O

View file

@ -1,4 +1,3 @@
// min-llvm-version: 10.0.1
// revisions: x86_64 i686 // revisions: x86_64 i686
// assembly-output: emit-asm // assembly-output: emit-asm
//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu //[x86_64] compile-flags: --target x86_64-unknown-linux-gnu

View file

@ -1,6 +1,5 @@
// //
// no-system-llvm // no-system-llvm
// min-llvm-version: 10.0.1
// compile-flags: -O // compile-flags: -O
#![crate_type="lib"] #![crate_type="lib"]

View file

@ -1,4 +1,3 @@
// min-llvm-version: 10.0.1
// revisions: powerpc powerpc64 powerpc64le // revisions: powerpc powerpc64 powerpc64le
//[powerpc] compile-flags: --target powerpc-unknown-linux-gnu //[powerpc] compile-flags: --target powerpc-unknown-linux-gnu
//[powerpc] needs-llvm-components: powerpc //[powerpc] needs-llvm-components: powerpc

View file

@ -1,4 +1,3 @@
// min-llvm-version: 11.0.0
// compile-flags: -O // compile-flags: -O
// ignore-debug: the debug assertions get in the way // ignore-debug: the debug assertions get in the way
#![crate_type = "lib"] #![crate_type = "lib"]

View file

@ -1,7 +1,6 @@
// This test checks an optimization that is not guaranteed to work. This test case should not block // This test checks an optimization that is not guaranteed to work. This test case should not block
// a future LLVM update. // a future LLVM update.
// compile-flags: -O // compile-flags: -O
// min-llvm-version: 11.0
#![crate_type = "lib"] #![crate_type = "lib"]

View file

@ -1,7 +1,6 @@
// This test checks an optimization that is not guaranteed to work. This test case should not block // This test checks an optimization that is not guaranteed to work. This test case should not block
// a future LLVM update. // a future LLVM update.
// compile-flags: -O // compile-flags: -O
// min-llvm-version: 11.0
#![crate_type = "lib"] #![crate_type = "lib"]

View file

@ -1,5 +1,4 @@
// compile-flags: -O // compile-flags: -O
// min-llvm-version: 11.0
#![crate_type = "lib"] #![crate_type = "lib"]

View file

@ -1,5 +1,4 @@
// compile-flags: -O // compile-flags: -O
// min-llvm-version: 11.0
#![crate_type = "lib"] #![crate_type = "lib"]

View file

@ -1,4 +1,3 @@
// min-llvm-version: 11.0.0
// compile-flags: -O // compile-flags: -O
// ignore-debug: the debug assertions get in the way // ignore-debug: the debug assertions get in the way
#![crate_type = "lib"] #![crate_type = "lib"]

View file

@ -1,7 +1,6 @@
// This test checks that bounds checks are elided when // This test checks that bounds checks are elided when
// index is part of a (x | y) < C style condition // index is part of a (x | y) < C style condition
// min-llvm-version: 11.0.0
// compile-flags: -O // compile-flags: -O
#![crate_type = "lib"] #![crate_type = "lib"]

View file

@ -1,5 +1,4 @@
// compile-flags: -g -Z src-hash-algorithm=sha256 // compile-flags: -g -Z src-hash-algorithm=sha256
// min-llvm-version: 11.0
#![crate_type = "lib"] #![crate_type = "lib"]

View file

@ -1,6 +1,5 @@
// ignore-debug: the debug assertions get in the way // ignore-debug: the debug assertions get in the way
// compile-flags: -O // compile-flags: -O
// min-llvm-version: 11.0
#![crate_type = "lib"] #![crate_type = "lib"]
// Ensure that trivial casts of vec elements are O(1) // Ensure that trivial casts of vec elements are O(1)

View file

@ -1,5 +1,4 @@
# needs-profiler-support # needs-profiler-support
# min-llvm-version: 11.0
-include ../coverage/coverage_tools.mk -include ../coverage/coverage_tools.mk

View file

@ -1,6 +1,5 @@
# needs-profiler-support # needs-profiler-support
# ignore-windows-gnu # ignore-windows-gnu
# min-llvm-version: 11.0
# FIXME(mati865): MinGW GCC miscompiles compiler-rt profiling library but with Clang it works # FIXME(mati865): MinGW GCC miscompiles compiler-rt profiling library but with Clang it works
# properly. Since we only have GCC on the CI ignore the test for now. # properly. Since we only have GCC on the CI ignore the test for now.

View file

@ -1,7 +1,5 @@
-include ../tools.mk -include ../tools.mk
# min-llvm-version: 11.0
all: off packed unpacked all: off packed unpacked
ifeq ($(UNAME),Darwin) ifeq ($(UNAME),Darwin)

View file

@ -1,7 +1,6 @@
-include ../tools.mk -include ../tools.mk
# only-linux # only-linux
# min-llvm-version: 11.0
all: all:
$(RUSTC) -Z unstable-options -C split-debuginfo=packed -C debuginfo=2 foo.rs -g $(RUSTC) -Z unstable-options -C split-debuginfo=packed -C debuginfo=2 foo.rs -g

View file

@ -1,4 +1,3 @@
// min-llvm-version: 10.0.1
// only-aarch64 // only-aarch64
// run-pass // run-pass
// revisions: mirunsafeck thirunsafeck // revisions: mirunsafeck thirunsafeck

View file

@ -1,4 +1,3 @@
// min-llvm-version: 10.0.1
// only-aarch64 // only-aarch64
// build-fail // build-fail
// compile-flags: -Ccodegen-units=1 // compile-flags: -Ccodegen-units=1

View file

@ -1,4 +1,3 @@
// min-llvm-version: 10.0.1
// only-aarch64 // only-aarch64
// only-linux // only-linux
// run-pass // run-pass

View file

@ -1,4 +1,3 @@
// min-llvm-version: 10.0.1
// only-x86_64 // only-x86_64
// run-pass // run-pass
// revisions: mirunsafeck thirunsafeck // revisions: mirunsafeck thirunsafeck

View file

@ -1,4 +1,3 @@
// min-llvm-version: 10.0.1
// only-x86_64 // only-x86_64
// build-fail // build-fail
// compile-flags: -Ccodegen-units=1 // compile-flags: -Ccodegen-units=1

View file

@ -1,5 +1,5 @@
error: invalid instruction mnemonic 'invalid_instruction' error: invalid instruction mnemonic 'invalid_instruction'
--> $DIR/srcloc.rs:11:15 --> $DIR/srcloc.rs:10:15
| |
LL | asm!("invalid_instruction"); LL | asm!("invalid_instruction");
| ^ | ^
@ -11,7 +11,7 @@ LL | invalid_instruction
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^
error: invalid instruction mnemonic 'invalid_instruction' error: invalid instruction mnemonic 'invalid_instruction'
--> $DIR/srcloc.rs:15:13 --> $DIR/srcloc.rs:14:13
| |
LL | invalid_instruction LL | invalid_instruction
| ^ | ^
@ -23,7 +23,7 @@ LL | invalid_instruction
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^
error: invalid instruction mnemonic 'invalid_instruction' error: invalid instruction mnemonic 'invalid_instruction'
--> $DIR/srcloc.rs:20:13 --> $DIR/srcloc.rs:19:13
| |
LL | invalid_instruction LL | invalid_instruction
| ^ | ^
@ -35,7 +35,7 @@ LL | invalid_instruction
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^
error: invalid instruction mnemonic 'invalid_instruction' error: invalid instruction mnemonic 'invalid_instruction'
--> $DIR/srcloc.rs:26:13 --> $DIR/srcloc.rs:25:13
| |
LL | invalid_instruction LL | invalid_instruction
| ^ | ^
@ -47,7 +47,7 @@ LL | invalid_instruction
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^
error: invalid instruction mnemonic 'invalid_instruction' error: invalid instruction mnemonic 'invalid_instruction'
--> $DIR/srcloc.rs:33:13 --> $DIR/srcloc.rs:32:13
| |
LL | invalid_instruction LL | invalid_instruction
| ^ | ^
@ -59,7 +59,7 @@ LL | invalid_instruction
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^
error: invalid instruction mnemonic 'invalid_instruction' error: invalid instruction mnemonic 'invalid_instruction'
--> $DIR/srcloc.rs:38:14 --> $DIR/srcloc.rs:37:14
| |
LL | asm!(concat!("invalid", "_", "instruction")); LL | asm!(concat!("invalid", "_", "instruction"));
| ^ | ^
@ -71,7 +71,7 @@ LL | invalid_instruction
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^
warning: scale factor without index register is ignored warning: scale factor without index register is ignored
--> $DIR/srcloc.rs:41:15 --> $DIR/srcloc.rs:40:15
| |
LL | asm!("movaps %xmm3, (%esi, 2)", options(att_syntax)); LL | asm!("movaps %xmm3, (%esi, 2)", options(att_syntax));
| ^ | ^
@ -83,7 +83,7 @@ LL | movaps %xmm3, (%esi, 2)
| ^ | ^
error: invalid instruction mnemonic 'invalid_instruction' error: invalid instruction mnemonic 'invalid_instruction'
--> $DIR/srcloc.rs:45:14 --> $DIR/srcloc.rs:44:14
| |
LL | "invalid_instruction", LL | "invalid_instruction",
| ^ | ^
@ -95,7 +95,7 @@ LL | invalid_instruction
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^
error: invalid instruction mnemonic 'invalid_instruction' error: invalid instruction mnemonic 'invalid_instruction'
--> $DIR/srcloc.rs:51:14 --> $DIR/srcloc.rs:50:14
| |
LL | "invalid_instruction", LL | "invalid_instruction",
| ^ | ^
@ -107,7 +107,7 @@ LL | invalid_instruction
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^
error: invalid instruction mnemonic 'invalid_instruction' error: invalid instruction mnemonic 'invalid_instruction'
--> $DIR/srcloc.rs:58:14 --> $DIR/srcloc.rs:57:14
| |
LL | "invalid_instruction", LL | "invalid_instruction",
| ^ | ^
@ -119,7 +119,7 @@ LL | invalid_instruction
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^
error: invalid instruction mnemonic 'invalid_instruction' error: invalid instruction mnemonic 'invalid_instruction'
--> $DIR/srcloc.rs:65:13 --> $DIR/srcloc.rs:64:13
| |
LL | concat!("invalid", "_", "instruction"), LL | concat!("invalid", "_", "instruction"),
| ^ | ^
@ -131,7 +131,7 @@ LL | invalid_instruction
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^
error: invalid instruction mnemonic 'invalid_instruction' error: invalid instruction mnemonic 'invalid_instruction'
--> $DIR/srcloc.rs:72:13 --> $DIR/srcloc.rs:71:13
| |
LL | concat!("invalid", "_", "instruction"), LL | concat!("invalid", "_", "instruction"),
| ^ | ^
@ -143,7 +143,7 @@ LL | invalid_instruction
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^
error: invalid instruction mnemonic 'invalid_instruction1' error: invalid instruction mnemonic 'invalid_instruction1'
--> $DIR/srcloc.rs:79:14 --> $DIR/srcloc.rs:78:14
| |
LL | "invalid_instruction1", LL | "invalid_instruction1",
| ^ | ^
@ -155,7 +155,7 @@ LL | invalid_instruction1
| ^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^
error: invalid instruction mnemonic 'invalid_instruction2' error: invalid instruction mnemonic 'invalid_instruction2'
--> $DIR/srcloc.rs:80:14 --> $DIR/srcloc.rs:79:14
| |
LL | "invalid_instruction2", LL | "invalid_instruction2",
| ^ | ^
@ -167,7 +167,7 @@ LL | invalid_instruction2
| ^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^
error: invalid instruction mnemonic 'invalid_instruction1' error: invalid instruction mnemonic 'invalid_instruction1'
--> $DIR/srcloc.rs:86:13 --> $DIR/srcloc.rs:85:13
| |
LL | concat!( LL | concat!(
| ^ | ^
@ -179,7 +179,7 @@ LL | invalid_instruction1
| ^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^
error: invalid instruction mnemonic 'invalid_instruction2' error: invalid instruction mnemonic 'invalid_instruction2'
--> $DIR/srcloc.rs:86:13 --> $DIR/srcloc.rs:85:13
| |
LL | concat!( LL | concat!(
| ^ | ^
@ -191,7 +191,7 @@ LL | invalid_instruction2
| ^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^
error: invalid instruction mnemonic 'invalid_instruction1' error: invalid instruction mnemonic 'invalid_instruction1'
--> $DIR/srcloc.rs:95:13 --> $DIR/srcloc.rs:94:13
| |
LL | concat!( LL | concat!(
| ^ | ^
@ -203,7 +203,7 @@ LL | invalid_instruction1
| ^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^
error: invalid instruction mnemonic 'invalid_instruction2' error: invalid instruction mnemonic 'invalid_instruction2'
--> $DIR/srcloc.rs:95:13 --> $DIR/srcloc.rs:94:13
| |
LL | concat!( LL | concat!(
| ^ | ^
@ -215,7 +215,7 @@ LL | invalid_instruction2
| ^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^
error: invalid instruction mnemonic 'invalid_instruction3' error: invalid instruction mnemonic 'invalid_instruction3'
--> $DIR/srcloc.rs:99:13 --> $DIR/srcloc.rs:98:13
| |
LL | concat!( LL | concat!(
| ^ | ^
@ -227,7 +227,7 @@ LL | invalid_instruction3
| ^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^
error: invalid instruction mnemonic 'invalid_instruction4' error: invalid instruction mnemonic 'invalid_instruction4'
--> $DIR/srcloc.rs:99:13 --> $DIR/srcloc.rs:98:13
| |
LL | concat!( LL | concat!(
| ^ | ^
@ -239,7 +239,7 @@ LL | invalid_instruction4
| ^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^
error: invalid instruction mnemonic 'invalid_instruction1' error: invalid instruction mnemonic 'invalid_instruction1'
--> $DIR/srcloc.rs:110:13 --> $DIR/srcloc.rs:109:13
| |
LL | concat!( LL | concat!(
| ^ | ^
@ -251,7 +251,7 @@ LL | invalid_instruction1
| ^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^
error: invalid instruction mnemonic 'invalid_instruction2' error: invalid instruction mnemonic 'invalid_instruction2'
--> $DIR/srcloc.rs:110:13 --> $DIR/srcloc.rs:109:13
| |
LL | concat!( LL | concat!(
| ^ | ^
@ -263,7 +263,7 @@ LL | invalid_instruction2
| ^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^
error: invalid instruction mnemonic 'invalid_instruction3' error: invalid instruction mnemonic 'invalid_instruction3'
--> $DIR/srcloc.rs:114:13 --> $DIR/srcloc.rs:113:13
| |
LL | concat!( LL | concat!(
| ^ | ^
@ -275,7 +275,7 @@ LL | invalid_instruction3
| ^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^
error: invalid instruction mnemonic 'invalid_instruction4' error: invalid instruction mnemonic 'invalid_instruction4'
--> $DIR/srcloc.rs:114:13 --> $DIR/srcloc.rs:113:13
| |
LL | concat!( LL | concat!(
| ^ | ^

View file

@ -1,4 +1,4 @@
// min-llvm-version: 10.0.1 // min-llvm-version: 12.0.0
// only-x86_64 // only-x86_64
// only-linux // only-linux
// run-pass // run-pass

View file

@ -1,7 +1,6 @@
// build-fail // build-fail
// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib // compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
// needs-llvm-components: arm // needs-llvm-components: arm
// min-llvm-version: 11.0
#![feature(abi_c_cmse_nonsecure_call, no_core, lang_items, intrinsics)] #![feature(abi_c_cmse_nonsecure_call, no_core, lang_items, intrinsics)]
#![no_core] #![no_core]
#[lang="sized"] #[lang="sized"]

View file

@ -1,7 +1,7 @@
// build-fail // build-fail
// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib // compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
// needs-llvm-components: arm // needs-llvm-components: arm
// min-llvm-version: 11.0 // min-llvm-version: 12.0
#![feature(cmse_nonsecure_entry, no_core, lang_items)] #![feature(cmse_nonsecure_entry, no_core, lang_items)]
#![no_core] #![no_core]
#[lang="sized"] #[lang="sized"]

View file

@ -1,6 +1,5 @@
// run-fail // run-fail
// compile-flags: -C opt-level=3 // compile-flags: -C opt-level=3
// min-llvm-version: 11.0
// error-pattern: index out of bounds: the len is 0 but the index is 16777216 // error-pattern: index out of bounds: the len is 0 but the index is 16777216
// ignore-wasm no panic or subprocess support // ignore-wasm no panic or subprocess support
// ignore-emscripten no panic or subprocess support // ignore-emscripten no panic or subprocess support