Commit
8955950c121c97a686310991203c89ba14c90b82
by rahmanlException support for basic block sections
This is part of the Propeller framework to do post link code layout optimizations. Please see the RFC here: https://groups.google.com/forum/#!msg/llvm-dev/ef3mKzAdJ7U/1shV64BYBAAJ and the detailed RFC doc here: https://github.com/google/llvm-propeller/blob/plo-dev/Propeller_RFC.pdf
This patch provides exception support for basic block sections by splitting the call-site table into call-site ranges corresponding to different basic block sections. Still all landing pads must reside in the same basic block section (which is guaranteed by the the core basic block section patch D73674 (ExceptionSection) ). Each call-site table will refer to the landing pad fragment by explicitly specifying @LPstart (which is omitted in the normal non-basic-block section case). All these call-site tables will share their action and type tables.
The C++ ABI somehow assumes that no landing pads point directly to LPStart (which works in the normal case since the function begin is never a landing pad), and uses LP.offset = 0 to specify no landing pad. In the case of basic block section where one section contains all the landing pads, the landing pad offset relative to LPStart could actually be zero. Thus, we avoid zero-offset landing pads by inserting a **nop** operation as the first non-CFI instruction in the exception section.
**Background on Exception Handling in C++ ABI** https://github.com/itanium-cxx-abi/cxx-abi/blob/master/exceptions.pdf
Compiler emits an exception table for every function. When an exception is thrown, the stack unwinding library queries the unwind table (which includes the start and end of each function) to locate the exception table for that function.
The exception table includes a call site table for the function, which is used to guide the exception handling runtime to take the appropriate action upon an exception. Each call site record in this table is structured as follows:
| CallSite | --> Position of the call site (relative to the function entry) | CallSite length | --> Length of the call site. | Landing Pad | --> Position of the landing pad (relative to the landing pad fragment’s begin label) | Action record offset | --> Position of the first action record
The call site records partition a function into different pieces and describe what action must be taken for each callsite. The callsite fields are relative to the start of the function (as captured in the unwind table).
The landing pad entry is a reference into the function and corresponds roughly to the catch block of a try/catch statement. When execution resumes at a landing pad, it receives an exception structure and a selector value corresponding to the type of the exception thrown, and executes similar to a switch-case statement. The landing pad field is relative to the beginning of the procedure fragment which includes all the landing pads (@LPStart). The C++ ABI requires all landing pads to be in the same fragment. Nonetheless, without basic block sections, @LPStart is the same as the function @Start (found in the unwind table) and can be omitted.
The action record offset is an index into the action table which includes information about which exception types are caught.
**C++ Exceptions with Basic Block Sections** Basic block sections break the contiguity of a function fragment. Therefore, call sites must be specified relative to the beginning of the basic block section. Furthermore, the unwinding library should be able to find the corresponding callsites for each section. To do so, the .cfi_lsda directive for a section must point to the range of call-sites for that section. This patch introduces a new **CallSiteRange** structure which specifies the range of call-sites which correspond to every section:
`struct CallSiteRange { // Symbol marking the beginning of the precedure fragment. MCSymbol *FragmentBeginLabel = nullptr; // Symbol marking the end of the procedure fragment. MCSymbol *FragmentEndLabel = nullptr; // LSDA symbol for this call-site range. MCSymbol *ExceptionLabel = nullptr; // Index of the first call-site entry in the call-site table which // belongs to this range. size_t CallSiteBeginIdx = 0; // Index just after the last call-site entry in the call-site table which // belongs to this range. size_t CallSiteEndIdx = 0; // Whether this is the call-site range containing all the landing pads. bool IsLPRange = false; };`
With N basic-block-sections, the call-site table is partitioned into N call-site ranges.
Conceptually, we emit the call-site ranges for sections sequentially in the exception table as if each section has its own exception table. In the example below, two sections result in the two call site ranges (denoted by LSDA1 and LSDA2) placed next to each other. However, their call-sites will refer to records in the shared Action Table. We also emit the header fields (@LPStart and CallSite Table Length) for each call site range in order to place the call site ranges in separate LSDAs. We note that with -basic-block-sections, The CallSiteTableLength will not actually represent the length of the call site table, but rather the reference to the action table. Since the only purpose of this field is to locate the action table, correctness is guaranteed.
Finally, every call site range has one @LPStart pointer so the landing pads of each section must all reside in one section (not necessarily the same section). To make this easier, we decide to place all landing pads of the function in one section (hence the `IsLPRange` field in CallSiteRange).
| @LPStart | ---> Landing pad fragment ( LSDA1 points here) | CallSite Table Length | ---> Used to find the action table. | CallSites | | … | | … | | @LPStart | ---> Landing pad fragment ( LSDA2 points here) | CallSite Table Length | | CallSites | | … | | … | … … | Action Table | | Types Table |
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D73739
|
 | llvm/lib/CodeGen/AsmPrinter/WasmException.h |
 | llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp |
 | llvm/lib/CodeGen/AsmPrinter/WasmException.cpp |
 | llvm/include/llvm/CodeGen/AsmPrinterHandler.h |
 | llvm/include/llvm/CodeGen/AsmPrinter.h |
 | llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp |
 | llvm/test/CodeGen/X86/gcc_except_table_bb_sections.ll |
 | llvm/lib/Target/ARM/ARMAsmPrinter.cpp |
 | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp |
 | llvm/lib/CodeGen/AsmPrinter/EHStreamer.h |
 | llvm/test/CodeGen/X86/gcc_except_table_bb_sections_ehpad_groups_with_cold.ll |
 | llvm/lib/CodeGen/BasicBlockSections.cpp |
Commit
c3193e464cbd5e8b7cade103032c222bf8bc0e27
by rupprecht[lldb/ipv6] Support running lldb tests in an ipv6-only environment.
When running in an ipv6-only environment where `AF_INET` sockets are not available, many lldb tests (mostly gdb remote tests) fail because things like `127.0.0.1` don't work there.
Use `localhost` instead of `127.0.0.1` whenever possible, or include a fallback of creating `AF_INET6` sockets when `AF_INET` fails.
Reviewed By: labath
Differential Revision: https://reviews.llvm.org/D87333
|
 | lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py |
 | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp |
 | lldb/test/API/tools/lldb-server/commandline/TestStubReverseConnect.py |
 | lldb/unittests/Host/SocketTest.cpp |
 | lldb/test/API/functionalities/gdb_remote_client/gdbclientutils.py |
 | lldb/unittests/Host/SocketTestUtilities.cpp |
 | lldb/tools/lldb-server/lldb-gdbserver.cpp |
Commit
655af658c93bf7f133341e7eb5a2dfa176282781
by ezhulenev[MLIR] Add async.value type to Async dialect
Return values from async regions as !async.value<...>.
Reviewed By: mehdi_amini, csigg
Differential Revision: https://reviews.llvm.org/D88510
|
 | mlir/test/Dialect/Async/ops.mlir |
 | mlir/include/mlir/Dialect/Async/IR/AsyncOps.td |
 | mlir/include/mlir/Dialect/Async/IR/Async.h |
 | mlir/include/mlir/Dialect/Async/IR/AsyncBase.td |
 | mlir/lib/Dialect/Async/IR/Async.cpp |
Commit
ad865d9d10b8cf93738470175aae1be7a4a3eb6b
by rupprecht[lldb-vscode] Allow an empty 'breakpoints' field to clear breakpoints.
Per the DAP spec for SetBreakpoints [1], the way to clear breakpoints is: `To clear all breakpoint for a source, specify an empty array.`
However, leaving the breakpoints field unset is also a well formed request (note the `breakpoints?:` in the `SetBreakpointsArguments` definition). If it's unset, we have a couple choices:
1. Crash (current behavior) 2. Clear breakpoints 3. Return an error response that the breakpoints field is missing.
I propose we do (2) instead of (1), and treat an unset breakpoints field the same as an empty breakpoints field.
[1] https://microsoft.github.io/debug-adapter-protocol/specification#Requests_SetBreakpoints
Reviewed By: wallace, labath
Differential Revision: https://reviews.llvm.org/D88513
|
 | lldb/test/API/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py |
 | lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py |
 | lldb/tools/lldb-vscode/lldb-vscode.cpp |
Commit
afaeb6af79a4278249ef9114755e5685d0b35984
by jinghamFix crash in SBStructuredData::GetDescription() when there's no StructuredDataPlugin.
Also, use the StructuredData::Dump method to print the StructuredData if there is no plugin, rather than just returning an error.
Differential Revision: https://reviews.llvm.org/D88266
|
 | lldb/test/API/python_api/sbstructureddata/TestStructuredDataAPI.py |
 | lldb/include/lldb/Core/StructuredDataImpl.h |
Commit
2d761a368c3637cb6a6b05eb10ac8d839efe77cc
by aeubanks[test][NewPM][SampleProfile] Fix more tests under NPM
These all have separate legacy and new PM RUN lines.
|
 | llvm/test/Transforms/SampleProfile/flattened.ll |
 | llvm/test/Transforms/SampleProfile/profile-sample-accurate.ll |
 | llvm/test/Transforms/SampleProfile/inline-mergeprof.ll |
Commit
490b556a0f3c9daddd05651d945662b93b3b13b9
by Louis Dionne[libc++] Make sure we don't attempt to run check-cxx-abilist when libc++ doesn't define new/delete
That would make the test fail spuriously because we don't generate an ABI list for that configuration.
|
 | libcxx/lib/abi/CMakeLists.txt |
Commit
bdc85292fb0f2a3965c8c65f9461d285b04841ed
by huberjnRevert "[OpenMP] Add Error Handling for Conflicting Pointer Sizes for Target Offload"
Failing tests on Arm due to the tests automatically populating incomatible pointer width architectures. Reverting until the tests are updated. Failing tests:
OpenMP/distribute_parallel_for_num_threads_codegen.cpp OpenMP/distribute_parallel_for_if_codegen.cpp OpenMP/distribute_parallel_for_simd_if_codegen.cpp OpenMP/distribute_parallel_for_simd_num_threads_codegen.cpp OpenMP/target_teams_distribute_parallel_for_if_codegen.cpp OpenMP/target_teams_distribute_parallel_for_simd_if_codegen.cpp OpenMP/teams_distribute_parallel_for_if_codegen.cpp OpenMP/teams_distribute_parallel_for_simd_if_codegen.cpp
This reverts commit 9d2378b59150f6f1cb5c9cf42ea06b0bb57029a1.
|
 | clang/include/clang/Basic/DiagnosticDriverKinds.td |
 | clang/test/OpenMP/target_incompatible_architecture_messages.cpp |
 | clang/lib/Frontend/CompilerInvocation.cpp |
 | clang/test/OpenMP/nvptx_target_parallel_reduction_codegen_tbaa_PR46146.cpp |
Commit
81921ebc430536ae5718da70a54328c790c8ae19
by spatel[CodeGen] improve coverage for float (32-bit) type of NAN; NFC
Goes with D88238
|
 | clang/test/CodeGen/builtin-nan-exception.c |
Commit
1b60f63e4fd041550019b692dc7bf490dce2c75c
by jhuber6Revert "[OpenMP] Replace OpenMP RTL Functions With OMPIRBuilder and OMPKinds.def"
Failing tests on Arm due to the tests automatically populating incomatible pointer width architectures. Reverting until the tests are updated. Failing tests:
OpenMP/distribute_parallel_for_num_threads_codegen.cpp OpenMP/distribute_parallel_for_if_codegen.cpp OpenMP/distribute_parallel_for_simd_if_codegen.cpp OpenMP/distribute_parallel_for_simd_num_threads_codegen.cpp OpenMP/target_teams_distribute_parallel_for_if_codegen.cpp OpenMP/target_teams_distribute_parallel_for_simd_if_codegen.cpp OpenMP/teams_distribute_parallel_for_if_codegen.cpp OpenMP/teams_distribute_parallel_for_simd_if_codegen.cpp
This reverts commit 90eaedda9b8ef46e2c0c1b8bce33e98a3adbb68c.
|
 | clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp |
 | clang/test/OpenMP/nvptx_parallel_codegen.cpp |
 | clang/lib/CodeGen/CGOpenMPRuntime.h |
 | llvm/test/Transforms/OpenMP/add_attributes.ll |
 | llvm/include/llvm/Frontend/OpenMP/OMPKinds.def |
 | clang/lib/CodeGen/CodeGenModule.h |
Commit
e9b38841619f20a6f4c8657880fd487083ba499a
by csiggAdd GDB prettyprinters for a few more MLIR types.
Reviewed By: dblaikie, jpienaar
Differential Revision: https://reviews.llvm.org/D87159
|
 | debuginfo-tests/llvm-prettyprinters/gdb/mlir-support.gdb |
 | debuginfo-tests/CMakeLists.txt |
 | debuginfo-tests/lit.cfg.py |
 | debuginfo-tests/llvm-prettyprinters/gdb/lit.local.cfg |
 | mlir/utils/gdb-scripts/prettyprinters.py |
 | debuginfo-tests/lit.site.cfg.py.in |
 | debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.cpp |
 | debuginfo-tests/llvm-prettyprinters/gdb/mlir-support.cpp |
Commit
dd14e5825209386129770296f9bc3a14ab0b4592
by thomasraoux[mlir][vector] First step of vector distribution transformation
This is the first of several steps to support distributing large vectors. This adds instructions extract_map and insert_map that allow us to do incremental lowering. Right now the transformation only apply to simple pointwise operation with a vector size matching the multiplicity of the IDs used to distribute the vector. This can be used to distribute large vectors to loops or SPMD.
Differential Revision: https://reviews.llvm.org/D88341
|
 | mlir/lib/Dialect/Vector/VectorOps.cpp |
 | mlir/test/Dialect/Vector/vector-distribution.mlir |
 | mlir/lib/Dialect/Vector/VectorTransforms.cpp |
 | mlir/include/mlir/Dialect/Vector/VectorTransforms.h |
 | mlir/test/Dialect/Vector/invalid.mlir |
 | mlir/test/Dialect/Vector/ops.mlir |
 | mlir/test/lib/Transforms/TestVectorTransforms.cpp |
 | mlir/include/mlir/Dialect/Vector/VectorOps.td |