[clang-repl] fix vtable symbol duplication error (closes #141039) (#185648)
In incremental mode, emit by ExternalLinkage causes duplicate symbol
error. A single targeted change in getVTableLinkage() fixes the issue by
returning LinkOnceODRLinkage when IncrementalExtensions is active. The
JIT linker then keeps the first definition a silently discards
subsequent ones.
closes issue #141039
Co-authored-by: Emery Conrad <emery.conrad at chicagotrading.com>
[PowerPC] Enable custom lowering for bswap64 builtin on Power8 64 bits with improved parallelism (#187259)
The current implementation for `__builtin_bswap64` does not do many
things in parallel. This patch splits the 64 bit swaps into 32 bit swaps
as high and low 32-bit swaps are independent and can execute
simultaneously.
Compared to the sequential approach, there are fewer instructions. These
changes should not alter the current assembly and there is default
fall-through for power9+.
---------
Co-authored-by: himadhith <himadhith.v at ibm.com>
[clang][NFC] Unify `MacroState` `isAmbiguous` and `getModuleInfo`
Every call to `MacroState::getModuleInfo`, and `MacroState::isAmbiguous` are paired in the same function. Rather than doing the same work twice, just unify them into a single function, `getModuleInfo`, that returns both pieces of information in a new type `ModuleMacroInfo`.
Unfortunately, `getModuleInfo` and`ModuleMacroInfo` already exist, so rename them to `getFullModuleInfo` and `FullModuleMacroInfo`, respectively, since the new type is a subset of the old type. The new type contains just the pieces consumers care about.
While we're there, use the range constructor of `llvm::DenseSet` instead of default constructing and calling `insert` in a loop.
[libc] Add all the toolchains needed for libc-shared-tests to the docker container. (#197735)
Toolchains include:
- gcc-7, 8, 9, 11
- qemu-static-user
- cross-build toolchain for aarch64, riscv64, ppc64le, including gcc,
g++, gmp, mpfr, mpc.
Container size before the change: ~ 500 MB
Container size after the change: ~ 1.3 - 1.4 GB
[flang] Diagnose BIND(C) procedures in submodules without ancestor interfaces (#194571)
This diagnoses `BIND(C)` procedures defined in submodules when their
interface is not declared in the ancestor module.
The check is added in `CheckBindC()` and covers plain `BIND(C)`,
explicit `NAME=`, empty/all-blank `NAME=`, valid ancestor-module
interfaces, and nested submodule cases.
Fixes #194570.
Co-authored-by: Sairudra More <moresair at pe31.hpc.amslabs.hpecorp.net>
[AtomicExpand] Add bitcasts when expanding store atomic vector
AtomicExpand fails for aligned \`store atomic <n x T>\` because it
does not find a compatible library call. This change adds appropriate
ptrtoint + bitcast so that the call can be lowered, mirroring the
load-side handling from #148900.
Require explicit yield in iterator op
Remove the implicit terminator trait from omp.iterator so iterator
modifiers must explicitly yield the value used to form the iterated list.
Add and update verfier and test accordingly.
Reject target map iterators without captures
Reject target map iterators until the follow-up capture-binding
representation is added since currently map_iterated on omp.target
only represents the dynamic map list and does not consider the
target-region arguments required by IsolatedFromAbove.
Simplify map iterator clause assembly
- Split MLIR map syntax into separate map_entries(...) and map_iterated(...),
removing the custom MapEntryList parser/printer.
- Moved omp.target map_iterated out of TargetOpRegion
- it now prints before the target region instead of as map_iterated_entries(...) after the region.
- Renamed LLVMIR TODO helper to clause-style checkMap.
- Added DeclareMapperInfoOp builder from DeclareMapperInfoOperands
and updated Flang call sites so they do not need to spell out newly
added operands..
gcc/vax: adjust the constraints on the output operands of the
'*extzv_aligned' instruction patterns, removing the 'earlyclobber'
modifier, to be consistent with the constraints on the output operands
of the related 'extv_aligned' instruction patterns.
Reject target map iterators without captures
Reject target map iterators until the follow-up capture-binding
representation is added since currently map_iterated on omp.target
only represents the dynamic map list and does not consider the
target-region arguments required by IsolatedFromAbove.
Require explicit yield in iterator op
Remove the implicit terminator trait from omp.iterator so iterator
modifiers must explicitly yield the value used to form the iterated list.
Add and update verfier and test accordingly.
Simplify map iterator clause assembly
- Split MLIR map syntax into separate map_entries(...) and map_iterated(...),
removing the custom MapEntryList parser/printer.
- Moved omp.target map_iterated out of TargetOpRegion
- it now prints before the target region instead of as map_iterated_entries(...) after the region.
- Renamed LLVMIR TODO helper to clause-style checkMap.
- Added DeclareMapperInfoOp builder from DeclareMapperInfoOperands
and updated Flang call sites so they do not need to spell out newly
added operands..