- Aug 20, 2020
-
-
Bjorn Pettersson authored
The getSrcFromCopy helper nowadays return a MachineOperand pointer, so talking about zero_reg was incorrect as it nowadays return a nullptr when not finding a copy like instruction.
-
Adam Czachorowski authored
This addresses a FIXME in ASTReader. Modules were already re-exported for Preprocessor, but not for Sema. The result was that, with -fmodules-local-submodule-visibility, all AST nodes belonging to a module that was loaded in a premable where not accesible from the main part of the file and a diagnostic recommending importing those modules would be generated. Differential Revision: https://reviews.llvm.org/D86069
-
Adam Czachorowski authored
When preamble contains #undef, indexing code finds the matching #define and uses that during indexing. However, it would only look for local definitions. If the macro was defined in a module, MacroInfo would be nullptr and clangd would crash. This change makes clangd ignore any #undef without a matching #define inside the same TU. The indexing of macros happens for preamble only, so then #undef must be in the preamble, which is why we need two .h files in a test. Note that clangd is currently not ready for module support, but this brings us one step closer. This was previously attempted in 4061d9e4, but had to be reverted due to broken test. This version fixes that test-only bug by setting a custom module cache path to avoid re-use of modules across test invocations. Differential Revision: https://reviews.llvm.org/D85923
-
Simon Pilgrim authored
-
David Green authored
-
Shinji Okumura authored
Currently, although we handle `CallBase` case in updateImpl, we give up in initialize in the case. That is problematic when we propagate a range from call site returned position to floating position. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D86196
-
Vitaly Buka authored
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-ubuntu/builds/8256/steps/test-check-all/logs/FAIL%3A%20LLVM%3A%3Athinlto-function-summary-paramaccess.ll Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D86053
-
Georgii Rymar authored
This reverts commit 455d5a8a. It broke UBSan: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-ubsan/builds/21386/steps/check-llvm%20ubsan/logs/stdio /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/tools/llvm-readobj/ELF/malformed-pt-dynamic.test:62:10: error: WARN3: expected string not found in input # WARN3: error: '[[FILE]]': Invalid data was encountered while parsing the file ^ <stdin>:2:1: note: scanning from here /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:1956:46: runtime error: addition of unsigned offset to 0x0000020c5b30 overflowed to 0x0000020c5b2f ^ <stdin>:2:1: note: with "FILE" equal to "/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/test/tools/llvm-readobj/ELF/Output/malformed-pt-dynamic\\.test\\.tmp3" /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:1956:46: runtime error: addition of unsigned offset to 0x0000020c5b30 overflowed to 0x0000020c5b2f ^ <stdin>:2:117: note: possible intended match here /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:1956:46: runtime error: addition of unsigned offset to 0x0000020c5b30 overflowed to 0x0000020c5b2f ^ Input file: <stdin> Check file: /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/tools/llvm-readobj/ELF/malformed-pt-dynamic.test
-
Paul Walker authored
For scalable vector shifts the prediacte is typically all active, which gets selected to an unpredicated shift by immediate. When code generating for fixed length vectors the predicate is based on the vector length and so additional patterns are required to make use of SVE's predicated shift by immediate instructions. Differential Revision: https://reviews.llvm.org/D86204
-
David Stenberg authored
When removing a non-constant store to a global in CleanupPointerRootUsers(), the GlobalOpt pass could incorrectly return false. This was caught using the check introduced by D80916. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D86149
-
David Stenberg authored
Relanded since the buildbot issue was unrelated to this commit. 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
-
Bjorn Pettersson authored
The byte swapping, when dealing with 4 byte (float) FP constants in DwarfExpression::addConstantFP, added in commit ef8992b9 was not correct. It always performed byte swapping using an uint64_t value. When dealing with 4 byte values the 4 interesting bytes ended up in the big end of the uint64_t, but later we emitted the 4 bytes at the little end. So we ended up with zeroes being emitted and faulty debug information. This patch simplifies things a bit, IMHO. Using the APInt representation throughout the function, instead of looking at the internal representation using getRawBytes and without using reinterpret_cast etc. And using API.byteSwap() should result in correct byte swapping independent of APInt being 4 or 8 bytes. Differential Revision: https://reviews.llvm.org/D86272
-
Georgii Rymar authored
The code that reports "PT_DYNAMIC segment offset + size exceeds the size of the file" has an issue: it is possible to bypass the validation by overflowing the size + offset result. Differential revision: https://reviews.llvm.org/D85519
-
David Stenberg authored
This reverts commit dfd447c2. After I pushed this commit, llvm-sphinx-docs started failing, due to: Warning, treated as error: extension 'recommonmark' has no setup() function; is it really a Sphinx extension module? I don't see how this commit may have caused that, but I'm still reverting it since I don't know how to proceed with that troubleshooting.
-
Evgeny Leviant authored
Differential revision: https://reviews.llvm.org/D73698
-
Sebastian Neubauer authored
When sampling from images with coordinates that only have 16 bit accuracy, convert the image intrinsic call to use a16 or g16. This does only happen if the target hardware supports it. An alternative would be to always apply this combination, independent of the target hardware and extend 16 bit arguments to 32 bit arguments during legalization. To me, this sounds like an unnecessary roundtrip that could prevent some further InstCombine optimizations. Differential Revision: https://reviews.llvm.org/D85887
-
Konstantin Schwarz authored
The check for the landingpad instructions was overly restrictive. In optimimized builds PHI nodes can appear before the landingpad instructions, resulting in a fallback to SelectionDAG. This change relaxes the check to allow PHI nodes. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D86141
-
Georgii Rymar authored
Currently we have to set 'Machine' to something in our YAML descriptions. Usually we use 'EM_X86_64' for 64-bit targets and 'EM_386' for 32-bit targets. At the same time, in fact, in most cases our tests do not need a machine type and we can use 'EM_NONE'. This is cleaner, because avoids the need of using a particular machine. In this patch I've made the 'Machine' key optional (the default value, when it is not specified is `EM_NONE`) and removed it (where possible) from yaml2obj, obj2yaml and llvm-readobj tests. There are few tests left where I decided not to remove it, because I didn't want to touch CHECK lines or doing anything more complex than a removing a "Machine: *" line and formatting lines around. Differential revision: https://reviews.llvm.org/D86202
-
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
-