head 1.9; access; symbols pkgsrc-2026Q1:1.9.0.28 pkgsrc-2026Q1-base:1.9 pkgsrc-2025Q4:1.9.0.26 pkgsrc-2025Q4-base:1.9 pkgsrc-2025Q3:1.9.0.24 pkgsrc-2025Q3-base:1.9 pkgsrc-2025Q2:1.9.0.22 pkgsrc-2025Q2-base:1.9 pkgsrc-2025Q1:1.9.0.20 pkgsrc-2025Q1-base:1.9 pkgsrc-2024Q4:1.9.0.18 pkgsrc-2024Q4-base:1.9 pkgsrc-2024Q3:1.9.0.16 pkgsrc-2024Q3-base:1.9 pkgsrc-2024Q2:1.9.0.14 pkgsrc-2024Q2-base:1.9 pkgsrc-2024Q1:1.9.0.12 pkgsrc-2024Q1-base:1.9 pkgsrc-2023Q4:1.9.0.10 pkgsrc-2023Q4-base:1.9 pkgsrc-2023Q3:1.9.0.8 pkgsrc-2023Q3-base:1.9 pkgsrc-2023Q2:1.9.0.6 pkgsrc-2023Q2-base:1.9 pkgsrc-2023Q1:1.9.0.4 pkgsrc-2023Q1-base:1.9 pkgsrc-2022Q4:1.9.0.2 pkgsrc-2022Q4-base:1.9 pkgsrc-2022Q3:1.8.0.8 pkgsrc-2022Q3-base:1.8 pkgsrc-2022Q2:1.8.0.6 pkgsrc-2022Q2-base:1.8 pkgsrc-2022Q1:1.8.0.4 pkgsrc-2022Q1-base:1.8 pkgsrc-2021Q4:1.8.0.2 pkgsrc-2021Q4-base:1.8 pkgsrc-2021Q3:1.7.0.2 pkgsrc-2021Q3-base:1.7 pkgsrc-2021Q2:1.6.0.10 pkgsrc-2021Q2-base:1.6 pkgsrc-2021Q1:1.6.0.8 pkgsrc-2021Q1-base:1.6 pkgsrc-2020Q4:1.6.0.6 pkgsrc-2020Q4-base:1.6 pkgsrc-2020Q3:1.6.0.4 pkgsrc-2020Q3-base:1.6 pkgsrc-2020Q2:1.6.0.2 pkgsrc-2020Q2-base:1.6 pkgsrc-2020Q1:1.5.0.2 pkgsrc-2020Q1-base:1.5 pkgsrc-2019Q4:1.5.0.4 pkgsrc-2019Q4-base:1.5 pkgsrc-2019Q3:1.4.0.8 pkgsrc-2019Q3-base:1.4 pkgsrc-2019Q2:1.4.0.6 pkgsrc-2019Q2-base:1.4 pkgsrc-2019Q1:1.4.0.4 pkgsrc-2019Q1-base:1.4 pkgsrc-2018Q4:1.4.0.2 pkgsrc-2018Q4-base:1.4 pkgsrc-2018Q3:1.3.0.16 pkgsrc-2018Q3-base:1.3 pkgsrc-2018Q2:1.3.0.14 pkgsrc-2018Q2-base:1.3 pkgsrc-2018Q1:1.3.0.12 pkgsrc-2018Q1-base:1.3 pkgsrc-2017Q4:1.3.0.10 pkgsrc-2017Q4-base:1.3 pkgsrc-2017Q3:1.3.0.8 pkgsrc-2017Q3-base:1.3 pkgsrc-2017Q2:1.3.0.4 pkgsrc-2017Q2-base:1.3 pkgsrc-2017Q1:1.3.0.2 pkgsrc-2017Q1-base:1.3 pkgsrc-2016Q4:1.1.0.8 pkgsrc-2016Q4-base:1.1 pkgsrc-2016Q3:1.1.0.6 pkgsrc-2016Q3-base:1.1 pkgsrc-2016Q2:1.1.0.4 pkgsrc-2016Q2-base:1.1 pkgsrc-2016Q1:1.1.0.2 pkgsrc-2016Q1-base:1.1; locks; strict; comment @# @; 1.9 date 2022.11.14.18.44.05; author adam; state Exp; branches; next 1.8; commitid D4GB0JeiCAn4wH1E; 1.8 date 2021.11.23.20.55.44; author wiz; state Exp; branches; next 1.7; commitid 1fDG4kXskvkoGXhD; 1.7 date 2021.07.12.18.41.02; author adam; state Exp; branches; next 1.6; commitid MGy8EYarF7UlfJ0D; 1.6 date 2020.04.18.07.50.18; author adam; state Exp; branches; next 1.5; commitid w9ShGcVpaOo67Q4C; 1.5 date 2019.10.19.13.52.40; author adam; state Exp; branches; next 1.4; commitid EKfFOmrVp90oYtHB; 1.4 date 2018.12.09.20.04.38; author adam; state Exp; branches; next 1.3; commitid 8fsHP9rfypST7a3B; 1.3 date 2017.03.19.19.01.48; author adam; state Exp; branches; next 1.2; commitid 36UsHnnfX1C82cKz; 1.2 date 2017.03.17.22.38.17; author adam; state Exp; branches; next 1.1; commitid RtC8EMbuGmoliXJz; 1.1 date 2016.03.11.06.50.42; author tnn; state Exp; branches; next ; commitid sJefktrxBhE3YbYy; desc @@ 1.9 log @llvm: updated to 15.0.4 LLVM 15.0.4 Changes to the LLVM IR LLVM now uses opaque pointers. This means that different pointer types like i8*, i32* or void()** are now represented as a single ptr type. See the linked document for migration instructions. Renamed llvm.experimental.vector.extract intrinsic to llvm.vector.extract. Renamed llvm.experimental.vector.insert intrinsic to llvm.vector.insert. The constant expression variants of the following instructions have been removed: extractvalue insertvalue udiv sdiv urem srem fadd fsub fmul fdiv frem Added the support for fmax and fmin in atomicrmw instruction. The comparison is expected to match the behavior of llvm.maxnum.* and llvm.minnum.* respectively. callbr instructions no longer use blockaddress arguments for labels. Instead, label constraints starting with ! refer directly to entries in the callbr indirect destination list. Changes to building LLVM Omitting CMAKE_BUILD_TYPE when using a single configuration generator is now an error. You now have to pass -DCMAKE_BUILD_TYPE= in order to configure LLVM. This is done to help new users of LLVM select the correct type: since building LLVM in Debug mode is very resource intensive, we want to make sure that new users make the choice that lines up with their usage. We have also improved documentation around this setting that should help new users. You can find this documentation here. Changes to Loop Optimizations Loop interchange legality and cost model improvements Changes to the AMDGPU Backend 8 and 16-bit atomic loads and stores are now supported Changes to the ARM Backend Added support for the Armv9-A, Armv9.1-A and Armv9.2-A architectures. Added support for the Armv8.1-M PACBTI-M extension. Added support for the Armv9-A, Armv9.1-A and Armv9.2-A architectures. Added support for the Armv8.1-M PACBTI-M extension. Removed the deprecation of ARMv8-A T32 Complex IT blocks. No deprecation warnings will be generated and -mrestrict-it is now always off by default. Previously it was on by default for Armv8 and off for all other architecture versions. Added a pass to workaround Cortex-A57 Erratum 1742098 and Cortex-A72 Erratum 1655431. This is enabled by default when targeting either CPU. Implemented generation of Windows SEH unwind information. Switched the MinGW target to use SEH instead of DWARF for unwind information. Added support for the Cortex-M85 CPU. Added support for a new -mframe-chain=(none|aapcs|aapcs+leaf) command-line option, which controls the generation of AAPCS-compliant Frame Records. Changes to the DirectX Backend DirectX has been added as an experimental target. Specify -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=DirectX in your CMake configuration to enable it. The target is not packaged in pre-built binaries. The DirectX backend supports the dxil architecture which is based on LLVM 3.6 IR encoded as bitcode and is the format used for DirectX GPU Shader programs. Changes to the PowerPC Backend Common PowerPC improvements: * Add a new post instruction selection pass to generate CTR loops. * Add SSE4 and BMI compatible intrinsics implementation. * Supported 16-byte lock free atomics on PowerPC8 and up. * Supported atomic load/store for pointer types. * Supported stack size larger than 2G * Add __builtin_min/__builtin_max/__abs builtins. * Code generation improvements for splat load/vector shuffle/mulli, etc. * Emit VSX instructions for vector loads and stores regardless of alignment. * The mcpu=future has its own ISA now (FutureISA). * Added the ppc-set-dscr option to set the Data Stream Control Register (DSCR). * Bug fixes. AIX improvements: * Supported 64 bit XCOFF for integrated-as path. * Supported X86-compatible vector intrinsics. * Program code csect default alignment now is 32-byte. * Supported auxiliary header in integrated-as path. * Improved alias symbol handling. Changes to the RISC-V Backend A RISCVRedundantCopyElimination pass was added to remove unnecessary zero copies. A RISC-V specific CodeGenPrepare pass was added. The machine outliner was enabled by default for RISC-V at -Oz. Additionally, the newly introduced RISCVMakeCompressible pass will make modify instructions prior to emission at -Oz in order to increase opportunities for the compression with the RISC-V C extension. Various bug fixes and improvements to code generation for the RISC-V vector extensions. Various improvements were made to RISC-V specific optimisation passes such as RISCVSExtWRemoval and RISCVMergeBaseOffset. llc now computes the target ABI based on the target architecture using the same logic as Clang if not explicit ABI is given. generic is now recognized as a valid CPU name and is mapped to generic-rv32 or generic-rv64 depending on the target triple. Support for the experimental Zvfh extension was added, enabling half-precision floating point in vectors. Support for the Zihintpause (Pause Hint) extension. Assembler and disassembler support for the Zfinx and Zdinx (float / double in integer register) extensions. Assembler and disassembler support for the Zicbom, Zicboz, and Zicbop cache management operation extensions. Support for the Zmmul extension (a subextension of the M extension, adding multiplication instructions only). Assembler and disassembler support for the hypervisor extension and for the Sinval supervisor memory-management extension. Changes to the X86 Backend Support half type on SSE2 and above targets following X86 psABI. Support rdpru instruction on Zen2 and above targets. During this release, half type has an ABI breaking change to provide the support for the ABI of _Float16 type on SSE2 and above following X86 psABI. (D107082) The change may affect the current use of half includes (but is not limited to): Frontends generating half type in function passing and/or returning arguments. Downstream runtimes providing any half conversion builtins assuming the old ABI. Projects built with LLVM 15.0 but using early versions of compiler-rt. When you find failures with half type, check the calling conversion of the code and switch it to the new ABI. Changes to the LLVM tools (Experimental) llvm-symbolizer now has --filter-markup to filter Symbolizer Markup into human-readable form. llvm-objcopy has removed support for the legacy zlib-gnu format. llvm-objcopy now allows --set-section-flags src=... --rename-section src=tst. --add-section=.foo1=... --rename-section=.foo1=.foo2 now adds .foo1 instead of .foo2. New features supported on AIX for llvm-ar: AIX big-format archive write operation (D123949) A new object mode option, -X , to specify the type of object file llvm-ar should operate upon (D127864) Read global symbols of AIX big archive (D124865) New options supported for llvm-nm: -X, to specify the type of object file that llvm-nm should examine (D118193) --export-symbols, to create a list of symbols to export (D112735) The LLVM gold plugin now ignores bitcode from the .llvmbc section of ELF files when doing LTO. https://github.com/llvm/llvm-project/issues/47216 llvm-objcopy now supports 32 bit XCOFF. llvm-objdump: improved assembly printing for XCOFF. llc now parses code-model attribute from input file. Changes to LLDB The “memory region” command now has a “–all” option to list all memory regions (including unmapped ranges). This is the equivalent of using address 0 then repeating the command until all regions have been listed. Added “–show-tags” option to the “memory find” command. This is off by default. When enabled, if the target value is found in tagged memory, the tags for that memory will be shown inline with the memory contents. Various memory related parts of LLDB have been updated to handle non-address bits (such as AArch64 pointer signatures): “memory read”, “memory write” and “memory find” can now be used with addresses with non-address bits. All the read and write memory methods on SBProccess and SBTarget can be used with addreses with non-address bits. When printing a pointer expression, LLDB can now dereference the result even if it has non-address bits. The memory cache now ignores non-address bits when looking up memory locations. This prevents us reading locations multiple times, or not writing out new values if the addresses have different non-address bits. LLDB now supports reading memory tags from AArch64 Linux core files. LLDB now supports the gnu debuglink section for reading debug information from a separate file on Windows LLDB now allows selecting the C++ ABI to use on Windows (between Itanium, used for MingW, and MSVC) via the plugin.object-file.pe-coff.abi setting. In Windows builds of LLDB, this defaults to the style used for LLVM’s default target. Other Changes The code for the LLVM Visual Studio integration has been removed. This had been obsolete and abandoned since Visual Studio started including an integration by default in 2019. Added the unwinder, personality, and helper functions for exception handling on AIX. (D100132) (D100504) PGO on AIX: A new implementation that requires linker support (__start_SECTION/__stop_SECTION symbols) available on AIX 7.2 TL5 SP4 and AIX 7.3 TL0 SP2. @ text @$NetBSD$ On Darwin, create symbolic links to shared libraries. On Darwin, use correct install-name for shared libraries. --- cmake/modules/AddLLVM.cmake.orig 2022-09-20 06:05:50.000000000 +0000 +++ cmake/modules/AddLLVM.cmake @@@@ -627,7 +627,7 @@@@ function(llvm_add_library name) endif() if(ARG_SHARED) - if(NOT APPLE AND ARG_SONAME) + if(ARG_SONAME) get_target_property(output_name ${name} OUTPUT_NAME) if(${output_name} STREQUAL "output_name-NOTFOUND") set(output_name ${name}) @@@@ -2270,7 +2270,7 @@@@ function(llvm_setup_rpath name) endif() if (APPLE) - set(_install_name_dir INSTALL_NAME_DIR "@@rpath") + set(_install_name_dir INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib") set(_install_rpath "@@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) elseif(${CMAKE_SYSTEM_NAME} MATCHES "AIX" AND BUILD_SHARED_LIBS) # $ORIGIN is not interpreted at link time by aix ld. @ 1.8 log @llvm: update llvm and friends to 13.0.0 Tested on NetBSD-current and 9.1/amd64. Also update packages tightly coupled to llvm, if new versions are available. Mark creduce, include-what-you-use, and zig broken (waiting for a new release). Changes: Non-comprehensive list of changes in this release Windows Control-flow Enforcement Technology: the -ehcontguard option now emits valid unwind entrypoints which are validated when the context is being set during exception handling. Flang is now included in the binary packages released by LLVM. The debuginfo-test project has been renamed cross-project-tests and is now intended for testing components from multiple projects, not just debug information. The new “cross-project-tests” name replaces “debuginfo-test” in LLVM_ENABLE_PROJECTS, and a new check-cross-project-tests target has been added for running all tests in the project. The pre-existing check-debuginfo- test target remains for running just the debug information tests. (D95339 and D96513) Changes to the LLVM IR The inalloca attribute now has a mandatory type field, similar to byval and sret. The opaque pointer type ptr has been introduced. It is still in the process of being worked on and should not be used yet. Using the legacy pass manager for the optimization pipeline is deprecated and will be removed after LLVM 14. In the meantime, only minimal effort will be made to maintain the legacy pass manager for the optimization pipeline. Changes to building LLVM The build system now supports building multiple distributions, so that you can e.g. have one distribution containing just tools and another for libraries (to enable development). See Multi-distribution configurations for details. Changes to the AArch64 Backend Introduced assembly support for Armv9-A’s Realm Management Extension (RME) and Scalable Matrix Extension (SME). Produce proper cross-section relative relocations on COFF Fixed the calling convention on Windows for variadic functions involving floats in the fixed arguments Changes to the ARM Backend Produce proper cross-section relative relocations on COFF Changes to the Hexagon Target The Hexagon target now supports V68/HVX ISA. Changes to the C API The C API functions LLVMGetAlignment and LLVMSetAlignment now allow changing alignment on atomicrmw and cmpxchg instructions A new entry LLVMDIArgListMetadataKind was added to the LLVMMetadataKind enum, representing DIArgLists (D88175) Type attributes have been added to LLVM-C, introducing LLVMCreateTypeAttribute, LLVMGetTypeAttributeValue and LLVMIsTypeAttribute. (D977763’) The LTO_API_VERSION was bumped to 28, introducing a new function lto_set_debug_options for parsing LTO debug options (D92611) LLVMJITTargetSymbolFlags was renamed to LLVMJITSymbolTargetFlags (rG8d718a0bff73af066675a6258c01307937c33cf9) The C API received support for creating custom ORCv2 MaterializationUnits and APIs to retrieve an LLJIT instance’s linking layers. An ABI breaking change for LLVMOrcAbsoluteSymbols was introduced to make it consistent with LLVMOrcCreateCustomMaterializationUnit. (rGc8fc5e3ba942057d6c4cdcd1faeae69a28e7b671) The C API received support for adding ORCv2 object buffers directly to an object layer. (rG7b73cd684a8d5fb44d34064200f10e2723085c33) A breaking change to LLVMGetInlineAsm was introduced, adding a ninth argument LLVMBool CanThrow (D95745) The C API received support for calling into the new pass manager. (D102136) The C API function LLVMIntrinsicCopyOverloadedName has been deprecated. Please migrate to LLVMIntrinsicCopyOverloadedName2 which takes an extra module argument and which also handles unnamed types. (D99173) The C API received support for dumping objects from ORCv2 (rGcec8e69f01c3374cb38c6683058381b96fab8f89) A breaking change to LLVMOrcObjectTransformLayerTransformFunction was introduced, changing the order of the function pointer’s arguments. (rG8962c68ad007a525f9daa987c99eda57e0d0069a) The C API received support for accessing utilities from the LLJIT IRTransformLayer and ThreadSafeModule classes. (D103855) The C API received support for creating lazy-export MaterializationUnits (D104672) The C API function LLVMPassBuilderOptionsSetCoroutines was removed because couroutine passes have been enabled by default. (D105877) comdat noduplicates was renamed to comdat nodeduplicate and as a result, LLVMNoDuplicatesComdatSelectionKind was renamed to LLVMNoDeduplicateComdatSelectionKind. (D106319) Changes to the FastISel infrastructure FastISel no longer tracks killed registers, and instead leaves this to the register allocator. This means that hasTrivialKill() is removed, as well as the OpNIsKill parameters to the fastEmit_*() family of functions. Changes to the LLVM tools The options --build-id-link-{dir,input,output} have been deleted. (D96310) Support for in-order processors has been added to llvm-mca. (D94928) llvm-objdump supports -M {att,intel} now. --x86-asm-syntax is a deprecated internal option which will be removed in LLVM 14.0.0. (D101695) The llvm-readobj short aliases -s (previously --sections) and -t (previously --syms) have been changed to --syms and --section-details respectively, to match llvm-readelf. (D105055) The llvm-nm short aliases -M (--print-armap), -U (--defined-only), and -W (--no-weak) are now deprecated. Use the long form versions instead. The alias --just-symbol-name is now deprecated in favor of --format=just-symbols and -j. (D105330) In lli the default JIT engine switched from MCJIT (-jit-kind=mcjit) to ORC (-jit-kind=orc). (D98931) llvm-rc got support for invoking Clang to preprocess its input. (D100755) llvm-rc got a GNU windres compatible frontend, llvm-windres. (D100756) llvm-ml has improved compatibility with MS ml.exe, managing to assemble more asm files. Changes to LLDB LLDB executable is now included in pre-built LLVM binaries. LLDB now includes full featured support for AArch64 SVE register access. LLDB now supports AArch64 Pointer Authentication, allowing stack unwind with signed return address. LLDB now supports debugging programs on AArch64 Linux that use memory tagging (MTE). Added memory tag read and memory tag write commands. The memory region command will note when a region has memory tagging enabled. Synchronous and asynchronous tag faults are recognised. Synchronous tag faults have memory tag annotations in addition to the usual fault address. @ text @d1 1 a1 1 $NetBSD: patch-cmake_modules_AddLLVM.cmake,v 1.7 2021/07/12 18:41:02 adam Exp $ d6 1 a6 1 --- cmake/modules/AddLLVM.cmake.orig 2021-09-24 16:18:10.000000000 +0000 d8 1 a8 1 @@@@ -607,7 +607,7 @@@@ function(llvm_add_library name) d17 1 a17 1 @@@@ -2118,7 +2118,7 @@@@ function(llvm_setup_rpath name) @ 1.7 log @llvm: updated to 12.0.1 12.0.1: Non-comprehensive list of changes in this release The ConstantPropagation pass was removed. Users should use the InstSimplify pass instead. Changes to the LLVM IR Added the byref attribute to better represent argument passing for the amdgpu_kernel calling convention. Added type parameter to the sret attribute to continue work on removing pointer element types. The llvm.experimental.vector.reduce family of intrinsics have been renamed to drop the “experimental” from the name, reflecting their now fully supported status in the IR. Changes to building LLVM The internal llvm-build Python script and the associated LLVMBuild.txt files used to describe the LLVM component structure have been removed and replaced by a pure CMake approach, where each component stores extra properties in the created targets. These properties are processed once all components are defined to resolve library dependencies and produce the header expected by llvm-config. Changes to TableGen The new “TableGen Programmer’s Reference” replaces the “TableGen Language Introduction” and “TableGen Language Reference” documents. The syntax for specifying an integer range in a range list has changed. The old syntax used a hyphen in the range (e.g., {0-9}). The new syntax uses the “…” range punctuation (e.g., {0...9}). The hyphen syntax is deprecated. Changes to the AArch64 Backend Lots of improvements to generation of Windows unwind data; the unwind data is optimized and written in packed form where possible, reducing the size of unwind data (pdata and xdata sections) by around 60% compared with LLVM 11. The generation of prologs/epilogs is tweaked when targeting Windows, to increase the chances of being able to use the packed unwind info format. Support for creating Windows unwind data using .seh_* assembler directives. Produce proper assembly output for the Windows target, including :lo12: relocation specifiers, to allow the assembly output to actually be assembled. Changed the assembly comment string for MSVC targets to // (consistent with the MinGW and ELF targets), freeing up ; to be used as statement separator. Changes to the ARM Backend Changes to the MIPS Target Changes to the PowerPC Target Optimization: Made improvements to loop unroll-and-jam including fix to respect user provided #pragma unroll-and-jam for loops on targets other than ARM. Improved PartialInliner allowing it to handle code regions in a switch statements. Improved PGO support on AIX by building and linking with compiler-rt profile library. Add support for Epilogue Vectorization and enabled it by default. CodeGen: POWER10 support * Implementation of PC Relative addressing in LLD including the associated linker optimizations. Add support for the new matrix multiplication (MMA) instructions to Clang and LLVM. Implementation of Power10 builtins. Scheduling enhancements * Add a new algorithm to cluster more loads/stores if the DAG is not too complicated. Enable the PowerPC scheduling heuristic for Power10. Target dependent passes tuning * Enhance LoopStrengthReduce/PPCLoopInstrFormPrep pass for PowerPC, especially for P10 intrinsics. Enhance machine combiner pass to reduce register pressure for PowerPC. Improve MachineSink to do more sinking based on register pressure and alias analysis. General improvements * Complete the constrained floating point operations support. * Improve the llvm-exegesis support. * Improve the stack clash protection to probe the gap between stackptr and realigned stackptr. Improve the IEEE long double support for Power8. Enable MemorySSA for LoopSink. Enhance LLVM debugging functionality via options such as -print-changed and -print-before-changed. Add builtins for Power9 (i.e. darn, xvtdiv, xvtsqrt etc). Add options to disable all or part of LoopIdiomRecognizePass. Add support for printing the DDG in DOT form allowing for visual inspection of the Data Dependence Graph. Remove the QPX support. Significant number of bug fixes including all the fixes necessary to achieve a clean test run for Julia. AIX Support: Compiler-rt support * Add support for building compiler-rt for AIX and 32-bit Power targets. * Made compiler-rt the default rtlib for AIX. General Improvements * Enable the AIX extended AltiVec ABI under option -mabi=vec-extabi. * Add partial C99 complex type support. * Implemente traceback table for functions (encodes vector information, emits exception handling). Implemente code generation for C++ dynamic initialization and finalization. of non-local variables for use with the -bcdtors option of the AIX linker. Add new option -mignore-xcoff-visibility. Enable explicit sections on AIX. Enable -f[no-]data-sections on AIX and set -fdata-sections to be the default on AIX. Enable -f[no-]function-sections. Add support for relocation generation using the large code model. Add pragma align natural and sorted out pragma pack stack effect. Changes to the X86 Target The ‘mpx’ feature was removed from the backend. It had been removed from clang frontend in 10.0. Mention of the ‘mpx’ feature in an IR file will print a message to stderr, but IR should still compile. Support for -march=alderlake, -march=sapphirerapids, -march=znver3 and -march=x86-64-v[234] has been added. The assembler now has support for {disp32} and {disp8} pseudo prefixes for controlling displacement size for memory operands and jump displacements. The assembler also supports the .d32 and .d8 mnemonic suffixes to do the same. A new function attribute “tune-cpu” has been added to support -mtune like gcc. This allows microarchitectural optimizations to be applied independent from the “target-cpu” attribute or TargetMachine CPU which will be used to select Instruction Set. If the attribute is not present, the tune CPU will follow the target CPU. Support for HRESET instructions has been added. Support for UINTR instructions has been added. Support for AVXVNNI instructions has been added. Changes to the AMDGPU Target The new byref attribute is now the preferred method for representing aggregate kernel arguments. @ text @d1 1 a1 1 $NetBSD: patch-cmake_modules_AddLLVM.cmake,v 1.6 2020/04/18 07:50:18 adam Exp $ d6 1 a6 1 --- cmake/modules/AddLLVM.cmake.orig 2020-10-07 10:10:48.000000000 +0000 d8 1 a8 1 @@@@ -596,7 +596,7 @@@@ function(llvm_add_library name) d11 1 a11 1 if(ARG_SHARED AND UNIX) d17 1 a17 1 @@@@ -2063,7 +2063,7 @@@@ function(llvm_setup_rpath name) d24 2 a25 2 elseif(UNIX) set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) @ 1.6 log @llvm: updated to 10.0.0 Non-comprehensive list of changes in this release The ISD::FP_ROUND_INREG opcode and related code was removed from SelectionDAG. Enabled MemorySSA as a loop dependency. Since r370957 (D58311 [MemorySSA & LoopPassManager] Enable MemorySSA as loop dependency. Update tests.), the MemorySSA analysis is being preserved and used by a series of loop passes. The most significant use is in LICM, where the instruction hoisting and sinking relies on aliasing information provided by MemorySSA vs previously creating an AliasSetTracker. The LICM step of promoting variables to scalars still relies on the creation of an AliasSetTracker, but its use is reduced to only be enabled for loops with a small number of overall memory instructions. This choice was motivated by experimental results showing compile and run time benefits or replacing the AliasSetTracker usage with MemorySSA without any performance penalties. The fact that MemorySSA is now preserved by and available in a series of loop passes, also opens up opportunities for its use in those respective passes. The BasicBlockPass, BBPassManager and all their uses were deleted in this revision. The LLVM_BUILD_LLVM_DYLIB and LLVM_LINK_LLVM_DYLIB CMake options are no longer available on Windows. As per LLVM Language Reference Manual, getelementptr inbounds can not change the null status of a pointer, meaning it can not produce non-null pointer given null base pointer, and likewise given non-null base pointer it can not produce null pointer; if it does, the result is a poison value. Since r369789 (D66608 [InstCombine] icmp eq/ne (gep inbounds P, Idx..), null -> icmp eq/ne P, null) LLVM uses that for transformations. If the original source violates these requirements this may result in code being miscompiled. If you are using Clang front-end, Undefined Behaviour Sanitizer -fsanitize=pointer-overflow check will now catch such cases. Windows Control Flow Guard: the -cfguard option now emits CFG checks on indirect function calls. The previous behavior is still available with the -cfguard-nochecks option. Note that this feature should always be used with optimizations enabled. Callbacks have been added to CommandLine Options. These can be used to validate or selectively enable other options. The function attributes no-frame-pointer-elim and no-frame-pointer-elim-non-leaf have been replaced by frame-pointer, which has 3 values: none, non-leaf, and all. The values mean what functions should retain frame pointers. The inter-procedural analysis and optimization capabilities in the Attributor framework and pass have been substantially advanced (initial commit D59918, LLVM-Dev talk). In this release, 19 different attributes are inferred, including 12 LLVM IR attributes and 7 “abstract” attributes, such as liveness. The Attributor is still under heavy development and disabled by default; to enable an early run pass -mllvm -attributor-disable=false to an invocation of clang. New matrix math intrinsics have been added to LLVM (see LLVM Language Reference Manual), together with the LowerMatrixIntrinsics pass. The pass lowers matrix intrinsics to a set of efficient vector instructions. The lowering pass is off by default and can be enabled by passing -mllvm -enable-matrix to an invocation of clang. @ text @d1 1 a1 1 $NetBSD: patch-cmake_modules_AddLLVM.cmake,v 1.5 2019/10/19 13:52:40 adam Exp $ a2 1 Don't use non-portable -z discard-unused on SunOS. d6 1 a6 1 --- cmake/modules/AddLLVM.cmake.orig 2020-03-19 09:19:04.000000000 +0000 d8 1 a8 11 @@@@ -233,9 +233,6 @@@@ function(add_link_opts target_name) # ld64's implementation of -dead_strip breaks tools that use plugins. set_property(TARGET ${target_name} APPEND_STRING PROPERTY LINK_FLAGS " -Wl,-dead_strip") - elseif(${CMAKE_SYSTEM_NAME} MATCHES "SunOS") - set_property(TARGET ${target_name} APPEND_STRING PROPERTY - LINK_FLAGS " -Wl,-z -Wl,discard-unused=sections") elseif(NOT WIN32 AND NOT LLVM_LINKER_IS_GOLD AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD|AIX") # Object files are compiled with -ffunction-data-sections. @@@@ -562,7 +559,7 @@@@ function(llvm_add_library name) d17 1 a17 1 @@@@ -1887,7 +1884,7 @@@@ function(llvm_setup_rpath name) @ 1.5 log @llvm: updated to 9.0.0 9.0.0: Non-comprehensive list of changes in this release: * Two new extension points, namely EP_FullLinkTimeOptimizationEarly and EP_FullLinkTimeOptimizationLast are available for plugins to specialize the legacy pass manager full LTO pipeline. * llvm-objcopy/llvm-strip got support for COFF object files/executables, supporting the most common copying/stripping options. * The CMake parameter CLANG_ANALYZER_ENABLE_Z3_SOLVER has been replaced by LLVM_ENABLE_Z3_SOLVER. * The RISCV target is no longer “experimental” (see Changes to the RISCV Target below for more details). * The ORCv1 JIT API has been deprecated. Please see Transitioning from ORCv1 to ORCv2. * Support for target-independent hardware loops in IR has been added, with PowerPC and Arm implementations. @ text @d1 1 a1 1 $NetBSD: patch-cmake_modules_AddLLVM.cmake,v 1.4 2018/12/09 20:04:38 adam Exp $ d7 1 a7 1 --- cmake/modules/AddLLVM.cmake.orig 2019-07-12 14:40:18.000000000 +0000 d9 1 a9 1 @@@@ -222,9 +222,6 @@@@ function(add_link_opts target_name) d19 1 a19 1 @@@@ -536,7 +533,7 @@@@ function(llvm_add_library name) d28 1 a28 1 @@@@ -1727,7 +1724,7 @@@@ function(llvm_setup_rpath name) d34 1 a34 1 set(_install_rpath "@@loader_path/../lib" ${extra_libdir}) @ 1.4 log @llvm: updated to 7.0.0 LLVM 7.0.0 Release The release contains the work on trunk up to SVN revision 338536 plus work on the release branch. It is the result of the community's work over the past six months, including: function multiversioning in Clang with the 'target' attribute for ELF-based x86/x86_64 targets, improved PCH support in clang-cl, preliminary DWARF v5 support, basic support for OpenMP 4.5 offloading to NVPTX, OpenCL C++ support, MSan, X-Ray and libFuzzer support for FreeBSD, early UBSan, X-Ray and libFuzzer support for OpenBSD, UBSan checks for implicit conversions, many long-tail compatibility issues fixed in lld which is now production ready for ELF, COFF and MinGW, new tools llvm-exegesis, llvm-mca and diagtool. And as usual, many optimizations, improved diagnostics, and bug fixes. For more details, see the release notes: https://llvm.org/releases/7.0.0/docs/ReleaseNotes.html https://llvm.org/releases/7.0.0/tools/clang/docs/ReleaseNotes.html https://llvm.org/releases/7.0.0/tools/clang/tools/extra/docs/ReleaseNotes.html https://llvm.org/releases/7.0.0/tools/lld/docs/ReleaseNotes.html @ text @d1 1 a1 1 $NetBSD: patch-cmake_modules_AddLLVM.cmake,v 1.3 2017/03/19 19:01:48 adam Exp $ d7 1 a7 1 --- cmake/modules/AddLLVM.cmake.orig 2018-08-01 07:51:55.000000000 +0000 d9 1 a9 1 @@@@ -218,9 +218,6 @@@@ function(add_link_opts target_name) d16 2 a17 1 elseif(NOT WIN32 AND NOT LLVM_LINKER_IS_GOLD AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") d19 1 a19 2 # Versions of bfd ld < 2.23.1 have a bug in --gc-sections that breaks @@@@ -517,7 +514,7 @@@@ function(llvm_add_library name) d28 1 a28 1 @@@@ -1632,7 +1629,7 @@@@ function(llvm_setup_rpath name) @ 1.3 log @Create and use shared library libLLVM; fix install_name for shared object on Darwin. @ text @d1 1 a1 1 $NetBSD: patch-cmake_modules_AddLLVM.cmake,v 1.2 2017/03/17 22:38:17 adam Exp $ d4 1 d7 1 a7 1 --- cmake/modules/AddLLVM.cmake.orig 2017-01-17 21:47:58.000000000 +0000 d9 1 a9 1 @@@@ -182,9 +182,6 @@@@ function(add_link_opts target_name) d16 1 a16 1 elseif(NOT WIN32 AND NOT LLVM_LINKER_IS_GOLD) d19 10 a28 1 @@@@ -1419,7 +1416,7 @@@@ function(llvm_setup_rpath name) @ 1.2 log @LLVM 4.0.0: The minimum compiler version required for building LLVM has been raised to 4.8 for GCC and 2015 for Visual Studio. The C API functions LLVMAddFunctionAttr, LLVMGetFunctionAttr, LLVMRemoveFunctionAttr, LLVMAddAttribute, LLVMRemoveAttribute, LLVMGetAttribute, LLVMAddInstrAttribute and LLVMRemoveInstrAttribute have been removed. The C API enum LLVMAttribute has been deleted. The definition and uses of LLVM_ATRIBUTE_UNUSED_RESULT in the LLVM source were replaced with LLVM_NODISCARD, which matches the C++17 [[nodiscard]] semantics rather than gcc’s __attribute__((warn_unused_result)). The Timer related APIs now expect a Name and Description. When upgrading code the previously used names should become descriptions and a short name in the style of a programming language identifier should be added. LLVM now handles invariant.group across different basic blocks, which makes it possible to devirtualize virtual calls inside loops. The aggressive dead code elimination phase (“adce”) now removes branches which do not effect program behavior. Loops are retained by default since they may be infinite but these can also be removed with LLVM option -adce-remove-loops when the loop body otherwise has no live operations. The llvm-cov tool can now export coverage data as json. Its html output mode has also improved. @ text @d1 1 a1 1 $NetBSD: patch-cmake_modules_AddLLVM.cmake,v 1.1 2016/03/11 06:50:42 tnn Exp $ d4 1 d6 1 a6 1 --- cmake/modules/AddLLVM.cmake.orig 2016-02-12 17:52:29.000000000 +0000 d8 1 a8 1 @@@@ -174,9 +174,6 @@@@ function(add_link_opts target_name) d18 9 @ 1.1 log @resurrect and copy the previous clang patch-ac to here jperkin Mon Mar 7 16:27:47 UTC 2016 Do not use "-z discard-unused" linker flags on SunOS, it is only supported by the very latest Oracle Solaris release. @ text @d1 1 a1 1 $NetBSD$ d7 1 a7 1 @@@@ -174,9 +174,9 @@@@ function(add_link_opts target_name) a13 3 +# elseif(${CMAKE_SYSTEM_NAME} MATCHES "SunOS") +# set_property(TARGET ${target_name} APPEND_STRING PROPERTY +# LINK_FLAGS " -Wl,-z -Wl,discard-unused=sections") @