- Oct 19, 2022
-
-
Malhar Jajoo authored
This patch is a partial fix for [[ https://github.com/llvm/llvm-project/issues/56349 | issue ]], due to functions affected by D117473. Implementation details: The patch essentially creates a new macro if the architecture is either intel32 or intel64, since the generate-def.pl cannot process boolean algebra on macros. Reviewed By: jlpeyton Differential Revision: https://reviews.llvm.org/D135795
-
Tomasz Kamiński authored
Previously, `LazyCompoundVal` bindings to subregions referred by `LazyCopoundVals`, were not marked as //lazily copied//. This change returns `LazyCompoundVals` from `getInterestingValues()`, so their regions can be marked as //lazily copied// in `RemoveDeadBindingsWorker::VisitBinding()`. Depends on D134947 Authored by: Tomasz Kamiński <tomasz.kamiński@sonarsource.com> Reviewed By: martong Differential Revision: https://reviews.llvm.org/D135136
-
Tomasz Kamiński authored
To illustrate our current understanding, let's start with the following program: https://godbolt.org/z/33f6vheh1 ```lang=c++ void clang_analyzer_printState(); struct C { int x; int y; int more_padding; }; struct D { C c; int z; }; C foo(D d, int new_x, int new_y) { d.c.x = new_x; // B1 assert(d.c.x < 13); // C1 C c = d.c; // L assert(d.c.y < 10); // C2 assert(d.z < 5); // C3 d.c.y = new_y; // B2 assert(d.c.y < 10); // C4 return c; // R } ``` In the code, we create a few bindings to subregions of root region `d` (`B1`, `B2`), a constrain on the values (`C1`, `C2`, ….), and create a `lazyCompoundVal` for the part of the region `d` at point `L`, which is returned at point `R`. Now, the question is which of these should remain live as long the return value of the `foo` call is live. In perfect a word we should preserve: # only the bindings of the subregions of `d.c`, which were created before the copy at `L`. In our example, this includes `B1`, and not `B2`. In other words, `new_x` should be live but `new_y` shouldn’t. # constraints on the values of `d.c`, that are reachable through `c`. This can be created both before the point of making the copy (`L`) or after. In our case, that would be `C1` and `C2`. But not `C3` (`d.z` value is not reachable through `c`) and `C4` (the original value of`d.c.y` was overridden at `B2` after the creation of `c`). The current code in the `RegionStore` covers the use case (1), by using the `getInterestingValues()` to extract bindings to parts of the referred region present in the store at the point of copy. This also partially covers point (2), in case when constraints are applied to a location that has binding at the point of the copy (in our case `d.c.x` in `C1` that has value `new_x`), but it fails to preserve the constraints that require creating a new symbol for location (`d.c.y` in `C2`). We introduce the concept of //lazily copied// locations (regions) to the `SymbolReaper`, i.e. for which a program can access the value stored at that location, but not its address. These locations are constructed as a set of regions referred to by `lazyCompoundVal`. A //readable// location (region) is a location that //live// or //lazily copied// . And symbols that refer to values in regions are alive if the region is //readable//. For simplicity, we follow the current approach to live regions and mark the base region as //lazily copied//, and consider any subregions as //readable//. This makes some symbols falsy live (`d.z` in our example) and keeps the corresponding constraints alive. The rename `Regions` to `LiveRegions` inside `RegionStore` is NFC change, that was done to make it clear, what is difference between regions stored in this two sets. Regression Test: https://reviews.llvm.org/D134941 Co-authored-by:
Balazs Benics <benicsbalazs@gmail.com> Reviewed By: martong, xazax.hun Differential Revision: https://reviews.llvm.org/D134947
-
Joseph Huber authored
Summary: Recent changes to clang-format improved the handling of OpenMP pragmas. Clean up the existing libomptarget tests.
-
Joe Nash authored
The amdgcn.ldexp.* intrinsics take an i32 value as src1. The V_LDEXP_F16 instruction considers src1 an f16 operand, and therefore src1 is implicitly truncated to 16 bits when lowering to that instruction from the intrinsic. This is unlikely to result in an error in practice because values that large are not useful. The operand class of src1 in the True16 version of the instruction has been corrected to encode correctly on GFX11. Reviewed By: foad, rampitec Differential Revision: https://reviews.llvm.org/D136195
-
dbakunevich authored
As part of the optimization in the unreachable code, we remove tokens, thereby replacing them with undef/poison in intrinsics. But the verifier falls on the assertion, within of what it sees token poison in unreachable code, which in turn is incorrect. bug: 57871, https://github.com/llvm/llvm-project/issues/57871 Differential Revision: https://reviews.llvm.org/D134427
-
David Spickett authored
875fd9df added a new dialect with some generated files. When flang is built out of tree (build llvm/clang/mlir first, then build flang pointing at the first build) those files were not created at all. I don't 100% understand why not but juding by the comment at the top of the file, add_mlir_interface probably expects to run in an MLIR directory, as add_mlir_dialect does. So in the same way, I've just inlined enough of that function to fix the out of tree build. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D136250
-
LLVM GN Syncbot authored
-
Yitzhak Mandelbaum authored
Defines an equivalence relation on the `Value` type to standardize several places in the code where we replicate the ~same equivalence comparison. Differential Revision: https://reviews.llvm.org/D135964
-
Florian Hahn authored
@Ayal suggested a better named helper than using `!getDef()` to check if a value is invariant across all parts. The property we are using here is that the VPValue is defined outside any vector loop region. There's a TODO left to handle recipes defined in pre-header blocks. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D133666
-
Sam McCall authored
This behavior was once deliberate, but i've yet to find someone who likes it. The reference behavior is unchanged: the `foo` within ~foo is still considered a reference to the type. This means rename etc still works. fixes https://github.com/clangd/clangd/issues/179 Differential Revision: https://reviews.llvm.org/D136212
-
Simon Pilgrim authored
Revert rG42230efc "[DAG] Fold (sra (or (shl x, c1), (shl y, c2)), c1) -> (sext_inreg (or x, (shl y,c2-c1)) iff c2 >= c1" @foad was right - this isn't actually going to help with D136042 as much as hoped, we need a better AMDGPU-specific solution as other targets are likely to make use of it
-
Alexey Bader authored
There is a contradiction in the #pragma unroll behavior documentation. It says that specifying `#pragma unroll` without a parameter directs the loop unroller to attempt to partially unroll the loop if the trip count is not known at compile time. At the same time later it states that `#pragma unroll` has identical semantics to `#pragma clang loop unroll(full)`, which doesn't attempt to unroll partially if the trip count is not known at compile time. pragma clang loop unroll(enable): If unroll(enable) is specified the unroller will attempt to fully unroll the loop if the trip count is known at compile time. If the fully unrolled code size is greater than an internal limit the loop will be partially unrolled up to this limit. If the trip count is not known at compile time the loop will be partially unrolled with a heuristically chosen unroll factor. pragma clang loop unroll(full): If unroll(full) is specified the unroller will attempt to fully unroll the loop if the trip count is known at compile time identically to unroll(enable). However, with unroll(full) the loop will not be unrolled if the loop count is not known at compile time. Differential Revision: https://reviews.llvm.org/D136160
-
Oleg Shyshkov authored
RFC: https://discourse.llvm.org/t/rfc-primitive-ops-add-mapop-reductionop-transposeop-broadcastop-to-linalg/64184 Differential Revision: https://reviews.llvm.org/D135854
-
Florian Hahn authored
This patch removes the bail out for signed predicates and non-positive strides in howManyLessThans and updates computeMaxBECountForLT to return SCEVCouldNotCompute for signed predicates with negative strides. AFAICT bail-out was only added because computeMaxBECountForLT may not handle negative signed strides correctly. Instead of not calling computeMaxBECountForLT at all because we bail out earlier, we can instead return SCEVCouldNotCompute in computeMaxBECountForLT. The max backedge taken count will be computed as the max value of the symbolic backedge taken count. This improves precision in cases where we can compute symbolic backedge taken counts and also fixes a crash. Fixes #57818. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D135667
-
bipmis authored
This patch extends the load merge/widen in AggressiveInstCombine() to handle reverse load patterns. Differential Revision: https://reviews.llvm.org/D135137
-
Serge Pavlov authored
Class ExpansionContext encapsulates options for search and expansion of response files, including configuration files. With this change the directories which are searched for configuration files are also stored in ExpansionContext. Differential Revision: https://reviews.llvm.org/D135439
-
Simon Pilgrim authored
[DAG] Fold (sra (or (shl x, c1), (shl y, c2)), c1) -> (sext_inreg (or x, (shl y,c2-c1)) iff c2 >= c1 Helps with some of the AMDGPU regressions identified in D136042 where we were losing signed BFE patterns after sinking shifts behind logic ops. Differential Revision: https://reviews.llvm.org/D136081
-
Jay Foad authored
getDefIgnoringCopies and getSrcRegIgnoringCopies should not fail on valid MIR, so don't bother to check for failure. Differential Revision: https://reviews.llvm.org/D136238
-
Tobias Gysi authored
The revision performs a topological sort of the blocks to ensure the operations are processed in dominance order. After the change, we do not need to introduce dummy instructions if an operand has not yet been processed. Additionally, the revision also moves and simplifies the control-flow related tests to a separate test file. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D136230
-
Caroline Concatto authored
The names in developer.arm for these SME features are: HaveSMEI16I64 and HaveSMEF64F64 so the new flag names are consistent with the documentation page Reviewed By: sdesmalen, c-rhodes Differential Revision: https://reviews.llvm.org/D135974
-
Jay Foad authored
-
Juan Manuel MARTINEZ CAAMAÑO authored
Reviewed By: jpages, arsenm Differential Revision: https://reviews.llvm.org/D134641
-
Nikolas Klauser authored
We've said that we'll remove `std::function` from C++03 in LLVM 16, so we might as well do it now before we forget. Reviewed By: ldionne, #libc, Mordante Spies: jloser, Mordante, libcxx-commits Differential Revision: https://reviews.llvm.org/D135868
-
Jean Perier authored
Add fir.declare operation whose purpose was described in https://reviews.llvm.org/D134285. It uses the FortranVariableInterfaceOp for most of its logic (including the verifier). The rational is that all these aspects/logic will be shared by hlfir.designate and hlfir.associate. Its codegen and lowering will be added in later patches. Differential Revision: https://reviews.llvm.org/D136181
-
Nikita Popov authored
Follow up on D135962, renaming the method name to match the new type name.
-
Nikita Popov authored
Followup to D135962 to rename remaining uses of FunctionModRefBehavior to MemoryEffects. Does not touch API names yet, but also updates variables names FMRB/MRB to ME, to match the new type name.
-
Nikita Popov authored
As part of https://discourse.llvm.org/t/rfc-unify-memory-effect-attributes/65579, the FunctionModRefBehavior class sees a good bit of additional use, and I've found the name to be something of a mouthful. This patch renames it to MemoryEffects, which has a couple of advantages over the old name: * It is more concise. * It decouples it from modelling only functions. * It matches the terminology of the aforementioned RFC. * The meaning should be more obvious to people not familiar with our particular AA lingo. This patch just updates the class definition. Other uses of the name will be updated separately. Differential Revision: https://reviews.llvm.org/D135962
-
luxufan authored
For RISC-V, load/store(exclude vector load/store) instructions only has a 12 bit immediate operand. If the offset is out-of-range, it must make use of a temp register to make up this offset. If between these offsets, they have a small(IsInt<12>) relative offset, LocalStackSlotAllocation pass can find a value as frame base register's value, and replace the origin offset with this register's value plus the relative offset. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D98101
-
Valentin Clement authored
-
Walter Erquinigo authored
- We weren't truncating the output files - We weren't considering the case in which we couldn't disassembly an instruction.
-
Valentin Clement authored
fir.dispatch code generation uses the binding table stored in the type descriptor. There is no runtime call involved. The binding table is always build from the parent type so the index of a specific binding is the same in the parent derived-type or in the extended type. Follow-up patches will deal cases not present here such as allocatable polymorphic entities or pointers. Reviewed By: jeanPerier, PeteSteinfeld Differential Revision: https://reviews.llvm.org/D136189
-
Kai Luo authored
Fixed ppc buildbot https://lab.llvm.org/buildbot/#/builders/121/builds/24273 which is using `-DBUILD_SHARED_LIBS=ON`. Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D136229
-
Jean Perier authored
HLFIR will rely on certain operations to create SSA memory values that correspond to a Fortran variable. They will hold bounds and type parameters information as well as metadata (like Fortran attributes). This patch adds an interface that for such operations so that Fortran variable can be stored, manipulated, and queried regardless of what created them. This is so far intended for fir.declare, hlfir.designate and hlfir.associate operations. It is added to FIR and not HLFIR because fir.declare needs it and it does not itself needs any HLFIR concepts. Unit tests for the interface methods will be added alongside fir.declare in the next patch. Differential Revision: https://reviews.llvm.org/D136151
-
Lei Zhang authored
Vectors with just one element will be converted into scalars. However, we cannot just return the element types and assume it is supported in the target environment; we need to conver the element type again factoring in those considerations. Reviewed By: kuhar Differential Revision: https://reviews.llvm.org/D136226
-
Freddy Ye authored
For more details about these instructions, please refer to the latest ISE document: https://www.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D135935
-
Craig Topper authored
If Mask[0] is 0, then we're never going to match a slidedown. If we get through the for loop, then it's an identity mask which should have already been optimized out. Otherwise it's some non-contiguous mask that will fail out of the lop. Might as well not bother entering the loop.
-
Maksim Panchenko authored
Move EFMM initialization code to emitAndLink(), where EFMM is used. Reviewed By: yavtuk Differential Revision: https://reviews.llvm.org/D136205
-
Freddy Ye authored
For more details about these instructions, please refer to the latest ISE document: https://www.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html Reviewed By: skan, RKSimon Differential Revision: https://reviews.llvm.org/D135934
-
chenglin.bi authored
For now, we have not parse section flag `Info` in asm file. When we emit a section with info flag to asm, then compile asm to obj we will lose the Info flag for the section. The motivation of this change is ARM64EC's hybmp$x section. If we lose the Info flag MSVC link will report a warning: `warning LNK4078: multiple '.hybmp' sections found with different attributes` Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D136125
-