build: adjust LLDB and clang library naming on Windows (#185084)
Ensure that use of the GNU driver does not change the library name on
Windows. We would check the build tools being MSVC rather than targeting
Windows to select the output name.
[X86] Fix assertion when lowering FP_ROUND (#185562)
443ce5569ee9854cfef1139cf6b9cf05165e0902 caused us to start hitting
assertions with non-standard vector widths (<3 x float>) in this case
now that node types are actually enforced. There was a place in
X86ISelLowering.cpp where we just passed along a 64-bit integer whereas
other places constructing a CVTPS2PH node specifically construct a new
integer.
[lldb] Consolidating platform support checks in tests. (#184656)
Moving the platform support check into
`lldb/unittests/TestingSupport/TestUtilities.h` so it can be reused
across tests.
Also skipping 'VariablesTest' cases that load a core dump if the
platform is not supported.
[SystemZ] Disable PCH on z/OS. (#185750)
The compiler supports PCH in principle, but there are occasionally
hickups. Therefore it is better to disable PCH by default.
[CIR] Remove diagnostic when handling incomplete record types (#185715)
Following the example of classic codegen, we were checking for
incomplete record types in function signatures and issuing a diagnostic
in a place where it appeared that the type conversion needed to be
delayed. However, because CIR defers ABI processing until after codegen,
we don't actually need special handling for incomplete types.
This change removes the diagnostic and adds a comment explaining the
difference in behavior.
[FLANG][MLIR][OpenMP] add MathToNVVM conversion pass to NVPTX MLIR (#180060)
This Commit adds the MLIR MathToNVVM conversion pass to flang's
NVPTX codegen lowering Math and Arith operations to libdevice library calls.
This allows support for calls to Fortran math intrinsics for OpenMP offload
for NVIDIA Targets. To support this support for -nogpulib was added for
NVIDIA targets
Fix #147023
Fix #179347
[flang][cuda] Support predefined conversion in inlined function (#185723)
Only fir.declare at top level were converted. Update the pass to loop
through all fir.declare operations.
[lldb] Have Host::RunShellCommand ret stderr & stdout seperately (#184548)
Host::RunShellCommand takes a std::string *command_output argument and a
bool hide_stderr=false defaulted argument. If the shell command returns
stderr and stdout text, it is intermixed in the same command_output,
unless hide_stderr=true.
In SymbolLocatorDebugSymbols::DownloadObjectAndSymbolFile we call an
external program to find a binary and dSYM by uuid, and the external
program returns a plist (xml) output. In some cases, it printed a
(harmless) warning message to stderr, and then a complete plist output
to stdout. We attempt to parse the combination of these two streams, and
the parse fails - we don't get the output.
This patch removes hide_stderr and instead adds a `std::string
*separated_error_output` argument. If `separated_error_output` is
nullptr, output and error texts are returned combined in the
`command_output` argument. If a std::string object address is provided
for `separated_error_output`, then standard error output is separated
[4 lines not shown]
[mlir][Pass] Report error when passing options to pipelines via shorthand syntax (#185738)
When passing options to a pass pipeline that doesn't accept options,
mlir-opt exits with error code 1, but prints no error message when using
shorthand CLI syntax:
```
# Silent failure (no error message):
$ mlir-opt --tosa-to-linalg-pipeline=foo /dev/null
$ echo $?
1
# Same pipeline via --pass-pipeline syntax reports error:
$ mlir-opt --pass-pipeline='builtin.module(tosa-to-linalg-pipeline{foo})' /dev/null
<unknown>:0: error: failed to add `tosa-to-linalg-pipeline` with options `foo`
```
This PR adds replaces the silent call to `failure` with `errorHandler`
in `PassPipelineCLParser::addToPipeline`, matching the existing pattern
in `TextualPipeline::addToPipeline`.
[X86] Add stop-gap for SDAG failure in fptrunc lowering
```
define <3 x half> @err_420(<3 x float> %0) {
entry:
%1 = fptrunc <3 x float> %0 to <3 x half>
ret <3 x half> %1
}
```
currently crashes.
\#185562 will fix this, but needs another round of review. Land a
stop-gap for now to unblock our integrate process.
[mlir][spirv] Move remaining verification from C++ to ODS for Matrix ops (#185702)
This adds two new custom constraints to enforce matrix and vector
dimension with respect to one another.
Assisted-by: Codex
[AMDGPU] Added support for Sparse WMMA ops (#183360)
This PR adds support for Sparce WMMA ops (gfx12 and gfx1250)
---------
Co-authored-by: Jakub Kuderski <kubakuderski at gmail.com>
[SystemZ] Disable PCH on z/OS.
The compiler supports PCH in pronciple, but there are occasionally
hickups. Therefore it is better to disable PCH by default.
[SLP] Loop aware cost model/tree building
Currently, SLP vectorizer do not care about loops and their trip count.
It may lead to inefficient vectorization in some cases. Patch adds loop
nest-aware tree building and cost estimation.
When it comes to tree building, it now checks that tree do not span
across different loop nests. The nodes from other loop nests are
immediate buildvector nodes.
The cost model adds the knowledge about loop trip count. If it is
unknown, the default value is used, controlled by the
-slp-cost-loop-min-trip-count=<value> option. The cost of the vector
nodes in the loop is multiplied by the number of iteration (trip count),
because each vector node will be executed the trip count number of
times. This allows better cost estimation.
Reviewers: jdenny-ornl, vporpo, hiraditya, RKSimon
Pull Request: https://github.com/llvm/llvm-project/pull/150450
[clang][codegen] Additional tests for vbptr memory size calculation (#185703)
This patch adds three vbptr and 32 bit test cases for additional
coverage
Follow-up to https://github.com/llvm/llvm-project/pull/184558
[CIR] Add abstract delete operation without AST attribute (#185538)
This introduces the cir.delete_array operation, adds code to emit that
operation during CIR codegen, and adds lowering of the operation to the
CXXABILowering pass.
In order to handle possible variations in the delete representation, we
add the name of the delete function, the usual delete parameters, and,
optionally, the name of the element destructor function.
During the CXXABILoweringPass, the cir.delete_array operation is
expanded to call the delete function. This will be extended in a future
change to handle reading the array cookie, if required, and calling
element destructors.
[SystemZ][GOFF] Reference to external variable needs PR symbol
Variables are modelled as parts in the GOFF format. Referencing a
variable defined in a different compilation unit requires to use
a PR symbol instead of EXTRN/WEXTRN instruction.
A small issue is that these PR symbols can refer to the same ED
symbols, for which a section needs to be created.
[AMDGPU][GlobalIsel] Add register bank legalization rules for amdgcn atomic fminmax num (#184564)
This patch adds register bank legalization rules for amdgcn global/flat
atomic fmin/fmax num operations in the AMDGPU GlobalISel pipeline.
[clang][CUDA] Define _NV_RSQRT_SPECIFIER for glibc-2.42/cuda-13.2 compatibility (#185701)
CUDA-13.2 defines _NV_RSQRT_SPECIFIER to make its headers compileable
with glibc 2.42+. However, clang does not include the header that
defines the macro, and has to define it by itself.
[flang][OpenMP] Allow parsing ODS as directive-specification list item
Normally a directive specification may use commas between the directive
name and the clauses, and between the clauses. There are some instances,
however, when a directive-specification is treated as a list item.
Specifically in arguments to the APPLY clause and as an argument to WHEN,
OTHERWISE, and the now-deprecated DEFAULT when used on a METADIRECTIVE.
In those cases, use of commas is prohibited to avoid confusion between
commas being part of the directive-specification, and the argument list
separators.
[SPIR-V] Add lowering for G_FPOWI (#185454)
This fixes an assertion I was hitting in the fragment density map sample
in Vulkan Samples. In starfield.frag.hlsl, we have
float starCol = pow((rnd - threshhold) / (1.0 - threshhold), 16.0);
The optimizer recognizes 16.0 as a whole number and converts the call to
`llvm.powi`. The backend goes on to fail with:
fatal error: error in backend: cannot select: %46:fid(s64) = nnan ninf
nsz arcp afn reassoc G_FPOWI %44:fid, %45:iid(s64) (in function:
_Z9starFieldDv3_f)
On Vulkan, there is no integer-exponent for pow. This patch lowers it by
converting the exponent to float and calling GLSL.std.450's Pow.
---------
Co-authored-by: Steven Perron <stevenperron at google.com>