summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [P0936R0] add [[clang::lifetimebound]] attributeRichard Smith2018-08-0112-77/+383
| | | | | | | | | | | | | | | | | | | This patch adds support for a new attribute, [[clang::lifetimebound]], that indicates that the lifetime of a function result is related to one of the function arguments. When walking an initializer to make sure that the lifetime of the initial value is at least as long as the lifetime of the initialized object, we step through parameters (including the implicit object parameter of a non-static member function) that are marked with this attribute. There's nowhere to write an attribute on the implicit object parameter, so in lieu of that, it may be applied to a function type (where it appears immediately after the cv-qualifiers and ref-qualifier, which is as close to a declaration of the implicit object parameter as we have). I'm currently modeling this in the AST as the attribute appertaining to the function type. Differential Revision: https://reviews.llvm.org/D49922 llvm-svn: 338464
* [PATCH] [SLC] Test simplification of pow() for vector types (NFC)Evandro Menezes2018-08-011-0/+95
| | | | | | | Add test case for the simplification of `pow()` for vector types that D50035 enables. llvm-svn: 338463
* [Polly-ACC] Fix compilation after r338450. NFC.Michael Kruse2018-08-011-1/+1
| | | | llvm-svn: 338462
* [JSONExporter] Replace bundled Jsoncpp with llvm/Support/JSON.h. NFC.Michael Kruse2018-08-0122-6666/+80
| | | | | | Differential Revision: https://reviews.llvm.org/D49950 llvm-svn: 338461
* Android is an environment and we were comparing the android tripleEric Christopher2018-07-311-3/+3
| | | | | | | | | against the OS rather than the environment. Also update other uses of OS when we meant environment in the android local code. NFC intended. llvm-svn: 338460
* Tidy up comment.Eric Christopher2018-07-311-2/+2
| | | | llvm-svn: 338459
* Use UnknownVendor rather than UnknownArch since they're in two different enumsEric Christopher2018-07-311-1/+1
| | | | | | and we're switching on vendor and not arch. llvm-svn: 338458
* Final bit of P0063 - make sure that aligned_alloc is available when the ↵Marshall Clow2018-07-313-4/+24
| | | | | | underlying C library supports it llvm-svn: 338457
* [compiler-rt] Add a routine to specify the mode used when creating profile dirs.Matt Davis2018-07-313-1/+64
| | | | | | | | | | | | | | | | | | | | | Summary: This patch introduces `llvm_profile_set_dir_mode` and `llvm_profile_get_dir_mode` to the compiler-rt profile API. Originally, profile data was placed into a directory that was created with a hard-coded mode value of 0755 (for non-win32 builds). In certain cases, it can be helpful to create directories with a different mode other than 0755. This patch introduces set/get routines to allow users to specify a desired mode. The default remains at 0755. Reviewers: void, probinson Reviewed By: probinson Subscribers: probinson, dberris, cfe-commits Differential Revision: https://reviews.llvm.org/D49953 llvm-svn: 338456
* [constexpr] Support for constant evaluation of __builtin_memcpy andRichard Smith2018-07-315-54/+375
| | | | | | | | | | | | | | __builtin_memmove (in non-type-punning cases). This is intended to permit libc++ to make std::copy etc constexpr without sacrificing the optimization that uses memcpy on trivially-copyable types. __builtin_strcpy and __builtin_wcscpy are not handled by this change. They'd be straightforward to add, but we haven't encountered a need for them just yet. llvm-svn: 338455
* Test for the presence of a bunch of new macros for c++17. These macros come ↵Marshall Clow2018-07-314-0/+105
| | | | | | from C11. Part of P0063 llvm-svn: 338454
* [gcov] Add tests using switch, one with break clauses and one with fallthroughMarco Castelluccio2018-07-315-0/+98
| | | | llvm-svn: 338453
* Revert r338354 "[ARM] Revert r337821"Reid Kleckner2018-07-314-12/+12
| | | | | | | | | | | | | | | | | Disable ARMCodeGenPrepare by default again. It is causing verifier failues in V8 that look like: Duplicate integer as switch case switch i32 %trunc, label %if.end13 [ i32 0, label %cleanup36 i32 0, label %if.then8 ], !dbg !4981 i32 0 fatal error: error in backend: Broken function found, compilation aborted! I will continue reducing the test case and send it along. llvm-svn: 338452
* [CodeGen] Convert IslNodeBuilder::getNumberOfIterations to isl++. NFC.Michael Kruse2018-07-312-31/+19
| | | | llvm-svn: 338451
* [CodeGen] Convert IslNodeBuilder::createForSequential to isl++. NFC.Michael Kruse2018-07-312-26/+18
| | | | llvm-svn: 338450
* [CodeGen] Convert IslNodeBuilder::getUpperBound to isl++. NFC.Michael Kruse2018-07-312-32/+18
| | | | llvm-svn: 338449
* [WebAssembly] Fix debug info tests after r338437.David L. Jones2018-07-311-19/+13
| | | | | | | After r338437, debug_ranges are no longer emitted. Previously, this was only done for DWARF version 5 and above. llvm-svn: 338448
* [DWARF] Support for .debug_addr (consumer)Victor Leschuk2018-07-3123-10/+702
| | | | | | | This patch implements basic support for parsing and dumping DWARFv5 .debug_addr section. llvm-svn: 338447
* [SLC] Refactor the simplication of pow() (NFC)Evandro Menezes2018-07-311-20/+16
| | | | | | Reword comments and minor code reformatting. llvm-svn: 338446
* Allow oformat to accept format starting with elf as acceptable format. ↵Rumeet Dhindsa2018-07-312-0/+4
| | | | | | | | | | isOutputFormatBinary returns false in such case. Example: --oformat elf64-x86-64 Differential Revision: https://reviews.llvm.org/D50105 llvm-svn: 338445
* Revert r337635 "[Driver] Sanitizer support based on runtime library presence"Reid Kleckner2018-07-3122-106/+42
| | | | | | | | This change causes issues with distributed build systems, which may only have compiler binaries without any runtime libraries. See discussion about this on https://reviews.llvm.org/D15225. llvm-svn: 338444
* [llvm-objcopy] Make --strip-debug strip .gdb_indexFangrui Song2018-07-312-2/+9
| | | | | | | | | | | | | | | | | Summary: See binutils-gdb/bfd/elf.c, GNU objcopy also strips .stab* (STABS) .line* (DWARF 1) .gnu.linkonce.wi.* (linkonce section for .debug_info) but I'm not sure we need to be compatible with it. Reviewers: dblaikie, alexshap, jakehehrlich, jhenderson Reviewed By: alexshap, jakehehrlich Subscribers: aprantl, JDevlieghere, jakehehrlich, llvm-commits Differential Revision: https://reviews.llvm.org/D50100 llvm-svn: 338443
* Revert r338431: "Add DebugCounters to DivRemPairs"George Burgess IV2018-07-312-96/+0
| | | | | | | This reverts r338431; the test it added is making buildbots unhappy. Locally, I can repro the failure on reverse-iteration builds. llvm-svn: 338442
* [analyzer] Fix eliding the same destructor twice due to buggy default arguments.Artem Dergachev2018-07-312-1/+17
| | | | | | | | | | | Because of incomplete support for CXXDefaultArgExpr, we cannot yet commit to asserting that the same destructor won't be elided twice. Suppress the assertion failure for now. Proper support is still an open problem. Differential Revision: https://reviews.llvm.org/D49213 llvm-svn: 338441
* [lld] Fix test RUN commands so they don't fail when run in a read-only ↵David L. Jones2018-07-311-6/+6
| | | | | | | | | | filesystem. Some test setups run tests in a read-only path, which means that opening the default output path (a.out) for write will fail. This change adds appropriate -o flags so the tests will not fail spuriously. llvm-svn: 338440
* [CFG] [analyzer] NFC: Enumerate construction context layer kinds.Artem Dergachev2018-07-315-310/+420
| | | | | | | | | | | | | | This is a refactoring patch; no functional change intended. The common part of ConstructionContextLayer and ConstructedObjectKey is factored out into a new structure, ConstructionContextItem. Various sub-kinds of ConstructionContextItem are enumerated in order to provide richer information about construction contexts. Differential Revision: https://reviews.llvm.org/D49210. llvm-svn: 338439
* [serialization] PR34728: Don't assume that only a suffix of templateRichard Smith2018-07-313-15/+60
| | | | | | | | | | | | | parameters can have default arguments. At least for function templates and class template partial specializations, it's possible for a template parameter with a default argument to be followed by a non-pack template parameter with no default argument, and this case was not properly handled here. Testcase by Steve O'Brien! llvm-svn: 338438
* [DWARF] Do not create a .debug_ranges section when no ranges are needed.Wolfgang Pieb2018-07-311-1/+1
| | | | | | | | Reviewers: aprantl Differential Revision: https://reviews.llvm.org/D50089 llvm-svn: 338437
* [CFG] [analyzer] Implement function argument construction contexts.Artem Dergachev2018-07-317-51/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | In r330377 and r338425 we have already identified what constitutes function argument constructors and added stubs in order to prevent confusing them with other temporary object constructors. Now we implement a ConstructionContext sub-class to carry all the necessary information about the construction site, namely call expression and argument index. On the analyzer side, the patch interacts with the recently implemented pre-C++17 copy elision support in an interesting manner. If on the CFG side we didn't find a construction context for the elidable constructor, we build the CFG as if the elidable constructor is not elided, and the non-elided constructor within it is a simple temporary. But the same problem may occur in the analyzer: if the elidable constructor has a construction context but the analyzer doesn't implement such context yet, the analyzer should also try to skip copy elision and still inline the non-elided temporary constructor. This was implemented by adding a "roll back" mechanism: when elision fails, roll back the changes and proceed as if it's a simple temporary. The approach is wonky, but i'm fine with that as long as it's merely a defensive mechanism that should eventually go away once all construction contexts become supported. Differential Revision: https://reviews.llvm.org/D48681. llvm-svn: 338436
* AMDGPU: Split amdgcn/r600 fminnum/fmaxnum testsMatt Arsenault2018-07-314-443/+667
| | | | | | | R600 breaks on too many things to usefully test changes with ieee_mode on vs. off. llvm-svn: 338435
* ELF: Add libcall symbols to the link when LTO is being used.Peter Collingbourne2018-07-313-3/+45
| | | | | | | | | | | | If any of our inputs are bitcode files, the LTO code generator may create references to certain library functions that might not be explicit in the bitcode file's symbol table. If any of those library functions are defined in a bitcode file in an archive member, we need to arrange to use LTO to compile those archive members by adding them to the link beforehand. Differential Revision: https://reviews.llvm.org/D50017 llvm-svn: 338434
* [analyzer] Move InnerPointerChecker out of alpha.Reka Kovacs2018-07-312-5/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D49058 llvm-svn: 338433
* [OpenCL] Forbid size dependent types used as kernel argumentsAlexey Sotkin2018-07-312-4/+72
| | | | | | | | | | | | | | | | | | | | Summary: Size_t, intptr_t, uintptr_t and ptrdiff_t cannot be used as kernel arguments, according to OpenCL Specification s6.9k: The size in bytes of these types are implementation-defined and in addition can also be different for the OpenCL device and the host processor making it difficult to allocate buffer objects to be passed as arguments to a kernel declared as pointer to these types. Patch by: Andrew Savonichev Reviewers: Anastasia, yaxunl Subscribers: yaxunl, Anastasia, cfe-commits Differential Revision: https://reviews.llvm.org/D49725 llvm-svn: 338432
* Add DebugCounters to DivRemPairsGeorge Burgess IV2018-07-312-0/+96
| | | | | | | | | | For people who don't use DebugCounters, NFCI. Patch by Zhizhou Yang! Differential Revision: https://reviews.llvm.org/D50033 llvm-svn: 338431
* [llvm-mca] Update the help text to reflect "physical" registers. NFC.Matt Davis2018-07-311-1/+1
| | | | llvm-svn: 338430
* [SystemZ] Fix bad assert composition.Jonas Paulsson2018-07-311-1/+1
| | | | | | Use '&&' before the string instead of '||' llvm-svn: 338429
* DAG: Correct pointer type used for stack slotMatt Arsenault2018-07-311-1/+2
| | | | | | | | | | Correct the address space for the inserted argument stack slot. AMDGPU seems to not do anything with this information, so I don't think this was breaking anything. llvm-svn: 338428
* [OpenCL] Check for invalid kernel arguments in array typesAlexey Sotkin2018-07-312-5/+40
| | | | | | | | | | | | | | | | Summary: OpenCL specification forbids use of several types as kernel arguments. This patch improves existing diagnostic to look through arrays. Patch by: Andrew Savonichev Reviewers: Anastasia, yaxunl Subscribers: yaxunl, Anastasia, cfe-commits Differential Revision: https://reviews.llvm.org/D49723 llvm-svn: 338427
* [CFG] [analyzer] Add construction contexts for returning C++ objects in ObjC++.Artem Dergachev2018-07-314-39/+148
| | | | | | | | | | | Like any normal funciton, Objective-C message can return a C++ object in Objective-C++. Such object would require a construction context. This patch, therefore, is an extension of r327343 onto Objective-C++. Differential Revision: https://reviews.llvm.org/D48608 llvm-svn: 338426
* [CFG] [analyzer] Add stubs for constructor and message argument constructors.Artem Dergachev2018-07-316-12/+173
| | | | | | | | | | | | | | | | | | CFG now correctly identifies construction context for temporaries constructed for the purpose of passing into a function as an argument. Such context is still not fully implemented because the information it provides is not rich enough: it doens't contain information about argument index. It will be addresssed later. This patch is an extension of r330377 to C++ construct-expressions and Objective-C message expressions which aren't call-expressions but require similar handling. C++ new-expressions with placement arguments still remain to be handled. Differential Revision: https://reviews.llvm.org/D49826 llvm-svn: 338425
* [DWARF] Change a test to ensure the creation of a __debug_ranges section.Wolfgang Pieb2018-07-311-0/+3
| | | | | Reviewer: aprantl llvm-svn: 338424
* [CodeView] Add coverage test for r338308 (Fixed crash in type merging)Alexandre Ganea2018-07-311-0/+15
| | | | llvm-svn: 338423
* [analyzer] Reuse some code in simplifySVal().Artem Dergachev2018-07-311-21/+22
| | | | | | | | No functional change intended. Differential Revision: https://reviews.llvm.org/D49826 llvm-svn: 338422
* AMDGPU: Break 64-bit arguments into 32-bit piecesMatt Arsenault2018-07-312-10/+59
| | | | llvm-svn: 338421
* [analyzer] Don't try to simplify mixed Loc/NonLoc expressions.Artem Dergachev2018-07-312-0/+18
| | | | | | | | | | | | | | | | | | This fix is similar to r337769 and addresses a regression caused by r337167. When an operation between a nonloc::LocAsInteger and a non-pointer symbol is performed, the LocAsInteger-specific part of information is lost. When the non-pointer symbol is collapsing into a constant, we cannot easily re-evaluate the result, because we need to recover the missing LocAsInteger-specific information (eg., integer type, or the very fact that this pointer was at some point converted to an integer). Add one more defensive check to prevent crashes on trying to simplify a SymSymExpr with different Loc-ness of operands. Differential Revision: llvm-svn: 338420
* import timespec and timespec_get into namespace std if we're under c++17 or ↵Marshall Clow2018-07-313-3/+41
| | | | | | later AND the underlying C library has them. Fixes PR#38220, but doesn't implement all of P0063 yet. llvm-svn: 338419
* AMDGPU: Split wide vectors of i16/f16 into 32-bit regs on callsMatt Arsenault2018-07-314-15/+95
| | | | | | | This improves code for the same reasons as scalarizing 32-bit element vectors. llvm-svn: 338418
* [CodeView] Minimal support for S_UNAMESPACE recordsAlexandre Ganea2018-07-3110-3/+102
| | | | | | Differential Revision: https://reviews.llvm.org/D50007 llvm-svn: 338417
* AMDGPU: Scalarize vector argument types to callsMatt Arsenault2018-07-314-63/+86
| | | | | | | | | | | | | | | | | When lowering calling conventions, prefer to decompose vectors into the constitute register types. This avoids artifical constraints to satisfy a wide super-register. This improves code quality because now optimizations don't need to deal with the super-register constraint. For example the immediate folding code doesn't deal with 4 component reg_sequences, so by breaking the register down earlier the existing immediate folding code is able to work. This also avoids the need for the shader input processing code to manually split vector types. llvm-svn: 338416
* [llvm-mca][docs] Replace "temporary" with "physical registers". NFC.Matt Davis2018-07-311-4/+4
| | | | llvm-svn: 338415
OpenPOWER on IntegriCloud