- Sep 05, 2023
-
-
Guray Ozen authored
TMA was introduced to MLIR, however, it needed `ptxas` compiler. Recent work D154117 introduced that! This work runs the existing integration test. Reviewed By: fmorac Differential Revision: https://reviews.llvm.org/D159347
-
- Sep 04, 2023
-
-
Simon Pilgrim authored
-
Amara Emerson authored
-
David Green authored
This adds some basic and/or/xor reduction costs for NEON/MVE, handling them like other reductions where vector operations are used to reduce to legal sizes, followed by an optional VREV+VAND/VORR/VEOR step and scalarization from there.
-
David Spickett authored
This is causing a lot of warnings with older compilers and errors for -Werror builders downstream. I'm removing it until we can decide a good way to do this, as it does seem important that this class not be discarded given it controls formatting.
-
Nicolas Vasilache authored
FuncToLLVM uses the data layout string attribute in 3 different ways: 1. LowerToLLVMOptions options(&getContext(), getAnalysis<DataLayoutAnalysis>().getAtOrAbove(m)); 2. options.dataLayout = llvm::DataLayout(this->dataLayout); 3. m->setAttr(..., this->dataLayout)); The 3rd way is unrelated to the other 2 and occurs after conversion, making it confusing. This revision separates this post-hoc module annotation functionality into its own pass. The convert-func-to-llvm pass loses its `data-layout` option and instead recovers it from the `llvm.data_layout` attribute attached to the module, when present. In the future, `LowerToLLVMOptions options(&getContext(), getAnalysis<DataLayoutAnalysis>().getAtOrAbove(m))` and `options.dataLayout = llvm::DataLayout(dataLayout);` should be unified. Reviewed By: ftynse, mehdi_amini Differential Revision: https://reviews.llvm.org/D157604
-
Richard Dzenis authored
Consider the following code: #include <windows.h> #include <TraceLoggingActivity.h> #include <TraceLoggingProvider.h> #include <winmeta.h> TRACELOGGING_DEFINE_PROVIDER( g_hMyComponentProvider, "SimpleTraceLoggingProvider", // {0205c616-cf97-5c11-9756-56a2cee02ca7} (0x0205c616,0xcf97,0x5c11,0x97,0x56,0x56,0xa2,0xce,0xe0,0x2c,0xa7)); void test() { TraceLoggingFunction(g_hMyComponentProvider); } int main() { TraceLoggingRegister(g_hMyComponentProvider); test(); TraceLoggingUnregister(g_hMyComponentProvider); } It compiles with MSVC, but clang-cl reports an error: C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared/TraceLoggingActivity.h(377,30): note: expanded from macro '_tlgThisFunctionName' #define _tlgThisFunctionName __FUNCTION__ ^ .\tl.cpp(14,5): error: cannot initialize an array element of type 'char' with an lvalue of type 'const char[5]' TraceLoggingFunction(g_hMyComponentProvider); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The second commit is not needed to support above code, however, during isolated tests in ms_predefined_expr.cpp I found that MSVC accepts code with constexpr, whereas clang-cl does not. I see that in most places PredefinedExpr is supported in constant evaluation, so I didn't wrap my code with ``if(MicrosoftExt)``. Reviewed By: cor3ntin Differential Revision: https://reviews.llvm.org/D158591 -
David Green authored
This adds some basic smin/smax/umin/umax reduction costs for MVE/NEON, similar to the existing Add reduction costs. They follow the same style as Add reductions, but include a higher cost as the costs tend to be dependant on the element size for vminv/vmaxv. These costs may not be precise, but will be more inline than the default that extracts each element.
-
Nicolas Vasilache authored
Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D159364
-
Vladislav Dzhidzhoev authored
G_EXTRACT_VECTOR_ELT instructions with non-constant indices are not selected, so they need to be lowered. Fixes https://github.com/llvm/llvm-project/issues/65049. Reviewed By: Peter Differential Revision: https://reviews.llvm.org/D159096
-
Timm Bäder authored
-
Nicolas Vasilache authored
This revision addresses issues surfaced in https://reviews.llvm.org/D159093
-
sdesmalen-arm authored
When calling a function which requires no streaming-mode change from an __arm_locally_streaming function, LLVM would otherwise emit: // function prologue smstart b streaming_compatible_function // tail call // never an smstop
-
Timm Bäder authored
We always call the expression parameter E.
-
Timm Bäder authored
This doesn't make a difference right now but makes future commits easier.
-
Timm Bäder authored
Differential Revision: https://reviews.llvm.org/D158361
-
Matthias Springer authored
The same transform op can now be used to apply registered pass pipelines. This revision also adds a helper function for querying `PassPipelineInfo` objects and moves the corresponding `lookup` function for `PassInfo` objects to the `PassInfo` class. Differential Revision: https://reviews.llvm.org/D159211
-
Sam McCall authored
Now we can store it in DynTypedNode, we can target these nodes (SelectionTree) and resolve them (FindTarget). This makes Hover, go-to-def etc work in all(?) cases. Also support it in DumpAST. Differential Revision: https://reviews.llvm.org/D159299
-
John Brawn authored
R12 is callee-saved in functions with pacbti-m enabled, but this is done in assignCalleeSavedSpillSlots, meaning that in determineCalleeSaves we have to manually set CanEliminateFrame. This fixes a bug where in leaf functions with no other callee-saved registers the aut instruction wouldn't be emitted and stack offsets of arguments passed on the stack would be incorrect. Differential Revision: https://reviews.llvm.org/D157865
-
Mel Chen authored
This patch removes the member TTI from VPReductionRecipe, as the generation of reduction operations no longer requires TTI. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D158148
-
Adrian Kuegel authored
-
Adrian Kuegel authored
Differential Revision: https://reviews.llvm.org/D159423
-
TY-AMD authored
-
Sam McCall authored
The dump() is not actually included recursively in any other nodes' dump, as this is too verbose (similar to NNS) but useful in its own right. It's unfortunate to not have the actual tests yet, but the DynTypedNode tests are matcher-based and adding matchers is a larger task than DynTypedNode support (but can't be done first). (I've got a clangd change stacked on this that uses DynTypedNode and dump(), and both work. I'll send a change for matchers next). Differential Revision: https://reviews.llvm.org/D159300
-
David Green authored
Similar to the other reductions, this changes the cost of fmin/fmax reductions under MVE/NEON to perform vector operations until the types need to be scalarized. The fp16 vectors can perform a VREV+FMIN/FMAX to skip a step of the reduction, and otherwise need lanewise extract fro the top lanes.
-
Sam McCall authored
415d9e8c edited the generated html directly without updating the source of truth.
-
Adrian Kuegel authored
Differential Revision: https://reviews.llvm.org/D159422
-
Florian Hahn authored
Update VPBlendRecipe::print() to print the result directly, instead of relying on the stored Phi pointer. This brings the recipe in line with how other recipes are printed.
-
Matthias Springer authored
Differential Revision: https://reviews.llvm.org/D156371
-
Ingo Müller authored
The mix-in of the `MultiTileSizesOp` set the default value of its `divisor` argument. This repeats information from the tablegen defintion, is not necessary (since the generic code deals with `None` and default values), and has the risk of running out of sync without people noticing. This patch removes the setting of the value and forward `None` to the generic constructor instead. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D159416
-
Ingo Müller authored
This patch simplifies and improves the mix-in of the `TileOp`. In particular: * Accept all types of sizes (static, dynamic, scalable) in a single argument `sizes`. * Use the existing convenience function to dispatch different types of sizes instead of repeating the implementation in the mix-in. * Pass on `None` values as is of optional arguments to the init function of the super class. * Reformat with default indentation width (4 spaces vs 2 spaces). * Add a a test for providing scalable sizes. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D159417
-
Ingo Müller authored
This patch removes some manual conversion of mixed Python/attribute arguments to `I64ArrayAttr`s, which turned out to be unnecessary. Interestingly, this change does not depend on the additional attribute builders added in the (currently pending) https://reviews.llvm.org/D159403 patch. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D159419
-
Matthias Springer authored
`bufferize_to_allocation` does not supports ops with regions, unless `bufferize_destination_only` is set. In that case, only the operand is replaced with an allocation and wrapped in a `to_tensor` op. The error checking was too strict. Differential Revision: https://reviews.llvm.org/D159420
-
Florian Hahn authored
Add missing test coverage for selects with !dbg info.
-
Egor Zhdan authored
iOS/OSX-specific availability is a legacy of compiled API Notes which are not supported and were removed from Apple Clang in 2019 (see https://github.com/apple/llvm-project/commit/30fc70f349277a42e02550779b464b92a2f06c1c).
-
Tom Eccles authored
This is the last piece required for the loop versioning patch to work on code lowered via HLFIR. With this patch, HLFIR performance on spec2017 roms is now similar to the FIR lowering. Adding support for fir.array_coor means that many more loops will be versioned, even in the FIR lowering. So far as I have seen, these do not seem to have an impact on performance for the benchmarks I tried, but I expect it would speed up some programs, if the loop being versioned happened to be the hot code. The main difference between fir.array_coor and fir.coordinate_of is that fir.coordinate_of uses zero-based indices, whereas fir.array_coor uses the indices as specified in the Fortran program (starting from 1 by default, but also supporting non default lower bounds). I opted to transform fir.array_coor operations into fir.coordinate_of operations because this allows both to share the same offset calculation logic. The tricky bit of this patch is getting the correct lower bounds for the array operand to subtract from the fir.array_coor indices to get a zero-based indices. So far as I can tell, the FIR lowering will always provide lower bounds (shift) information in the shape operand to the fir.array_coor when non-default lower bounds are used. If none is given, I originally tried falling back to reading lower bounds from the box, but this led to misscompilation in SPEC2017 cam4. Therefore the pass instead assumes that if it can't already find an SSA value for the shift information, the default lower bound (1) should be used. A suspect the incorrect lower bounds in the box for the FIR lowering was already a known issue (see https://reviews.llvm.org/D158119). Differential Revision: https://reviews.llvm.org/D158597
-
David Green authored
This adds some basic fadd/fmul reduction costs for MVE/NEON. It reduces by halving the vector size until it it gets scalarized, with some additional costs for fp16 which may require extracting the top lanes. Differential Revision: https://reviews.llvm.org/D159367
-
Sergio Afonso authored
This reverts commit 823151f0.
-
Sander de Smalen authored
Otherwise these functions are not inlined when invoked from streaming functions. Reviewed By: paulwalker-arm Differential Revision: https://reviews.llvm.org/D159188
-
Sander de Smalen authored
If no frame-pointer is available and the compiler has scavenged a spill-slot in the callee-save area, the compiler may be forced to emit an 'addvl' inside the streaming-mode-changing call sequence when it needs to fill (reload) an FP register being passed to the call. We can avoid this entirely by disabling stack-slot scavenging when there are streaming-mode-changing call-sequences in the function. Reviewed By: david-arm Differential Revision: https://reviews.llvm.org/D159196
-