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

Switch to LDC-LLVM v17.0.6 #4540

Merged
merged 5 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ install_macos_prerequisites_template: &INSTALL_MACOS_PREREQUISITES_TEMPLATE
environment:
CIRRUS_CLONE_DEPTH: 50
HOST_LDC_VERSION: 1.31.0
LLVM_VERSION: 16.0.6
LLVM_VERSION: 17.0.6
GITHUB_TOKEN: ENCRYPTED[0955bd48c8d4e5391446fc0149d0719ad0b63df27ec9e6c180a5730a5b10dc7f28f09d1383423db158d21380ee2b022a]

task:
Expand Down
10 changes: 5 additions & 5 deletions .github/actions/3-build-cross/android-llvm-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ LIBFILE="${prefix}/lib/libLLVM-$version.so"

components="aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils \
aggressiveinstcombine all all-targets analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils \
asmparser asmprinter binaryformat bitreader bitstreamreader bitwriter cfguard codegen core coroutines coverage \
debuginfocodeview debuginfodwarf debuginfogsym debuginfologicalview debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker dwarflinkerparallel dwp \
asmparser asmprinter binaryformat bitreader bitstreamreader bitwriter cfguard codegen codegentypes core coroutines coverage \
debuginfobtf debuginfocodeview debuginfodwarf debuginfogsym debuginfologicalview debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker dwarflinkerparallel dwp \
engine executionengine extensions filecheck frontendhlsl frontendopenacc frontendopenmp fuzzercli fuzzmutate globalisel instcombine \
instrumentation interfacestub interpreter ipo irprinter irreader jitlink libdriver lineeditor linker lto mc mca mcdisassembler \
mcjit mcparser mirparser native nativecodegen objcarcopts objcopy object objectyaml option orcjit orcshared orctargetprocess \
Expand All @@ -64,17 +64,17 @@ x86targetmca xray"
static_libs="-lLLVMWindowsManifest -lLLVMXRay -lLLVMLibDriver -lLLVMDlltoolDriver -lLLVMCoverage -lLLVMLineEditor \
-lLLVMSPIRVCodeGen -lLLVMSPIRVDesc -lLLVMSPIRVInfo \
-lLLVMX86TargetMCA -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMX86Desc -lLLVMX86Info -lLLVMWebAssemblyDisassembler \
-lLLVMWebAssemblyAsmParser -lLLVMWebAssemblyCodeGen -lLLVMWebAssemblyDesc -lLLVMWebAssemblyUtils -lLLVMWebAssemblyInfo -lLLVMARMDisassembler \
-lLLVMWebAssemblyAsmParser -lLLVMWebAssemblyCodeGen -lLLVMWebAssemblyUtils -lLLVMWebAssemblyDesc -lLLVMWebAssemblyInfo -lLLVMARMDisassembler \
-lLLVMARMAsmParser -lLLVMARMCodeGen -lLLVMARMDesc -lLLVMARMUtils -lLLVMARMInfo -lLLVMAArch64Disassembler \
-lLLVMAArch64AsmParser -lLLVMAArch64CodeGen -lLLVMAArch64Desc -lLLVMAArch64Utils -lLLVMAArch64Info -lLLVMOrcJIT \
-lLLVMWindowsDriver -lLLVMMCJIT -lLLVMJITLink -lLLVMInterpreter -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMOrcTargetProcess -lLLVMOrcShared \
-lLLVMDWP -lLLVMDebugInfoLogicalView -lLLVMDebugInfoGSYM -lLLVMOption -lLLVMObjectYAML -lLLVMObjCopy -lLLVMMCA \
-lLLVMMCDisassembler -lLLVMLTO -lLLVMPasses -lLLVMCFGuard -lLLVMCoroutines -lLLVMipo \
-lLLVMVectorize -lLLVMLinker -lLLVMInstrumentation -lLLVMFrontendOpenMP -lLLVMFrontendOpenACC -lLLVMFrontendHLSL -lLLVMExtensions \
-lLLVMDWARFLinkerParallel -lLLVMDWARFLinker -lLLVMGlobalISel -lLLVMMIRParser -lLLVMAsmPrinter -lLLVMSelectionDAG \
-lLLVMCodeGen -lLLVMObjCARCOpts -lLLVMIRPrinter -lLLVMInterfaceStub -lLLVMFileCheck -lLLVMFuzzMutate -lLLVMTarget \
-lLLVMCodeGen -lLLVMTarget -lLLVMObjCARCOpts -lLLVMCodeGenTypes -lLLVMIRPrinter -lLLVMInterfaceStub -lLLVMFileCheck -lLLVMFuzzMutate \
-lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis \
-lLLVMProfileData -lLLVMSymbolize -lLLVMDebugInfoPDB -lLLVMDebugInfoMSF -lLLVMDebugInfoDWARF -lLLVMObject -lLLVMTextAPI -lLLVMMCParser -lLLVMIRReader -lLLVMAsmParser -lLLVMMC -lLLVMDebugInfoCodeView \
-lLLVMProfileData -lLLVMSymbolize -lLLVMDebugInfoBTF -lLLVMDebugInfoPDB -lLLVMDebugInfoMSF -lLLVMDebugInfoDWARF -lLLVMObject -lLLVMTextAPI -lLLVMMCParser -lLLVMIRReader -lLLVMAsmParser -lLLVMMC -lLLVMDebugInfoCodeView \
-lLLVMBitReader -lLLVMFuzzerCLI -lLLVMCore -lLLVMRemarks -lLLVMBitstreamReader -lLLVMBinaryFormat -lLLVMTargetParser -lLLVMTableGen -lLLVMSupport \
-lLLVMDemangle"
shared_libs="-lLLVM-$version"
Expand Down
1 change: 0 additions & 1 deletion .github/actions/5a-ios/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ runs:
{
switches = [
\"-defaultlib=phobos2-ldc,druntime-ldc\",
\"-func-specialization-size-threshold=1000000000\",
\"-Xcc=-target\",
\"-Xcc=$triple\",
\"-Xcc=-miphoneos-version-min=$deployment_target\",
Expand Down
4 changes: 0 additions & 4 deletions .github/actions/merge-macos/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ runs:
// default switches injected before all explicit command-line switches
switches = [
\"-defaultlib=phobos2-ldc,druntime-ldc\",
\"-func-specialization-size-threshold=1000000000\",
];
// default switches appended after all explicit command-line switches
post-switches = [
Expand All @@ -64,7 +63,6 @@ runs:
{
switches = [
\"-defaultlib=phobos2-ldc,druntime-ldc\",
\"-func-specialization-size-threshold=1000000000\",
\"-Xcc=-target\",
\"-Xcc=x86_64-apple-macos\",
];
Expand All @@ -78,7 +76,6 @@ runs:
{
switches = [
\"-defaultlib=phobos2-ldc,druntime-ldc\",
\"-func-specialization-size-threshold=1000000000\",
\"-Xcc=-target\",
\"-Xcc=arm64-apple-macos\",
];
Expand All @@ -92,7 +89,6 @@ runs:
{
switches = [
\"-defaultlib=phobos2-ldc,druntime-ldc\",
\"-func-specialization-size-threshold=1000000000\",
\"-Xcc=-target\",
\"-Xcc=arm64-apple-ios$ios_version\",
\"-Xcc=-miphoneos-version-min=$ios_version\",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ concurrency:

env:
CLANG_VERSION: 15.0.6
LLVM_VERSION: 16.0.6
LLVM_VERSION: 17.0.6

jobs:
build-native:
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/supported_llvm_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,11 @@ jobs:
url="https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/clang+llvm-$version-$suffix.tar.xz"

# FIXME: weird crashes with official v16.0.0 archive; use LDC-LLVM instead
if [[ "$version" =~ ^16\. ]]; then
# FIXME: use LDC-LLVM v17.0.6 because it still works on Ubuntu 20 (official release doesn't), so
# we can still use older gdb and postpone fxixing issues with newer gdb
if [[ "$version" =~ ^1(6|7)\. ]]; then
url="https://github.com/ldc-developers/llvm-project/releases/download/ldc-v$version/llvm-$version-linux-x86_64.tar.xz"
fi
# FIXME: Use LDC-LLVM v17.0.6 RC package because it still works on Ubuntu 20 (official release doesn't), so
# we can still use older gdb and postpone fxixing issues with newer gdb
if [[ "$version" =~ ^17\. ]]; then
url="https://github.com/ldc-developers/llvm-project/releases/download/CI/llvm-be7fee94-linux-x86_64.tar.xz"
fi

curl -fL --retry 3 --max-time 300 -o llvm.tar.xz "$url"
mkdir llvm
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#### Big news
- Frontend, druntime and Phobos are at version [2.106.0](https://dlang.org/changelog/2.106.0.html). (#4522, #4539)
- Support for [LLVM 17](https://releases.llvm.org/17.0.1/docs/ReleaseNotes.html). The prebuilt packages use v17.0.6. (#4533, #4540)
- New command-line options `-fno-{exceptions,moduleinfo,rtti}` to selectively enable some `-betterC` effects. (#4522)
- New command-line option `-fprofile-sample-use` for using sample-based profile data for optimization. Functionality and usage is identical to Clang's option with same name. (#4531)
- New `ldc-profgen` tool for sample-based PGO, a copy of LLVM's [llvm-profgen](https://llvm.org/docs/CommandGuide/llvm-profgen.html). (#4536)
Expand Down
22 changes: 14 additions & 8 deletions driver/cl_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,7 @@ void hideLLVMOptions() {
"aarch64-neon-syntax", "aarch64-use-aa",
"abort-on-max-devirt-iterations-reached",
"addrsig", "align-loops", "allow-ginsert-as-artifact",
"amdgpu-atomic-optimizer-strategy",
"amdgpu-bypass-slow-div", "amdgpu-disable-loop-alignment",
"amdgpu-disable-power-sched", "amdgpu-dpp-combine",
"amdgpu-dump-hsa-metadata", "amdgpu-enable-flat-scratch",
Expand All @@ -814,21 +815,22 @@ void hideLLVMOptions() {
"arm-implicit-it", "asm-instrumentation", "asm-show-inst",
"atomic-counter-update-promoted", "atomic-first-counter",
"basic-block-sections",
"basicblock-sections", "bounds-checking-single-trap",
"basicblock-sections", "bounds-checking-single-trap", "bpf-stack-size",
"cfg-hide-cold-paths",
"cfg-hide-deoptimize-paths", "cfg-hide-unreachable-paths",
"code-model", "cost-kind", "cppfname", "cppfor", "cppgen",
"cvp-dont-add-nowrap-flags",
"cvp-dont-process-adds", "debug-counter", "debug-entry-values",
"debugger-tune", "debugify-func-limit", "debugify-level",
"debugify-quiet", "debug-info-correlate",
"denormal-fp-math", "denormal-fp-math-f32", "disable-debug-info-verifier",
"denormal-fp-math", "denormal-fp-math-f32",
"disable-auto-upgrade-debug-info", "disable-debug-info-verifier",
"disable-i2p-p2i-opt",
"disable-objc-arc-checkforcfghazards", "disable-promote-alloca-to-lds",
"disable-promote-alloca-to-vector", "disable-slp-vectorization",
"disable-spill-fusing",
"do-counter-promotion", "dot-cfg-mssa", "dwarf64", "emit-call-site-info",
"emit-dwarf-unwind",
"emit-compact-unwind-non-canonical", "emit-dwarf-unwind",
"emscripten-cxx-exceptions-allowed",
"emscripten-cxx-exceptions-whitelist",
"emulated-tls", "enable-approx-func-fp-math", "enable-correct-eh-support",
Expand All @@ -848,9 +850,10 @@ void hideLLVMOptions() {
"experimental-debug-variable-locations",
"fatal-assembler-warnings", "filter-print-funcs",
"force-dwarf-frame-section", "force-opaque-pointers",
"force-tail-folding-style",
"fs-profile-debug-bw-threshold", "fs-profile-debug-prob-diff-threshold",
"generate-merged-base-profiles",
"gpsize", "hash-based-counter-split",
"gpsize", "hash-based-counter-split", "hexagon-rdf-limit",
"hot-cold-split", "ignore-xcoff-visibility",
"imp-null-check-page-size", "imp-null-max-insts-to-consider",
"import-all-index", "incremental-linker-compatible",
Expand All @@ -872,10 +875,12 @@ void hideLLVMOptions() {
"mips-compact-branches", "mips16-constant-islands", "mips16-hard-float",
"mir-strip-debugify-only", "misexpect-tolerance", "mlsm", "mno-compound",
"mno-fixup", "mno-ldc1-sdc1", "mno-pairing", "mwarn-missing-parenthesis",
"mwarn-noncontigious-register", "mwarn-sign-mismatch",
"no-discriminators", "no-type-check", "no-xray-index",
"mwarn-noncontigious-register", "mwarn-sign-mismatch", "mxcoff-roptr",
"no-discriminators", "no-integrated-as", "no-type-check", "no-xray-index",
"nozero-initialized-in-bss", "nvptx-sched4reg",
"objc-arc-annotation-target-identifier", "opaque-pointers",
"pgo-block-coverage", "pgo-temporal-instrumentation",
"pgo-view-block-coverage-graph",
"pie-copy-relocations", "poison-checking-function-local",
"polly-dump-after", "polly-dump-after-file", "polly-dump-before",
"polly-dump-before-file", "pre-RA-sched", "print-after-all",
Expand All @@ -885,7 +890,8 @@ void hideLLVMOptions() {
"profile-file", "profile-info-file", "profile-verifier-noassert",
"pseudo-probe-for-profiling",
"r600-ir-structurize", "rdf-dump", "rdf-limit", "recip", "regalloc",
"relax-elf-relocations", "remarks-section", "rewrite-map-file", "rng-seed",
"relax-elf-relocations", "remarks-section", "rewrite-map-file",
"riscv-add-build-attributes", "rng-seed",
"runtime-counter-relocation", "safepoint-ir-verifier-print-only",
"sample-profile-check-record-coverage",
"sample-profile-check-sample-coverage",
Expand Down Expand Up @@ -920,7 +926,7 @@ void hideLLVMOptions() {
"x86-branches-within-32B-boundaries", "x86-early-ifcvt",
"x86-pad-max-prefix-size",
"x86-recip-refinement-steps", "x86-use-vzeroupper",
"xcoff-traceback-table",
"xcoff-traceback-table", "xray-function-index",

// We enable -fdata-sections/-ffunction-sections by default where it makes
// sense for reducing code size, so hide them to avoid confusion.
Expand Down
2 changes: 1 addition & 1 deletion tests/codegen/dllimport_gh3926.d
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ void foo()

// should set m_init.ptr:
// CHECK: if1:
// CHECK-NEXT: store {{i8\*|ptr}} getelementptr inbounds ({{.*}} @_D3std7variant__T8VariantN{{.*}}6__initZ, i32 0, i32 0, i32 0),
// CHECK-NEXT: store {{i8\*|ptr}} {{.*}}@_D3std7variant__T8VariantN{{.*}}6__initZ, {{.*}}TypeInfo_S3std7variant__T8VariantN{{.*}}6__initZ
6 changes: 3 additions & 3 deletions tests/codegen/in_place_construct.d
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ void structs()

// make sure the variables are in-place constructed via sret
// CHECK: call {{.*}}_D18in_place_construct13returnLiteralFZSQBm1S
// CHECK-SAME: %in_place_construct.S{{.*}} %a
// CHECK-SAME: {{(%in_place_construct\.S\*|ptr).*}} %a
const a = returnLiteral();
// CHECK: call {{.*}}_D18in_place_construct12returnRValueFZSQBl1S
// CHECK-SAME: %in_place_construct.S{{.*}} %b
// CHECK-SAME: {{(%in_place_construct\.S\*|ptr).*}} %b
const b = returnRValue();
// CHECK: call {{.*}}_D18in_place_construct10returnNRVOFZSQBj1S
// CHECK-SAME: %in_place_construct.S{{.*}} %c
// CHECK-SAME: {{(%in_place_construct\.S\*|ptr).*}} %c
const c = returnNRVO();

withOutContract();
Expand Down
4 changes: 2 additions & 2 deletions tests/instrument/xray_link.d
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// REQUIRES: XRay_RT

// fails on macOS with LLVM 11 due to a linker error, see
// fails on macOS with LLVM 11-16 due to a linker error, see
// https://github.com/llvm/llvm-test-suite/commit/2c3c4a6286d453f763c0245c6536ddd368f0db99
// XFAIL: Darwin
// XFAIL: Darwin && atmost_llvm1609

// RUN: %ldc -fxray-instrument -fxray-instruction-threshold=1 -of=%t%exe %s -vv 2>&1 | FileCheck %s

Expand Down