- Aug 05, 2021
-
-
David Sherwood authored
This patch adds more instructions to the Uniforms list, for example certain intrinsics that are uniform by definition or whose operands are loop invariant. This list includes: 1. The intrinsics 'experimental.noalias.scope.decl' and 'sideeffect', which are always uniform by definition. 2. If intrinsics 'lifetime.start', 'lifetime.end' and 'assume' have loop invariant input operands then these are also uniform too. Also, in VPRecipeBuilder::handleReplication we check if an instruction is uniform based purely on whether or not the instruction lives in the Uniforms list. However, there are certain cases where calls to some intrinsics can be effectively treated as uniform too. Therefore, we now also treat the following cases as uniform for scalable vectors: 1. If the 'assume' intrinsic's operand is not loop invariant, then we are free to treat this as uniform anyway since it's only a performance hint. We will get the benefit for the first lane. 2. When the input pointers for 'lifetime.start' and 'lifetime.end' are loop variant then for scalable vectors we assume these still ultimately come from the broadcast of an alloca. We do not support scalable vectorisation of loops containing alloca instructions, hence the alloca itself would be invariant. If the pointer does not come from an alloca then the intrinsic itself has no effect. I have updated the assume test for fixed width, since we now treat it as uniform: Transforms/LoopVectorize/assume.ll I've also added new scalable vectorisation tests for other intriniscs: Transforms/LoopVectorize/scalable-assume.ll Transforms/LoopVectorize/scalable-lifetime.ll Transforms/LoopVectorize/scalable-noalias-scope-decl.ll Differential Revision: https://reviews.llvm.org/D107284
-
Fanbo Meng authored
This reverts commit d91234b2. Reviewed By: abhina.sreeskantharajan Differential Revision: https://reviews.llvm.org/D107565
-
Dawid Jurczak authored
[SimplifyLibCalls][NFC] Clean up LibCallSimplifier from 'memset + malloc into calloc' transformation FoldMallocMemset can be safely removed because since https://reviews.llvm.org/D103009 such transformation is already performed in DSE. Differential Revision: https://reviews.llvm.org/D103451
-
Krzysztof Parzyszek authored
When LLVM is used in other projects, it may happen that global cons- tructors will execute before the call to ParseCommandLineOptions. Since OptBisect is initialized via a constructor, and has no ability to be updated at a later time, passing "-opt-bisect-limit" to the parse function may have no effect. To avoid this problem use a cl::cb (callback) to set the bisection limit when the option is actually processed. Differential Revision: https://reviews.llvm.org/D104551
-
David Sherwood authored
The tests previously had lots of unnecessary CHECK lines, where all we really need to check is the presence (or absence) of the assume intrinsic and the correct input operands. Differential Revision: https://reviews.llvm.org/D107157
-
Sean Fertile authored
Limit the maximum alignment for attribute aligned to 4096 to match the limit of the .align pseudo op in the system assembler. Differential Revision: https://reviews.llvm.org/D107497
-
Bardia Mahjour authored
Function exploreDirections() in DependenceAnalysis implements a recursive algorithm for refining direction vectors. This algorithm has worst-case complexity of O(3^(n+1)) where n is the number of common loop levels. In this patch I'm adding a threshold to control the amount of time we spend in doing MIV tests (which most of the time end up resulting in over pessimistic direction vectors anyway). Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107159
-
Sander de Smalen authored
This change wasn't strictly necessary for D106164 and could be removed. This patch addresses the post-commit comments from @fhahn on D106164, and also changes sve-widen-gep.ll to use the same IR test as shown in pointer-induction.ll. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D106878
-
David Sherwood authored
The two tests (@testloopvariant and @testbitcast) are actually identical as in both loops the bitcast gets widened, forcing the lifetime marker to be replicated using each lane of the input vector. Differential Revision: https://reviews.llvm.org/D107150
-
Paul Robinson authored
It's entirely possible (because it actually happened) for a bool variable to end up with a 256-bit DW_AT_const_value. This came about when a local bool variable was initialized from a bitfield in a 32-byte struct of bitfields, and after inlining and constant propagation, the variable did have a constant value. The sequence of optimizations had it carrying "i256" values around, but once the constant made it into the llvm.dbg.value, no further IR changes could affect it. Technically the llvm.dbg.value did have a DIExpression to reduce it back down to 8 bits, but the compiler is in no way ready to emit an oversized constant *and* a DWARF expression to manipulate it. Depending on the circumstances, we had either just the very fat bool value, or an expression with no starting value. The sequence of optimizations that led to this state did seem pretty reasonable, so the solution I came up with was to invent a DWARF constant expression folder. Currently it only does convert ops, but there's no reason it couldn't do other ops if that became useful. This broke three tests that depended on having convert ops survive into the DWARF, so I added an operator that would abort the folder to each of those tests. Differential Revision: https://reviews.llvm.org/D106915
-
Florian Hahn authored
Suggested in D107364.
-
Petar Avramovic authored
Instructions that produceSameValue produce same values for operands with same index. matchEqualDefs used to return true for any two values from different instructions that produce same values. Fix this by checking if values are defined by operands with the same index. Differential Revision: https://reviews.llvm.org/D107362
-
Andrzej Warzynski authored
This patch removes `f18`, a.k.a. the old driver. It is being replaced with the new driver, `flang-new`, which has reached feature parity with `f18` a while ago. This was discussed in [1] and also in [2]. With this change, `FLANG_BUILD_NEW_DRIVER` is no longer needed and is also deleted. This means that we are making the dependency on Clang permanent (i.e. it cannot be disabled with a CMake flag). LIT set-up is updated accordingly. All references to `f18` or `f18.cpp` are either updated or removed. The `F18_FC` variable from the `flang` bash script is replaced with `FLANG_FC`. The former is still supported for backwards compatibility. [1] https://lists.llvm.org/pipermail/flang-dev/2021-June/000742.html [2] https://reviews.llvm.org/D103177 Differential Revision: https://reviews.llvm.org/D105811
-
Jay Foad authored
-
Simon Pilgrim authored
As suggested on D107370, this patch renames the tuning feature flags to start with 'Tuning' instead of 'Feature'. Differential Revision: https://reviews.llvm.org/D107459
-
Dominik Montada authored
Reviewed By: foad Differential Revision: https://reviews.llvm.org/D107330
-
Dmitry Vyukov authored
Currently we hardcode u64 type for shadow everywhere and do lots of uptr<->u64* casts. It makes it hard to change u64 to another type (e.g. u32) and makes it easy to introduce bugs. Introduce RawShadow type and use it in MemToShadow, ShadowToMem, IsShadowMem and throughout the code base as u64 replacement. This makes it possible to change u64 to something else in future and generally improves static typing. Depends on D107481. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D107482
-
Dmitry Vyukov authored
MemToMeta returns u32*, so it's reasonable for IsMetaMem to accept u32* as well. Changing the argument type just removes few type casts. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D107481
-
Aaron Ballman authored
Clang diagnostics should not start with a capital letter or use trailing punctuation (https://clang.llvm.org/docs/InternalsManual.html#the-format-string), but quite a few driver diagnostics were not following this advice. This corrects the grammar and punctuation to improve consistency, but does not change the circumstances under which the diagnostics are produced.
-
Andrzej Warzynski authored
For boolean options, e.g. `-fxor-operator`/`-fno-xor-operator`, we ought to be using TableGen multi-classes. This way, we only have to write one definition to have both forms auto-generated. This patch refactors all of Flang's boolean options to use two new multi-classes: `OptInFC1FFOption` and `OptOutFC1FFOption`. These multi-classes are based on `OptInFFOption`/`OptOutFFOption`, respectively. I've also simplified the processing of the updated options in CompilerInvocation.cpp. With the new approach, "empty" help text (i.e. no `HelpText`) is now replaced with an empty string (i.e. HelpText<"">). When running flang-new --help, that's considered as non-empty help messages, which is then printed (that's controlled by `printHelp` from llvm/lib/Option/OptTable.cpp). This means that with this patch, flang-new --help will start printing e.g. -fno-backslash, even though there is no actual help text to print for this option (apart from the empty string ""). Tests are updated accordingly. Note that with this patch, both `-fxor-operator` and `-fno-xor-operator` (and other boolean options refactored here) remain available in `flang-new` and `flang-new -fc1`. In this respect, nothing changes. In a forthcoming patch, I will refine this so that `flang-new -fc1` only accepts `-ffoo` (`OptInFC1FFOption`) or `-fno-foo` (`OptOutCC1FFOption`). For clarity, `OptInFFOption`/`OptOutFFOption` are renamed as `OptInCC1FFOption`/`OptOutCC1FFOption`, respectively. Otherwise, this is an NFC from Clang's perspective. Differential Revision: https://reviews.llvm.org/D105881
-
Sven van Haastregt authored
Builtin definitions with pointer arguments were duplicated to provide overloads differing in the pointer argument's address space. Reduce this duplication by capturing the definitions in multiclasses. This still results in the same number of builtins in the generated tables, but the description is more concise now. Differential Revision: https://reviews.llvm.org/D107151
-
Neal Sidhwaney authored
This reverts commit 7529f0e3.
-
Jay Foad authored
-
Oliver Stannard authored
-
Fraser Cormack authored
The LegalizeAction for this node should follow the logic for `VECREDUCE_SEQ_FADD` and be determined using the vector operand's type. here isn't an in-tree target that makes use of this, but I think it's safe to say this is how it should behave, should a target want to customize the action for this node. Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D107478
-
Lang Hames authored
ORC-runtime regression tests will now explicitly specify the runtime path.
-
Jay Foad authored
-
Anshil Gandhi authored
Implement target builtins for gfx90a including fadd64, fadd32, add2h, max and min on various global, flat and ds address spaces for which intrinsics are implemented. Differential Revision: https://reviews.llvm.org/D106909
-
Neal Sidhwaney authored
This change moves to using narrow character types and libedit APIs in Editline, because those are the same types that the rest of LLVM/LLDB uses, and it's generally considered better practice to use UTF-8 encoded in char than it is to use wider characters. However, for character input, the change leaves in using a wchar to enable input of multi-byte characters. Differential Revision: https://reviews.llvm.org/D106035
-
Martin Storsjö authored
This option is always interpreted strictly as a hexadecimal string, even if it has no prefix that indicates the number format, hence the existing call to StringRef::getAsInteger(16, ...). StringRef::getAsInteger(0, ...) consumes a leading "0x" prefix is present, but when the radix is specified, the radix shouldn't be included. Both MS rc.exe and GNU windres accept the language with that prefix. Also allow specifying the codepage to llvm-windres with a different radix, as GNU windres allows that (but MS rc.exe doesn't). This fixes https://llvm.org/PR51295. Differential Revision: https://reviews.llvm.org/D107263
-
Michał Górny authored
Remove test times when running shtest-keyword-parse-errors test, in order to prevent the previous executions from impacting subtest order and therefore causing FileCheck to fail. Differential Revision: https://reviews.llvm.org/D107427
-
Igor Kudrin authored
This extends D105979 and adds support for VLDR instructions. Differential Revision: https://reviews.llvm.org/D105980
-
Igor Kudrin authored
This implements `MCInstrAnalysis::evaluateMemoryOperandAddress()` for Arm so that the disassembler can print the target address of memory operands that use PC+immediate addressing. Differential Revision: https://reviews.llvm.org/D105979
-
Fangrui Song authored
Currently version script patterns are ignored for .symver produced non-default version (single @) symbols. This makes such symbols not localizable by `local:`, e.g. ``` .symver foo3_v1,foo3@v1 .globl foo_v1 foo3_v1: ld.lld --version-script=a.ver -shared a.o ``` This patch adds the support: * Move `config->versionDefinitions[VER_NDX_LOCAL].patterns` to `config->versionDefinitions[versionId].localPatterns` * Rename `config->versionDefinitions[versionId].patterns` to `config->versionDefinitions[versionId].nonLocalPatterns` * Allow `findAllByVersion` to find non-default version symbols when `includeNonDefault` is true. (Note: `symtab` keys do not have `@@`) * Make each pattern check both the unversioned `pat.name` and the versioned `${pat.name}@${v.name}` * `localPatterns` can localize `${pat.name}@${v.name}`. `nonLocalPatterns` can prevent localization by assigning `verdefIndex` (before `parseSymbolVersion`). --- If a user notices new `undefined symbol` errors with a version script containing `local: *;`, the issue is likely due to a missing `global:` pattern. Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D107234 -
Fangrui Song authored
This reverts commit 7ed22a6f. buf is not cleared so the commit misses some cases.
-
eopXD authored
Letting it take SCEV allows further modification on the function to optimize if the StoreSize / Stride is runtime determined. This is a preceeding of D107353. The big picture is to let LoopIdiom deal with runtime-determined sizes. Reviewed By: Whitney, lebedev.ri Differential Revision: https://reviews.llvm.org/D104595
-
Heejin Ahn authored
- Remove a redundant test: there were `longjmp_only` and `only_longjmp`, which do the same thing - Add `CHECK-LABEL` lines for function names Reviewed By: tlively Differential Revision: https://reviews.llvm.org/D107511
-
Heejin Ahn authored
Reviewed By: tlively Differential Revision: https://reviews.llvm.org/D107499
-
Matthias Springer authored
Differential Revision: https://reviews.llvm.org/D107520
-
Nathan Lanza authored
These functions don't exist in android API levels < 21. A change in llvm-12 (rG6dbf0cfc) caused Oz builds to emit this symbol assuming it's available and thus is causing link errors. Simply disable it here. Differential Revision: https://reviews.llvm.org/D107509
-