[Flang][MLIR][OpenMP] Add distinct var_ptr_ptr_type to omp.map.info operations
This is a precursor patch to attach and ref_ptr/ptee mapping that I intend to upstream
over the next few weeks. The attach maps require both the type of the descriptor and
the pointed to data to calculate the appropriate offload/base pointers and size. In
the base case of ref_ptr_ptee all of this information can be gathered from the pointer
and pointee maps, but in cases where we have only one (i.e. ref_ptr/ref_ptee) we will
be missing one of the key elements required to create an corresponding attach map.
So, this PR basically adds the ability to ferry around the type of both var_ptr and
var_ptr_ptr as opposed to just var_ptr, then we can emit attach maps as seperate
map.info's that carry all the pre-requisite informaion for lowering to LLVM-IR. But,
otherwise it seems reasonable to have var_ptr_ptr mirror var_ptr in all aspects for
consistency.
[Flang][OpenMP][MLIR] Add attach and ref map type lowering to MLIR
This doesn't implement the functionality, just the relevant map type
lowering to MLIR's omp.map.info. The more complicated changes to
MapInfoFinalizationPass.cpp and OpenMPTOLLVMIRTranslation.cpp to support
attach map and the various ref/attach semantics will come in a subsequent
set of PRs. This just helps compartmentalize the changeset.
[orc-rt] Actually test orc-rt/bit.h functions. (#177300)
The unit test was copied from a similar test in llvm, and was still
qualifying calls with 'llvm::'. This was unintended, but happened to
work because LLVM's bit.h is transitively included through LLVM's gtest
headers. Qualifying with 'orc_rt::' tests the intended functions.
Thanks to @jaredwy for spotting this!
[ELF] --why-live: Skip symbol at index 0 and section symbols, handle .eh_frame symbols (#177099)
Symbols of empty names can be matched by `--why-live='*'`, which are
generally not useful.
* The first entry in a symbol table (STB_LOCAL and undefined)
* `STT_SECTION` symbols (emitted by LLVM integrated assembler when
needed by relocations). These input section symbols will be demoted by
`demoteAndCopyLocalSymbols`, so technically not really live.
In addition, such symbols of non-allocable sections currently lead to
crashes: `whyLive` does not record the section, causing the second
iteration of the `while (true)` loop in printWhyLive to call
`std::get<Symbol *>(cur)` when `cur` is an `InputSectionBase *`.
In addition, handle GCC crtendS.o `__FRAME_END__`, which is defined
relative to a `.eh_frame` section created with
`__attribute__((used, section(".eh_frame")))`.
Fix #176890
[SystemZ] Implement ctor/dtor emission via @@SQINIT and .xtor sections
This patch implements support for constructors/destructors by introducing the
@@SQINIT section and emitting .xtor.<priority> sections within the SystemZ
AsmPrinter and in the GOFF object lowering layer. Improvements to ADA descriptor
handling is also done within this change.
Remove nomenclature clash in statistic pass with one of the stats (#177267)
Attribute TotalInstructionCount is used, but previously the name of the
stat printed out was "Total"+property, which made it look like
TotalTotalInstruction. Num does not provide such clashes in the
nomenclature.
[lld][COFF] Use `.contains` rather than `.count` for set membership. NFC (#177067)
Also converted a couple of `std::set` to
`llvm::StringSet`/`llvm::SmallSet`.
This matches the usage in the other linker backends.
See #176610
[DTLTO][NFC] Minor cleanups and improvements to DTLTO tests (#177282)
This change makes small, non-functional improvements to the DTLTO test
suite, including:
- Tightening+Regularizing FileCheck match expressions across tests
- Simplifying `signal.test` using more lit macro features
[IR] Support constructing `dead_on_return` without an argument (#177272)
After #171712, `dead_on_return` takes an optional argument indicating
the number of bytes known dead. The existing clang callsite uses the
attribute builder interface directly which supports the optional
argument through `DeadOnReturnInfo`. However, users constructing the
Attribute directly (e.g. `rustc`) were using `Attribute::get` which will
now default to providing a 0 value to the optional argument.
Add the additional method `Attribute::getWithDeadOnReturnInfo` to allow
users which produce explicit `Attribute` values to continue to indicate
`dead_on_return` without an argument.
[M68k] Fix MOVEM collapse pass for 2 instances of same register (#174349)
Add test case for MOVEM collapse opt pass failure and fix pass handling
of 2 appearances of the same register in a MOVEM block.
[Sanitizers] Remove unused variable (#177061)
Must've remained from debugging the test case.
rdar://119958411
Co-authored-by: Mariusz Borsa <m_borsa at apple.com>