- Mar 05, 2021
-
-
Eric Schweitz authored
-
KareemErgawy-TomTom authored
To unify the naming scheme across all ops in the SPIR-V dialect, we are moving from spv.camelCase to spv.CamelCase everywhere. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D97919
-
Martin Storsjö authored
Differential Revision: https://reviews.llvm.org/D89945
-
KareemErgawy-TomTom authored
To unify the naming scheme across all ops in the SPIR-V dialect, we are moving from `spv.camelCase` to `spv.CamelCase` everywhere. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D97917
-
Jinsong Ji authored
To avoid assembler errors. Reviewed By: sfertile Differential Revision: https://reviews.llvm.org/D97418
-
KareemErgawy-TomTom authored
To unify the naming scheme across all ops in the SPIR-V dialect, we are moving from spv.camelCase to spv.CamelCase everywhere. Differential Revision: https://reviews.llvm.org/D97920
-
Philip Reames authored
BasicAA knows how to analyze phis, but to control compile time, we're fairly limited in doing so. This patch loosens that restriction just slightly when there is exactly one phi input (after discounting induction variable increments). The result of this is that we can handle more cases around nested and sibling loops with pointer induction variables. A few points to note. * This is deliberately extremely restrictive about recursing through at most one input of the phi. There's a known general problem with BasicAA sometimes hitting exponential compile time already, and this patch makes every effort not to compound the problem. Once the root issue is fixed, we can probably loosen the restrictions here a bit. * As seen in the test file, we're still missing cases which aren't *directly* based on phis (e.g. using the indvar increment). I believe this to be a separate problem and am going to explore this in another patch once this one lands. * As seen in the test file, this results in the unfortunate fact that using phivalues sometimes results in worse quality results. I believe this comes down to an oversight in how recursive phi detection was implemented for phivalues. I'm happy to tackle this in a follow up change. Differential Revision: https://reviews.llvm.org/D97401
-
River Riddle authored
Now that attributes can be generated using ODS, we can move the builtin attributes as well. This revision removes a majority of the builtin attributes with a few left for followup revisions. The attributes moved to ODS in this revision are: AffineMapAttr, ArrayAttr, DictionaryAttr, IntegerSetAttr, StringAttr, SymbolRefAttr, TypeAttr, and UnitAttr. Differential Revision: https://reviews.llvm.org/D97591
-
River Riddle authored
The value type of the attribute can be specified by either overriding the typeBuilder field on the AttrDef, or by providing a parameter of type `AttributeSelfTypeParameter`. This removes the need to define custom storage class constructors for attributes that have a value type other than NoneType. Differential Revision: https://reviews.llvm.org/D97590
-
Louis Dionne authored
-
George Balatsouras authored
Add more expectations in vector.ll and select.ll based on command-line option combinations. Also, remove hard-coded shadow width references to enable fast8 transition. Reviewed By: stephan.yichao.zhao Differential Revision: https://reviews.llvm.org/D97903
-
Francis Visoiu Mistrih authored
This enhances the auto-init remark with information about the variable that is auto-initialized. This is based of debug info if available, or alloca names (mostly for development purposes). ``` auto-init.c:4:7: remark: Call to memset inserted by -ftrivial-auto-var-init. Memory operation size: 4096 bytes.Variables: var (4096 bytes). [-Rpass-missed=annotation-remarks] int var[1024]; ^ ``` This allows to see things like partial initialization of a variable that the optimizer won't be able to completely remove. Differential Revision: https://reviews.llvm.org/D97734 -
Petar Avramovic authored
This is recommit of 4c8fb7dd. MIR in one unit test had mismatched types. For vectors we consider a bit as known if it is the same for all demanded vector elements (all elements by default). KnownBits BitWidth for vector type is size of vector element. Add support for G_BUILD_VECTOR. This allows combines of urem_pow2_to_mask in pre-legalizer combiner. Differential Revision: https://reviews.llvm.org/D96122
-
Nicolas Guillemot authored
This reverts commit 7479a2e0. This commit causes compile errors on clang-x64-windows-msvc, so I'm reverting the patch for now. For reference, the error in question is: ``` error C2280: 'llvm::raw_ostream_iterator<char,char> &llvm::raw_ostream_iterator<char,char>::operator =(const llvm::raw_ostream_iterator<char,char> &)': attempting to reference a deleted function note: compiler has generated 'llvm::raw_ostream_iterator<char,char>::operator =' here note: 'llvm::raw_ostream_iterator<char,char> &llvm::raw_ostream_iterator<char,char>::operator =(const llvm::raw_ostream_iterator<char,char> &)': function was implicitly deleted because 'llvm::raw_ostream_iterator<char,char>' has a data member 'llvm::raw_ostream_iterator<char,char>::OutStream' of reference type ```
-
Benjamin Kramer authored
-
Philip Reames authored
-
Philip Reames authored
-
Philip Reames authored
-
Gui Andrade authored
This change adds a new IR noundef attribute, which denotes when a function call argument or return val may never contain uninitialized bits. In MemorySanitizer, this attribute enables optimizations which decrease instrumented code size by up to 17% (measured with an instrumented build of clang) . I'll introduce the change allowing msan to take advantage of this information in a separate patch. Differential Revision: https://reviews.llvm.org/D81678
-
Mitch Phillips authored
We're having flaky failures on this test on the sanitizer slow buildbot. Not per-run flaky, but it'll be green for a while, then red for a while. I suspect that changes in codegen are causing the LLVM_VP_MAX_NUM_VALS_PER_SITE=150 to be above and below the limit sporadically. The limit on my machine using lld and a non-bootstrapped compiler is 175, but the bot uses GNU ld and ld.gold at different points, which could be affecting behaviour. Change this threshold to LLVM_VP_MAX_NUM_VALS_PER_SITE=130 in order to try and get it below the failure point, at least for the foreseeable future. http://lab.llvm.org:8011/#/builders/37/builds/2744
-
Philip Reames authored
-
Jens Massberg authored
[clang-tidy] Add options to describe individual core increments to readability-function-cognitive-complexity check. Often you are only interested in the overall cognitive complexity of a function and not every individual increment. Thus the flag 'DescribeBasicIncrements' is added. If it is set to 'true', each increment is flagged. Otherwise, only the complexity of function with complexity of at least the threshold are flagged. By default 'DescribeBasisIncrements' is set to 'true', which is the original behavior of the check. Added a new test for different flag combinations. (The option to ignore macros which was original part of this patch will be added in another path) Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D96281
-
River Riddle authored
This function simplifies calling the getChecked methods on Attributes and Types from within the parser, and removes any need to use `getEncodedSourceLocation` for these methods (by using an SMLoc instead). This is much more efficient than using an mlir::Location, as the encoding process to produce an mlir::Location is inefficient and undesirable for parsing (locations used during parsing should not persist afterwards unless otherwise necessary). Differential Revision: https://reviews.llvm.org/D97900
-
Jez Ng authored
Since multiple dylibs can be defined in one TBD, this is necessary to avoid confusion. Reviewed By: #lld-macho, oontvoo Differential Revision: https://reviews.llvm.org/D97905
-
Jez Ng authored
Previously, we were loading re-exports without checking whether they were compatible with our target. Prior to {D97209}, it meant that we were defining dylib symbols that were invalid -- usually a silent failure unless our binary actually used them. D97209 exposed this as an explicit error. Along the way, I've extended our TAPI compatibility check to cover the platform as well, instead of just checking the arch. To this end, I've replaced MachO::Architecture with MachO::Target in our Config struct. Reviewed By: #lld-macho, oontvoo Differential Revision: https://reviews.llvm.org/D97867 -
Jez Ng authored
The reexport-nested-libs test added in D97438 was a bit wonky. First, it was linking against libReexportSystem.tbd which targets the iOS simulator, and which in turn attempted to re-export the iOS simulator's libSystem. However, due to the way `-syslibroot` works, it was actually re-exporting the macOS libSystem. As a result, the test was not actually able to resolve the symbols in the desired libSystem. I'm guessing that @oontvoo was confused by this and therefore included those symbols in libReexportSystem.tbd itself. But this means that the test wasn't actually testing the resolution of re-exported symbols (though it did at least verify that the re-exported libraries could be located). After some consideration, I figured that stub-link.s could be extended to cover what reexport-nested-libs.s was attempting to do. The test targets macOS, so we only have one `-syslibroot` and no chance of confusion. Reviewed By: #lld-macho, oontvoo Differential Revision: https://reviews.llvm.org/D97866
-
Jez Ng authored
Suppose we are linking against libFoo, which re-exports the implicitly-bound libSystem, which in turn re-exports some non-explicitly-bound library like `/usr/lib/system/libsystem_c.dylib`. Then any bindings we have to a symbol in libsystem_c should use libSystem (and not libFoo) as the umbrella library. Reviewed By: #lld-macho, smeenai Differential Revision: https://reviews.llvm.org/D97865
-
Haowei Wu authored
This change adds '-use-interfacestub' option to allow llvm-ifs to use InterfaceStub lib when generating ELF binary. Differential Revision: https://reviews.llvm.org/D94461
-
Siva Chandra Reddy authored
-
Med Ismail Bennani authored
When using `OptionGroupPythonClassWithDict` options in an `OptionGroup` with other `Options`, it can happen that the combinaison of some options of each group makes the command invalid. To solve that issue, this patch adds a bitmask argument to the `OptionGroupPythonClassWithDict` constuctor that is used to mark each option as required (or not). If the `required_options` bitmask isn't passed to the constructor, the class will keep its default behaviour, making the `--script-class` and `--python-function` required. rdar://65508855 Differential Revision: https://reviews.llvm.org/D97910 Signed-off-by:
Med Ismail Bennani <medismail.bennani@gmail.com>
-
Akira Hatanaka authored
explicitly emitting retainRV or claimRV calls in the IR This reapplies ed4718ec, which was reverted because it was causing a miscompile. The bug that was causing the miscompile has been fixed in 75805dce. Original commit message: Background: This fixes a longstanding problem where llvm breaks ARC's autorelease optimization (see the link below) by separating calls from the marker instructions or retainRV/claimRV calls. The backend changes are in https://reviews.llvm.org/D92569. https://clang.llvm.org/docs/AutomaticReferenceCounting.html#arc-runtime-objc-autoreleasereturnvalue What this patch does to fix the problem: - The front-end adds operand bundle "clang.arc.attachedcall" to calls, which indicates the call is implicitly followed by a marker instruction and an implicit retainRV/claimRV call that consumes the call result. In addition, it emits a call to @llvm.ob...
-
Nicolas Guillemot authored
Adds a class `raw_ostream_iterator` that behaves like std::ostream_iterator, but can be used with raw_ostream. This is useful for using raw_ostream with std algorithms. For example, it can be used to output std containers as follows: ``` std::vector<int> V = { 1, 2, 3 }; std::copy(V.begin(), V.end(), raw_ostream_iterator<int>(outs(), ", ")); // Output: "1, 2, 3, " ``` The API tries to follow std::ostream_iterator as closely as is practically possible. Reviewed By: dblaikie, mkitzan Differential Revision: https://reviews.llvm.org/D78795 -
Adrian Prantl authored
This patch updates the scope line to point to the suspend point. This makes the first address in the function point to the first source line in the resume function rather than the function declaration. Without this the line table "jumps" from the beginning of the function to the suspend point at the beginning. rdar://73386346 Differential Revision: https://reviews.llvm.org/D97345
-
Nathan James authored
Enables transforming loops of the form: ``` for (int i = 0; I != container.size(); ++I) { container[I]...; } for (int i = 0; I != N; ++I) { FixedArrSizeN[I]...; } ``` Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D97940 -
Caroline Concatto authored
This patch adds the cost model for experimental.vector.reverse with scalable vector types: nxv16i1, nxv8i1, nxv4i1 and nxv2i1. These types are missing from the previous cost model patch D95603. The cost model for experimental.vector.reverse with 1 bit mask is used by loop vectorization in the patch D95363 Differential Revision: https://reviews.llvm.org/D97758
-
Jay Foad authored
This fixes an instance of: warning: cast from 'const unsigned long *' to 'unsigned char *' drops const qualifier [-Wcast-qual] when compiling the generated MCCodeEmitter for an out-of-tree target that uses the optional support for instruction widths > 64 bits. Differential Revision: https://reviews.llvm.org/D97942
-
Daniel Sanders authored
:: (store 1 + 4, addrspace 1) -> :: (store 1 into undef + 4, addrspace 1) An offset without a base isn't terribly useful but it's convenient to update the offset without checking the value. For example, when breaking apart stores into smaller units Differential Revision: https://reviews.llvm.org/D97812
-
Albion Fung authored
Implemented the option to omit Power10 instructions from save stubs via the option --no-power10-stubs or --power10-stubs=no on lld. --power10-stubs= will override the other option. --power10-stubs=auto also exists to use the default behaviour (ie allow Power10 instructions in stubs). Differential Revision: https://reviews.llvm.org/D94627
-
Philip Reames authored
This is a compile time optimization for d9e93e8e. Not sure this matters or not, but why not do it just in case. This does involve querying TLI with a potentially invalid addressing mode for the using instruction, but since we don't actually pass the using instruction to the TLI callback, that should be fine.
-