- Aug 20, 2020
-
-
Bevin Hansson authored
The tests were not written with update_cc_test_checks in mind, which make them difficult to update. Fix this. Also, some of the consteval tests were outright broken, since the CHECK lines were wrong. Other than this, the semantics of the tests are preserved.
-
Bevin Hansson authored
This patch adds a convenience class for using FixedPointSemantics to build fixed-point operations in IR. RFC: http://lists.llvm.org/pipermail/llvm-dev/2020-August/144025.html Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D85314
-
Bevin Hansson authored
This patch moves FixedPointSemantics and APFixedPoint from Clang to LLVM ADT. This will make it easier to use the fixed-point classes in LLVM for constructing an IR builder for fixed-point and for reusing the APFixedPoint class for constant evaluation purposes. RFC: http://lists.llvm.org/pipermail/llvm-dev/2020-August/144025.html Reviewed By: leonardchan, rjmccall Differential Revision: https://reviews.llvm.org/D85312
-
Bevin Hansson authored
In D79719, LayoutField was refactored to fetch the size of field types in bits and then convert to chars, rather than fetching them in chars directly. This is not ideal, since it makes the calculations char size dependent, and breaks for sizes that are not a multiple of the char size. This patch changes it to use getTypeInfoInChars instead of getTypeInfo. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D85191
-
Arjun P authored
This patch adds the capability to perform constraint redundancy checks for `FlatAffineConstraints` using `Simplex`, via a new member function `FlatAffineConstraints::removeRedundantConstraints`. The pre-existing redundancy detection algorithm runs a full rational emptiness check for each inequality separately for checking redundancy. Leveraging the existing `Simplex` infrastructure, in this patch we have an algorithm for redundancy checks that can check each constraint by performing pivots on the tableau, which provides an alternative to running Fourier-Motzkin elimination for each constraint separately. Differential Revision: https://reviews.llvm.org/D84935
-
dfukalov authored
The `UnrollMaxBlockToAnalyze` parameter is used at the stage when we have no information about a loop body BB cost. In some cases, e.g. for simple loop ``` for(int i=0; i<32; ++i){ D = Arr2[i*8 + C1]; Arr1[i*64 + C2] += C3 * D; Arr1[i*64 + C2 + 2048] += C4 * D; } ``` current default parameter value is not enough to run deeper cost analyze so the loop is not completely unrolled. Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D86248 -
Petr Hosek authored
It isn't very wise to pass an assembly file to the compiler and tell it to compile as a C file and hope that the compiler recognizes it as assembly instead. Instead enable the ASM language and mark the files as being ASM. [525/634] Building C object lib/tsan/CMakeFiles/clang_rt.tsan-aarch64.dir/rtl/tsan_rtl_aarch64.S.o FAILED: lib/tsan/CMakeFiles/clang_rt.tsan-aarch64.dir/rtl/tsan_rtl_aarch64.S.o /opt/tooling/drive/host/bin/clang --target=aarch64-linux-gnu -I/opt/tooling/drive/llvm/compiler-rt/lib/tsan/.. -isystem /opt/tooling/drive/toolchain/opt/drive/toolchain/include -x c -Wall -Wno-unused-parameter -fno-lto -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -Wno-non-virtual-dtor -fPIE -fno-rtti -Wframe-larger-than=530 -Wglobal-constructors --sysroot=. -MD -MT lib/tsan/CMakeFiles/clang_rt.tsan-aarch64.dir/rtl/tsan_rtl_aarch64.S.o -MF lib/tsan/CMakeFiles/clang_rt.tsan-aarch64.dir/rtl/tsan_rtl_aarch64.S.o.d -o lib/tsan/CMakeFiles/clang_rt.tsan-aarch64.dir/rtl/tsan_rtl_aarch64.S.o -c /opt/tooling/drive/llvm/compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S /opt/tooling/drive/llvm/compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S:29:1: error: expected identifier or '(' .section .text ^ 1 error generated. Fixed Clang not being passed as the assembly compiler for compiler-rt runtime build. Patch By: tambre Differential Revision: https://reviews.llvm.org/D85706 -
Yvan Roux authored
Use the stack to save and restore the link register when there is no available register to do it. Differential Revision: https://reviews.llvm.org/D76069
-
David Stenberg authored
When hoisting simple values out from a loop, and an optsize attribute, a convergent call, or an invoke instruction hindered the pass from unswitching the loop, the pass would return an incorrect Modified status. This was caught using the check introduced by D80916. Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D86085
-
Johannes Doerfert authored
The internal version is now part of the SCC, make sure to perform this update.
-
Johannes Doerfert authored
Comparison against null is a common pattern that usually is followed by error handling code and the likes. We now use AANonNull to simplify these comparisons optimistically in order to make more code dead early on. Reviewed By: uenoku Differential Revision: https://reviews.llvm.org/D86145
-
Johannes Doerfert authored
`AADereferenceable::getAssumedDereferenceableBytes()` is actually deducing `dereferenceable_or_null`. We should not use that information to deduce `nonnull`, since it doesn't imply `nonnull`.
-
Johannes Doerfert authored
-
Johannes Doerfert authored
-
Johannes Doerfert authored
-
Fangrui Song authored
-
Qiu Chaofan authored
This patch adds support for constrained scalar fp to int operations on PowerPC. Besides, this fixes the FP exception bit of quad-precision convert & truncate instructions. Reviewed By: steven.zhang, uweigand Differential Revision: https://reviews.llvm.org/D81537
-
Johannes Doerfert authored
This commit introduced a non-trivial compile time regression that needs to be addressed: https://reviews.llvm.org/D70365#2227627 Given that it is unclear how long that will take, I'll revert it for now. This reverts commit eedf18fc.
-
Johannes Doerfert authored
This commits breaks certain OpenMP codes (on power) because it expanded the Attributor scope without telling the Attributor about the SCC extend. See: https://reviews.llvm.org/D85544#2227611 This reverts commit b0b32e64.
-
Shilei Tian authored
Target memory manager is introduced in this patch which aims to manage target memory such that they will not be freed immediately when they are not used because the overhead of memory allocation and free is very large. For CUDA device, cuMemFree even blocks the context switch on device which affects concurrent kernel execution. The memory manager can be taken as a memory pool. It divides the pool into multiple buckets according to the size such that memory allocation/free distributed to different buckets will not affect each other. In this version, we use the exact-equality policy to find a free buffer. This is an open question: will best-fit work better here? IMO, best-fit is not good for target memory management because computation on GPU usually requires GBs of data. Best-fit might lead to a serious waste. For example, there is a free buffer of size 1960MB, and now we need a buffer of size 1200MB. If best-fit, the free buffer will be returned, leading to a 760MB waste. The allocation will happen when there is no free memory left, and the memory free on device will take place in the following two cases: 1. The program ends. Obviously. However, there is a little problem that plugin library is destroyed before the memory manager is destroyed, leading to a fact that the call to target plugin will not succeed. 2. Device is out of memory when we request a new memory. The manager will walk through all free buffers from the bucket with largest base size, pick up one buffer, free it, and try to allocate immediately. If it succeeds, it will return right away rather than freeing all buffers in free list. Update: A threshold (8KB by default) is set such that users could control what size of memory will be managed by the manager. It can also be configured by an environment variable `LIBOMPTARGET_MEMORY_MANAGER_THRESHOLD`. Reviewed By: jdoerfert, ye-luo, JonChesterfield Differential Revision: https://reviews.llvm.org/D81054
-
Zi Xuan Wu (Zeson) authored
-
Tony authored
- Rename AMDGPU SCC DWARF register to STATUS since the scalar condition code is a bit within the STATUS register. - Correct bit size of the VCC_64 register to 64 which is the size in wave64 mode. Differential Revision: https://reviews.llvm.org/D86259
-
Jonas Devlieghere authored
No return statement means the method returns None which breaks a list comprehension down the line that expects a str instance.
-
Craig Topper authored
We don't need a std::string for a literal string, we can use a StringRef. The addition of StringRefs produces a Twine that we can just call str() without converting to a SmallString ourselves. Twine will do that internally.
-
Rahul Joshi authored
- This utility to merge a block anywhere into another one can help inline single block regions into other blocks. - Modified patterns test to use the new function. Differential Revision: https://reviews.llvm.org/D86251
-
Craig Topper authored
This adds parsing and codegen support for tune in target attribute. I've implemented this so that arch in the target attribute implicitly disables tune from the command line. I'm not sure what gcc does here. But since -march implies -mtune. I assume 'arch' in the target attribute implies tune in the target attribute. Differential Revision: https://reviews.llvm.org/D86187
-
Craig Topper authored
[X86] Add mtune command line test cases that should have gone with 4cbceb74
-
Matt Arsenault authored
This fixes <6 x s16> = G_CONCAT_VECTORS from <3 x s16> handling.
-
Richard Smith authored
for array bounds, not "integer constant" rules. For an array bound of class type, this causes us to perform an implicit conversion to size_t, instead of looking for a unique conversion to integral or unscoped enumeration type. This affects which cases are valid when a class has multiple implicit conversion functions to different types.
-
Richard Smith authored
In passing, also use a more precise diagnostic to explain why an expression is not an ICE if it's not of integral type.
-
Jonas Devlieghere authored
I move the triple (de)composition logic into the builder in e5d08fcb but this test is relying on Make to construct the set the ARCH, ARCH_CFLAGS and SDKROOT based on the given TRIPLE. This patch updates the test to pass these variables directly. Differential revision: https://reviews.llvm.org/D86244
-
Med Ismail Bennani authored
This patch adds the infrastructure to have language specific REPL init files. It's the foundation work to a following patch that will introduce Swift REPL init file. When lldb is launched with the `--repl` option, it will look for a REPL init file in the home directory and source it. This overrides the default `~/.lldbinit`, which content might make the REPL behave unexpectedly. If the REPL init file doesn't exists, lldb will fall back to the default init file. rdar://65836048 Differential Revision: https://reviews.llvm.org/D86242 Signed-off-by:
Med Ismail Bennani <medismail.bennani@gmail.com>
-
Dokyung Song authored
The behavior of the CrossOver mutator has changed with bb54bcf8. This seems to affect the value-profile-load test on Darwin. This patch provides a wider margin for determining success of the value-profile-load test, by testing the targeted functionality (i.e., GEP index value profile) more directly and faster. To this end, LoadTest.cpp now uses a narrower condition (Size != 8) for initial pruning of inputs, effectively preventing libFuzzer from generating inputs longer than necessary and spending time on mutating such long inputs in the corpus - a functionality not meant to be tested by this specific test. Previously, on x86/Linux, it required 6,597,751 execs with -use_value_profile=1 and 19,605,575 execs with -use_value_profile=0 to hit the crash. With this patch, the test passes with 174,493 execs, providing a wider margin from the given trials of 10,000,000. Note that, without the value profile (i.e., -use_value_profile=0), the test wouldn't pass as it still requires 19,605,575 execs to hit the crash. Differential Revision: https://reviews.llvm.org/D86247
-
Matt Morehouse authored
InitializeInterceptors() calls dlsym(), which calls calloc(). Depending on the allocator implementation, calloc() may invoke mmap(), which results in a segfault since REAL(mmap) is still being resolved. We fix this by doing a direct syscall if interceptors haven't been fully resolved yet. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D86168
-
Siva Chandra Reddy authored
Fixes incorrectly constructed ceill tests.
-
Francesco Petrogalli authored
This patch prevents failures like those reported in http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/34173. We have enabled the default constructor for `llvm::ElementCount` to make sure the code compiles on Windows. Reviewed By: ormris Differential Revision: https://reviews.llvm.org/D86240
-
Petr Hosek authored
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=1119478 Patch By: haampie Differential Revision: https://reviews.llvm.org/D86245
-
Kyungwoo Lee authored
-force-attribute adds an attribute to function via command-line. However, there was no counter-part to remove an attribute. This patch adds -force-remove-attribute that removes an attribute from function. Differential Revision: https://reviews.llvm.org/D85586
-
Sanjay Patel authored
There's a potential motivating case to increase this limit in PR47191: http://bugs.llvm.org/PR47191 But first we should make it less hacky. The limit in InstCombine is directly tied to this value because an increase there can cause asserts in the underlying value tracking calls if not changed together. The usage in VectorUtils is independent, but the comment suggests that we should use the same value unless there's a known reason to diverge. There are similar limits in codegen analysis, but I think we should leave those independent in case we intentionally want the optimization power/cost to be different there. Differential Revision: https://reviews.llvm.org/D86113
-
Mars Saxman authored
Add the unsigned complements to the existing FPToSI and SIToFP operations in the standard dialect, with one-to-one lowerings to the corresponding LLVM operations. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D85557
-