- Apr 05, 2019
-
-
Alex Lorenz authored
`test/Driver/debug-options.c` to ensure that the driver selects the DWARF 2 version as intended by the test. Fixes the `test/Driver/debug-options.c` test regression on GreenDragon on macOS that started failing after r357713. llvm-svn: 357740
-
- Apr 04, 2019
-
-
Alexey Bataev authored
Added test for the task reduction variables with the allocate clause. llvm-svn: 357717
-
Stephen Hines authored
Summary: In the future, Android releases will support DWARF 5, but we need to ensure that older targets only have DWARF 4 generated for them. This patch inserts that verification for all Android releases now. The patch also fixes 2 minor mistakes (a mistakenly moved RUN line, and the missing G_DWARF2 check label). Reviewers: aprantl Reviewed By: aprantl Subscribers: chh, pirama, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60238 llvm-svn: 357713
-
Alexey Bataev authored
Added test for the linear variables with the allocate clause. llvm-svn: 357712
-
Alexey Bataev authored
Fixed the regression of the lookup of user-defined reductions for C. llvm-svn: 357708
-
Alex Bradbury authored
svn add doesn't play very nicely here... llvm-svn: 357702
-
Alex Bradbury authored
When setting up library and tools paths when detecting an accompanying GCC installation only riscv32 was handled. As a consequence when targetting riscv64 neither the linker nor libraries would be found. This adds handling and tests for riscv64. Differential Revision: https://reviews.llvm.org/D53392 Patch by Edward Jones. llvm-svn: 357699
-
Alex Bradbury authored
[RISCV][NFC] s/riscv32-linux-unknown-elf/riscv32-unknown-linux-gnu in test/Driver/riscv32-toolchain.c riscv32-linux-unknown-elf was a weird thing to test for as it doesn't match the triple used in any common RISC-V toolchain distributions (e.g. riscv-gnu-toolchain scripts produce riscv{32,64}-unknown-linux-gnu). llvm-svn: 357693
-
Sam McCall authored
Summary: The fix isn't great, but it's hard to fix properly because the completion code sensibly uses ParmVarDecl to represent parameters, but the AST-building code sensibly doesn't synthesize them if the type is broken. Also this case is apparently really rare, so it's probably not worth bending over backwards for. Reviewers: ilya-biryukov Subscribers: javed.absar, kristof.beyls, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60258 llvm-svn: 357686
-
Anastasia Stulova authored
Prevent adding initializers implicitly to variables declared in local address space. This happens when they get converted into global variables and therefore theoretically have to be default initialized in C++. Differential Revision: https://reviews.llvm.org/D59646 llvm-svn: 357684
-
Anastasia Stulova authored
Improved classification of address space cast when qualification conversion is performed - prevent adding addr space cast for non-pointer and non-reference types. Take address space correctly from the pointee. Also pass correct address space from 'this' object using AggValueSlot when generating addrspacecast in the constructor call. Differential Revision: https://reviews.llvm.org/D59988 llvm-svn: 357682
-
David L. Jones authored
Revert r357452 - 'SimplifyCFG SinkCommonCodeFromPredecessors: Also sink function calls without used results (PR41259)' This revision causes tests to fail under ASAN. Since the cause of the failures is not clear (could be ASAN, could be a Clang bug, could be a bug in this revision), the safest course of action seems to be to revert while investigating. llvm-svn: 357667
-
- Apr 03, 2019
-
-
Alexey Bataev authored
Added test for the reduction variables with the allocate clause. llvm-svn: 357629
-
Alexey Bataev authored
Added test for the lastprivatized variables with the allocate clause. llvm-svn: 357625
-
Artem Dergachev authored
This reverts commit r352473. The overall idea is great, but it seems to cause unintented consequences when not only Region Store invalidation but also pointer escape mechanism was accidentally affected. Based on discussions in https://reviews.llvm.org/D58121#1452483 and https://reviews.llvm.org/D57230#1434161 Differential Revision: https://reviews.llvm.org/D57230 llvm-svn: 357620
-
Alexey Bataev authored
Added codegen/test for the firstprivatized variables with the allocate clause. llvm-svn: 357617
-
Jennifer Yu authored
Bug-40323: MS ABI adding template static member in the linker directive section to make sure init function can be called before main. llvm-svn: 357610
-
Xing GUO authored
Reviewers: Higuoxing Reviewed By: Higuoxing Subscribers: kubamracek, cfe-commits, #sanitizers, llvm-commits Tags: #clang, #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D60183 llvm-svn: 357577
-
Artem Dergachev authored
__builtin_constant_p(x) is a compiler builtin that evaluates to 1 when its argument x is a compile-time constant and to 0 otherwise. In CodeGen it is simply lowered to the respective LLVM intrinsic. In the Analyzer we've been trying to delegate modeling to Expr::EvaluateAsInt, which is allowed to sometimes fail for no apparent reason. When it fails, let's conservatively return false. Modeling it as false is pretty much never wrong, and it is only required to return true on a best-effort basis, which every user should expect. Fixes VLAChecker false positives on code that tries to emulate static asserts in C by constructing a VLA of dynamic size -1 under the assumption that this dynamic size is actually a constant in the sense of __builtin_constant_p. Differential Revision: https://reviews.llvm.org/D60110 llvm-svn: 357557
-
- Apr 02, 2019
-
-
Aaron Enye Shi authored
Also for CUDA, we need to disable producing these fat binary functions when there is no GPU code. Reviewers: yaxunl, tra Differential Revision: https://reviews.llvm.org/D60141 llvm-svn: 357526
-
Aaron Enye Shi authored
Skip producing the fat binary functions for HIP when no device code is present. Reviewers: yaxunl Differential Review: https://reviews.llvm.org/D60141 llvm-svn: 357520
-
Erik Pilkington authored
moveAttrFromListToList only makes sense when moving an attribute to a list with a pool that's either equivalent, or has a shorter lifetime. Therefore, using it to move a ParsedAttr from a declarator to a declaration specifier doesn't make sense, since the declaration specifier's pool outlives the declarator's. The patch adds a new function, ParsedAttributes::takeOneFrom, which transfers the attribute from one pool to another, fixing the use-after-deallocate. rdar://49175426 Differential revision: https://reviews.llvm.org/D60101 llvm-svn: 357516
-
Erik Pilkington authored
This ability was removed in r351487, but it's needed when a lambda appears as an OpaqueValueExpr subexpression of a PseudoObjectExpr. rdar://49030379 Differential revision: https://reviews.llvm.org/D60099 llvm-svn: 357515
-
Alexey Bataev authored
Added codegen/test for the privatized variables with the allocate clause. llvm-svn: 357514
-
Simon Atanasyan authored
In case of N64 ABI toolchain paths migth have `mips-linux-gnuabi64` or `mips-linux-gnu` directory regardless of selected environment. Check both variants while detecting a multiarch triple. Fix for the bug https://bugs.llvm.org/show_bug.cgi?id=41204 llvm-svn: 357506
-
Vedant Kumar authored
Allow the optimizer to remove unnecessary EH cleanups surrounding calls to os_log_helper, to save some code size. As a follow-up, it might be worthwhile to add a BasicNoexcept exception spec to os_log_helper, and to then teach CGCall to emit direct calls for callees which can't throw. This could save some compile-time. Differential Revision: https://reviews.llvm.org/D60108 llvm-svn: 357501
-
Alexey Bataev authored
If the pointer is captured by reference, it must be mapped as _PTR_AND_OBJ kind of mapping to correctly translate the pointer address on the device. llvm-svn: 357488
-
Pierre Gousseau authored
Can be safely enabled on PS4. Reviewed By: probinson Differential Revision: https://reviews.llvm.org/D59815 llvm-svn: 357480
-
Strahinja Petrovic authored
This patch prevents floating point register constraints in soft float mode. Differential Revision: https://reviews.llvm.org/D59310 llvm-svn: 357466
-
Hans Wennborg authored
The code was previously checking that candidates for sinking had exactly one use or were a store instruction (which can't have uses). This meant we could sink call instructions only if they had a use. That limitation seemed a bit arbitrary, so this patch changes it to "instruction has zero or one use" which seems more natural and removes the need to special-case stores. Differential revision: https://reviews.llvm.org/D59936 llvm-svn: 357452
-
- Apr 01, 2019
-
-
Michael Kruse authored
Before this patch, CGLoop would dump all transformations for a loop into a single LoopID without encoding any order in which to apply them. rL348944 added the possibility to encode a transformation order using followup-attributes. When a loop has more than one transformation, use the follow-up attribute define the order in which they are applied. The emitted order is the defacto order as defined by the current LLVM pass pipeline, which is: LoopFullUnrollPass LoopDistributePass LoopVectorizePass LoopUnrollAndJamPass LoopUnrollPass MachinePipeliner This patch should therefore not change the assembly output, assuming that all explicit transformations can be applied, and no implicit transformations in-between. In the former case, WarnMissedTransformationsPass should emit a warning (except for MachinePipeliner which is not implemented yet). The latter could be avoided by adding 'llvm.loop.disable_nonforced' attributes. Because LoopUnrollAndJamPass processes a loop nest, generation of the MDNode is delayed to after the inner loop metadata have been processed. A temporary LoopID is therefore used to annotate instructions and RAUW'ed by the actual LoopID later. Differential Revision: https://reviews.llvm.org/D57978 llvm-svn: 357415
-
Alexey Bataev authored
According to OpenMP 5.0, 2.11.4 allocate Clause, Restrictions, allocate clauses that appear on a target construct or on constructs in a target region must specify an allocator expression unless a requires directive with the dynamic_allocators clause is present in the same compilation unit. Patch adds a check for this restriction. llvm-svn: 357412
-
Alexey Bataev authored
According to OpenMP 5.0 standard, 2.11.4 allocate Clause, Restrictions, For any list item that is specified in the allocate clause on a directive, a data-sharing attribute clause that may create a private copy of that list item must be specified on the same directive. Patch adds the checks for this restriction. llvm-svn: 357390
-
- Mar 31, 2019
-
-
Sanjay Patel authored
In PR41304: https://bugs.llvm.org/show_bug.cgi?id=41304 ...we have a case where we want to fold a binop of select-shuffle (blended) values. Rather than try to match commuted variants of the pattern, we can canonicalize the shuffles and check for mask equality with commuted operands. We don't produce arbitrary shuffle masks in instcombine, but select-shuffles are a special case that the backend is required to handle because we already canonicalize vector select to this shuffle form. So there should be no codegen difference from this change. It's possible that this improves CSE in IR though. Differential Revision: https://reviews.llvm.org/D60016 llvm-svn: 357366
-
David Chisnall authored
Summary: Based on a patch by Dustin Howett, modified to not change the ABI for ELF platforms. Use more Windows-like section names. This also makes things more readable by PE/COFF debug tools that assume sections fit in the first header. With these changes in, it is now possible to build a working WinObjC with clang and the WinObjC version of GNUstep libobjc (upstream GNUstep libobjc + a work around for incremental linking, which can be removed once LINK.EXE gains a feature to opt sections out of receiving extra padding during an incremental link). Patch by Dustin Howett! Reviewers: DHowett-MSFT Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58724 llvm-svn: 357364
-
David Chisnall authored
Without this change, linking multiple objects containing block descriptors together on Windows will generate duplicate symbol errors. Patch by Dustin Howett! Differential Revision: https://reviews.llvm.org/D58807 llvm-svn: 357363
-
David Chisnall authored
This doesn't make a difference most of the time but FreeBSD/ARM doesn't run anything in the .ctors array. llvm-svn: 357362
-
- Mar 30, 2019
-
-
Artem Dergachev authored
Differential Revision: https://reviews.llvm.org/D59914 llvm-svn: 357335
-
Hubert Tong authored
Summary: When building the `check-all` target on AIX, lit produces ``` warning: unable to inject shared library path on 'AIX' ``` This patch addresses this. `LIBPATH` is the environment variable of interest on AIX. Newer versions of AIX may consider `LD_LIBRARY_PATH`, but only when `LIBPATH` is unset. Reviewers: xingxue, jasonliu, sfertile, serge-sans-paille Reviewed By: xingxue Subscribers: jsji, cfe-commits, llvm-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59741 llvm-svn: 357334
-
Artem Dergachev authored
This reverts commit r357323. ASan leaks found by a buildbot :) Differential Revision: https://reviews.llvm.org/D58367 llvm-svn: 357332
-