- Aug 24, 2023
-
-
Slava Zakharin authored
Related to https://github.com/llvm/llvm-project/issues/64866. This patch effectively disables CSE for identical hlfir.elemental operations, because it causes hlfir.destroy to be applied twice to the same temporary. Moreover, I think MemAlloc is correct for hlfir.elemental, in general. Reviewed By: tblah Differential Revision: https://reviews.llvm.org/D158565
-
Slava Zakharin authored
This effectively reverts D154715. The issue appears as the dialect conversion error because we try to erase an op that has already been erased. See the added LIT test case with HLFIR that may appear as a result of CSE. The `adaptor.getSource()` is an operation producing a tuple, which does not have users, so `allOtherUsesAreSafeForAssociate` just looks at the empty list of users. So we get completely wrong answers from it. This causes problems with the following `eraseAllUsesInDestroys` that tries to remove the `DestroyOp` twice during both `hflir.associate` processing. But we also cannot use `associate.getSource()` *efficiently*, because the original users may still hang around: one example is the original body of hlfir.elemental (see D154715), another example is other already converted AssociateOp's that are pending removal in the rewriter (that is why we have a temporary created for each hlfir.associate in the newly added LIT case). This patch just fixes the correctness issue. I think we have to separate the buffer reuse analysis from the conversion itself. I also tried to address the issues with the cloned bodies of `hlfir.elemental`, but this should not matter since D155778: if `hlfir.associate` is inside `hlfir.elemental`, it will end up inside a do-loop body region, so the early exit added in D155778 will prevent the buffer reuse. Reviewed By: tblah Differential Revision: https://reviews.llvm.org/D158471
-
Luke Lau authored
At some point a merge operand was added to the binary vl ops, so this combine was using the mask for the VL. This causes a crash when trying to select the vmv_v_x_vl, which showed up locally when messing about with selectVSplat, but thankfully in ToT the vmv_v_x_vl gets pattern matched away into the .vx and .vi operands every time, so there's no noticeable change. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D158634
-
Hao Jin authored
The option fuse-ld is not visible in Flang. Flang reports "Unknown argument: '-fuse-ld'" during link stage. Reviewed By: awarzynski, kiranchandramohan Differential Revision: https://reviews.llvm.org/D158430
-
Valentin Clement authored
Introduce the acc.set operation that models the acc set directive. Based on acc.init and acc.shutdown Reviewed By: razvanlupusoru Differential Revision: https://reviews.llvm.org/D158554
-
Mark de Wever authored
This is a nicer way to suppress the diagnostic instead of using the pre-processor work-around. Reviewed By: ChuanqiXu Differential Revision: https://reviews.llvm.org/D158523
-
Felipe de Azevedo Piovezan authored
With D149881, we converted EntryValue MachineFunction table entries into `DbgVariables` initialized by a "DbgValue" intrinsic, which can only handle a single, non-fragment DIExpression. However, it is desirable to handle variables with multiple fragments and DIExpressions. To do this, we expand the `DbgVariable` class to handle the EntryValue case. This class can already operate under three different "modes" (stack slot, unchanging location described by a dbg value, changing location described by a loc list). A fourth case is added as a separate class entirely, but a subsequent patch should redesign `DbgVariable` with four subclasses in order to make the code more readable. This patch also exposed a bug in the `beginEntryValueExpression` function, which was not initializing the `LocationFlags` properly. Note how the `finalizeEntryValue` function resets that flag. We fix this bug here, as testing this changing in isolation would be tricky. Differential Revision: https://reviews.llvm.org/D158458
-
Felipe de Azevedo Piovezan authored
When we convert an EntryValue dbg.declare into an entry of the MF side table, we currently copy its DIExpression as is, and rely on subsequent layers to "know" that this expression is implicitly indirect. This is bad because it adds an implicit assumption to the IR representation, and requires subsequent layers to know about this assumption. This also limits the reusability of this table: what if, in the future, we want to use this table for dbg.values? This patch changes existing behavior so that the entities converting dbg_declares explicitly add an OP_deref when converting EntryValue dbg.declares. Differential Revision: https://reviews.llvm.org/D158437
-
Kazu Hirata authored
-
Kazu Hirata authored
This patch fixes: flang/lib/Semantics/resolve-directives.cpp:899:29: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]
-
- Aug 23, 2023
-
-
Fangrui Song authored
Similar to D81116 (AArch64): separate the GISel components for organization purposes and match other targets ({AArch64,M68k,PowerPC,RISCV,X86}/GISel). Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D158489 -
Valentin Clement authored
This patch propagates the acc routine information to the module file so they can be used by the caller. Reviewed By: razvanlupusoru Differential Revision: https://reviews.llvm.org/D158541
-
Adrian Kuegel authored
Prefer to use .empty() instead of checking size().
-
Matthias Springer authored
Elementwise arith.select are currently not supported. Emit an error message instead of crashing. This fixes #61707. Differential Revision: https://reviews.llvm.org/D158617
-
LLVM GN Syncbot authored
-
Manna, Soumi authored
This reverts commit 9e150ada.
-
Adrian Kuegel authored
Prefer to use .empty() instead of checking size().
-
Victor Kingi authored
This commit addresses the comment at https://reviews.llvm.org/D158174#inline-1534036 which suggested adding a check for un-inlined remarks printed. Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D158599
-
Manna, Soumi authored
Static Analyzer Tool complains about a large function call parameter which is is passed by value in CGBuiltin.cpp file. 1. In CodeGenFunction::EmitSMELdrStr(clang::SVETypeFlags, llvm::SmallVectorImpl<llvm::Value *> &, unsigned int): We are passing parameter TypeFlags of type clang::SVETypeFlags by value. 2. In CodeGenFunction::EmitSMEZero(clang::SVETypeFlags, llvm::SmallVectorImpl<llvm::Value *> &, unsigned int): We are passing parameter TypeFlags of type clang::SVETypeFlags by value. 3. In CodeGenFunction::EmitSMEReadWrite(clang::SVETypeFlags, llvm::SmallVectorImpl<llvm::Value *> &, unsigned int): We are passing parameter TypeFlags of type clang::SVETypeFlags by value. 4. In CodeGenFunction::EmitSMELd1St1(clang::SVETypeFlags, llvm::SmallVectorImpl<llvm::Value *> &, unsigned int): We are passing parameter TypeFlags of type clang::SVETypeFlags by value. I see many places in CGBuiltin.cpp file, we are passing parameter TypeFlags of type clang::SVETypeFlags by reference. clang::SVETypeFlags inherits several other types. This patch passes parameter TypeFlags by reference instead of by value in the function. Reviewed By: tahonermann, sdesmalen Differential Revision: https://reviews.llvm.org/D158522
-
Daniil Dudkin authored
This patch introduces new operations: `irdl.region` and `irdl.regions`. The former lets us to specify characteristics of a region, such as the arguments for the entry block and the number of blocks. The latter accepts all results of the former operations to define the set of the regions for the operation. Example: ``` irdl.dialect @example { irdl.operation @op_with_regions { %r0 = irdl.region %r1 = irdl.region() %v0 = irdl.is i32 %v1 = irdl.is i64 %r2 = irdl.region(%v0, %v1) %r3 = irdl.region with size 3 irdl.regions(%r0, %r1, %r2, %r3) } } ``` The above snippet demonstrates an operation named `@op_with_regions`, which is constrained to have four regions. * Region `%r0` doesn't have any constraints on the arguments or the number of blocks. * Region `%r1` should have an empty set of arguments. * Region `%r2` should have two arguments of types `i32` and `i64`. * Region `%r3` should contain exactly three blocks. In the future the block count constraint may be expanded to support range of possible number of blocks. Reviewed By: math-fehr, Mogball Differential Revision: https://reviews.llvm.org/D155112 -
Tom Stellard authored
Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D158569
-
Vassil Vassilev authored
This reverts commit 3edd338a due to missing graphviz https://lab.llvm.org/buildbot/#/builders/92/builds/49520
-
Vassil Vassilev authored
This reverts commit eb0e6c31 due to failures in clangd such as https://lab.llvm.org/buildbot/#/builders/57/builds/29377
-
Manna, Soumi authored
Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D158227
-
Med Ismail Bennani authored
This should fix the Sanitizer Green Dragon LLDB Bot: https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-sanitized/4633 Signed-off-by:
Med Ismail Bennani <ismail@bennani.ma>
-
Krishna-13-cyber authored
This patch adds documentation for execution results handling in Clang-REPL with the below features: * Automatic Printf feature * Value Synthesis feature * Pretty Printing feature I am issuing this patch on behalf of @QuillPusher Differential revision: https://reviews.llvm.org/D156858
-
LLVM GN Syncbot authored
-
Fred Fu authored
This patch enabled code completion for ClangREPL. The feature was built upon three existing Clang components: a list completer for LineEditor, a CompletionConsumer from SemaCodeCompletion, and the ASTUnit::codeComplete method. The first component serves as the main entry point of handling interactive inputs. Because a completion point for a compiler instance has to be unchanged once it is set, an incremental compiler instance is created for each code completion. Such a compiler instance carries over AST context source from the main interpreter compiler in order to obtain declarations or bindings from previous input in the same REPL session. The most important API codeComplete in Interpreter/CodeCompletion is a thin wrapper that calls with ASTUnit::codeComplete with necessary arguments, such as a code completion point and a ReplCompletionConsumer, which communicates completion results from SemaCodeCompletion back to the list completer for the REPL. In addition, PCC_TopLevelOrExpression and CCC_TopLevelOrExpression` top levels were added so that SemaCodeCompletion can treat top level statements like expression statements at the REPL. For example, clang-repl> int foo = 42; clang-repl> f<tab> From a parser's persective, the cursor is at a top level. If we used code completion without any changes, PCC_Namespace would be supplied to Sema::CodeCompleteOrdinaryName, and thus the completion results would not include foo. Currently, the way we use PCC_TopLevelOrExpression and CCC_TopLevelOrExpression is no different from the way we use PCC_Statement and CCC_Statement respectively. Differential revision: https://reviews.llvm.org/D154382
-
Neumann Hon authored
The function emitFunctionEntryLabel does not look at whether or not a function is a leaf when setting the entry flags, and instead blindly marks all functions as non-leaf routines. Differential Revision: https://reviews.llvm.org/D157701 Reviewed By: uweigand
-
Samuel Tebbs authored
This patch adds a scheduling model for the Arm Cortex-M85 CPU and is based on the Software Optimisation Guide made available at https://developer.arm.com/documentation/107950/0100. The model was written by David Penry. Differential Revision: https://reviews.llvm.org/D158498
-
Tuan Chuong Goh authored
Select ushll2 instruction instead of using mov and ushll Differential Revision: https://reviews.llvm.org/D158420
-
Bjorn Pettersson authored
-
Bjorn Pettersson authored
This patch simply replace assert(X || Y && "...") by assert((X || Y) && "...") to silence -Wparentheses warnings.
-
Bjorn Pettersson authored
Avoiding warnings like this when building with GCC: warning: enumeral mismatch in conditional expression: 'llvm::AMDGPUISD::NodeType' vs 'llvm::ISD::NodeType' [-Wenum-compare]
-
Bjorn Pettersson authored
-
Nikita Popov authored
-
wangpc authored
This assertion is introduced by D157425. We should calculate the cost iff `Mask` is not empty. Fixes 64901 Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D158590
-
Kiran Chandramohan authored
Commonblock names are not variables, but they can be marked as threadprivate in OpenMP. This requires the commonblock name to be bound to the address of the Commonblock. hlfir.declares are not required for these, but we should be able to retrieve the mlir Value corresponding to the Commonblock. This patch enables this by special casing the Commonblocks like procedures. Reviewed By: tblah, vzakhari Differential Revision: https://reviews.llvm.org/D158070
-
Nikita Popov authored
-
David Green authored
The LastChange can be MBB->end(), so it is not valid to dereference it for printing. Fix the DEBUG statement to check for end() and handle it specially.
-