- May 12, 2023
-
-
Philip Reames authored
LV/LAA will speculate that (some) strided access patterns have unit stride, and insert runtime checks if required. LV cost models a multiply by such a stride as free. We did this by keeping around the StrideSet structure, just to check if one of the operands were one of the strides we speculated. We can instead just ask PredicatedScalarEvolution if either of the operands are one (after predicates are applied). We get mostly the same result - PSE can prove it in more cases in theory - and simpler code.
-
Mircea Trofin authored
-
Joseph Huber authored
Summary: We need this function from the test.cpp but need to declare it manually.
-
Hanhan Wang authored
The revision adds support for tensor.pack op decomposition when all inner tile sizes are static. The generated tensor.expand_shape op is still valid because only one of the expanding dimension is dynamic. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D150233
-
Aart Bik authored
Reviewed By: Peiming Differential Revision: https://reviews.llvm.org/D150382
-
Valentin Clement authored
The information needed for translation is now encoded in the dialect operations and does not require a dedicated pass to be extracted. Remove the obsolete passes that were performing operand legalization. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D150248
-
Philip Reames authored
The original commit wasn't quite NFC, and this was caught by an arguably overly strong assert. Specifically, I'd failed to strip off the integer cast off the SCEV before saving it in the map. The result - other than a failed assert - is that we'd speculate on the casted unknown, not the unknown. The only case I can think of where that might change behavior would be a sext(i1 load). I doubt that case is interesting in practice, but it's good to be strictly NFC on this change regardless. Original commit message follows.. The existing code makes it hard to tell that collectStridedAccess is really about identifying some loop invariant SCEV which is *profitable* to speculate is equal to one. The odd dual usage structure of Value and SCEV confuses this point. We could choose to loosen the profitability analysis if desired. I'm not proposing doing so at this time as it exposes too many cases where the speculation is unprofitable. Differential Revision: https://reviews.llvm.org/D147750
-
Joseph Huber authored
Currently we provide the `send_n` and `recv_n` functions. These were somewhat divergent and not tested on the GPU. This patch changes the support to be more common. We do this my making the CPU provide an array equal the to at least the lane size while the GPU can rely on the private memory address of its stack variables. This allows us to send data back and forth generically. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D150379
-
Philip Reames authored
This reverts commit d5b84013. Running this through broader testing after rebasing is revealing a crash. Reverting while I investigate.
-
Teresa Johnson authored
I noticed that we are converting llvm.public.type.test to regular llvm.type.test too early, and thus not updating those in imported functions. This would result in losing out on WPD opportunities. Move the update to after function importing, and improve test to cover this case. Differential Revision: https://reviews.llvm.org/D150326
-
- May 11, 2023
-
-
Florian Hahn authored
Update skeleton creation logic to use SCEV expansion results from expanding the pre-header. This avoids another set of SCEV expansions that may happen after the CFG has been modified. Fixes #58811. Depends on D147964. Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D147965
-
Slava Zakharin authored
The bufferization pass must create the tuple for these operations, because the users may require it. For example, in case of ElementalOp inlining a DestroyOp may be generated for the operand of YieldElementOp, and the operand may be ApplyOp->NoReassocOp chain. Differential Revision: https://reviews.llvm.org/D150343
-
Philip Reames authored
The existing code makes it hard to tell that collectStridedAccess is really about identifying some loop invariant SCEV which is *profitable* to speculate is equal to one. The odd dual usage structure of Value and SCEV confuses this point. We could choose to loosen the profitability analysis if desired. I'm not proposing doing so at this time as it exposes too many cases where the speculation is unprofitable. Differential Revision: https://reviews.llvm.org/D147750
-
David Truby authored
On Windows, global string literals with "linkonce" linkage is not supported without using comdat. As a simpler fix than adding comdat support we can use internal linkage instead. This fixes a bug where two string literals with the same value in different fortran files would cause a linker error due to the use of linkonce linkage. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D149859
-
NAKAMURA Takumi authored
Differential Revision: https://reviews.llvm.org/D149513
-
Felipe de Azevedo Piovezan authored
This commit implements the serialization and deserialization of the Machine Function's EntryValueObjects. Depends on D149879, D149778 Differential Revision: https://reviews.llvm.org/D149880
-
Joseph Huber authored
I forgot that we still used these variables in the loaders. Differential Revision: https://reviews.llvm.org/D150362
-
Aaron Ballman authored
This fixes the visualizers for: Type DeclContext QualType TypedefNameDecl NestedNameSpecifier FunctionDecl and adds visualizers for: VariableArrayType ElaboratedType ParenType BitIntType
-
Aaron Ballman authored
This fixes the visualizers for: PointerIntPair PointerUnion PointerIntPair<PointerUnion<*>, *> StringMapEntry and adds a visualizer for: PunnedPointer
-
Joseph Huber authored
Small cleanup of the server code and fixes a constant name not following the naming convention. Differential Revision: https://reviews.llvm.org/D150361
-
Erich Keane authored
Fixes #60778. When instantiating the body of a class template specialization that was instantiated from a partial specialization, we were incorrectly collecting template arguments from the primary template, which resulted in the template arguments list being inaccurate. In the example from the issue, we were trying to substitute the boolean 'false' into the type on Nested, which caused an assertion. Differential Revision: https://reviews.llvm.org/D150285
-
Tobias Gysi authored
Improve the constant import to handle zeroinitializer as well as additional float types such as quad floats. The logic got restructured to avoid creating intermediate dense element attributes when constructing multi-dimensional arrays. Additionally, we also leverage the fact that we do not need to iterate all elements of splat constants. Reviewed By: Dinistro Differential Revision: https://reviews.llvm.org/D150274
-
Tobias Gysi authored
This revision uses contains in favor of count when searching sets and maps. Additionally it uses find instead of count and lookup, which avoids searching some maps twice. Reviewed By: Dinistro Differential Revision: https://reviews.llvm.org/D150344
-
sgokhale authored
Land D42600 with optimisation disabled by default by setting 'enable-shrink-wrap-region-split' option. This is just to reduce effort involved in making changes to patch each time issue is detected and reland the whole patch.
-
Jacques Pienaar authored
We were querying the wrong EncReader along some paths that resulted in failures depending on if one encountered an Attribute from an unloaded dialect before encountering an operation from that dialect. Also fix error where we were able to emit "custom" form for an attribute without custom form in TestDialect. Differential Revision: https://reviews.llvm.org/D150260
-
Kiran Chandramohan authored
Currently complex division is lowered to a fir.divc operation and the fir.divc is later converted to a sequence of llvm operations to perform complex division, however this causes issues for extreme values when the calculations overflow. This patch changes the lowering of complex division to use the Intrinsic Call functionality to lower into library calls (for single, double, extended and quad precisions) or an MLIR complex dialect division operation (for half and bfloat precisions). A new wrapper function `genLibSplitComplexArgsCall` is written to handle the case of the arguments of the Complex Library calls being split to its real and imaginary real components. Note 1: If the Complex To Standard conversion of division operation matures then we can use it for all precisions. Currently it has the same issues as the conversion of fir.divc. Note 2: A previous patch (D145808) did the same but during conversion of the fir.divc operation. But using function calls at that stage leads to ABI issues since the conversion to LLVM is not aware of the complex target rewrite. Note 3: If the patch is accepted, fir.divc can be removed from FIR. We can use the complex.div operation where any transformation is required. Reviewed By: vzakhari, PeteSteinfeld, DavidTruby, jeanPerier Differential Revision: https://reviews.llvm.org/D149546
-
Felipe de Azevedo Piovezan authored
MachineFunction keeps a table of variables whose addresses never change throughout the function. Today, the only kinds of locations it can handle are stack slots. However, we could expand this for variables whose address is derived from the value a register had upon function entry. One case where this happens is with variables alive across coroutine funclets: these can be placed in a coroutine frame object whose pointer is placed in a register that is an argument to coroutine funclets. ``` define @foo(ptr %frame_ptr) { dbg.declare(%frame_ptr, !some_var, !DIExpression(EntryValue, <ptr_arithmetic>)) ``` This is a patch in a series that aims to improve the debug information generated by the CoroSplit pass in the context of `swiftasync` arguments. Variables stored in the coroutine frame _must_ be described the entry_value of the ABI-defined register containing a pointer to the coroutine frame. Since these variables have a single location throughout their lifetime, they are candidates for being stored in the MachineFunction table. Differential Revision: https://reviews.llvm.org/D149879 -
John Brawn authored
Several tests undefined __DEPRECATED to avoid warnings as they're testing the deprecated ext/hash_map. A better way to do this is to use -Wno-deprecated so it isn't defined in the first place. This prevents these tests from failing when we give a warning when undefining the __DEPRECATED macro, as D144654 will do. For the generated tests however just remove the testing of these header files, so we don't disable the warning when testing the other header files. Differential Revision: https://reviews.llvm.org/D145691
-
Jingu Kang authored
When we lower BUILD_VECTOR to VECTOR_SHUFFL, we could generate efficient vector mask. For example, t24: v8i8 = BUILD_VECTOR t25, t25, t25, t25, t26, t26, t26, t26 ==> t27: v8i8 = BUILD_VECTOR t26, t26, t26, t26, t26, t26, t26, t26 t28: v8i8 = BUILD_VECTOR t25, t25, t25, t25, t25, t25, t25, t25 t29: v8i8 = vector_shuffle<0,1,2,3,12,13,14,15> t27, t2 Differential Revision: https://reviews.llvm.org/D150345
-
Guillaume Chatelet authored
Being able to link statically depends on other CMake options and choice of libc.
-
Guillaume Chatelet authored
This patch makes sure: - we pass the correct compiler options when building Google benchmarks, - we only import the C++ version of the memory functions. The change in libc/cmake/modules/LLVMLibCTestRules.cmake is here to make sure CMake can generate the right command line in the presence of the CMAKE_CROSSCOMPILING_EMULATOR option. Relevant documentation: https://cmake.org/cmake/help/latest/variable/CMAKE_CROSSCOMPILING_EMULATOR.html https://cmake.org/cmake/help/latest/command/add_custom_command.html#command:add_custom_command " If COMMAND specifies an executable target name (created by the `add_executable()` command), it will automatically be replaced by the location of the executable created at build time if either of the following is true: - The target is not being cross-compiled (i.e. the CMAKE_CROSSCOMPILING variable is not set to true). - New in version 3.6: The target is being cross-compiled and an emulator is provided (i.e. its CROSSCOMPILING_EMULATOR target property is set). In this case, the contents of CROSSCOMPILING_EMULATOR will be prepended to the command before the location of the target executable. " Reviewed By: gchatelet Differential Revision: https://reviews.llvm.org/D150200
-
Yan Xin authored
According to the EBNF syntax described in the 'Common syntax' chapter, literal characters should be surrounded by backticks (`). However, in some sections of this document, single quotes (') are used instead. So, fix them. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D150067 -
Thomas Symalla authored
-
Serguei Katkov authored
Reviewed By: e-kud Differential Revision: https://reviews.llvm.org/D149844
-
Matthias Braun authored
Add support for splitting critical edges coming from an indirect jump using a jump table ("switch jumps"). This introduces the `TargetInstrInfo::getJumpTableIndex` callback to allows targets to return an index into `MachineJumpTableInfo` for a given indirect jump. It also updates to `MachineBasicBlock::SplitCriticalEdge` to allow splitting of critical edges by rewriting jump table entries. This is largely based on work done by Zhixuan Huan in D132202. Differential Revision: https://reviews.llvm.org/D140975 -
Nathan Lanza authored
If we're using an old instrprof profile and the user passes we can get Decls with children decl counts not matching the what the profile was written against. In a particular case I was debugging we have 24 decls in the AST and 22 decls in the profile. Avoid crashing in this case. Differential Revision: https://reviews.llvm.org/D149504
-
Chen Zheng authored
After enhancement for XCOFF integrated assembler mode, now OrcCAPITest can be enabled on AIX. Differential Revision: https://reviews.llvm.org/D148325
-
Chuanqi Xu authored
Close https://github.com/llvm/llvm-project/issues/62174 And this was originally a try to close https://github.com/llvm/llvm-project/issues/62158. I don't feel this is the correct fix. I just think it is not bad as an ad-hoc patch. And let's discuss things in the higher-level in the above GitHub issue link. Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D148506
-
Jon Chesterfield authored
Allows moving the pointer swap between server and client into reset. Single allocation simplifies whatever allocates the client/server, currently the libc loaders. Reviewed By: jhuber6 Differential Revision: https://reviews.llvm.org/D150337
-
Teresa Johnson authored
Removes an empty file inadvertently included with b8d2f717.
-