- Nov 24, 2022
-
-
Fangrui Song authored
Extend SM_SLOC_BUFFER_BLOB_COMPRESSED to allow zstd, which is much faster (compression/decompression) than zlib with a similar compression ratio. An alternative is to add a value beside SM_SLOC_BUFFER_BLOB_COMPRESSED, but reusing SM_SLOC_BUFFER_BLOB_COMPRESSED slightly simplifies the implementation and leads to better diagnostics when a slightly older Clang consumes zstd compressed blob. Compressing AST takes a small portion of WriteAST, so we can pick a higher compression level. Compiling a relatively large .pcm (absl endian) with -fmodules-embed-all-files, zstd level 9 has comparable performance with zlib-chromium level 6 (default), but provides smaller output (5809156 => 5796016). Higher zstd levels will make "Compress AST" notably slower and do not provide significant more size saving. ``` 2.219345 Total ExecuteCompiler 0.746799 Total Frontend 0.736862 Total Source 0.339434 Total ReadAST 0.165452 Total WriteAST 0.043045 Total Compress AST 0.008236 Total ParseClass 0.00633 Total InstantiateClass 0.001887 Total isPotentialConstantExpr 0.001808 Total InstantiateFunction 0.001535 Total EvaluateForOverflow 0.000986 Total EvaluateAsRValue 0.000536 Total EvaluateAsBooleanCondition 0.000308 Total EvaluateAsConstantExpr 0.000156 Total EvaluateAsInt 3.4e-05 Total EvaluateKnownConstInt 8e-06 Total EvaluateAsInitializer 0 Total PerformPendingInstantiations ``` Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D137885
-
Luca Boasso authored
This patch adds the and, or, and xor bitwise operations to the index dialects with folders and LLVM lowerings. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D138590
-
Snehasish Kumar authored
For the RAII lock usage we need to create a local var. There were some headers which clang-tidy identified as unused. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D138593
-
Uday Bondhugula authored
Fix bug in simplify affine map with operands utility; the wrong LHS and RHS were being used in some cases post simplification. While on this, also handle a corner case of undefined expressions. Differential Revision: https://reviews.llvm.org/D138584
-
Hanhan Wang authored
The output operands will be added to input operands if the generic op (on tensors) becomes an elementwise operation. The outputs of the generic op is still the same. They will be cleaned up by ReplaceWithEmptyTensorIfUnused pattern. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D138251
-
Alexey Kreshchuk authored
It's more likely the user needs a const cast, but probably not sure enough that we should suggest that either - so err on the side of caution and offer no suggestion. Fixes pr58958 Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D138426
-
Alexander Belyaev authored
Differential Revision: https://reviews.llvm.org/D138586
-
Greg Clayton authored
-flimit-debug-info and other compiler options might end up removing debug info that is needed for debugging. LLDB marks these types as being forcefully completed in the metadata in the TypeSystem. These types should have been complete in the debug info but were not because the compiler omitted them to save space. When we can't find a suitable replacement for the type, we should let the user know that these types are incomplete to indicate there was an issue instead of just showing nothing for a type. The solution is to display presented in this patch is to display "<incomplete type>" as the summary for any incomplete types. If there is a summary string or function that is provided for a type, but the type is currently forcefully completed, the installed summary will be ignored and we will display "<incomplete type>". This patch also exposes the ability to ask a SBType if it was forcefully completed with: bool SBType::IsTypeForcefullyCompleted(); This will allow the user interface for a debugger to also detect this issue and possibly mark the variable display up on some way to indicate to the user the type is incomplete. To show how this is diplayed, we can look at the existing output first for the example source file from the file: lldb/test/API/functionalities/limit-debug-info/main.cpp (lldb) frame variable inherits_from_one inherits_from_two one_as_member two_as_member array_of_one array_of_two shadowed_one (InheritsFromOne) ::inherits_from_one = (member = 47) (InheritsFromTwo) ::inherits_from_two = (member = 47) (OneAsMember) ::one_as_member = (one = member::One @ 0x0000000100008028, member = 47) (TwoAsMember) ::two_as_member = (two = member::Two @ 0x0000000100008040, member = 47) (array::One [3]) ::array_of_one = ([0] = array::One @ 0x0000000100008068, [1] = array::One @ 0x0000000100008069, [2] = array::One @ 0x000000010000806a) (array::Two [3]) ::array_of_two = ([0] = array::Two @ 0x0000000100008098, [1] = array::Two @ 0x0000000100008099, [2] = array::Two @ 0x000000010000809a) (ShadowedOne) ::shadowed_one = (member = 47) (lldb) frame variable --show-types inherits_from_one inherits_from_two one_as_member two_as_member array_of_one array_of_two shadowed_one (InheritsFromOne) ::inherits_from_one = { (int) member = 47 } (InheritsFromTwo) ::inherits_from_two = { (int) member = 47 } (OneAsMember) ::one_as_member = { (member::One) one = {} (int) member = 47 } (TwoAsMember) ::two_as_member = { (member::Two) two = {} (int) member = 47 } (array::One [3]) ::array_of_one = { (array::One) [0] = {} (array::One) [1] = {} (array::One) [2] = {} } (array::Two [3]) ::array_of_two = { (array::Two) [0] = {} (array::Two) [1] = {} (array::Two) [2] = {} } (ShadowedOne) ::shadowed_one = { (int) member = 47 } With this patch in place we can now see any classes that were forcefully completed to let us know that we are missing information: (lldb) frame variable inherits_from_one inherits_from_two one_as_member two_as_member array_of_one array_of_two shadowed_one (InheritsFromOne) ::inherits_from_one = (One = <incomplete type>, member = 47) (InheritsFromTwo) ::inherits_from_two = (Two = <incomplete type>, member = 47) (OneAsMember) ::one_as_member = (one = <incomplete type>, member = 47) (TwoAsMember) ::two_as_member = (two = <incomplete type>, member = 47) (array::One[3]) ::array_of_one = ([0] = <incomplete type>, [1] = <incomplete type>, [2] = <incomplete type>) (array::Two[3]) ::array_of_two = ([0] = <incomplete type>, [1] = <incomplete type>, [2] = <incomplete type>) (ShadowedOne) ::shadowed_one = (func_shadow::One = <incomplete type>, member = 47) (lldb) frame variable --show-types inherits_from_one inherits_from_two one_as_member two_as_member array_of_one array_of_two shadowed_one (InheritsFromOne) ::inherits_from_one = { (One) One = <incomplete type> {} (int) member = 47 } (InheritsFromTwo) ::inherits_from_two = { (Two) Two = <incomplete type> {} (int) member = 47 } (OneAsMember) ::one_as_member = { (member::One) one = <incomplete type> {} (int) member = 47 } (TwoAsMember) ::two_as_member = { (member::Two) two = <incomplete type> {} (int) member = 47 } (array::One[3]) ::array_of_one = { (array::One) [0] = <incomplete type> {} (array::One) [1] = <incomplete type> {} (array::One) [2] = <incomplete type> {} } (array::Two[3]) ::array_of_two = { (array::Two) [0] = <incomplete type> {} (array::Two) [1] = <incomplete type> {} (array::Two) [2] = <incomplete type> {} } (ShadowedOne) ::shadowed_one = { (func_shadow::One) func_shadow::One = <incomplete type> {} (int) member = 47 } Differential Revision: https://reviews.llvm.org/D138259 -
Paulo Matos authored
Removes the unnecessary GEP instructions from WebAssembly Table tests. Differential Revision: https://reviews.llvm.org/D138569
-
Matt Arsenault authored
This is tested in a future llvm-reduce patch.
-
- Nov 23, 2022
-
-
Hassnaa Hamdi authored
1-To generate code compatible to streaming mode: - enable custom lowering for SMIN, SMAX, UMIN, UMAX, FMAXNUM, FMINNUM, FMAXIMUM, FMINIMUM. 2-Testing files: - int-minmax.ll - fp-minmax.ll Reviewed By: david-arm, sdesmalen Differential Revision: https://reviews.llvm.org/D138292
-
Hassnaa Hamdi authored
Add testing files: - int-minmax.ll - fp-minmax.ll
-
Louis Dionne authored
-
Hans Wennborg authored
It broke the build, see comments on code review. > Leaves the implementation and tests files in-place for right now, but > deletes the ability to build the old sanitizer-common based scudo. This > has been on life-support for a long time, and the newer scudo_standalone > is much better supported and maintained. > > Also patches up some GWP-ASan wording, primarily related to the fact > that -fsanitize=scudo now is scudo_standalone, and therefore the way to > reference the GWP-ASan options through the environment variable has > changed. > > Future follow-up patches will delete the original scudo, and migrate all > its tests over to be part of the scudo_standalone test suite. > > Reviewed By: vitalybuka > > Differential Revision: https://reviews.llvm.org/D138157 This reverts commit ab1a5991.
-
Jonas Paulsson authored
In cases where the SELECT_CCMASK has an additional user of the carry, a truncated SELECT_CCMASK may result as the input to the GET_CCMASK, which need to be recognized. Fixes https://github.com/llvm/llvm-project/issues/59054 Reviewed By: Ulrich Weigand Differential Revision: https://reviews.llvm.org/D138324
-
Balazs Benics authored
Casting a pointer to a suitably large integral type by reinterpret-cast should result in the same value as by using the `__builtin_bit_cast()`. The compiler exploits this: https://godbolt.org/z/zMP3sG683 However, the analyzer does not bind the same symbolic value to these expressions, resulting in weird situations, such as failing equality checks and even results in crashes: https://godbolt.org/z/oeMP7cj8q Previously, in the `RegionStoreManager::getBinding()` even if `T` was non-null, we replaced it with `TVR->getValueType()` in case the `MR` was `TypedValueRegion`. It doesn't make much sense to auto-detect the type if the type is already given. By not doing the auto-detection, we would just do the right thing and perform the load by that type. This means that we will cast the value to that type. So, in this patch, I'm proposing to do auto-detection only if the type was null. Here is a snippet of code, annotated by the previous and new dump values. `LocAsInteger` should wrap the `SymRegion`, since we want to load the address as if it was an integer. In none of the following cases should type auto-detection be triggered, hence we should eventually reach an `evalCast()` to lazily cast the loaded value into that type. ```lang=C++ void LValueToRValueBitCast_dumps(void *p, char (*array)[8]) { clang_analyzer_dump(p); // remained: &SymRegion{reg_$0<void * p>} clang_analyzer_dump(array); // remained: {{&SymRegion{reg_$1<char (*)[8] array>} clang_analyzer_dump((unsigned long)p); // remained: {{&SymRegion{reg_$0<void * p>} [as 64 bit integer]}} clang_analyzer_dump(__builtin_bit_cast(unsigned long, p)); <--------- change #1 // previously: {{&SymRegion{reg_$0<void * p>}}} // now: {{&SymRegion{reg_$0<void * p>} [as 64 bit integer]}} clang_analyzer_dump((unsigned long)array); // remained: {{&SymRegion{reg_$1<char (*)[8] array>} [as 64 bit integer]}} clang_analyzer_dump(__builtin_bit_cast(unsigned long, array)); <--------- change #2 // previously: {{&SymRegion{reg_$1<char (*)[8] array>}}} // now: {{&SymRegion{reg_$1<char (*)[8] array>} [as 64 bit integer]}} } ``` Reviewed By: xazax.hun Differential Revision: https://reviews.llvm.org/D136603
-
Louis Dionne authored
This patch removes the base template implementation for std::char_traits. If my reading of http://eel.is/c++draft/char.traits is correct, the Standard mandates that the library provides specializations for several types like char and wchar_t, but not any implementation in the base template. Indeed, such an implementation is bound to be incorrect for most types anyways, since things like `eof()` and `int_type` will definitely have to be customized. Since the base template implementation should not have worked for anyone, this shouldn't be a breaking change (I expect that anyone defining a custom character type today will already have to provide their own specialization of char_traits). However, since we're aware of some users of char_traits for unsigned char and signed char, we're keeping those two specializations around for two releases to give people some time to migrate. Differential Revision: https://reviews.llvm.org/D138307
-
Louis Dionne authored
This makes the library consistent in how it handles C library headers. For C headers provided by libc++, we unconditionally include <foo.h> from <cfoo>, and then <foo.h> conditionally include_next <foo.h>. For headers not provided by libc++, <cfoo> conditionally includes the system's <foo.h> directly. Differential Revision: https://reviews.llvm.org/D138512
-
Nico Weber authored
No behavior difference in practice, but makes it possible to use `-t` for debugging when that assert fails.
-
Michał Górny authored
Update external unittest rules for flang standalone builds to account for the unittest components (gtest, gmock) being moved to `third-party` directory, in a11cd0d9. Differential Revision: https://reviews.llvm.org/D138562
-
Emmmer authored
Add: - RV32F instruction set. - corresponding unittests. Further work: - RV32FC, RV64F and RV64FC instructions support. - update execution exceptions to fcsr register in RVM instructions. Reviewed By: DavidSpickett Differential Revision: https://reviews.llvm.org/D138447
-
OCHyams authored
Fix replaceVariableLocationOp unconditionally replacing the first operand of a dbg.assign. Reviewed By: jryans Differential Revision: https://reviews.llvm.org/D138561
-
Matt Arsenault authored
-
Louis Dionne authored
-
Matt Devereau authored
This reverts a change to exclude scalarizeBinopOrCmp in VectorCombine for scalable vectors which caused poor scalable Binop codegen. Differential Revision: https://reviews.llvm.org/D138545
-
Matthias Springer authored
Do not generate CollapseShapeOps/ExpandShapeOps that have the same source and result shape. Generate casts instead. Such reshapes became invalid with D138498. Differential Revision: https://reviews.llvm.org/D138557
-
Pavel Labath authored
This reverts commit f0c16f89 because it breaks linux and mac bots.
-
Benjamin Kramer authored
This reverts commit cf624b23. It triggers crashes in clang, see the comments on github on the original change.
-
David Green authored
I noticed these were missing, so this adds Host identifiers for cortex-a55, cortex-a510, cortex-a710 and cortex-x2, taken from their respective TRMs. Differential Revision: https://reviews.llvm.org/D138497
-
zhongyunde authored
* For case bcmp9, there is extras AND and EXTEND int the chain of OR/XOR, which prevent the transform, so enable the optimize before legalization. * The key IR frag related: t37: i32,ch = load<(load (s8) from %ir.4), anyext from i8> t0, t11, undef:i64 t12: i64 = add t4, Constant:i64<8> t38: i32,ch = load<(load (s8) from %ir.5), anyext from i8> t0, t12, undef:i64 t39: i32 = xor t37, t38 t40: i64 = any_extend t39 t42: i64 = and t40, Constant:i64<255> Depends on D138398 to fix combine_setcc_glue Reviewed By: dmgreen, bcl5980 Differential Revision: https://reviews.llvm.org/D137936 -
Haohai Wen authored
Avx512 permute latency should be 3 instead of 1. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D138427
-
Stefan Gränitz authored
This reverts commit a37807ac. Differential Revision: https://reviews.llvm.org/D137942
-
Stefan Gränitz authored
When ObjCARCOpt::run() returned early, Changed and CFGChanged were never initialized. CFGChanged is read unconditionally afterwards. This came up in the course of D137942.
-
Benjamin Kramer authored
-
Alex Richardson authored
The ctype mask for newlib/picolibc is fully saturated, so __regex_word has to overlap with one of the values. This commit uses the same workaround as bionic did (uint16_t for char_class_type inside regex_traits). It should be possible to have libc++ provide the default rune table instead, but that will require a new mechanism to detect newlib inside __config since the header defining the newlib/picolibc macros has not been included yet inside __config. Doing it this way also avoids duplicating the ctype table for newlib, reducing the global data size. Differential Revision: https://reviews.llvm.org/D138195
-
Alex Richardson authored
I noticed a an assertion error when building MIPS code that loaded from NULL. Loading from NULL ends up being a load with maximum alignment, and due to integer truncation the value maximum was interpreted as 0 and the assertion in MipsDAGToDAGISel::Select() failed. This previously happened to work, but the maximum alignment was increased in df84c1fe, so it no longer fits into a 32 bit integer. Instead of just fixing the one MIPS case, this patch removes all uses of the deprecated getAlignment() call and replaces them with getAlign(). Differential Revision: https://reviews.llvm.org/D138420
-
Alex Richardson authored
This simply calls getTargetAddressSpace(Q.getAddressSpace()) and there are only two callers, so adjust those caller instead.
-
Kito Cheng authored
Introduce a RVVTypeCache to hold the cache instead of using a local static variable to maintain a cache. Also made construct of RVVType to private, make sure that could be only created by a cache manager. Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D138429
-
Akshay Baviskar authored
Adds RegionBranchOpInterface for AffineIf Op and tests it using buffer deallocation pass. Reviewed By: bondhugula Differential Revision: https://reviews.llvm.org/D130962
-