Support LLVM 12 in rustc
This commit is contained in:
parent
7c3a914b5d
commit
55f345f325
18 changed files with 226 additions and 77 deletions
|
@ -430,7 +430,13 @@ impl<'tcx> FnAbiLlvmExt<'tcx> for FnAbi<'tcx, Ty<'tcx>> {
|
||||||
PassMode::Indirect { ref attrs, extra_attrs: _, on_stack } => {
|
PassMode::Indirect { ref attrs, extra_attrs: _, on_stack } => {
|
||||||
assert!(!on_stack);
|
assert!(!on_stack);
|
||||||
let i = apply(attrs);
|
let i = apply(attrs);
|
||||||
llvm::Attribute::StructRet.apply_llfn(llvm::AttributePlace::Argument(i), llfn);
|
unsafe {
|
||||||
|
llvm::LLVMRustAddStructRetAttr(
|
||||||
|
llfn,
|
||||||
|
llvm::AttributePlace::Argument(i).as_uint(),
|
||||||
|
self.ret.layout.llvm_type(cx),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
@ -486,8 +492,13 @@ impl<'tcx> FnAbiLlvmExt<'tcx> for FnAbi<'tcx, Ty<'tcx>> {
|
||||||
PassMode::Indirect { ref attrs, extra_attrs: _, on_stack } => {
|
PassMode::Indirect { ref attrs, extra_attrs: _, on_stack } => {
|
||||||
assert!(!on_stack);
|
assert!(!on_stack);
|
||||||
let i = apply(attrs);
|
let i = apply(attrs);
|
||||||
llvm::Attribute::StructRet
|
unsafe {
|
||||||
.apply_callsite(llvm::AttributePlace::Argument(i), callsite);
|
llvm::LLVMRustAddStructRetCallSiteAttr(
|
||||||
|
callsite,
|
||||||
|
llvm::AttributePlace::Argument(i).as_uint(),
|
||||||
|
self.ret.layout.llvm_type(bx),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,6 +104,10 @@ fn strip_x86_address_spaces(data_layout: String) -> String {
|
||||||
data_layout.replace("-p270:32:32-p271:32:32-p272:64:64-", "-")
|
data_layout.replace("-p270:32:32-p271:32:32-p272:64:64-", "-")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn strip_powerpc64_vectors(data_layout: String) -> String {
|
||||||
|
data_layout.replace("-v256:256:256-v512:512:512", "")
|
||||||
|
}
|
||||||
|
|
||||||
pub unsafe fn create_module(
|
pub unsafe fn create_module(
|
||||||
tcx: TyCtxt<'_>,
|
tcx: TyCtxt<'_>,
|
||||||
llcx: &'ll llvm::Context,
|
llcx: &'ll llvm::Context,
|
||||||
|
@ -119,6 +123,9 @@ pub unsafe fn create_module(
|
||||||
{
|
{
|
||||||
target_data_layout = strip_x86_address_spaces(target_data_layout);
|
target_data_layout = strip_x86_address_spaces(target_data_layout);
|
||||||
}
|
}
|
||||||
|
if llvm_util::get_version() < (12, 0, 0) && sess.target.arch == "powerpc64" {
|
||||||
|
target_data_layout = strip_powerpc64_vectors(target_data_layout);
|
||||||
|
}
|
||||||
|
|
||||||
// Ensure the data-layout values hardcoded remain the defaults.
|
// Ensure the data-layout values hardcoded remain the defaults.
|
||||||
if sess.target.is_builtin {
|
if sess.target.is_builtin {
|
||||||
|
|
|
@ -239,6 +239,7 @@ pub enum TypeKind {
|
||||||
Token = 16,
|
Token = 16,
|
||||||
ScalableVector = 17,
|
ScalableVector = 17,
|
||||||
BFloat = 18,
|
BFloat = 18,
|
||||||
|
X86_AMX = 19,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TypeKind {
|
impl TypeKind {
|
||||||
|
@ -263,6 +264,7 @@ impl TypeKind {
|
||||||
TypeKind::Token => rustc_codegen_ssa::common::TypeKind::Token,
|
TypeKind::Token => rustc_codegen_ssa::common::TypeKind::Token,
|
||||||
TypeKind::ScalableVector => rustc_codegen_ssa::common::TypeKind::ScalableVector,
|
TypeKind::ScalableVector => rustc_codegen_ssa::common::TypeKind::ScalableVector,
|
||||||
TypeKind::BFloat => rustc_codegen_ssa::common::TypeKind::BFloat,
|
TypeKind::BFloat => rustc_codegen_ssa::common::TypeKind::BFloat,
|
||||||
|
TypeKind::X86_AMX => rustc_codegen_ssa::common::TypeKind::X86_AMX,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1073,6 +1075,7 @@ extern "C" {
|
||||||
pub fn LLVMRustAddDereferenceableAttr(Fn: &Value, index: c_uint, bytes: u64);
|
pub fn LLVMRustAddDereferenceableAttr(Fn: &Value, index: c_uint, bytes: u64);
|
||||||
pub fn LLVMRustAddDereferenceableOrNullAttr(Fn: &Value, index: c_uint, bytes: u64);
|
pub fn LLVMRustAddDereferenceableOrNullAttr(Fn: &Value, index: c_uint, bytes: u64);
|
||||||
pub fn LLVMRustAddByValAttr(Fn: &Value, index: c_uint, ty: &Type);
|
pub fn LLVMRustAddByValAttr(Fn: &Value, index: c_uint, ty: &Type);
|
||||||
|
pub fn LLVMRustAddStructRetAttr(Fn: &Value, index: c_uint, ty: &Type);
|
||||||
pub fn LLVMRustAddFunctionAttribute(Fn: &Value, index: c_uint, attr: Attribute);
|
pub fn LLVMRustAddFunctionAttribute(Fn: &Value, index: c_uint, attr: Attribute);
|
||||||
pub fn LLVMRustAddFunctionAttrStringValue(
|
pub fn LLVMRustAddFunctionAttrStringValue(
|
||||||
Fn: &Value,
|
Fn: &Value,
|
||||||
|
@ -1108,6 +1111,7 @@ extern "C" {
|
||||||
pub fn LLVMRustAddDereferenceableCallSiteAttr(Instr: &Value, index: c_uint, bytes: u64);
|
pub fn LLVMRustAddDereferenceableCallSiteAttr(Instr: &Value, index: c_uint, bytes: u64);
|
||||||
pub fn LLVMRustAddDereferenceableOrNullCallSiteAttr(Instr: &Value, index: c_uint, bytes: u64);
|
pub fn LLVMRustAddDereferenceableOrNullCallSiteAttr(Instr: &Value, index: c_uint, bytes: u64);
|
||||||
pub fn LLVMRustAddByValCallSiteAttr(Instr: &Value, index: c_uint, ty: &Type);
|
pub fn LLVMRustAddByValCallSiteAttr(Instr: &Value, index: c_uint, ty: &Type);
|
||||||
|
pub fn LLVMRustAddStructRetCallSiteAttr(Instr: &Value, index: c_uint, ty: &Type);
|
||||||
|
|
||||||
// Operations on load/store instructions (only)
|
// Operations on load/store instructions (only)
|
||||||
pub fn LLVMSetVolatile(MemoryAccessInst: &Value, volatile: Bool);
|
pub fn LLVMSetVolatile(MemoryAccessInst: &Value, volatile: Bool);
|
||||||
|
|
|
@ -95,6 +95,7 @@ pub enum TypeKind {
|
||||||
Token,
|
Token,
|
||||||
ScalableVector,
|
ScalableVector,
|
||||||
BFloat,
|
BFloat,
|
||||||
|
X86_AMX,
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME(mw): Anything that is produced via DepGraph::with_task() must implement
|
// FIXME(mw): Anything that is produced via DepGraph::with_task() must implement
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
#include "LLVMWrapper.h"
|
#include "LLVMWrapper.h"
|
||||||
|
|
||||||
|
#include "llvm/Analysis/AliasAnalysis.h"
|
||||||
#include "llvm/Analysis/TargetLibraryInfo.h"
|
#include "llvm/Analysis/TargetLibraryInfo.h"
|
||||||
#include "llvm/Analysis/TargetTransformInfo.h"
|
#include "llvm/Analysis/TargetTransformInfo.h"
|
||||||
#include "llvm/CodeGen/TargetSubtargetInfo.h"
|
#include "llvm/CodeGen/TargetSubtargetInfo.h"
|
||||||
|
@ -683,6 +684,25 @@ void LLVMSelfProfileInitializeCallbacks(
|
||||||
PassInstrumentationCallbacks& PIC, void* LlvmSelfProfiler,
|
PassInstrumentationCallbacks& PIC, void* LlvmSelfProfiler,
|
||||||
LLVMRustSelfProfileBeforePassCallback BeforePassCallback,
|
LLVMRustSelfProfileBeforePassCallback BeforePassCallback,
|
||||||
LLVMRustSelfProfileAfterPassCallback AfterPassCallback) {
|
LLVMRustSelfProfileAfterPassCallback AfterPassCallback) {
|
||||||
|
#if LLVM_VERSION_GE(12, 0)
|
||||||
|
PIC.registerBeforeNonSkippedPassCallback([LlvmSelfProfiler, BeforePassCallback](
|
||||||
|
StringRef Pass, llvm::Any Ir) {
|
||||||
|
std::string PassName = Pass.str();
|
||||||
|
std::string IrName = LLVMRustwrappedIrGetName(Ir);
|
||||||
|
BeforePassCallback(LlvmSelfProfiler, PassName.c_str(), IrName.c_str());
|
||||||
|
});
|
||||||
|
|
||||||
|
PIC.registerAfterPassCallback(
|
||||||
|
[LlvmSelfProfiler, AfterPassCallback](StringRef Pass, llvm::Any IR,
|
||||||
|
const PreservedAnalyses &Preserved) {
|
||||||
|
AfterPassCallback(LlvmSelfProfiler);
|
||||||
|
});
|
||||||
|
|
||||||
|
PIC.registerAfterPassInvalidatedCallback(
|
||||||
|
[LlvmSelfProfiler, AfterPassCallback](StringRef Pass, const PreservedAnalyses &Preserved) {
|
||||||
|
AfterPassCallback(LlvmSelfProfiler);
|
||||||
|
});
|
||||||
|
#else
|
||||||
PIC.registerBeforePassCallback([LlvmSelfProfiler, BeforePassCallback](
|
PIC.registerBeforePassCallback([LlvmSelfProfiler, BeforePassCallback](
|
||||||
StringRef Pass, llvm::Any Ir) {
|
StringRef Pass, llvm::Any Ir) {
|
||||||
std::string PassName = Pass.str();
|
std::string PassName = Pass.str();
|
||||||
|
@ -700,6 +720,7 @@ void LLVMSelfProfileInitializeCallbacks(
|
||||||
[LlvmSelfProfiler, AfterPassCallback](StringRef Pass) {
|
[LlvmSelfProfiler, AfterPassCallback](StringRef Pass) {
|
||||||
AfterPassCallback(LlvmSelfProfiler);
|
AfterPassCallback(LlvmSelfProfiler);
|
||||||
});
|
});
|
||||||
|
#endif
|
||||||
|
|
||||||
PIC.registerBeforeAnalysisCallback([LlvmSelfProfiler, BeforePassCallback](
|
PIC.registerBeforeAnalysisCallback([LlvmSelfProfiler, BeforePassCallback](
|
||||||
StringRef Pass, llvm::Any Ir) {
|
StringRef Pass, llvm::Any Ir) {
|
||||||
|
@ -760,8 +781,15 @@ LLVMRustOptimizeWithNewPassManager(
|
||||||
PTO.LoopVectorization = LoopVectorize;
|
PTO.LoopVectorization = LoopVectorize;
|
||||||
PTO.SLPVectorization = SLPVectorize;
|
PTO.SLPVectorization = SLPVectorize;
|
||||||
|
|
||||||
|
// FIXME: We may want to expose this as an option.
|
||||||
|
bool DebugPassManager = false;
|
||||||
|
|
||||||
PassInstrumentationCallbacks PIC;
|
PassInstrumentationCallbacks PIC;
|
||||||
|
#if LLVM_VERSION_GE(12, 0)
|
||||||
|
StandardInstrumentations SI(DebugPassManager);
|
||||||
|
#else
|
||||||
StandardInstrumentations SI;
|
StandardInstrumentations SI;
|
||||||
|
#endif
|
||||||
SI.registerCallbacks(PIC);
|
SI.registerCallbacks(PIC);
|
||||||
|
|
||||||
if (LlvmSelfProfiler){
|
if (LlvmSelfProfiler){
|
||||||
|
@ -777,10 +805,12 @@ LLVMRustOptimizeWithNewPassManager(
|
||||||
PGOOpt = PGOOptions(PGOUsePath, "", "", PGOOptions::IRUse);
|
PGOOpt = PGOOptions(PGOUsePath, "", "", PGOOptions::IRUse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LLVM_VERSION_GE(12, 0)
|
||||||
|
PassBuilder PB(DebugPassManager, TM, PTO, PGOOpt, &PIC);
|
||||||
|
#else
|
||||||
PassBuilder PB(TM, PTO, PGOOpt, &PIC);
|
PassBuilder PB(TM, PTO, PGOOpt, &PIC);
|
||||||
|
#endif
|
||||||
|
|
||||||
// FIXME: We may want to expose this as an option.
|
|
||||||
bool DebugPassManager = false;
|
|
||||||
LoopAnalysisManager LAM(DebugPassManager);
|
LoopAnalysisManager LAM(DebugPassManager);
|
||||||
FunctionAnalysisManager FAM(DebugPassManager);
|
FunctionAnalysisManager FAM(DebugPassManager);
|
||||||
CGSCCAnalysisManager CGAM(DebugPassManager);
|
CGSCCAnalysisManager CGAM(DebugPassManager);
|
||||||
|
@ -802,7 +832,8 @@ LLVMRustOptimizeWithNewPassManager(
|
||||||
|
|
||||||
// We manually collect pipeline callbacks so we can apply them at O0, where the
|
// We manually collect pipeline callbacks so we can apply them at O0, where the
|
||||||
// PassBuilder does not create a pipeline.
|
// PassBuilder does not create a pipeline.
|
||||||
std::vector<std::function<void(ModulePassManager &)>> PipelineStartEPCallbacks;
|
std::vector<std::function<void(ModulePassManager &, PassBuilder::OptimizationLevel)>>
|
||||||
|
PipelineStartEPCallbacks;
|
||||||
#if LLVM_VERSION_GE(11, 0)
|
#if LLVM_VERSION_GE(11, 0)
|
||||||
std::vector<std::function<void(ModulePassManager &, PassBuilder::OptimizationLevel)>>
|
std::vector<std::function<void(ModulePassManager &, PassBuilder::OptimizationLevel)>>
|
||||||
OptimizerLastEPCallbacks;
|
OptimizerLastEPCallbacks;
|
||||||
|
@ -812,9 +843,11 @@ LLVMRustOptimizeWithNewPassManager(
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (VerifyIR) {
|
if (VerifyIR) {
|
||||||
PipelineStartEPCallbacks.push_back([VerifyIR](ModulePassManager &MPM) {
|
PipelineStartEPCallbacks.push_back(
|
||||||
|
[VerifyIR](ModulePassManager &MPM, PassBuilder::OptimizationLevel Level) {
|
||||||
MPM.addPass(VerifierPass());
|
MPM.addPass(VerifierPass());
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SanitizerOptions) {
|
if (SanitizerOptions) {
|
||||||
|
@ -832,9 +865,11 @@ LLVMRustOptimizeWithNewPassManager(
|
||||||
);
|
);
|
||||||
#else
|
#else
|
||||||
#if LLVM_VERSION_GE(10, 0)
|
#if LLVM_VERSION_GE(10, 0)
|
||||||
PipelineStartEPCallbacks.push_back([Options](ModulePassManager &MPM) {
|
PipelineStartEPCallbacks.push_back(
|
||||||
|
[Options](ModulePassManager &MPM, PassBuilder::OptimizationLevel Level) {
|
||||||
MPM.addPass(MemorySanitizerPass(Options));
|
MPM.addPass(MemorySanitizerPass(Options));
|
||||||
});
|
}
|
||||||
|
);
|
||||||
#endif
|
#endif
|
||||||
OptimizerLastEPCallbacks.push_back(
|
OptimizerLastEPCallbacks.push_back(
|
||||||
[Options](FunctionPassManager &FPM, PassBuilder::OptimizationLevel Level) {
|
[Options](FunctionPassManager &FPM, PassBuilder::OptimizationLevel Level) {
|
||||||
|
@ -854,9 +889,11 @@ LLVMRustOptimizeWithNewPassManager(
|
||||||
);
|
);
|
||||||
#else
|
#else
|
||||||
#if LLVM_VERSION_GE(10, 0)
|
#if LLVM_VERSION_GE(10, 0)
|
||||||
PipelineStartEPCallbacks.push_back([](ModulePassManager &MPM) {
|
PipelineStartEPCallbacks.push_back(
|
||||||
|
[](ModulePassManager &MPM, PassBuilder::OptimizationLevel Level) {
|
||||||
MPM.addPass(ThreadSanitizerPass());
|
MPM.addPass(ThreadSanitizerPass());
|
||||||
});
|
}
|
||||||
|
);
|
||||||
#endif
|
#endif
|
||||||
OptimizerLastEPCallbacks.push_back(
|
OptimizerLastEPCallbacks.push_back(
|
||||||
[](FunctionPassManager &FPM, PassBuilder::OptimizationLevel Level) {
|
[](FunctionPassManager &FPM, PassBuilder::OptimizationLevel Level) {
|
||||||
|
@ -879,9 +916,11 @@ LLVMRustOptimizeWithNewPassManager(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
#else
|
#else
|
||||||
PipelineStartEPCallbacks.push_back([&](ModulePassManager &MPM) {
|
PipelineStartEPCallbacks.push_back(
|
||||||
|
[&](ModulePassManager &MPM, PassBuilder::OptimizationLevel Level) {
|
||||||
MPM.addPass(RequireAnalysisPass<ASanGlobalsMetadataAnalysis, Module>());
|
MPM.addPass(RequireAnalysisPass<ASanGlobalsMetadataAnalysis, Module>());
|
||||||
});
|
}
|
||||||
|
);
|
||||||
OptimizerLastEPCallbacks.push_back(
|
OptimizerLastEPCallbacks.push_back(
|
||||||
[SanitizerOptions](FunctionPassManager &FPM, PassBuilder::OptimizationLevel Level) {
|
[SanitizerOptions](FunctionPassManager &FPM, PassBuilder::OptimizationLevel Level) {
|
||||||
FPM.addPass(AddressSanitizerPass(
|
FPM.addPass(AddressSanitizerPass(
|
||||||
|
@ -890,7 +929,7 @@ LLVMRustOptimizeWithNewPassManager(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
PipelineStartEPCallbacks.push_back(
|
PipelineStartEPCallbacks.push_back(
|
||||||
[SanitizerOptions](ModulePassManager &MPM) {
|
[SanitizerOptions](ModulePassManager &MPM, PassBuilder::OptimizationLevel Level) {
|
||||||
MPM.addPass(ModuleAddressSanitizerPass(
|
MPM.addPass(ModuleAddressSanitizerPass(
|
||||||
/*CompileKernel=*/false, SanitizerOptions->SanitizeAddressRecover));
|
/*CompileKernel=*/false, SanitizerOptions->SanitizeAddressRecover));
|
||||||
}
|
}
|
||||||
|
@ -907,7 +946,7 @@ LLVMRustOptimizeWithNewPassManager(
|
||||||
);
|
);
|
||||||
#else
|
#else
|
||||||
PipelineStartEPCallbacks.push_back(
|
PipelineStartEPCallbacks.push_back(
|
||||||
[SanitizerOptions](ModulePassManager &MPM) {
|
[SanitizerOptions](ModulePassManager &MPM, PassBuilder::OptimizationLevel Level) {
|
||||||
MPM.addPass(HWAddressSanitizerPass(
|
MPM.addPass(HWAddressSanitizerPass(
|
||||||
/*CompileKernel=*/false, SanitizerOptions->SanitizeHWAddressRecover));
|
/*CompileKernel=*/false, SanitizerOptions->SanitizeHWAddressRecover));
|
||||||
}
|
}
|
||||||
|
@ -917,35 +956,53 @@ LLVMRustOptimizeWithNewPassManager(
|
||||||
}
|
}
|
||||||
|
|
||||||
ModulePassManager MPM(DebugPassManager);
|
ModulePassManager MPM(DebugPassManager);
|
||||||
|
bool NeedThinLTOBufferPasses = UseThinLTOBuffers;
|
||||||
if (!NoPrepopulatePasses) {
|
if (!NoPrepopulatePasses) {
|
||||||
if (OptLevel == PassBuilder::OptimizationLevel::O0) {
|
if (OptLevel == PassBuilder::OptimizationLevel::O0) {
|
||||||
|
#if LLVM_VERSION_GE(12, 0)
|
||||||
for (const auto &C : PipelineStartEPCallbacks)
|
for (const auto &C : PipelineStartEPCallbacks)
|
||||||
C(MPM);
|
PB.registerPipelineStartEPCallback(C);
|
||||||
|
for (const auto &C : OptimizerLastEPCallbacks)
|
||||||
|
PB.registerOptimizerLastEPCallback(C);
|
||||||
|
|
||||||
#if LLVM_VERSION_GE(11, 0)
|
// Pass false as we manually schedule ThinLTOBufferPasses below.
|
||||||
|
MPM = PB.buildO0DefaultPipeline(OptLevel, /* PreLinkLTO */ false);
|
||||||
|
#else
|
||||||
|
for (const auto &C : PipelineStartEPCallbacks)
|
||||||
|
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
|
# else
|
||||||
if (!OptimizerLastEPCallbacks.empty()) {
|
if (!OptimizerLastEPCallbacks.empty()) {
|
||||||
FunctionPassManager FPM(DebugPassManager);
|
FunctionPassManager FPM(DebugPassManager);
|
||||||
for (const auto &C : OptimizerLastEPCallbacks)
|
for (const auto &C : OptimizerLastEPCallbacks)
|
||||||
C(FPM, OptLevel);
|
C(FPM, OptLevel);
|
||||||
MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM)));
|
MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM)));
|
||||||
}
|
}
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
MPM.addPass(AlwaysInlinerPass(EmitLifetimeMarkers));
|
MPM.addPass(AlwaysInlinerPass(EmitLifetimeMarkers));
|
||||||
|
|
||||||
#if LLVM_VERSION_GE(10, 0)
|
# if LLVM_VERSION_GE(10, 0)
|
||||||
if (PGOOpt) {
|
if (PGOOpt) {
|
||||||
PB.addPGOInstrPassesForO0(
|
PB.addPGOInstrPassesForO0(
|
||||||
MPM, DebugPassManager, PGOOpt->Action == PGOOptions::IRInstr,
|
MPM, DebugPassManager, PGOOpt->Action == PGOOptions::IRInstr,
|
||||||
/*IsCS=*/false, PGOOpt->ProfileFile, PGOOpt->ProfileRemappingFile);
|
/*IsCS=*/false, PGOOpt->ProfileFile, PGOOpt->ProfileRemappingFile);
|
||||||
}
|
}
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
|
#if LLVM_VERSION_GE(12, 0)
|
||||||
for (const auto &C : PipelineStartEPCallbacks)
|
for (const auto &C : PipelineStartEPCallbacks)
|
||||||
PB.registerPipelineStartEPCallback(C);
|
PB.registerPipelineStartEPCallback(C);
|
||||||
|
#else
|
||||||
|
for (const auto &C : PipelineStartEPCallbacks)
|
||||||
|
PB.registerPipelineStartEPCallback([C, OptLevel](ModulePassManager &MPM) {
|
||||||
|
C(MPM, OptLevel);
|
||||||
|
});
|
||||||
|
#endif
|
||||||
if (OptStage != LLVMRustOptStage::PreLinkThinLTO) {
|
if (OptStage != LLVMRustOptStage::PreLinkThinLTO) {
|
||||||
for (const auto &C : OptimizerLastEPCallbacks)
|
for (const auto &C : OptimizerLastEPCallbacks)
|
||||||
PB.registerOptimizerLastEPCallback(C);
|
PB.registerOptimizerLastEPCallback(C);
|
||||||
|
@ -956,7 +1013,12 @@ LLVMRustOptimizeWithNewPassManager(
|
||||||
MPM = PB.buildPerModuleDefaultPipeline(OptLevel, DebugPassManager);
|
MPM = PB.buildPerModuleDefaultPipeline(OptLevel, DebugPassManager);
|
||||||
break;
|
break;
|
||||||
case LLVMRustOptStage::PreLinkThinLTO:
|
case LLVMRustOptStage::PreLinkThinLTO:
|
||||||
|
#if LLVM_VERSION_GE(12, 0)
|
||||||
|
MPM = PB.buildThinLTOPreLinkDefaultPipeline(OptLevel);
|
||||||
|
NeedThinLTOBufferPasses = false;
|
||||||
|
#else
|
||||||
MPM = PB.buildThinLTOPreLinkDefaultPipeline(OptLevel, DebugPassManager);
|
MPM = PB.buildThinLTOPreLinkDefaultPipeline(OptLevel, DebugPassManager);
|
||||||
|
#endif
|
||||||
#if LLVM_VERSION_GE(11, 0)
|
#if LLVM_VERSION_GE(11, 0)
|
||||||
for (const auto &C : OptimizerLastEPCallbacks)
|
for (const auto &C : OptimizerLastEPCallbacks)
|
||||||
C(MPM, OptLevel);
|
C(MPM, OptLevel);
|
||||||
|
@ -970,21 +1032,34 @@ LLVMRustOptimizeWithNewPassManager(
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case LLVMRustOptStage::PreLinkFatLTO:
|
case LLVMRustOptStage::PreLinkFatLTO:
|
||||||
|
#if LLVM_VERSION_GE(12, 0)
|
||||||
|
MPM = PB.buildLTOPreLinkDefaultPipeline(OptLevel);
|
||||||
|
NeedThinLTOBufferPasses = false;
|
||||||
|
#else
|
||||||
MPM = PB.buildLTOPreLinkDefaultPipeline(OptLevel, DebugPassManager);
|
MPM = PB.buildLTOPreLinkDefaultPipeline(OptLevel, DebugPassManager);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case LLVMRustOptStage::ThinLTO:
|
case LLVMRustOptStage::ThinLTO:
|
||||||
// FIXME: Does it make sense to pass the ModuleSummaryIndex?
|
// FIXME: Does it make sense to pass the ModuleSummaryIndex?
|
||||||
// It only seems to be needed for C++ specific optimizations.
|
// It only seems to be needed for C++ specific optimizations.
|
||||||
|
#if LLVM_VERSION_GE(12, 0)
|
||||||
|
MPM = PB.buildThinLTODefaultPipeline(OptLevel, nullptr);
|
||||||
|
#else
|
||||||
MPM = PB.buildThinLTODefaultPipeline(OptLevel, DebugPassManager, nullptr);
|
MPM = PB.buildThinLTODefaultPipeline(OptLevel, DebugPassManager, nullptr);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case LLVMRustOptStage::FatLTO:
|
case LLVMRustOptStage::FatLTO:
|
||||||
|
#if LLVM_VERSION_GE(12, 0)
|
||||||
|
MPM = PB.buildLTODefaultPipeline(OptLevel, nullptr);
|
||||||
|
#else
|
||||||
MPM = PB.buildLTODefaultPipeline(OptLevel, DebugPassManager, nullptr);
|
MPM = PB.buildLTODefaultPipeline(OptLevel, DebugPassManager, nullptr);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UseThinLTOBuffers) {
|
if (NeedThinLTOBufferPasses) {
|
||||||
MPM.addPass(CanonicalizeAliasesPass());
|
MPM.addPass(CanonicalizeAliasesPass());
|
||||||
MPM.addPass(NameAnonGlobalPass());
|
MPM.addPass(NameAnonGlobalPass());
|
||||||
}
|
}
|
||||||
|
|
|
@ -263,6 +263,17 @@ extern "C" void LLVMRustAddByValCallSiteAttr(LLVMValueRef Instr, unsigned Index,
|
||||||
Call->addAttribute(Index, Attr);
|
Call->addAttribute(Index, Attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" void LLVMRustAddStructRetCallSiteAttr(LLVMValueRef Instr, unsigned Index,
|
||||||
|
LLVMTypeRef Ty) {
|
||||||
|
CallBase *Call = unwrap<CallBase>(Instr);
|
||||||
|
#if LLVM_VERSION_GE(12, 0)
|
||||||
|
Attribute Attr = Attribute::getWithStructRetType(Call->getContext(), unwrap(Ty));
|
||||||
|
#else
|
||||||
|
Attribute Attr = Attribute::get(Call->getContext(), Attribute::StructRet);
|
||||||
|
#endif
|
||||||
|
Call->addAttribute(Index, Attr);
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" void LLVMRustAddFunctionAttribute(LLVMValueRef Fn, unsigned Index,
|
extern "C" void LLVMRustAddFunctionAttribute(LLVMValueRef Fn, unsigned Index,
|
||||||
LLVMRustAttribute RustAttr) {
|
LLVMRustAttribute RustAttr) {
|
||||||
Function *A = unwrap<Function>(Fn);
|
Function *A = unwrap<Function>(Fn);
|
||||||
|
@ -304,6 +315,17 @@ extern "C" void LLVMRustAddByValAttr(LLVMValueRef Fn, unsigned Index,
|
||||||
F->addAttribute(Index, Attr);
|
F->addAttribute(Index, Attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" void LLVMRustAddStructRetAttr(LLVMValueRef Fn, unsigned Index,
|
||||||
|
LLVMTypeRef Ty) {
|
||||||
|
Function *F = unwrap<Function>(Fn);
|
||||||
|
#if LLVM_VERSION_GE(12, 0)
|
||||||
|
Attribute Attr = Attribute::getWithStructRetType(F->getContext(), unwrap(Ty));
|
||||||
|
#else
|
||||||
|
Attribute Attr = Attribute::get(F->getContext(), Attribute::StructRet);
|
||||||
|
#endif
|
||||||
|
F->addAttribute(Index, Attr);
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" void LLVMRustAddFunctionAttrStringValue(LLVMValueRef Fn,
|
extern "C" void LLVMRustAddFunctionAttrStringValue(LLVMValueRef Fn,
|
||||||
unsigned Index,
|
unsigned Index,
|
||||||
const char *Name,
|
const char *Name,
|
||||||
|
@ -1007,12 +1029,19 @@ LLVMRustDICompositeTypeReplaceArrays(LLVMRustDIBuilderRef Builder,
|
||||||
|
|
||||||
extern "C" LLVMMetadataRef
|
extern "C" LLVMMetadataRef
|
||||||
LLVMRustDIBuilderCreateDebugLocation(unsigned Line, unsigned Column,
|
LLVMRustDIBuilderCreateDebugLocation(unsigned Line, unsigned Column,
|
||||||
LLVMMetadataRef Scope,
|
LLVMMetadataRef ScopeRef,
|
||||||
LLVMMetadataRef InlinedAt) {
|
LLVMMetadataRef InlinedAt) {
|
||||||
DebugLoc debug_loc = DebugLoc::get(Line, Column, unwrapDIPtr<MDNode>(Scope),
|
#if LLVM_VERSION_GE(12, 0)
|
||||||
|
MDNode *Scope = unwrapDIPtr<MDNode>(ScopeRef);
|
||||||
|
DILocation *Loc = DILocation::get(
|
||||||
|
Scope->getContext(), Line, Column, Scope,
|
||||||
|
unwrapDIPtr<MDNode>(InlinedAt));
|
||||||
|
return wrap(Loc);
|
||||||
|
#else
|
||||||
|
DebugLoc debug_loc = DebugLoc::get(Line, Column, unwrapDIPtr<MDNode>(ScopeRef),
|
||||||
unwrapDIPtr<MDNode>(InlinedAt));
|
unwrapDIPtr<MDNode>(InlinedAt));
|
||||||
|
|
||||||
return wrap(debug_loc.getAsMDNode());
|
return wrap(debug_loc.getAsMDNode());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" int64_t LLVMRustDIBuilderCreateOpDeref() {
|
extern "C" int64_t LLVMRustDIBuilderCreateOpDeref() {
|
||||||
|
@ -1262,6 +1291,10 @@ extern "C" LLVMTypeKind LLVMRustGetTypeKind(LLVMTypeRef Ty) {
|
||||||
return LLVMScalableVectorTypeKind;
|
return LLVMScalableVectorTypeKind;
|
||||||
case Type::BFloatTyID:
|
case Type::BFloatTyID:
|
||||||
return LLVMBFloatTypeKind;
|
return LLVMBFloatTypeKind;
|
||||||
|
#endif
|
||||||
|
#if LLVM_VERSION_GE(12, 0)
|
||||||
|
case Type::X86_AMXTyID:
|
||||||
|
return LLVMX86_AMXTypeKind;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
report_fatal_error("Unhandled TypeID.");
|
report_fatal_error("Unhandled TypeID.");
|
||||||
|
@ -1708,11 +1741,23 @@ LLVMRustBuildVectorReduceMax(LLVMBuilderRef B, LLVMValueRef Src, bool IsSigned)
|
||||||
}
|
}
|
||||||
extern "C" LLVMValueRef
|
extern "C" LLVMValueRef
|
||||||
LLVMRustBuildVectorReduceFMin(LLVMBuilderRef B, LLVMValueRef Src, bool NoNaN) {
|
LLVMRustBuildVectorReduceFMin(LLVMBuilderRef B, LLVMValueRef Src, bool NoNaN) {
|
||||||
|
#if LLVM_VERSION_GE(12, 0)
|
||||||
|
Instruction *I = unwrap(B)->CreateFPMinReduce(unwrap(Src));
|
||||||
|
I->setHasNoNaNs(NoNaN);
|
||||||
|
return wrap(I);
|
||||||
|
#else
|
||||||
return wrap(unwrap(B)->CreateFPMinReduce(unwrap(Src), NoNaN));
|
return wrap(unwrap(B)->CreateFPMinReduce(unwrap(Src), NoNaN));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
extern "C" LLVMValueRef
|
extern "C" LLVMValueRef
|
||||||
LLVMRustBuildVectorReduceFMax(LLVMBuilderRef B, LLVMValueRef Src, bool NoNaN) {
|
LLVMRustBuildVectorReduceFMax(LLVMBuilderRef B, LLVMValueRef Src, bool NoNaN) {
|
||||||
|
#if LLVM_VERSION_GE(12, 0)
|
||||||
|
Instruction *I = unwrap(B)->CreateFPMaxReduce(unwrap(Src));
|
||||||
|
I->setHasNoNaNs(NoNaN);
|
||||||
|
return wrap(I);
|
||||||
|
#else
|
||||||
return wrap(unwrap(B)->CreateFPMaxReduce(unwrap(Src), NoNaN));
|
return wrap(unwrap(B)->CreateFPMaxReduce(unwrap(Src), NoNaN));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" LLVMValueRef
|
extern "C" LLVMValueRef
|
||||||
|
|
|
@ -14,7 +14,7 @@ pub fn target() -> Target {
|
||||||
Target {
|
Target {
|
||||||
llvm_target: "powerpc64-unknown-linux-gnu".to_string(),
|
llvm_target: "powerpc64-unknown-linux-gnu".to_string(),
|
||||||
pointer_width: 64,
|
pointer_width: 64,
|
||||||
data_layout: "E-m:e-i64:64-n32:64".to_string(),
|
data_layout: "E-m:e-i64:64-n32:64-v256:256:256-v512:512:512".to_string(),
|
||||||
arch: "powerpc64".to_string(),
|
arch: "powerpc64".to_string(),
|
||||||
options: TargetOptions { endian: Endian::Big, mcount: "_mcount".to_string(), ..base },
|
options: TargetOptions { endian: Endian::Big, mcount: "_mcount".to_string(), ..base },
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ pub fn target() -> Target {
|
||||||
Target {
|
Target {
|
||||||
llvm_target: "powerpc64-unknown-linux-musl".to_string(),
|
llvm_target: "powerpc64-unknown-linux-musl".to_string(),
|
||||||
pointer_width: 64,
|
pointer_width: 64,
|
||||||
data_layout: "E-m:e-i64:64-n32:64".to_string(),
|
data_layout: "E-m:e-i64:64-n32:64-v256:256:256-v512:512:512".to_string(),
|
||||||
arch: "powerpc64".to_string(),
|
arch: "powerpc64".to_string(),
|
||||||
options: TargetOptions { endian: Endian::Big, mcount: "_mcount".to_string(), ..base },
|
options: TargetOptions { endian: Endian::Big, mcount: "_mcount".to_string(), ..base },
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ pub fn target() -> Target {
|
||||||
Target {
|
Target {
|
||||||
llvm_target: "powerpc64-unknown-linux-gnu".to_string(),
|
llvm_target: "powerpc64-unknown-linux-gnu".to_string(),
|
||||||
pointer_width: 64,
|
pointer_width: 64,
|
||||||
data_layout: "E-m:e-i64:64-n32:64".to_string(),
|
data_layout: "E-m:e-i64:64-n32:64-v256:256:256-v512:512:512".to_string(),
|
||||||
arch: "powerpc64".to_string(),
|
arch: "powerpc64".to_string(),
|
||||||
options: TargetOptions { endian: Endian::Big, ..base },
|
options: TargetOptions { endian: Endian::Big, ..base },
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ pub fn target() -> Target {
|
||||||
Target {
|
Target {
|
||||||
llvm_target: "powerpc64le-unknown-linux-gnu".to_string(),
|
llvm_target: "powerpc64le-unknown-linux-gnu".to_string(),
|
||||||
pointer_width: 64,
|
pointer_width: 64,
|
||||||
data_layout: "e-m:e-i64:64-n32:64".to_string(),
|
data_layout: "e-m:e-i64:64-n32:64-v256:256:256-v512:512:512".to_string(),
|
||||||
arch: "powerpc64".to_string(),
|
arch: "powerpc64".to_string(),
|
||||||
options: TargetOptions { mcount: "_mcount".to_string(), ..base },
|
options: TargetOptions { mcount: "_mcount".to_string(), ..base },
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ pub fn target() -> Target {
|
||||||
Target {
|
Target {
|
||||||
llvm_target: "powerpc64le-unknown-linux-musl".to_string(),
|
llvm_target: "powerpc64le-unknown-linux-musl".to_string(),
|
||||||
pointer_width: 64,
|
pointer_width: 64,
|
||||||
data_layout: "e-m:e-i64:64-n32:64".to_string(),
|
data_layout: "e-m:e-i64:64-n32:64-v256:256:256-v512:512:512".to_string(),
|
||||||
arch: "powerpc64".to_string(),
|
arch: "powerpc64".to_string(),
|
||||||
options: TargetOptions { mcount: "_mcount".to_string(), ..base },
|
options: TargetOptions { mcount: "_mcount".to_string(), ..base },
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
//[riscv32] compile-flags: --target riscv32imac-unknown-none-elf
|
//[riscv32] compile-flags: --target riscv32imac-unknown-none-elf
|
||||||
// compile-flags: -C target-feature=+d
|
// compile-flags: -C target-feature=+d
|
||||||
// needs-llvm-components: riscv
|
// needs-llvm-components: riscv
|
||||||
|
// min-system-llvm-version: 12.0
|
||||||
|
|
||||||
#![feature(no_core, lang_items, rustc_attrs)]
|
#![feature(no_core, lang_items, rustc_attrs)]
|
||||||
#![crate_type = "rlib"]
|
#![crate_type = "rlib"]
|
||||||
|
@ -99,45 +100,45 @@ macro_rules! check_reg {
|
||||||
|
|
||||||
// CHECK-LABEL: reg_i8:
|
// CHECK-LABEL: reg_i8:
|
||||||
// CHECK: #APP
|
// CHECK: #APP
|
||||||
// CHECK: add {{[a-z0-9]+}}, zero, {{[a-z0-9]+}}
|
// CHECK: mv {{[a-z0-9]+}}, {{[a-z0-9]+}}
|
||||||
// CHECK: #NO_APP
|
// CHECK: #NO_APP
|
||||||
check!(reg_i8 i8 reg "mv");
|
check!(reg_i8 i8 reg "mv");
|
||||||
|
|
||||||
// CHECK-LABEL: reg_i16:
|
// CHECK-LABEL: reg_i16:
|
||||||
// CHECK: #APP
|
// CHECK: #APP
|
||||||
// CHECK: add {{[a-z0-9]+}}, zero, {{[a-z0-9]+}}
|
// CHECK: mv {{[a-z0-9]+}}, {{[a-z0-9]+}}
|
||||||
// CHECK: #NO_APP
|
// CHECK: #NO_APP
|
||||||
check!(reg_i16 i16 reg "mv");
|
check!(reg_i16 i16 reg "mv");
|
||||||
|
|
||||||
// CHECK-LABEL: reg_i32:
|
// CHECK-LABEL: reg_i32:
|
||||||
// CHECK: #APP
|
// CHECK: #APP
|
||||||
// CHECK: add {{[a-z0-9]+}}, zero, {{[a-z0-9]+}}
|
// CHECK: mv {{[a-z0-9]+}}, {{[a-z0-9]+}}
|
||||||
// CHECK: #NO_APP
|
// CHECK: #NO_APP
|
||||||
check!(reg_i32 i32 reg "mv");
|
check!(reg_i32 i32 reg "mv");
|
||||||
|
|
||||||
// CHECK-LABEL: reg_f32:
|
// CHECK-LABEL: reg_f32:
|
||||||
// CHECK: #APP
|
// CHECK: #APP
|
||||||
// CHECK: add {{[a-z0-9]+}}, zero, {{[a-z0-9]+}}
|
// CHECK: mv {{[a-z0-9]+}}, {{[a-z0-9]+}}
|
||||||
// CHECK: #NO_APP
|
// CHECK: #NO_APP
|
||||||
check!(reg_f32 f32 reg "mv");
|
check!(reg_f32 f32 reg "mv");
|
||||||
|
|
||||||
// riscv64-LABEL: reg_i64:
|
// riscv64-LABEL: reg_i64:
|
||||||
// riscv64: #APP
|
// riscv64: #APP
|
||||||
// riscv64: add {{[a-z0-9]+}}, zero, {{[a-z0-9]+}}
|
// riscv64: mv {{[a-z0-9]+}}, {{[a-z0-9]+}}
|
||||||
// riscv64: #NO_APP
|
// riscv64: #NO_APP
|
||||||
#[cfg(riscv64)]
|
#[cfg(riscv64)]
|
||||||
check!(reg_i64 i64 reg "mv");
|
check!(reg_i64 i64 reg "mv");
|
||||||
|
|
||||||
// riscv64-LABEL: reg_f64:
|
// riscv64-LABEL: reg_f64:
|
||||||
// riscv64: #APP
|
// riscv64: #APP
|
||||||
// riscv64: add {{[a-z0-9]+}}, zero, {{[a-z0-9]+}}
|
// riscv64: mv {{[a-z0-9]+}}, {{[a-z0-9]+}}
|
||||||
// riscv64: #NO_APP
|
// riscv64: #NO_APP
|
||||||
#[cfg(riscv64)]
|
#[cfg(riscv64)]
|
||||||
check!(reg_f64 f64 reg "mv");
|
check!(reg_f64 f64 reg "mv");
|
||||||
|
|
||||||
// CHECK-LABEL: reg_ptr:
|
// CHECK-LABEL: reg_ptr:
|
||||||
// CHECK: #APP
|
// CHECK: #APP
|
||||||
// CHECK: add {{[a-z0-9]+}}, zero, {{[a-z0-9]+}}
|
// CHECK: mv {{[a-z0-9]+}}, {{[a-z0-9]+}}
|
||||||
// CHECK: #NO_APP
|
// CHECK: #NO_APP
|
||||||
check!(reg_ptr ptr reg "mv");
|
check!(reg_ptr ptr reg "mv");
|
||||||
|
|
||||||
|
@ -155,45 +156,45 @@ check!(freg_f64 f64 freg "fmv.d");
|
||||||
|
|
||||||
// CHECK-LABEL: a0_i8:
|
// CHECK-LABEL: a0_i8:
|
||||||
// CHECK: #APP
|
// CHECK: #APP
|
||||||
// CHECK: add a0, zero, a0
|
// CHECK: mv a0, a0
|
||||||
// CHECK: #NO_APP
|
// CHECK: #NO_APP
|
||||||
check_reg!(a0_i8 i8 "a0" "mv");
|
check_reg!(a0_i8 i8 "a0" "mv");
|
||||||
|
|
||||||
// CHECK-LABEL: a0_i16:
|
// CHECK-LABEL: a0_i16:
|
||||||
// CHECK: #APP
|
// CHECK: #APP
|
||||||
// CHECK: add a0, zero, a0
|
// CHECK: mv a0, a0
|
||||||
// CHECK: #NO_APP
|
// CHECK: #NO_APP
|
||||||
check_reg!(a0_i16 i16 "a0" "mv");
|
check_reg!(a0_i16 i16 "a0" "mv");
|
||||||
|
|
||||||
// CHECK-LABEL: a0_i32:
|
// CHECK-LABEL: a0_i32:
|
||||||
// CHECK: #APP
|
// CHECK: #APP
|
||||||
// CHECK: add a0, zero, a0
|
// CHECK: mv a0, a0
|
||||||
// CHECK: #NO_APP
|
// CHECK: #NO_APP
|
||||||
check_reg!(a0_i32 i32 "a0" "mv");
|
check_reg!(a0_i32 i32 "a0" "mv");
|
||||||
|
|
||||||
// CHECK-LABEL: a0_f32:
|
// CHECK-LABEL: a0_f32:
|
||||||
// CHECK: #APP
|
// CHECK: #APP
|
||||||
// CHECK: add a0, zero, a0
|
// CHECK: mv a0, a0
|
||||||
// CHECK: #NO_APP
|
// CHECK: #NO_APP
|
||||||
check_reg!(a0_f32 f32 "a0" "mv");
|
check_reg!(a0_f32 f32 "a0" "mv");
|
||||||
|
|
||||||
// riscv64-LABEL: a0_i64:
|
// riscv64-LABEL: a0_i64:
|
||||||
// riscv64: #APP
|
// riscv64: #APP
|
||||||
// riscv64: add a0, zero, a0
|
// riscv64: mv a0, a0
|
||||||
// riscv64: #NO_APP
|
// riscv64: #NO_APP
|
||||||
#[cfg(riscv64)]
|
#[cfg(riscv64)]
|
||||||
check_reg!(a0_i64 i64 "a0" "mv");
|
check_reg!(a0_i64 i64 "a0" "mv");
|
||||||
|
|
||||||
// riscv64-LABEL: a0_f64:
|
// riscv64-LABEL: a0_f64:
|
||||||
// riscv64: #APP
|
// riscv64: #APP
|
||||||
// riscv64: add a0, zero, a0
|
// riscv64: mv a0, a0
|
||||||
// riscv64: #NO_APP
|
// riscv64: #NO_APP
|
||||||
#[cfg(riscv64)]
|
#[cfg(riscv64)]
|
||||||
check_reg!(a0_f64 f64 "a0" "mv");
|
check_reg!(a0_f64 f64 "a0" "mv");
|
||||||
|
|
||||||
// CHECK-LABEL: a0_ptr:
|
// CHECK-LABEL: a0_ptr:
|
||||||
// CHECK: #APP
|
// CHECK: #APP
|
||||||
// CHECK: add a0, zero, a0
|
// CHECK: mv a0, a0
|
||||||
// CHECK: #NO_APP
|
// CHECK: #NO_APP
|
||||||
check_reg!(a0_ptr ptr "a0" "mv");
|
check_reg!(a0_ptr ptr "a0" "mv");
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// compile-flags: -C no-prepopulate-passes
|
// compile-flags: -C no-prepopulate-passes
|
||||||
// ignore-tidy-linelength
|
// ignore-tidy-linelength
|
||||||
|
// min-system-llvm-version: 12.0
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
|
@ -73,7 +74,7 @@ pub fn _box(x: Box<i32>) -> Box<i32> {
|
||||||
x
|
x
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: @struct_return(%S* noalias nocapture sret dereferenceable(32){{( %0)?}})
|
// CHECK: @struct_return(%S* noalias nocapture sret(%S) dereferenceable(32){{( %0)?}})
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub fn struct_return() -> S {
|
pub fn struct_return() -> S {
|
||||||
S {
|
S {
|
||||||
|
|
|
@ -52,7 +52,7 @@ pub struct BigPacked2 {
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub fn call_pkd1(f: fn() -> Array) -> BigPacked1 {
|
pub fn call_pkd1(f: fn() -> Array) -> BigPacked1 {
|
||||||
// CHECK: [[ALLOCA:%[_a-z0-9]+]] = alloca %Array
|
// CHECK: [[ALLOCA:%[_a-z0-9]+]] = alloca %Array
|
||||||
// CHECK: call void %{{.*}}(%Array* noalias nocapture sret dereferenceable(32) [[ALLOCA]])
|
// CHECK: call void %{{.*}}(%Array* noalias nocapture sret{{.*}} dereferenceable(32) [[ALLOCA]])
|
||||||
// CHECK: call void @llvm.memcpy.{{.*}}(i8* align 1 %{{.*}}, i8* align 4 %{{.*}}, i{{[0-9]+}} 32, i1 false)
|
// CHECK: call void @llvm.memcpy.{{.*}}(i8* align 1 %{{.*}}, i8* align 4 %{{.*}}, i{{[0-9]+}} 32, i1 false)
|
||||||
// check that calls whose destination is a field of a packed struct
|
// check that calls whose destination is a field of a packed struct
|
||||||
// go through an alloca rather than calling the function with an
|
// go through an alloca rather than calling the function with an
|
||||||
|
@ -64,7 +64,7 @@ pub fn call_pkd1(f: fn() -> Array) -> BigPacked1 {
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub fn call_pkd2(f: fn() -> Array) -> BigPacked2 {
|
pub fn call_pkd2(f: fn() -> Array) -> BigPacked2 {
|
||||||
// CHECK: [[ALLOCA:%[_a-z0-9]+]] = alloca %Array
|
// CHECK: [[ALLOCA:%[_a-z0-9]+]] = alloca %Array
|
||||||
// CHECK: call void %{{.*}}(%Array* noalias nocapture sret dereferenceable(32) [[ALLOCA]])
|
// CHECK: call void %{{.*}}(%Array* noalias nocapture sret{{.*}} dereferenceable(32) [[ALLOCA]])
|
||||||
// CHECK: call void @llvm.memcpy.{{.*}}(i8* align 2 %{{.*}}, i8* align 4 %{{.*}}, i{{[0-9]+}} 32, i1 false)
|
// CHECK: call void @llvm.memcpy.{{.*}}(i8* align 2 %{{.*}}, i8* align 4 %{{.*}}, i{{[0-9]+}} 32, i1 false)
|
||||||
// check that calls whose destination is a field of a packed struct
|
// check that calls whose destination is a field of a packed struct
|
||||||
// go through an alloca rather than calling the function with an
|
// go through an alloca rather than calling the function with an
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// compile-flags: -C no-prepopulate-passes
|
// compile-flags: -C no-prepopulate-passes
|
||||||
// ignore-tidy-linelength
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
// min-system-llvm-version: 9.0
|
// min-system-llvm-version: 12.0
|
||||||
// ignore-arm
|
// ignore-arm
|
||||||
// ignore-aarch64
|
// ignore-aarch64
|
||||||
// ignore-mips
|
// ignore-mips
|
||||||
|
@ -34,19 +34,19 @@ pub enum TeBigS {
|
||||||
Variant(BigS),
|
Variant(BigS),
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: define void @test_BigS(%BigS* [[BIGS_RET_ATTRS:.*]], %BigS* [[BIGS_ARG_ATTRS1:.*]] byval(%BigS) [[BIGS_ARG_ATTRS2:.*]])
|
// CHECK: define void @test_BigS(%BigS* [[BIGS_RET_ATTRS1:.*]] sret(%BigS) [[BIGS_RET_ATTRS2:.*]], %BigS* [[BIGS_ARG_ATTRS1:.*]] byval(%BigS) [[BIGS_ARG_ATTRS2:.*]])
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn test_BigS(_: BigS) -> BigS { loop {} }
|
pub extern "C" fn test_BigS(_: BigS) -> BigS { loop {} }
|
||||||
|
|
||||||
// CHECK: define void @test_TsBigS(%TsBigS* [[BIGS_RET_ATTRS]], %TsBigS* [[BIGS_ARG_ATTRS1]] byval(%TsBigS) [[BIGS_ARG_ATTRS2:.*]])
|
// CHECK: define void @test_TsBigS(%TsBigS* [[BIGS_RET_ATTRS1]] sret(%TsBigS) [[BIGS_RET_ATTRS2]], %TsBigS* [[BIGS_ARG_ATTRS1]] byval(%TsBigS) [[BIGS_ARG_ATTRS2:.*]])
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn test_TsBigS(_: TsBigS) -> TsBigS { loop {} }
|
pub extern "C" fn test_TsBigS(_: TsBigS) -> TsBigS { loop {} }
|
||||||
|
|
||||||
// CHECK: define void @test_TuBigS(%TuBigS* [[BIGS_RET_ATTRS]], %TuBigS* [[BIGS_ARG_ATTRS1]] byval(%TuBigS) [[BIGS_ARG_ATTRS2:.*]])
|
// CHECK: define void @test_TuBigS(%TuBigS* [[BIGS_RET_ATTRS1]] sret(%TuBigS) [[BIGS_RET_ATTRS2]], %TuBigS* [[BIGS_ARG_ATTRS1]] byval(%TuBigS) [[BIGS_ARG_ATTRS2:.*]])
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn test_TuBigS(_: TuBigS) -> TuBigS { loop {} }
|
pub extern "C" fn test_TuBigS(_: TuBigS) -> TuBigS { loop {} }
|
||||||
|
|
||||||
// CHECK: define void @test_TeBigS(%"TeBigS::Variant"* [[BIGS_RET_ATTRS]], %"TeBigS::Variant"* [[BIGS_ARG_ATTRS1]] byval(%"TeBigS::Variant") [[BIGS_ARG_ATTRS2]])
|
// CHECK: define void @test_TeBigS(%"TeBigS::Variant"* [[BIGS_RET_ATTRS1]] sret(%"TeBigS::Variant") [[BIGS_RET_ATTRS2]], %"TeBigS::Variant"* [[BIGS_ARG_ATTRS1]] byval(%"TeBigS::Variant") [[BIGS_ARG_ATTRS2]])
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn test_TeBigS(_: TeBigS) -> TeBigS { loop {} }
|
pub extern "C" fn test_TeBigS(_: TeBigS) -> TeBigS { loop {} }
|
||||||
|
|
||||||
|
@ -70,18 +70,18 @@ pub enum TeBigU {
|
||||||
Variant(BigU),
|
Variant(BigU),
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: define void @test_BigU(%BigU* [[BIGU_RET_ATTRS:.*]], %BigU* [[BIGU_ARG_ATTRS1:.*]] byval(%BigU) [[BIGU_ARG_ATTRS2:.*]])
|
// CHECK: define void @test_BigU(%BigU* [[BIGU_RET_ATTRS1:.*]] sret(%BigU) [[BIGU_RET_ATTRS2:.*]], %BigU* [[BIGU_ARG_ATTRS1:.*]] byval(%BigU) [[BIGU_ARG_ATTRS2:.*]])
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn test_BigU(_: BigU) -> BigU { loop {} }
|
pub extern "C" fn test_BigU(_: BigU) -> BigU { loop {} }
|
||||||
|
|
||||||
// CHECK: define void @test_TsBigU(%TsBigU* [[BIGU_RET_ATTRS:.*]], %TsBigU* [[BIGU_ARG_ATTRS1]] byval(%TsBigU) [[BIGU_ARG_ATTRS2]])
|
// CHECK: define void @test_TsBigU(%TsBigU* [[BIGU_RET_ATTRS1:.*]] sret(%TsBigU) [[BIGU_RET_ATTRS2:.*]], %TsBigU* [[BIGU_ARG_ATTRS1]] byval(%TsBigU) [[BIGU_ARG_ATTRS2]])
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn test_TsBigU(_: TsBigU) -> TsBigU { loop {} }
|
pub extern "C" fn test_TsBigU(_: TsBigU) -> TsBigU { loop {} }
|
||||||
|
|
||||||
// CHECK: define void @test_TuBigU(%TuBigU* [[BIGU_RET_ATTRS]], %TuBigU* [[BIGU_ARG_ATTRS1]] byval(%TuBigU) [[BIGU_ARG_ATTRS2]])
|
// CHECK: define void @test_TuBigU(%TuBigU* [[BIGU_RET_ATTRS1]] sret(%TuBigU) [[BIGU_RET_ATTRS2:.*]], %TuBigU* [[BIGU_ARG_ATTRS1]] byval(%TuBigU) [[BIGU_ARG_ATTRS2]])
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn test_TuBigU(_: TuBigU) -> TuBigU { loop {} }
|
pub extern "C" fn test_TuBigU(_: TuBigU) -> TuBigU { loop {} }
|
||||||
|
|
||||||
// CHECK: define void @test_TeBigU(%"TeBigU::Variant"* [[BIGU_RET_ATTRS]], %"TeBigU::Variant"* [[BIGU_ARG_ATTRS1]] byval(%"TeBigU::Variant") [[BIGU_ARG_ATTRS2]])
|
// CHECK: define void @test_TeBigU(%"TeBigU::Variant"* [[BIGU_RET_ATTRS1]] sret(%"TeBigU::Variant") [[BIGU_RET_ATTRS2:.*]], %"TeBigU::Variant"* [[BIGU_ARG_ATTRS1]] byval(%"TeBigU::Variant") [[BIGU_ARG_ATTRS2]])
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn test_TeBigU(_: TeBigU) -> TeBigU { loop {} }
|
pub extern "C" fn test_TeBigU(_: TeBigU) -> TeBigU { loop {} }
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
// compile-flags: -C no-prepopulate-passes
|
// compile-flags: -C no-prepopulate-passes
|
||||||
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
|
// min-system-llvm-version: 12.0
|
||||||
// ignore-aarch64
|
// ignore-aarch64
|
||||||
// ignore-emscripten
|
// ignore-emscripten
|
||||||
// ignore-mips64
|
// ignore-mips64
|
||||||
|
@ -36,19 +38,19 @@ pub enum TeBigS {
|
||||||
Variant(BigS),
|
Variant(BigS),
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: define void @test_BigS(%BigS* [[BIGS_RET_ATTRS:.*]], [16 x i32]
|
// CHECK: define void @test_BigS(%BigS* [[BIGS_RET_ATTRS1:.*]] sret(%BigS) [[BIGS_RET_ATTRS2:.*]], [16 x i32]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern fn test_BigS(_: BigS) -> BigS { loop {} }
|
pub extern fn test_BigS(_: BigS) -> BigS { loop {} }
|
||||||
|
|
||||||
// CHECK: define void @test_TsBigS(%TsBigS* [[BIGS_RET_ATTRS]], [16 x i32]
|
// CHECK: define void @test_TsBigS(%TsBigS* [[BIGS_RET_ATTRS1]] sret(%TsBigS) [[BIGS_RET_ATTRS2]], [16 x i32]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern fn test_TsBigS(_: TsBigS) -> TsBigS { loop {} }
|
pub extern fn test_TsBigS(_: TsBigS) -> TsBigS { loop {} }
|
||||||
|
|
||||||
// CHECK: define void @test_TuBigS(%TuBigS* [[BIGS_RET_ATTRS]], [16 x i32]
|
// CHECK: define void @test_TuBigS(%TuBigS* [[BIGS_RET_ATTRS1]] sret(%TuBigS) [[BIGS_RET_ATTRS2]], [16 x i32]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern fn test_TuBigS(_: TuBigS) -> TuBigS { loop {} }
|
pub extern fn test_TuBigS(_: TuBigS) -> TuBigS { loop {} }
|
||||||
|
|
||||||
// CHECK: define void @test_TeBigS(%"TeBigS::Variant"* [[BIGS_RET_ATTRS]], [16 x i32]
|
// CHECK: define void @test_TeBigS(%"TeBigS::Variant"* [[BIGS_RET_ATTRS1]] sret(%"TeBigS::Variant") [[BIGS_RET_ATTRS2]], [16 x i32]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern fn test_TeBigS(_: TeBigS) -> TeBigS { loop {} }
|
pub extern fn test_TeBigS(_: TeBigS) -> TeBigS { loop {} }
|
||||||
|
|
||||||
|
@ -72,18 +74,18 @@ pub enum TeBigU {
|
||||||
Variant(BigU),
|
Variant(BigU),
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: define void @test_BigU(%BigU* [[BIGU_RET_ATTRS:.*]], [16 x i32]
|
// CHECK: define void @test_BigU(%BigU* [[BIGU_RET_ATTRS1:.*]] sret(%BigU) [[BIGU_RET_ATTRS2:.*]], [16 x i32]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern fn test_BigU(_: BigU) -> BigU { loop {} }
|
pub extern fn test_BigU(_: BigU) -> BigU { loop {} }
|
||||||
|
|
||||||
// CHECK: define void @test_TsBigU(%TsBigU* [[BIGU_RET_ATTRS:.*]], [16 x i32]
|
// CHECK: define void @test_TsBigU(%TsBigU* [[BIGU_RET_ATTRS1]] sret(%TsBigU) [[BIGU_RET_ATTRS2]], [16 x i32]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern fn test_TsBigU(_: TsBigU) -> TsBigU { loop {} }
|
pub extern fn test_TsBigU(_: TsBigU) -> TsBigU { loop {} }
|
||||||
|
|
||||||
// CHECK: define void @test_TuBigU(%TuBigU* [[BIGU_RET_ATTRS]], [16 x i32]
|
// CHECK: define void @test_TuBigU(%TuBigU* [[BIGU_RET_ATTRS1]] sret(%TuBigU) [[BIGU_RET_ATTRS2]], [16 x i32]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern fn test_TuBigU(_: TuBigU) -> TuBigU { loop {} }
|
pub extern fn test_TuBigU(_: TuBigU) -> TuBigU { loop {} }
|
||||||
|
|
||||||
// CHECK: define void @test_TeBigU(%"TeBigU::Variant"* [[BIGU_RET_ATTRS]], [16 x i32]
|
// CHECK: define void @test_TeBigU(%"TeBigU::Variant"* [[BIGU_RET_ATTRS1]] sret(%"TeBigU::Variant") [[BIGU_RET_ATTRS2]], [16 x i32]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern fn test_TeBigU(_: TeBigU) -> TeBigU { loop {} }
|
pub extern fn test_TeBigU(_: TeBigU) -> TeBigU { loop {} }
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
// compile-flags: -C no-prepopulate-passes
|
// compile-flags: -C no-prepopulate-passes
|
||||||
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
|
// min-system-llvm-version: 12.0
|
||||||
// only-mips64
|
// only-mips64
|
||||||
// See repr-transparent.rs
|
// See repr-transparent.rs
|
||||||
|
|
||||||
|
@ -25,19 +27,19 @@ pub enum TeBigS {
|
||||||
Variant(BigS),
|
Variant(BigS),
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: define void @test_BigS(%BigS* [[BIGS_RET_ATTRS:.*]], [8 x i64]
|
// CHECK: define void @test_BigS(%BigS* [[BIGS_RET_ATTRS1:.*]] sret(%BigS) [[BIGS_RET_ATTRS2:.*]], [8 x i64]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern fn test_BigS(_: BigS) -> BigS { loop {} }
|
pub extern fn test_BigS(_: BigS) -> BigS { loop {} }
|
||||||
|
|
||||||
// CHECK: define void @test_TsBigS(%TsBigS* [[BIGS_RET_ATTRS]], [8 x i64]
|
// CHECK: define void @test_TsBigS(%TsBigS* [[BIGS_RET_ATTRS1]] sret(%TsBigS) [[BIGS_RET_ATTRS2]], [8 x i64]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern fn test_TsBigS(_: TsBigS) -> TsBigS { loop {} }
|
pub extern fn test_TsBigS(_: TsBigS) -> TsBigS { loop {} }
|
||||||
|
|
||||||
// CHECK: define void @test_TuBigS(%TuBigS* [[BIGS_RET_ATTRS]], [8 x i64]
|
// CHECK: define void @test_TuBigS(%TuBigS* [[BIGS_RET_ATTRS1]] sret(%TuBigS) [[BIGS_RET_ATTRS2]], [8 x i64]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern fn test_TuBigS(_: TuBigS) -> TuBigS { loop {} }
|
pub extern fn test_TuBigS(_: TuBigS) -> TuBigS { loop {} }
|
||||||
|
|
||||||
// CHECK: define void @test_TeBigS(%"TeBigS::Variant"* [[BIGS_RET_ATTRS]], [8 x i64]
|
// CHECK: define void @test_TeBigS(%"TeBigS::Variant"* [[BIGS_RET_ATTRS1]] sret(%"TeBigS::Variant") [[BIGS_RET_ATTRS2]], [8 x i64]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern fn test_TeBigS(_: TeBigS) -> TeBigS { loop {} }
|
pub extern fn test_TeBigS(_: TeBigS) -> TeBigS { loop {} }
|
||||||
|
|
||||||
|
@ -61,18 +63,18 @@ pub enum TeBigU {
|
||||||
Variant(BigU),
|
Variant(BigU),
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: define void @test_BigU(%BigU* [[BIGU_RET_ATTRS:.*]], [8 x i64]
|
// CHECK: define void @test_BigU(%BigU* [[BIGU_RET_ATTRS1:.*]] sret(%BigU) [[BIGU_RET_ATTRS2:.*]], [8 x i64]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern fn test_BigU(_: BigU) -> BigU { loop {} }
|
pub extern fn test_BigU(_: BigU) -> BigU { loop {} }
|
||||||
|
|
||||||
// CHECK: define void @test_TsBigU(%TsBigU* [[BIGU_RET_ATTRS:.*]], [8 x i64]
|
// CHECK: define void @test_TsBigU(%TsBigU* [[BIGU_RET_ATTRS1]] sret(%TsBigU) [[BIGU_RET_ATTRS2]], [8 x i64]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern fn test_TsBigU(_: TsBigU) -> TsBigU { loop {} }
|
pub extern fn test_TsBigU(_: TsBigU) -> TsBigU { loop {} }
|
||||||
|
|
||||||
// CHECK: define void @test_TuBigU(%TuBigU* [[BIGU_RET_ATTRS]], [8 x i64]
|
// CHECK: define void @test_TuBigU(%TuBigU* [[BIGU_RET_ATTRS1]] sret(%TuBigU) [[BIGU_RET_ATTRS2]], [8 x i64]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern fn test_TuBigU(_: TuBigU) -> TuBigU { loop {} }
|
pub extern fn test_TuBigU(_: TuBigU) -> TuBigU { loop {} }
|
||||||
|
|
||||||
// CHECK: define void @test_TeBigU(%"TeBigU::Variant"* [[BIGU_RET_ATTRS]], [8 x i64]
|
// CHECK: define void @test_TeBigU(%"TeBigU::Variant"* [[BIGU_RET_ATTRS1]] sret(%"TeBigU::Variant") [[BIGU_RET_ATTRS2]], [8 x i64]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern fn test_TeBigU(_: TeBigU) -> TeBigU { loop {} }
|
pub extern fn test_TeBigU(_: TeBigU) -> TeBigU { loop {} }
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
# min-llvm-version: 11.0
|
# min-llvm-version: 11.0
|
||||||
|
|
||||||
all:
|
all:
|
||||||
$(RUSTC) -Z unstable-options -C split-debuginfo=packed foo.rs -g
|
$(RUSTC) -Z unstable-options -C split-debuginfo=packed -C debuginfo=2 foo.rs -g
|
||||||
rm $(TMPDIR)/foo.dwp
|
rm $(TMPDIR)/foo.dwp
|
||||||
rm $(TMPDIR)/$(call BIN,foo)
|
rm $(TMPDIR)/$(call BIN,foo)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue