- Apr 08, 2020
-
-
Clement Courbet authored
-
Ilya Leoshkevich authored
Summary: Commit b684c1a5 ("Add a `Symbolizer::GetEnvP()` method that allows symbolizer implementations to customise the environment of the symbolizer binary.") exposed a latent ARM issue, and that broke http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-full-sh This coincided with breakage caused by my commit 5f5fb56c ("[compiler-rt] Intercept the uname() function"), so I had to investigate. The issue is that GetArgsAndEnv does not work on ARM: there glibc's _start overwrites argc value stored at __libc_start_end, breaking the existing argv/envp parsing logic. Fix by inferring argc from argv. Reviewers: eugenis, vitalybuka Reviewed By: eugenis Subscribers: dberris, kristof.beyls, danielkiss, #sanitizers, delcypher Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D77400
-
Haojian Wu authored
Summary: so that go-to-def on label can work. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D77715
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Sam McCall authored
Summary: It runs one command and exits. See D77385 for motivation. Reviewers: mnauw, kbobyrev Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D77645
-
Andrew Ng authored
Differential Revision: https://reviews.llvm.org/D77659
-
Adam Czachorowski authored
Summary: The crash happened on cases like: template<typename TT> using one = two::three<T^T>; because we tried to call getName() on getBaseTypeIdentifier(), which can be nullptr. Ideally we would support this use case as well, but for now not crashing will do. Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D77656
-
Uday Bondhugula authored
Fix gcc-5 build failure cause by D77528 Differential Revision: https://reviews.llvm.org/D77719
-
Peter Smith authored
The R_ARM_ALU_PC_G0 and R_ARM_LDR_PC_G0 relocations are used by the ADR and LDR pseudo instructions, and are the basis of the group relocations that can load an arbitrary constant via a series of add, sub and ldr instructions. The relocations need to be obtained via the .reloc directive. R_ARM_ALU_PC_G0 is much more complicated as the add/sub instruction uses a modified immediate encoding of an 8-bit immediate rotated right by an even 4-bit field. This means that the range of representable immediates is sparse. We extract the encoding and decoding functions for the modified immediate from llvm/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h as this header file is not accessible from LLD. Duplication of code isn't ideal, but as these are well-defined mathematical functions they are unlikely to change. Differential Revision: https://reviews.llvm.org/D75349
-
Simon Pilgrim authored
Tests derived from PR42035 examples
-
Sam McCall authored
Summary: This triggers only on the definition itself, not on references (probably too noisy). Inspecting the definition seems like a decent hint for being interested in layout. Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D77355
-
Jeremy Morse authored
This is a performance patch that hoists two conditions in DwarfDebug's validThroughout to avoid a linear-scan of all instructions in a block. We now exit early if validThrougout will never return true for the variable location. The first added clause filters for the two circumstances where validThroughout will return true. The second added clause should be identical to the one that's deleted from after the linear-scan. Differential Revision: https://reviews.llvm.org/D77639
-
Peter Smith authored
The R_AARCH64_PLT32 relocation type will be documented in the next release of ELF for the 64-bit Arm Architecture. It is being added in draft state for the benefit of the position independent vtable feature. R_AARCH64_PLT32 is very similar to R_AARCH64_PREL32. The intention is to provide a signed 32-bit integer representing an offset from the place to a function. - It relocates 32-bit data - The expression is S + A - P - The overflow check for the expression is -2^31 <= X < 2^31 - The relocation generates Thunks/Veneers/Stubs and PLT entries as per R_AArch64_CALL26 - If the symbol S is an undefined weak the ABI does not define its value. The ABI defines a code for ilp32 for completeness, I have added the code but have only added to the existing reloc-types-elf-aarch64.text as there is no ilp32 equivalent. Differential Revision: https://reviews.llvm.org/D77647
-
Shengchen Kan authored
Summary: Since D75300 has been landed, I want to support enhanced relaxation when we need to align branches and allow prefix padding. "Enhanced Relaxtion" means we allow an instruction that could not be traditionally relaxed to be emitted into RelaxableFragment so that we increase its length by adding prefixes for optimization. The motivation is straightforward, RelaxFragment is mostly for relative jumps and we can not increase the length of jumps when we need to align them, so if we need to achieve D75300's purpose (reducing the bytes of nops) when need to align jumps, we have to make more instructions "relaxable". Reviewers: reames, MaskRay, craig.topper, LuoYuanke, jyknight Reviewed By: reames Subscribers: hiraditya, llvm-commits, annita.zhang Tags: #llvm Differential Revision: https://reviews.llvm.org/D76286
-
Mikael Holmen authored
Summary: This fixes PR45302. Previously the case BB1 / \ | | TBB FBB | | \ / BB2 was treated as a valid diamond also when TBB and FBB was the same basic block. This then lead to a failed assertion in IfConvertDiamond. Since TBB == FBB is quite a degenerated case of a diamond, we now don't treat it as a valid diamond anymore, and thus we will avoid the trouble of making IfConvertDiamond handle it correctly. Reviewers: efriedma, kparzysz Reviewed By: efriedma Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D77651 -
Anna Welker authored
This patch adds an analysis of the offset addresses used by gathers and scatters to the MVEGatherScatterLowering pass to find multiplications and additions that are loop invariant and thus can be moved into the loop preheader, avoiding to execute them each time. Differential Revision: https://reviews.llvm.org/D76681
-
Max Kazantsev authored
-
Dominik Montada authored
Summary: Legalization can introduce the trunc(trunc) pattern. This can cause problems if one of these intermediate truncs is not legal. Combine truncs of this pattern, if the resulting trunc is legal. Reviewers: arsenm, aemerson, dsanders Reviewed By: arsenm Subscribers: jvesely, wdng, nhaehnle, rovka, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76601
-
James Henderson authored
When two sections shared the same address, the disassembly code was using pointer values when sorting (see the SectionRef less than operator). Since those values aren't guaranteed to have a specific order, this meant the disassembly code would sometimes change which section to pick when finding symbols targeted by calls in fully linked objects. This change fixes the non-determinism, so that the same section is always picked. This might have a negative impact in that now a section without any symbol might be picked over a section with symbols, but this will be addressed in a later commit. Fixes https://bugs.llvm.org/show_bug.cgi?id=45411. Reviewed by: grimar, MaskRay Differential Revision: https://reviews.llvm.org/D77640
-
Uday Bondhugula authored
Support to recognize and deal with aligned_alloc was recently added to LLVM's TLI/MemoryBuiltins and its various optimization passes. This revision adds support for generation of aligned_alloc's when lowering AllocOp from std to LLVM. Setting 'use-aligned_alloc=1' will lead to aligned_alloc being used for all heap allocations. An alignment and size that works with the constraints of aligned_alloc is chosen. Using aligned_alloc is preferable to "using malloc and adjusting the allocated pointer to align for indexing" because the pointer access arithmetic done for the latter only makes it harder for LLVM passes to deal with for analysis, optimization, attribute deduction, and rewrites. Differential Revision: https://reviews.llvm.org/D77528
-
Balázs Kéri authored
Summary: Store the error flags (EOF or error) of a stream. Support the functions feof, ferror, clearerr. Added a test checker for setting the error flags. Reviewers: Szelethus, NoQ, Charusso, baloghadamsoftware, xazax.hun Reviewed By: Szelethus Subscribers: steakhal, ASDenysPetrov, rnkovacs, xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, gamesh411, Charusso, martong, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D75682
-
Dominik Montada authored
Summary: Combine sext(zext x) to (zext x) since the sign-bit is 0 after the zero-extension. Combine sext(sext x) to (sext x) and ext(zext x) to (zext x) since the intermediate step is not needed. Reviewers: arsenm, volkan, aemerson, aditya_nandakumar Reviewed By: arsenm Subscribers: jvesely, wdng, nhaehnle, rovka, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77210
-
Christian Sigg authored
Reviewers: herhut Reviewed By: herhut Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, grosul1, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77709
-
Dominik Montada authored
Summary: When narrowing G_IMPLICIT_DEF where the original size is not a multiple of the narrow size, emit a smaller G_IMPLICIT_DEF and use G_ANYEXT. To prevent a potential endless loop in the legalizer, the condition to combine G_ANYEXT(G_IMPLICIT_DEF) is changed from isInstUnsupported to !isInstLegal, since in this case the combine is only valid if consequent legalization of the newly combined G_IMPLICIT_DEF does not introduce G_ANYEXT due to narrowing. Although this legalization for G_IMPLICIT_DEF would also be valid for the general case, it actually caused a lot of code regressions when tried due to superfluous COPYs and combines not getting hit anymore. Reviewers: dsanders, aemerson, volkan, arsenm, aditya_nandakumar Reviewed By: arsenm Subscribers: jvesely, nhaehnle, kerbowa, wdng, rovka, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76598
-
Kadir Cetinkaya authored
Summary: Our tests stash callbacks into request context and rely on it being invoked before threads going idle. Reviewers: sammccall Subscribers: ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D77671
-
Kadir Cetinkaya authored
Summary: This assertion was bad. It will show up once we start running preamble thread async. Think about the following case: - Update 1 builds a preamble, and an AST. Caches the AST. - Update 2 Invalidates the cache, preamble hasn't changed. - Update 3 Invalidates the cache, preamble hasn't changed - Read builds AST using preamble v1, and caches it. preamble for v2 gets build, cache isn't invalidated since preamble is same. generateDiags tries to reuse cached AST but latest version is 3 not 2, so assertion fails. Reviewers: sammccall Subscribers: ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D77664 -
Kazushi (Jam) Marukawa authored
Summary: To prepare continuous changes, simplify uimm6 and simm7 operands. Reviewed By: simoll Differential Revision: https://reviews.llvm.org/D77700
-
Austin Conlon authored
-
Igor Kudrin authored
In DWARFv5, type units are stored in .debug_info sections, along with compilation units, and they are distinguished by the unit_type field in the header, not by the name of the section. It is impossible to associate the correct index section of a DWP file with the unit before the unit's header is read. This patch fixes reading DWARFv5 type units by parsing the header first and then applying the index entry according to the actual unit type. Differential Revision: https://reviews.llvm.org/D77552
-
Julian Lettner authored
-
Julian Lettner authored
This change aligns the test summary output along the longest category label. We also properly align test counts. Before: ``` Testing Time: 10.30s Unsupported Tests : 1 Expected Passes : 30 ``` After: ``` Testing Time: 10.29s Unsupported Tests: 1 Expected Passes : 30 ```
-
LLVM GN Syncbot authored
-
Stanislav Mekhanoshin authored
Differential Revision: https://reviews.llvm.org/D77693
-
Johannes Doerfert authored
For OpenMP target regions to piggy back on the CUDA/AMDGPU/... implementation of math functions, we include the appropriate definitions inside of an `omp begin/end declare variant match(device={arch(nvptx)})` scope. This way, the vendor specific math functions will become specialized versions of the system math functions. When a system math function is called and specialized version is available the selection logic introduced in D75779 instead call the specialized version. In contrast to the code path we used so far, the system header is actually included. This means functions without specialized versions are available and so are macro definitions. This should address PR42061, PR42798, and PR42799. Reviewed By: ye-luo Differential Revision: https://reviews.llvm.org/D75788 -
Johannes Doerfert authored
As with regular calls, we want to specialize a call that went through template instantiation if it has an applicable OpenMP declare variant. Reviewed By: erichkeane, mikerice Differential Revision: https://reviews.llvm.org/D77290
-
Johannes Doerfert authored
By default, all traits in the OpenMP context selector have to match for it to be acceptable. Though, we sometimes want a single property out of multiple to match (=any) or no match at all (=none). We offer these choices as extensions via `implementation={extension(match_{all,any,none})}` to the user. The choice will affect the entire context selector not only the traits following the match property. The first user will be D75788. There we can replace ``` #pragma omp begin declare variant match(device={arch(nvptx64)}) #define __CUDA__ #include <__clang_cuda_cmath.h> // TODO: Hack until we support an extension to the match clause that allows "or". #undef __CLANG_CUDA_CMATH_H__ #undef __CUDA__ #pragma omp end declare variant #pragma omp begin declare variant match(device={arch(nvptx)}) #define __CUDA__ #include <__clang_cuda_cmath.h> #undef __CUDA__ #pragma omp end declare variant ``` with the much simpler ``` #pragma omp begin declare variant match(device={arch(nvptx, nvptx64)}, implementation={extension(match_any)}) #define __CUDA__ #include <__clang_cuda_cmath.h> #undef __CUDA__ #pragma omp end declare variant ``` Reviewed By: mikerice Differential Revision: https://reviews.llvm.org/D77414 -
Johannes Doerfert authored
If we have a function definition in `omp begin/end declare variant` it is a specialization of a base function with the same name and "compatible" type. Before, we just created a declaration for the base. With this patch we try to find an existing declaration first and only create a new one if we did not find any with a compatible type. This is preferable as we can tolerate slight mismatches, especially if the specialized version is "more constrained", e.g., constexpr. Reviewed By: mikerice Differential Revision: https://reviews.llvm.org/D77252
-
Nicolas Vasilache authored
This revision removes the reliance of Promotion on `linalg.slice` which is meant for the rank-reducing case. Differential Revision: https://reviews.llvm.org/D77676
-
Johannes Doerfert authored
It seems one target was missed in D77666 which kept some bots red [0]. [0] http://lab.llvm.org:8011/builders/clang-ppc64le-linux-multistage/builds/12079/steps/build%20stage%201/logs/stdio
-