- Jul 29, 2021
-
-
Fraser Cormack authored
This patch aims to improve the performance of BUILD_VECTORs which are identified as containing a dominant element. Given that most floating-point constants themselves require a load from the constant pool, it was possible for the optimization to actually increase the number of individual loads on small vectors. The exception is the zero constant -- +0.0 -- which can be materialized efficiently. While this optimization could do with a proper cost model to weigh the benfits of a single vector load vs. the manipulation of individual elements -- even for integer vectors which often require several instructions to materialize -- without a concrete RVV implementation to work with any heuristic is likely to be both more obtuse and inaccurate. Until then, this patch fixes at least one known obvious deficiency. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D106963
-
Fraser Cormack authored
The second test case added here was pointed out to me by @craig.topper and shows how we "optimize" a two-element BUILD_VECTOR from being one load from the constant pool to two loads from the constant pool. The first test case shows that since materialization for the floating-point +0.0 value is cheap and doesn't involve a load, the optimization is more clearly beneficial here. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D106962
-
Diana Picus authored
Don't prefer python2's virtualenv when setting up the test-suite. Always use python3 instead, since that's what we support everywhere else anyway. Differential Revision: https://reviews.llvm.org/D106941
-
Björn Schäpers authored
This amends c5243c63 to fix formatting continued function calls with BinPacking = false. Differential Revision: https://reviews.llvm.org/D106773
-
Mark de Wever authored
These are the hunks of D106770 [libc++][doc] Update the release notes that are relevant for main.
-
Jun Ma authored
-
Dmitry Vyukov authored
Switch x86_64 requirement for optimized code from SSE3 to SSE4.2. The new tsan runtime will need few instructions that are only supported by SSE4: _mm_max_epu32 _mm_extract_epi8 _mm_insert_epi32 SSE3 was introcued in 2004 and SSE4 in 2006: https://en.wikipedia.org/wiki/SSE3 https://en.wikipedia.org/wiki/SSE4 We are still providing non-optimized C++ version of the code, so either way it's possible to build tsan runtime for any CPU. But for Go this will bump strict requirement for -race because Go contains prebuilt versions and these will be built with -msse4.2. But requiring a CPU produced at least in 2006 looks reasonable for a debugging tool (more reasonable than disabling optimizations for everybody). Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D106948
-
Dmitry Vyukov authored
Prefer code readability over writeability. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D106982
-
Dmitry Vyukov authored
We reliably remove bottom libc-guts frames only on linux/glibc. Some bots failed on this test showing other bottom frames: .annobin_libc_start.c libc-start.c (libc.so.6+0x249f4) generic_start_main.isra.0 libc-start.c (libc.so.6+0x45b0c) We can't reliably remove all of possible bottom frames. So remove the assertion for that. Differential Revision: https://reviews.llvm.org/D107037
-
Arthur O'Dwyer authored
-
Freddy Ye authored
Reviewed By: pengfei Differential Revision: https://reviews.llvm.org/D106849
-
Mehdi Amini authored
This allows to use OperationEquivalence to track structural comparison for equality between two operations. Differential Revision: https://reviews.llvm.org/D106422
-
Mehdi Amini authored
This takes two ranges and invokes a predicate on the element-wise pair in the ranges. It returns true if all the pairs are matching the predicate and the ranges have the same size. It is useful with containers that aren't random iterator where we can't check the sizes in O(1). Differential Revision: https://reviews.llvm.org/D106605
-
Nathan Chancellor authored
When running this test on an aarch64 machine, it fails: ``` /usr/bin/ld.gold: error: .../test/tools/gold/X86/Output/comdat-nodeduplicate.ll.tmp/ab.lto.o: incompatible target ``` Specify the elf_x86_64 emulation as all of the other gold plugin tests do. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D107020
-
Alfonso Gregory authored
These functions make it clear to the compiler and user what the intended behavior is so llvm can make them go as fast as possible. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D106807
-
Tom Stellard authored
This function is marked with CINDEX_LINKAGE, but was never added to the export list / linker script. Reviewed By: jrtc27 Differential Revision: https://reviews.llvm.org/D106974
-
Michael Kruse authored
The implementation of -fminimize-whitespace (D104601) revised the logic when to emit newlines. There was no case to handle when more than 8 lines were skippped in -P (DisableLineMarkers) mode and instead fell through the case intended for -fminimize-whitespace, i.e. emit nothing. This patch will emit one newline in this case. The newline logic is slightly reorganized. The `-P -fminimize-whitespace` case is handled explicitly and emitting at least one newline is the new fallback case. The choice between emitting a line marker or up to 7 empty lines is now a choice only with enabled line markers. The up to 8 newlines likely are fewer characters than a line directive, but in -P mode this had the paradoxic effect that it would print up to 7 empty lines, but none at all if more than 8 lines had to be skipped. Now with DisableLineMarkers, we don't consider printing empty lines (just start a new line) which matches gcc's behavior. The line-directive-output-mincol.c test is replaced with a more comprehensive test skip-empty-lines.c also testing the more than 8 skipped lines behaviour with all flag combinations. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D106924
-
Stella Laurenzo authored
-
Stella Laurenzo authored
-
LLVM GN Syncbot authored
-
Ruslan Arutyunyan authored
Differential Revision: https://reviews.llvm.org/D106107
-
Arthur O'Dwyer authored
-
Jason Liu authored
Summary: Currently, if we pass in the same iterator for begin and end, the long double version of do_get would throw a runtime error. However, according to standard (https://eel.is/c++draft/locale.money.get#virtuals-1), we should set the failbit and eofbit when no more characters are available. Differential Revision: https://reviews.llvm.org/D100510
-
Guozhi Wei authored
Function findBestLoopTopHelper tries to find a new loop top block which can also fall through to OldTop, but it's impossible if OldTop is not a chain header, so it should exit immediately. Differential Revision: https://reviews.llvm.org/D106329
-
Ben Shi authored
This patch makes the following optimization, if the immediate multiplier is not a simm12. (mul x, (power_of_2 + 2)) => (SH1ADD x, (SLLI x, bits)) (mul x, (power_of_2 + 4)) => (SH2ADD x, (SLLI x, bits)) (mul x, (power_of_2 + 8)) => (SH3ADD x, (SLLI x, bits)) Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D106648
-
Ben Shi authored
These test will show the following optimization by future patches. (mul x, (power_of_2 + 2)) => (SH1ADD x, (SLLI x, bits)) (mul x, (power_of_2 + 4)) => (SH2ADD x, (SLLI x, bits)) (mul x, (power_of_2 + 8)) => (SH3ADD x, (SLLI x, bits)) Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D106647
-
Arthur O'Dwyer authored
Implement the changes in all language modes. LWG3506 "Missing allocator-extended constructors for priority_queue" makes the following changes: - New allocator-extended constructors for priority_queue. - New deduction guides targeting those constructors. LWG3522: "Missing requirement on InputIterator template parameter for priority_queue constructors". The iterator parameter should be constrained to actually be an iterator type. `priority_queue{1,2}` should be SFINAE-friendly ill-formed. Also, do a drive-by fix in the allocator-extended move constructor: there's no need to do a `make_heap` after moving from `__q.c` into our own `c`, because that container was already heapified when it was part of `__q`. [priqueue.cons.alloc] actually specifies the behavior and does *not* mention calling `make_heap`. I think this was just a copy-paste thinko. It dates back to the initial import of libc++. Differential Revision: https://reviews.llvm.org/D106824 Differential Revision: https://reviews.llvm.org/D106827 -
Wenlei He authored
We don't allowing inlining for functions with blockaddress with uses other than strictly callbr. This is because if the blockaddress escapes the function via a global variable, inlining may lead to an invalid cross-function reference. We check against such cases during inlining, however the check can fail for ThinLTO post-link because CFG simplification can incorrectly removes blocks based on wrong block reachability. When we import a function with blockaddress taken in a global variable but without importing that variable, we won't go through value mapping to reflect the real address-taken-ness of the cloned blocks. For the imported clone, this leads to blocks reachable from indirect branch through global variable being incorrectly treated as unreachable and removed by SimplifyCFG. Since inlining for such cases shouldn't be allowed in the first place, I'm marking them as ineligible for importing during pre-link to save the problem of missing address-taken-ness of imported clone as well as bad DCE and inlining. Differential Revision: https://reviews.llvm.org/D106930
-
Marco Vanotti authored
This CL modifies the PlatformUnpoisonStacks so that fuchsia can implement its own logic for unpoisoning the stacks. For the general case, the behavior is the same as with regular asan: it will unpoison everything from the current stack pointer until the base of the stack (stack top). In some situations, the current stack might not be the same as the default stack. In those cases, the code will now unpoison the entire default stack, and will also unpoison the current page of the stack. Reviewed By: mcgrathr Differential Revision: https://reviews.llvm.org/D106835
-
Marco Vanotti authored
This commit fixes the CFI directives in the crash trampoline so libunwind can get a backtrace during a crash. In order to get a backtrace from a libfuzzer crash in fuchsia, we resume execution in the crashed thread, forcing it to call the StaticCrashHandler. We do this by setting a "crash trampoline" that has all the necessary cfi directives for an unwinder to get full backtrace for that thread. Due to a bug in libunwind, it was not possible to restore the RSP pointer, as it was always set to the call frame address (CFA). The previous version worked around this issue by setting the CFA to the value of the stack pointer at the point of the crash. The bug in libunwind is now fixed[0], so I am correcting the CFI annotations so that the CFA correctly points to the beginning of the trampoline's call frame. [0]: https://reviews.llvm.org/D106626 Reviewed By: mcgrathr Differential Revision: https://reviews.llvm.org/D106725
-
Daniel Rodríguez Troitiño authored
The LC_SUB_FRAMEWORK, LC_SUB_UMBRELLA, LC_SUB_CLIENT, and LC_SUB_LIBRARY are used to indicate related libraries, binaries or framework names. Their only payload is the string with the name of the object. Adding those commands to the list of ignored/skipped load commands will avoid an error that stop the process of copying/stripping and will copy their contents verbatim. Additionally, in order to have a test for this case, `yaml2obj` now allows those four commands to contain a `Content`. Differential Revision: https://reviews.llvm.org/D106412
-
Jessica Paquette authored
Swap the order of widening so that we widen to the next power-of-2 first when legalizing G_LOAD. Also, provide a minimum type for the power of 2 to disallow s2 + s1. Clamping ought to disallow s2 and s1, but I think it's better to be explicit about the expected minimum size. We probably need a similar change for G_STORE, but it seems to be a bit more finnicky. So, let's just handle G_LOAD for now. Differential Revision: https://reviews.llvm.org/D107013
-
Stella Laurenzo authored
* For python projects that don't need JIT/ExecutionEngine, cuts the number of files to compile roughly in half (with similar reduction in end binary size). Differential Revision: https://reviews.llvm.org/D106992
-
Mehdi Amini authored
By making an explicit template specialization for the TypeID provided by these classes, the compiler will not emit an inline weak definition and rely on the linker to unique it. Instead a single definition will be emitted in the C++ file alongside the implementation for these classes. That will turn into a linker error what is now a hard-to-debug runtime behavior where instances of the same class may be using a different TypeID inside of different DSOs. Recommit 660a5695 after fixing gcc5 build. Differential Revision: https://reviews.llvm.org/D105903
-
Stella Laurenzo authored
-
Vitaly Buka authored
-
Vitaly Buka authored
It was invalid fix. This reverts commit 6a0fe688.
-
Vitaly Buka authored
-
Joseph Huber authored
Summary: Enabling internalization in the Attributor's CGSCC pass does something different that we don't expect. Ignore this for now to pass the tests.
-
LLVM GN Syncbot authored
-