- Oct 21, 2022
-
-
Jean Perier authored
This patch adds the basic dialect definition of the HLFIR dialect that was described in https://reviews.llvm.org/D134285. It adds the definition of the hlfir.expr type and related tests so that it can be verified that the dialect is properly hooked up by the tools. Operations will be added as progress is made in the expression lowering update. Differential Revision: https://reviews.llvm.org/D136328
-
Aaron Jacobs authored
Replace the two-level implementation with a simpler one that directly subclasses the predicates, avoiding the instantiation of the template to get the `type` member in a situation where we should short-circuit. This prevents incorrect diagnostics when the instantiated predicate contains a static assertion. Add a test case that reproduced the previous problem. The existing test case involving `HasNoValue` didn't catch the problem because `HasNoValue` was in the final position. The bug comes up when the predicate that shouldn't be instantiated is after the short-circuit position but there is more to follow, because then `__conjunction_impl<False, BadPredicate, ...>` instantiates `__conjunction_impl<BadPredicate, ...>` (in order to obtain its `type` member), which in turn instantiates `BadPredicate` in order to obtain its `value` member. In contrast the new implementation doesn't recurse in instantiation any further than it needs to, because i...
-
Anton Sidorenko authored
Enable Machine Combiner for O1/O2/O3 optimization levels. It makes RISCV consistent with other targets running Machine Combiner. Originally it was enabled only for -O3, however I looked through time reports and usually it takes 0.1%-0.4% of total time, and never takes more than 1.0%. Differential Revision: https://reviews.llvm.org/D136339
-
Nikita Popov authored
This makes sure that this code continue working when switching to the memory attribute. A caveat here is that onlyReadsMemory() will also true for readnone. To be conservative, I'm explicitly excluding that case here.
-
Florian Hahn authored
Additional SCEV verification highlighted a case where the cached loop dispositions where incorrect after simplifying a condition in IndVars and moving the user in LoopDeletion. Fix it by invalidating ICmp and all its users. Fixes #58515.
-
Nikita Popov authored
This implements IR and bitcode support for the memory attribute, as specified in https://reviews.llvm.org/D135597. The new attribute is not used for anything yet (and as such, the old memory attributes are unaffected). Differential Revision: https://reviews.llvm.org/D135592
-
Nikita Popov authored
This adds the LangRef wording for the memory attribute proposed at https://discourse.llvm.org/t/rfc-unify-memory-effect-attributes/65579. The old attributes are not removed from LangRef until the migration is finished. Differential Revision: https://reviews.llvm.org/D135597
-
Paulo Matos authored
-
Nikita Popov authored
UpgradeIntrinsicFunction() is supposed to handle this already.
-
Simon Pilgrim authored
Extends existing anyextend fold to make use of the implicit zero-extension of the movd instruction This also helps replace some nasty xmm->gpr->xmm traffic with a shuffle pattern instead Noticed while looking at D130953
-
wanglei authored
This patch adds support for stack realignment while adding support for variable sized objects. Differential Revision: https://reviews.llvm.org/D136074
-
Simon Pilgrim authored
-
David Green authored
This was previously using the 32bit variant of the instruction, instead of the 16bit as intended. Fixes #58512 Differential Revision: https://reviews.llvm.org/D136422
-
Diana Picus authored
The single precision `hypot` intrinsic is lowered to a call to the libm `hypotf` function. However, the MSVC runtime lacks a hypotf function and instead uses `_hypotf` (*). This patch tries to find and rewrite calls to `hypotf` if we're on a MSVC platform. Calls to libm functions can be introduced even after lowering (**). Therefore, we try to do the rewriting at the very end of FIR to LLVM lowering. Fixes https://github.com/llvm/llvm-project/issues/57563 (*) More specifically, MSVC's headers define hypotf as an inline function that just calls _hypotf. This works fine for clang, since it will include those headers, but flang only links with the CRT so we don't get a free ride. (**) https://github.com/llvm/llvm-project/blob/56f94ede2af9a327e59fe84dbf8cbbb7bb1dfa79/flang/lib/Optimizer/CodeGen/CodeGen.cpp#L3391 Differential Revision: https://reviews.llvm.org/D135853
-
Nikita Popov authored
This was remangling the old function rather than the new one, and could result in failures when we were performing both a struct return upgrade and an opaque pointer upgrade.
-
Luo, Yuanke authored
In D121898 we restrict parameter alignment size in IR since DAGISel only have 4 bits to hold the alignment value. However intrinsics won't be lowered to call instruction, so we can remove the constrain for intrinsics. Differential Revision: https://reviews.llvm.org/D136330
-
wanglei authored
Modify the ParserMethod of `simm26_b` operand type to `parseImmediate`. Before that, for the `simm26_b` operand type, the same ParserMethod was used as `simm26_bl`. When using the internal assembler to process the blockaddress with `asm` instruction, the wrong blockaddress symbol would be generated due to the call to the `getOrCreateSymbol()` interface. Differential Revision: https://reviews.llvm.org/D136073
-
Nikita Popov authored
UpgradeCallsToIntrinsic() is already intended to perform remangling in case no other upgrades are necessary. The additional remangleIntrinsicFunction() calls are not needed and can hide bugs in the UpgradeCallsToIntrinsic() implementation.
-
Nikita Popov authored
The shortest intrinsics that can be upgraded via remangling have 8 characters (like "llvm.abs"). Make sure these go through the upgrade code. I think that currently this change is not observable from in-tree callers of UpgradeIntrinsicFunction(), because callers do redundant remangling checks. However, this issue shows up in existing tests if those checks are removed (which I will do in followup changes).
-
Timm Bäder authored
Differential Revision: https://reviews.llvm.org/D135025
-
Timm Bäder authored
Differential Revision: https://reviews.llvm.org/D135013
-
Timm Bäder authored
-
David Green authored
-
Florian Hahn authored
-
Danil Sidoruk authored
Adds an option whether requires clause body should be aligned with the `requires` keyword. This option is now the default, both without configuration and in LLVM style. Fixes https://github.com/llvm/llvm-project/issues/56283 Differential Revision: https://reviews.llvm.org/D129443 Co-authored-by:
Emilia Dreamer <emilia@rymiel.space>
-
Pierre van Houtryve authored
Small bugfix. Currently harmless but a case in D134354 triggers it. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D136235
-
Adrian Kuegel authored
-
Pierre van Houtryve authored
These tests had been commented out but seem to not be crashing. Not sure if codegen is perfect in each of them, but even if it's not I think it's better to put a TODO to fix codegen than remove the test outright, unless codegen is plain wrong (then I'd still rather XFAIL rather than hide it) Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D136341
-
Pierre van Houtryve authored
The condition needs to be different for right-shifts, else we may lose information in some cases. Reviewed By: foad Differential Revision: https://reviews.llvm.org/D136059
-
Michael Wyman authored
Zeroing weak references are by definition `nullable`, and adding `nonnull` or `_Nullable` yields a mutual-exclusivity error. When `-Wnullability-completeness` is enabled, however, non-audited header regions require adding the `nullable` property keyword to avoid a warning. This should be unnecessary, since it restates known nullability of the `weak` property. Additionally, the fix-it hints are both non-idiomatic Objective-C (adding `_Nullable` to the property's pointer type rather than in the `@property` attributes) and suggest the option of adding `_Nonnull`, which would be an error. Differential Revision: https://reviews.llvm.org/D128031
-
LLVM GN Syncbot authored
-
Carlos Alberto Enciso authored
llvm-debuginfo-analyzer is a command line tool that processes debug info contained in a binary file and produces a debug information format agnostic “Logical View”, which is a high-level semantic representation of the debug info, independent of the low-level format. The code has been divided into the following patches: 1) Interval tree 2) Driver and documentation 3) Logical elements 4) Locations and ranges 5) Select elements 6) Warning and internal options 7) Compare elements 8) ELF Reader 9) CodeView Reader Full details: https://discourse.llvm.org/t/llvm-dev-rfc-llvm-dva-debug-information-visual-analyzer/62570 This patch: Select elements - Support for logical elements selection: LVPatterns Reviewed By: psamolysov, probinson Differential Revision: https://reviews.llvm.org/D125780
-
Craig Topper authored
-
Weining Lu authored
Do this check because the ISA manual says (edited from the original translation): > If the AM* instruction has its rd == rj, an Instruction Non-defined Exception will be triggered when the instruction is executed. > > If the AM* instruction has its rd == rk, the execution result is unpredictable. It is software's responsibility to avoid this situation. Note that binutils does the same check except when rd == r0 but this is undocumented. Differential Revision: https://reviews.llvm.org/D136076
-
Peiming Liu authored
Clarify that sparse_tensor.foreach iterates sparse_tensor in stored dim order. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D136401
-
Peiming Liu authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D136384
-
Siva Chandra Reddy authored
-
bixia1 authored
Previously, it used DimLevelType::SingletonNo to represent an unorder COO tensor of rank 1 while it should use DimLevelType::CompressedNuNo. Reviewed By: Peiming, wrengr Differential Revision: https://reviews.llvm.org/D136387
-
Michael Jones authored
The name of the libc target changed, this patch updates the cmake for the string to float comparison test to use the correct name. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D136388
-
rkayaith authored
Add an option to dump the pipeline that will be run to stderr. A dedicated option is needed since the existing `test-dump-pipeline` pipeline won't be usable with `-pass-pipeline` after D135745. Reviewed By: rriddle, mehdi_amini Differential Revision: https://reviews.llvm.org/D135747
-