- Jan 03, 2024
-
-
Peter Klausler authored
Nearly every Fortran compiler supports the extension of NAMELIST input into a storage sequence identified by its initial scalar array element. For example, &GROUP A(1) = 1. 2. 3. / should be processed as if the input had been &GROUP A(1:) = 1. 2. 3. / Fixes llvm-test-suite/Fortran/gfortran/regression/namelist_24.f90.
-
SunilKuravinakop authored
This is a continuation of https://reviews.llvm.org/D123235 ([OpenMP] atomic compare fail : Parser & AST support). In this branch Support for codegen support for atomic compare fail is being added. --------- Co-authored-by: Sunil Kuravinakop
-
Peter Klausler authored
The prescanner allows multiple spaces within a compiler directive, but not between the directive's sentinel (e.g., !DIR$) and the directive's first token. Fixes https://github.com/llvm/llvm-project/issues/76537.
-
Peter Klausler authored
The compiler requires that a Cray pointee have a SEQUENCE type, but a recent bug report points out that a BIND(C) type should also be accepted. Fixes https://github.com/llvm/llvm-project/issues/76529.
-
Peter Klausler authored
When parsing a deeply-nested expression like A1(A2(A3(A4(A5(A6(...A99(i)...)))))) the parser can get into an exponential state due to the need to consider the possibility that each "An(...)" might be the beginning of a reference to a procedure component ("An(...)%PROC(...)") so that alternative has to be attempted first before proceeding to try parsing "An(...)" as a function reference or as an array element designator. The parser for a structure component, which is used by the procedure designator parser, was not protected with the usual failure memoization technique, leading to exponentially bad behavior parsing a deeply-nested expression. Fix by exploiting the instrumented() parser combinator so that failed structure component parsers aren't repeated. Fixes https://github.com/llvm/llvm-project/issues/76477. -
Peter Klausler authored
... when it is followed eventually by the '&' that begins the next NAMELIST input group. This is a gfortran extension.
-
Peter Klausler authored
Initializers in entity-decls don't need to have their expressions analyzed immediately in name resolution unless of course they are defining the values of named constants. By deferring the expression analysis, the compiler can better handle references to module and internal procedures that might appear in structure constructors; at present, these are typically rejected as being forward references (which they can be) to subprogram names that can't yet be checked for compatibility with the characteristics of the corresponding procedure component.
-
Alex Bradbury authored
Split out from #73789, so as to leave that PR just for flipping load clustering to on by default. Clusters if the operations are within a cache line of each other (as AMDGPU does in shouldScheduleLoadsNear). X86 does something similar, but does `((Offset2 - Offset1) / 8 > 64)`. I'm not sure if that's intentionally set to 512 bytes or if the division is in error. Adopts the suggestion from @wangpc-pp to query the cache line size and use it if available. We also cap the maximum cluster size to cap the potential register pressure impact (which may lead to additional spills).
-
Thorsten Schütt authored
A first small step at combining selects.
-
Jungwook Park authored
Enable bindings. --------- Co-authored-by:jungpark-mlir <jungwook@jungwook-22.04>
-
Joseph Huber authored
Summary: The `puts` function consists of an initial write and then another write to append the newline. When executing code in parallel, it is possible for these writes to becomes disjointed. This code adds an explicit lock call to ensure that the string is always appended by the newline as the users expects. Wasn't sure if this required a test as it would be difficult since reproducing it would be flaky.
-
- Jan 02, 2024
-
-
Nikita Popov authored
-
Simon Camphausen authored
-
Nikita Popov authored
Add a common place for icmp folds that should be tried with both operand orders, so we don't have to repeat this pattern for individual folds.
-
Ilya Biryukov authored
With updates the libc++ tests. This reverts commit 2205d233 and relands 86dc6e15 and 7ab16fb5. Original commit was reverted because of failing libc++ tests, see #76232 for the discussion. The errors in the tests are spurious in the first place (coming from initialization of invalid classes), so update the tests to match new behavior that does not show those errors.
-
Alex Bradbury authored
The helper function allows examples like `cast<ConstantSDNode>(Op.getOperand(0))->getAPIntValue();` to be changed to `Op.getConstantOperandAPInt(0);`. See #76708 for further context. Although there are far fewer opportunities for replacement, I used a similar git grep and sed combo as before, given I already had it to hand: `git grep -l "cast<ConstantSDNode>\(.*->getOperand\(.*\)\)->getAPIntValue\(\)" | xargs sed -E -i 's/cast<ConstantSDNode>\((.*)->getOperand\((.*)\)\)->getAPIntValue\(\)/\1->getConstantOperandAPInt(\2)/'` and `git grep -l "cast<ConstantSDNode>\(.*\.getOperand\(.*\)\)->getAPIntValue\(\)" | xargs sed -E -i 's/cast<ConstantSDNode>\((.*)\.getOperand\((.*)\)\)->getAPIntValue\(\)/\1.getConstantOperandAPInt(\2)/'`
-
Pierre van Houtryve authored
Fixes #76031
-
Piyou Chen authored
This patch update some missing overlapping constraints flag in following pseudo: - VPseudoUnaryMaskRoundingMode - VPseudoTiedBinaryCarryIn - VPseudoTiedBinaryV_VM - VPseudoTiedBinaryV_XM - PseudoVEXT_VF2|4|8 - VPseudoConversionRoundingMode - VPseudoUnaryNoMask_FRM - VPseudoUnaryMask_FRM - VPseudoConversionRM - VPseudoVNCVTI_RM_W
-
Alex Bradbury authored
Tests are in preparation for adding handling of the load of a constant value as Mips does (noted in <https://github.com/llvm/llvm-project/pull/72356#discussion_r1395203532>). I've opted to implement these tests as a C++ unit test as on balance I _think_ it's easier to follow and maintain than .mir tests trying to indirectly test this function. That said, you see the limitations with the test of describeLoadedValue on a memory operation where we'd rather pass `MachinePointerInfo::getFixedStack` but can't because we'd need to then ensure the necessary stack metadata for the function is present.
-
Enna1 authored
The index constraints for the collected getelementptr instructions should be single **and** non-constant.
-
Tobias Gysi authored
This revision adds support for importing call site calling conventions. Additionally, the revision also adds a roundtrip test for an indirect call with a non-standard calling convention.
-
Jay Foad authored
Co-authored-by:Konstantin Zhuravlyov <kzhuravl@amd.com>
-
Timm Bäder authored
-
Alex Bradbury authored
This helper function shortens examples like `cast<ConstantSDNode>(Node->getOperand(1))->getZExtValue();` to `Node->getConstantOperandVal(1);`. Implemented with: `git grep -l "cast<ConstantSDNode>\(.*->getOperand\(.*\)\)->getZExtValue\(\)" | xargs sed -E -i 's/cast<ConstantSDNode>\((.*)->getOperand\((.*)\)\)->getZExtValue\(\)/\1->getConstantOperandVal(\2)/` and `git grep -l "cast<ConstantSDNode>\(.*\.getOperand\(.*\)\)->getZExtValue\(\)" | xargs sed -E -i 's/cast<ConstantSDNode>\((.*)\.getOperand\((.*)\)\)->getZExtValue\(\)/\1.getConstantOperandVal(\2)/'`. With a couple of simple manual fixes needed. Result then processed by `git clang-format`.
-
Jay Foad authored
-
Simon Pilgrim authored
Drop atom/slm costs from the default bswap costs, and update the avx1 latency costs based off latest codegen. Based off analysis report from https://github.com/RKSimon/llvm-scripts/check_cost_tables.py Fixes #62659
-
Matt Arsenault authored
Assorted intrinsics are currently using i16 in place of a proper bfloat type, but they should really switch to bfloat. Note this only changes the type lists in tablegen, these are still not registered to be truly treated as a legal type yet. Depends #76213 -
Simon Pilgrim authored
Test coverage for #62659 - we need to split SLM costs from other SSSE3 targets
-
David Green authored
This makes an adjustment to the existing fir minloc/maxloc generation code to handle functions with a dim=1 that produce a scalar result. This should allow us to get the same benefits as the existing generated minmax reductions. This is a recommit of #75820 with the typename added to the generated function.
-
OCHyams authored
The disabled line should be checking FastISel but was incorrectly checking SelectionDAG due to a copy-paste error in #73496.
-
Nikita Popov authored
Same as the change in d5db2cdb, but for condition handling. The same issue could occur here as well.
-
Nikita Popov authored
If one of the binop operands depends on the other, this may end up evaluating them in the wrong order, producing sub-optimal results. Make sure that only one unevaluated operand gets pushed per iteration. Fixes https://github.com/llvm/llvm-project/issues/76705.
-
Nikita Popov authored
-
Adrian Kuegel authored
- Use '\n' instead of std::endl; https://clang.llvm.org/extra/clang-tidy/checks/performance/avoid-endl.html
-
Nikita Popov authored
Currently, LVI will only use conditions like "X < C" to constrain the value of X on the relevant edge. This patch extends it to handle conditions like "X < Y" by querying the known range of Y. This means that getValueFromCondition() and various related APIs can now return nullopt to indicate that they have pushed to the worklist, and need to be called again later. This behavior is currently controlled by a UseBlockValue option, and only enabled for actual edge value handling. All other places deriving constraints from conditions keep using the previous logic for now. This change was originally motivated as a fix for the regression reported in https://github.com/llvm/llvm-project/pull/73662#issuecomment-1849281758. Unfortunately, it doesn't actually fix it, because we run into another issue there (LVI currently is really bad at handling values used in loops). This change has some compile-time impact, but it's fairly small, in the 0.05% range.
-
Sander de Smalen authored
This includes: * __arm_in_streaming_mode() * __arm_has_sme() * __arm_za_disable() * __svundef_za()
-
David Green authored
This is a fix for the second half of #75822, where smaller constants can also be bitcast to larger types. We should be checking the size is what we expect it to be when matching ones.
-
Adrian Kuegel authored
Prefer to use .empty() instead of checking size().
-
Adrian Kuegel authored
- Remove redundant return - Use .empty() instead of size() == 0.
-
Kareem Ergawy authored
Adds a new test for offloading `target update` directive to AMD GPUs.
-