- Feb 13, 2021
-
-
Alex Zinenko authored
The existing approach to translation to the LLVM IR relies on a single translation supporting the base LLVM dialect, extensible through inheritance to support intrinsic-based dialects also derived from LLVM IR such as NVVM and AVX512. This approach does not scale well as it requires additional translations to be created for each new intrinsic-based dialect and does not allow them to mix in the same module, contrary to the rest of the MLIR infrastructure. Furthermore, OpenMP translation ingrained itself into the main translation mechanism. Start refactoring the translation to LLVM IR to operate using dialect interfaces. Each dialect that contains ops translatable to LLVM IR can implement the interface for translating them, and the top-level translation driver can operate on interfaces without knowing about specific dialects. Furthermore, the delayed dialect registration mechanism allows one to avoid a dependency on LLVM IR in the dialect that is translated to it by implementing the translation as a separate library and only registering it at the client level. This change introduces the new mechanism and factors out the translation of the "main" LLVM dialect. The remaining dialects will follow suit. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D96503
-
Yitzhak Mandelbaum authored
Currently, all include insertions are directed to the main file. However, Transformer rules can specify alternative destinations for include insertions. This patch fixes the code to associate the include with the correct file. This patch was tested manually. The clang tidy unit test framework does not support testing changes to header files. Given that this is a bug fix for a live bug, the patch relies on manual testing rather than blocking on upgrading the unit test framework. Differential Revision: https://reviews.llvm.org/D96542
-
Florian Hahn authored
-
Florian Hahn authored
This is a backend test for PR49082.
-
Petar Avramovic authored
Implements same logis as in SelectionDAG. G_FMINNUM_IEEE and G_FMAXNUM_IEEE are never SNaN by definition and never NaN when one operand is known non-NaN and other known non-SNaN. G_FMINNUM and G_FMAXNUM are never NaN/SNaN when one of the operands is known non-NaN/SNaN. Differential Revision: https://reviews.llvm.org/D91716
-
Petar Avramovic authored
Differential Revision: https://reviews.llvm.org/D91714
-
Petar Avramovic authored
-
Nicolas Vasilache authored
-
- Feb 12, 2021
-
-
Yaxun (Sam) Liu authored
This reverts commit e384e94f.
-
David Goldman authored
- Instead of `AppDelegate::application:didFinishLaunchingWithOptions:` you will now see `-[AppDelegate application:didFinishLaunchingWithOptions:]` - Also include categories in the name when printing the scopes, e.g. `Class(Category)` and `-[Class(Category) method]` Differential Revision: https://reviews.llvm.org/D68590
-
Kirstóf Umann authored
Suppose you stumble across a DeclRefExpr in the AST, that references a VarDecl. How would you know that that variable is written in the containing statement, or not? One trick would be to ascend the AST through Stmt::getParent, and see whether the variable appears on the left hand side of the assignment. Liveness does something similar, but instead of ascending the AST, it descends into it with a StmtVisitor, and after finding an assignment, it notes that the LHS appears in the context of an assignemnt. However, as [1] demonstrates, the analysis isn't ran on the AST of an entire function, but rather on CFG, where the order of the statements, visited in order, would make it impossible to know this information by descending. void f() { int i; i = 5; } `-FunctionDecl 0x55a6e1b070b8 <test.cpp:1:1, line:5:1> line:1:6 f 'void ()' `-CompoundStmt 0x55a6e1b07298 <col:10, line:5:1> |-DeclStmt 0x55a6e1b07220 <line:2:3, col:8> | `-VarDecl 0x55a6e1b071b8 <col:3, col:7> col:7 used i 'int' `-BinaryOperator 0x55a6e1b07278 <line:4:3, col:7> 'int' lvalue '=' |-DeclRefExpr 0x55a6e1b07238 <col:3> 'int' lvalue Var 0x55a6e1b071b8 'i' 'int' `-IntegerLiteral 0x55a6e1b07258 <col:7> 'int' 5 void f() [B2 (ENTRY)] Succs (1): B1 [B1] 1: int i; 2: 5 3: i 4: [B1.3] = [B1.2] Preds (1): B2 Succs (1): B0 [B0 (EXIT)] Preds (1): B1 You can see that the arguments (rightfully so, they need to be evaluated first) precede the assignment operator. For this reason, Liveness implemented a pass to scan the CFG and note which variables appear in an assignment. BUT. This problem only exists if we traverse a CFGBlock in order. And Liveness in fact does it reverse order. So a distinct pass is indeed unnecessary, we can note the appearance of the assignment by the time we reach the variable. [1] http://lists.llvm.org/pipermail/cfe-dev/2020-July/066330.html Differential Revision: https://reviews.llvm.org/D87518 -
Jay Foad authored
Allow different GICustomOperandRenderers to use the same RendererFn. This avoids the need for targets to define a bunch of identical C++ renderer functions with different names. Without this fix TableGen would have emitted code that tried to define the GICR enumeration with duplicate enumerators. Differential Revision: https://reviews.llvm.org/D96587
-
Sam McCall authored
Differential Revision: https://reviews.llvm.org/D96507
-
Nicolas Vasilache authored
This revision takes advantage of the newly extended `ref` directive in assembly format to allow better region handling for LinalgOps. Specifically, FillOp and CopyOp now build their regions explicitly which allows retiring older behavior that relied on specific op knowledge in both lowering to loops and vectorization. Differential Revision: https://reviews.llvm.org/D96598
-
Haojian Wu authored
and simplify the code. Differential Revision: https://reviews.llvm.org/D96578
-
David Green authored
Our current lowering of VMOVNT goes via a shuffle vector of the form <0, N, 2, N+2, 4, N+4, ..>. That can of course also be a single input shuffle of the form <0, 0, 2, 2, 4, 4, ..>, where we use a VMOVNT to insert a vector into the top lanes of itself. This adds lowering of that case, re-using the existing isVMOVNMask. Differential Revision: https://reviews.llvm.org/D96065
-
Benjamin Kramer authored
-
Kerry McLaughlin authored
Changes `getScalarizationOverhead` to return an invalid cost for scalable VFs and adds some simple tests for loops containing a function for which there is a vectorized variant available. Reviewed By: david-arm Differential Revision: https://reviews.llvm.org/D96356
-
Sanjay Patel authored
The vector reduction intrinsics started life as experimental ops, so backend support was lacking. As part of promoting them to 1st-class intrinsics, however, codegen support was added/improved: D58015 D90247 So I think it is safe to now remove this complication from IR. Note that we still have an IR-level codegen expansion pass for these as discussed in D95690. Removing that is another step in simplifying the logic. Also note that x86 was already unconditionally forming reductions in IR, so there should be no difference for x86. I spot checked a couple of the tests here by running them through opt+llc and did not see any asm diffs. If we do find functional differences for other targets, it should be possible to (at least temporarily) restore the shuffle IR with the ExpandReductions IR pass. Differential Revision: https://reviews.llvm.org/D96552
-
Alex Zinenko authored
Until now, the GPU translation to NVVM or ROCDL intrinsics relied on the presence of the generic `gpu.kernel` attribute to attach additional LLVM IR metadata to the relevant functions. This would be problematic if each dialect were to handle the conversion of its own options, which is the intended direction for the translation infrastructure. Introduce `nvvm.kernel` and `rocdl.kernel` in addition to `gpu.kernel` and base translation on these new attributes instead. Reviewed By: herhut Differential Revision: https://reviews.llvm.org/D96591
-
Florian Hahn authored
The individual recipes have been updated to manage their operands using VPUser a while back. Now that the transition is done, we can instead make VPRecipeBase a VPUser and get rid of the toVPUser helper.
-
Abhina Sreeskantharajan authored
This is a continuation of https://reviews.llvm.org/D67696. The following places need to set the OF_Text flag correctly. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D96363
-
luxufan authored
Change parseVTypeI function to Make the added vset instruction test cases report more concrete error message. Differential Revision: https://reviews.llvm.org/D96218
-
David Sherwood authored
This patch changes the VecDesc struct to use ElementCount instead of an unsigned VF value, in preparation for future work that adds support for vectorized versions of math functions using scalable vectors. Since all I'm doing in this patch is switching the type I believe it's a non-functional change. I changed getWidestVF to now return both the widest fixed-width and scalable VF values, but currently the widest scalable value will be zero. Differential Revision: https://reviews.llvm.org/D96011
-
Vitaly Buka authored
-
Vitaly Buka authored
-
Max Kazantsev authored
-
Simon Pilgrim authored
Style fixup - the if() block always returns so we can pull out the contents of the else() block.
-
Stephan Herhut authored
This fixes some missing dependencies that broke the shared library build.
-
Sjoerd Meijer authored
Late follow-up of D74306 to document MachineOperand comments in MIRLangRef. Differential Revision: https://reviews.llvm.org/D96518
-
Florian Hahn authored
Some of the sign patterns can be optimized to or & asr, which requires fewer instructions.
-
Sven van Haastregt authored
Clean up trailing whitespace and a stray backtick.
-
Sven van Haastregt authored
Add a high level explanation of the `-fdeclare-opencl-builtins` option. Differential Revision: https://reviews.llvm.org/D96150
-
Stephan Herhut authored
This does not split transformations, yet. Those will be done as future clean ups. Differential Revision: https://reviews.llvm.org/D96272
-
Jon Chesterfield authored
[libomptarget][amdgcn] Build amdgcn devicertl as openmp Change cmake to build as openmp and fix up some minor errors in the code. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D96533
-
Maxim Kuvyrkov authored
Include x86 intrinsics only when compiling for x86_64 or i386. _MSC_VER no longer implies x86. Reviewed By: gchatelet Differential Revision: https://reviews.llvm.org/D96498
-
David Sherwood authored
Adds support for mangling TLI vector names for scalable vectors. Differential Revision: https://reviews.llvm.org/D96338
-
Alexander Belyaev authored
-
Fraser Cormack authored
This patch extends the initial fixed-length vector support to include smin, smax, umin, and umax. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D96491
-
Kristof Beyls authored
Before, the first mention of LLVM's license on the developer policy page stated that LLVM's license is Apache 2. This patch makes that more accurate by mentioning the LLVM exception this first time the LLVM license is discussed on that page, i.e. Apache-2.0 with LLVM-exception. Technically, the correct SPDX identifier for LLVM's license is 'Apache-2.0 WITH LLVM-exception', but I thought that writing the 'WITH' in lower case made the paragraph easier to read without reducing clarity. Differential Revision: https://reviews.llvm.org/D96482
-